PandaRoot
MvdMQ/src/devices/PndMvdMQFileSampler.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  ********************************************************************************/
15 #ifndef PndMvdMQFileSampler_H_
16 #define PndMvdMQFileSampler_H_
17 
18 #include <string>
19 
20 #include "TClonesArray.h"
21 
22 #include "FairFileSource.h"
23 #include "FairRunAna.h"
24 
25 #include "FairMQDevice.h"
26 
27 class PndMvdMQFileSampler : public FairMQDevice {
28  public:
29  enum { InputFileName = FairMQDevice::Last, Last };
30 
32  virtual ~PndMvdMQFileSampler();
33 
34  void AddInputFileName(std::string tempString) { fFileNames.push_back(tempString); }
35  void AddInputChannelBranchName(std::pair<std::string, std::string> tempString)
36  {
37  fBranchNames.push_back(tempString);
38  fPorts.insert(tempString.first);
39  }
40 
41  void SetMaxIndex(int64_t tempInt) { fMaxIndex = tempInt; }
42 
43  protected:
44  virtual void Run();
45  virtual void InitTask();
46 
47  private:
48  FairRunAna *fRunAna;
49  FairFileSource *fSource;
50  std::multimap<std::string, TObject *> fInputObjects; //< multimap of port and object
51  std::map<std::string, TObject *> fInputBranches;
52  TObject *fEventHeaderPointer;
53  std::set<std::string> fPorts;
54  int fNObjects;
55  int64_t fMaxIndex;
56  std::vector<std::pair<std::string, std::string>> fBranchNames;
57  std::vector<std::string> fFileNames;
58 };
59 
60 #endif /* PndMvdMQFileSampler_H_ */
virtual void Run()
virtual ~PndMvdMQFileSampler()
void AddInputFileName(std::string tempString)
void AddInputChannelBranchName(std::pair< std::string, std::string > tempString)
virtual void InitTask()