FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairMQSamplerTask.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
15 #ifndef FAIRMQSAMPLERTASK_H_
16 #define FAIRMQSAMPLERTASK_H_
17 
18 #include "FairEventHeader.h"
19 #include "FairMQTransportFactory.h"
20 #include "FairTask.h"
21 
22 #include <FairMQMessage.h>
23 #include <TClonesArray.h>
24 #include <memory>
25 #include <string>
26 
28 {
29  public:
31  FairMQSamplerTask(const Text_t* name, int iVerbose = 1);
32  FairMQSamplerTask(const FairMQSamplerTask&) = delete;
34 
35  virtual ~FairMQSamplerTask();
36 
37  virtual InitStatus Init();
38  virtual void Exec(Option_t* opt);
39 
40  void SetEventIndex(Long64_t eventIndex);
41  void SetBranch(const std::string& branch);
42 
43  void GetPayload(std::unique_ptr<FairMQMessage>& msg);
44  void SetTransport(std::shared_ptr<FairMQTransportFactory> factory);
45 
46  protected:
47  std::string fBranch;
48  TClonesArray* fInput;
49  FairMQMessagePtr fPayload;
50  Long64_t fEventIndex;
52  std::shared_ptr<FairMQTransportFactory> fTransportFactory;
53 };
54 
55 #endif /* FAIRMQSAMPLERTASK_H_ */
virtual void Exec(Option_t *opt)
FairEventHeader * fEvtHeader
TClonesArray * fInput
InitStatus
Definition: FairTask.h:33
std::shared_ptr< FairMQTransportFactory > fTransportFactory
FairMQMessagePtr fPayload
void SetEventIndex(Long64_t eventIndex)
FairMQSamplerTask operator=(const FairMQSamplerTask &)=delete
void SetTransport(std::shared_ptr< FairMQTransportFactory > factory)
void GetPayload(std::unique_ptr< FairMQMessage > &msg)
void SetBranch(const std::string &branch)
virtual InitStatus Init()