/******************************************************************************** * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * * * * This software is distributed under the terms of the * * GNU Lesser General Public Licence version 3 (LGPL) version 3, * * copied verbatim in the file "LICENSE" * ********************************************************************************/ /** * FairMQProcessorTask.h * * @since Dec 6, 2012-12-06 * @author: D. Klein, A. Rybalchenko */ #ifndef FAIRMQPROCESSORTASK_H_ #define FAIRMQPROCESSORTASK_H_ #include #include #include "FairTask.h" #include "FairMQMessage.h" #include "FairMQTransportFactory.h" class FairMQProcessorTask : public FairTask { public: FairMQProcessorTask(); virtual ~FairMQProcessorTask(); virtual void Exec(Option_t* opt = "0") = 0; void SetSendPart(boost::function); // provides a callback to the Processor. void SetReceivePart(boost::function); // provides a callback to the Processor. FairMQMessage* GetPayload(); void SetPayload(FairMQMessage* msg); protected: FairMQMessage* fPayload; boost::function SendPart; // function pointer for the Processor callback. boost::function ReceivePart; // function pointer for the Processor callback. }; #endif /* FAIRMQPROCESSORTASK_H_ */