FairRoot/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 {
29  public:
30  enum
31  {
32  InputFileName = FairMQDevice::Last,
34  };
35 
37  virtual ~PndMvdMQFileSampler();
38 
39  void AddInputFileName (std::string tempString) { fFileNames .push_back(tempString);}
40  void AddInputChannelBranchName(std::pair<std::string, std::string> tempString) {
41  fBranchNames.push_back(tempString);
42  fPorts.insert(tempString.first);
43  }
44 
45  void SetMaxIndex(int64_t tempInt) {fMaxIndex=tempInt;}
46 
47  protected:
48  virtual void Run();
49  virtual void InitTask();
50 
51  private:
52  FairRunAna* fRunAna;
53  FairFileSource* fSource;
54  std::multimap<std::string, TObject*> fInputObjects; //< multimap of port and object
55  std::map<std::string, TObject*> fInputBranches;
57  std::set<std::string> fPorts;
58  int fNObjects;
59  int64_t fMaxIndex;
60  std::vector<std::pair<std::string, std::string> > fBranchNames;
61  std::vector<std::string> fFileNames;
62 };
63 
64 #endif /* PndMvdMQFileSampler_H_ */
void AddInputFileName(std::string tempString)
std::vector< std::string > fFileNames
std::multimap< std::string, TObject * > fInputObjects
std::vector< std::pair< std::string, std::string > > fBranchNames
void AddInputChannelBranchName(std::pair< std::string, std::string > tempString)
std::map< std::string, TObject * > fInputBranches