PandaRoot
MvdOfflineTBAnalysis_Topix4/MQ/PndMvdMQFileSampler.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  ********************************************************************************/
27 #ifndef PndMvdMQFileSampler_H_
28 #define PndMvdMQFileSampler_H_
29 
30 #include <string>
31 
32 #include "TClonesArray.h"
33 
34 #include "FairFileSource.h"
35 #include "FairRunAna.h"
36 
37 #include "FairMQDevice.h"
38 
39 class PndMvdMQFileSampler : public FairMQDevice {
40  public:
41  enum { InputFileName = FairMQDevice::Last, Last };
42 
44  virtual ~PndMvdMQFileSampler();
45 
46  void AddInputFileName(std::string tempString) { fFileNames.push_back(tempString); }
47  void AddInputBranchName(std::string tempString) { fBranchNames.push_back(tempString); }
48 
49  void SetMaxIndex(int64_t tempInt) { fMaxIndex = tempInt; }
50 
51  protected:
52  virtual void Run();
53  virtual void InitTask();
54 
55  private:
56  FairRunAna *fRunAna;
57  FairFileSource *fSource;
58  TObject *fInputObjects[100];
59  int fNObjects;
60  int64_t fMaxIndex;
61  std::vector<std::string> fBranchNames;
62  std::vector<std::string> fFileNames;
63 };
64 
65 #endif /* PndMvdMQFileSampler_H_ */
virtual void Run()
virtual ~PndMvdMQFileSampler()
virtual void InitTask()