PandaRoot
PndMvdMQTaskProcessor.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 version 3 (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 
9 #ifndef FAIRMQEXAMPLE9TASKPROCESSOR_H_
10 #define FAIRMQEXAMPLE9TASKPROCESSOR_H_
11 
12 #include <string>
13 
14 #include "FairEventHeader.h"
15 #include "FairGeoParSet.h"
16 #include "FairParGenericSet.h"
17 
18 #include "FairMQDevice.h"
19 #include "FairMQParts.h"
20 
21 #include "TClonesArray.h"
22 #include "TList.h"
23 #include "TMessage.h"
24 
25 template <typename T>
26 class PndMvdMQTaskProcessor : public FairMQDevice {
27  public:
28  enum { Last };
29 
31  virtual ~PndMvdMQTaskProcessor();
32 
33  void SetProperty(const int key, const std::string &value);
34  std::string GetProperty(const int key, const std::string &default_ = "");
35  void SetProperty(const int key, const int value);
36  int GetProperty(const int key, const int default_ = 0);
37 
38  void SetDataToKeep(std::string tStr) { fDataToKeep = tStr; }
39 
40  protected:
41  virtual void Run();
42  virtual void Init();
43 
44  void UpdateParameters();
45  FairParGenericSet *UpdateParameter(FairParGenericSet *thisPar);
46 
47  static void CustomCleanup(void *data, void *hint);
48 
49  FairEventHeader *fEventHeader;
50  TList *fInput;
51  TList *fOutput;
52 
53  int fNewRunId;
55 
56  std::string fDataToKeep;
57 
59  TList *fParCList;
60  FairGeoParSet *fGeoPar;
61 };
62 
63 // Template implementation is in PndMvdMQTaskProcessor.tpl :
64 #include <PndMvdMQTaskProcessor.tpl>
65 
66 #endif /* FAIRMQEXAMPLE9TASKPROCESSOR_H_ */
virtual void Init()
void SetDataToKeep(std::string tStr)
FairEventHeader * fEventHeader
void SetProperty(const int key, const std::string &value)
static void CustomCleanup(void *data, void *hint)
virtual void Run()
FairParGenericSet * UpdateParameter(FairParGenericSet *thisPar)
virtual ~PndMvdMQTaskProcessor()
std::string GetProperty(const int key, const std::string &default_="")