FairRoot/PandaRoot
MvdOfflineTBAnalysis_Topix4/MQ/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,
33  Last
34  };
35 
37  virtual ~PndMvdMQFileSampler();
38 
39  void AddInputFileName (std::string tempString) { fFileNames .push_back(tempString); }
40  void AddInputBranchName(std::string tempString) { fBranchNames.push_back(tempString); }
41 
42  void SetMaxIndex(int64_t tempInt) {fMaxIndex=tempInt;}
43 
44  protected:
45  virtual void Run();
46  virtual void InitTask();
47 
48  private:
49  FairRunAna* fRunAna;
50  FairFileSource* fSource;
51  TObject* fInputObjects[100];
52  int fNObjects;
53  int64_t fMaxIndex;
54  std::vector<std::string> fBranchNames;
55  std::vector<std::string> fFileNames;
56 };
57 
58 #endif /* PndMvdMQFileSampler_H_ */
std::vector< std::string > fFileNames
std::multimap< std::string, TObject * > fInputObjects
std::vector< std::pair< std::string, std::string > > fBranchNames