KaliVeda
Toolkit for HIC analysis
KVSimDirAnalyser.h
1 
4 #ifndef __KVSIMDIRANALYSER_H
5 #define __KVSIMDIRANALYSER_H
6 
7 #include "KVDataAnalyser.h"
8 #include "TChain.h"
9 #include "KVUnownedList.h"
10 #include <KVSimDir.h>
11 
20 
21  KVUnownedList fListOfSimFiles;
22  KVUnownedList fListOfAuxFiles;
23  TChain* fAnalysisChain;
24  KVSimDir* fSimDir;
25  Bool_t fCopyFilesToWorkDir;
26 
27  TString fModel;
28  TString fFilterSystem;
29  TString fFilterDataSet;
30 
31  Bool_t is_filter_job = false;
32 
33 protected:
34  void BuildChain();
35  Bool_t NeedToChooseWhatToAnalyse() const override
36  {
37  return fListOfSimFiles.IsEmpty();
38  }
39  void GetInfosForJobNameFromFiles();
40 
41 public:
44  {
46  SafeDelete(fSimDir);
47  }
48 
49  void SetFileList(const KVUnownedList& l) override
50  {
51  fListOfSimFiles = l;
52  GetInfosForJobNameFromFiles();
53  }
54  void SetAuxFileList(const KVUnownedList& l) override
55  {
56  fListOfAuxFiles = l;
57  }
58  auto& GetFileList() const
59  {
60  return fListOfSimFiles;
61  }
63  {
64  return fListOfSimFiles.GetEntries();
65  }
66 
67  void SubmitTask() override;
69 
70  void WriteBatchEnvFile(const TString&, Bool_t sav = kTRUE) override;
71  Bool_t ReadBatchEnvFile(const TString&) override;
72 
73  static void Make(const Char_t* kvsname = "MySimulatedAnalysis");
74 
75  TString ExpandAutoBatchName(const Char_t* format) const override;
77  {
78  fFilterDataSet = f;
79  is_filter_job = true;
80  }
81  void SetSystemForFilter(const TString& f)
82  {
83  fFilterSystem = f;
84  is_filter_job = true;
85  }
86  TTree* GetAnalysedTree() const override
87  {
88  return fAnalysisChain;
89  }
91  {
95  return "SimDirAnalyser";
96  }
97 
98  ClassDefOverride(KVSimDirAnalyser, 1) //Analysis of trees containing simulated events
99 };
100 
101 #endif
int Int_t
#define SafeDelete(p)
#define f(i)
bool Bool_t
char Char_t
#define ClassDefOverride(name, id)
Manager class which sets up and runs data analysis tasks.
Class piloting analyses of simulated data.
void SetFileList(const KVUnownedList &l) override
void SetDataSetForFilter(const TString &f)
void SetAuxFileList(const KVUnownedList &l) override
TString GetAnalyserClassNameForBatchJob() override
TTree * GetAnalysedTree() const override
Int_t GetNumberOfFilesToAnalyse() const override
TString ExpandAutoBatchName(const Char_t *format) const override
Replace any special symbols in auto-format jobname with current values.
auto & GetFileList() const
Bool_t ReadBatchEnvFile(const TString &) override
KVString GetRootDirectoryOfDataToAnalyse() const override
Returns path to data to be analysed.
void SetSystemForFilter(const TString &f)
KVSimDirAnalyser()
Default constructor.
void SubmitTask() override
Set up and run the analysis.
static void Make(const Char_t *kvsname="MySimulatedAnalysis")
Generate a new simulated analysis selector class.
void WriteBatchEnvFile(const TString &, Bool_t sav=kTRUE) override
Handle directory containing simulated and/or filtered simulated data ,.
Definition: KVSimDir.h:46
Extension of ROOT TString class which allows backwards compatibility with ROOT v3....
Definition: KVString.h:73
Extended TList class which does not own its objects by default.
Definition: KVUnownedList.h:20
virtual Int_t GetEntries() const
virtual Bool_t IsEmpty() const
TLine l