PandaRoot
PndMvdMQTaskProcessor.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 /********************************************************************************
14  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
15  * *
16  * This software is distributed under the terms of the *
17  * GNU Lesser General Public Licence version 3 (LGPL) version 3, *
18  * copied verbatim in the file "LICENSE" *
19  ********************************************************************************/
20 
21 #ifndef FAIRMQEXAMPLE9TASKPROCESSOR_H_
22 #define FAIRMQEXAMPLE9TASKPROCESSOR_H_
23 
24 #include <string>
25 
26 #include "FairEventHeader.h"
27 #include "FairGeoParSet.h"
28 #include "FairParGenericSet.h"
29 
30 #include "FairMQDevice.h"
31 #include "FairMQParts.h"
32 
33 #include "TClonesArray.h"
34 #include "TList.h"
35 #include "TMessage.h"
36 
37 template <typename T>
38 class PndMvdMQTaskProcessor : public FairMQDevice {
39  public:
40  enum { Last };
41 
43  virtual ~PndMvdMQTaskProcessor();
44 
45  void SetProperty(const int key, const std::string &value);
46  std::string GetProperty(const int key, const std::string &default_ = "");
47  void SetProperty(const int key, const int value);
48  int GetProperty(const int key, const int default_ = 0);
49 
50  void SetDataToKeep(std::string tStr) { fDataToKeep = tStr; }
51 
52  protected:
53  virtual void Run();
54  virtual void Init();
55 
56  void UpdateParameters();
57  FairParGenericSet *UpdateParameter(FairParGenericSet *thisPar);
58 
59  static void CustomCleanup(void *data, void *hint);
60 
61  FairEventHeader *fEventHeader;
62  TList *fInput;
63  TList *fOutput;
64 
65  int fNewRunId;
67 
68  std::string fDataToKeep;
69 
71  TList *fParCList;
72  FairGeoParSet *fGeoPar;
73 };
74 
75 // Template implementation is in PndMvdMQTaskProcessor.tpl :
76 #include <PndMvdMQTaskProcessor.tpl>
77 
78 #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_="")