simple-tof-analysis
 All Classes Namespaces Functions Variables Groups Pages
TSDataSetMgr.h
1 /*
2  * TSDataSetMgr.h
3  *
4  * Created on: Jun 7, 2014
5  * Author: Silvestro di Luise
6  * Silvestro.Di.Luise@cern.ch
7  *
8  *
9  * TSDataBin
10  * TSPhaseSpaceMap/Fld
11  *
12  *
13  *
14  *
15  */
16 
17 #ifndef TSDATASETMGR_H_
18 #define TSDATASETMGR_H_
19 
20 
21 #include <string>
22 #include <map>
23 
24 #include <TString.h>
25 #include <TFile.h>
26 #include <TTree.h>
27 
28 
29 #include "TSVariable.h"
30 
31 #include "TSHistogramFld.h"
32 #include "TSPhaseSpaceMap.h"
33 #include "TSPhaseSpaceFld.h"
34 #include "TSDataBin.h"
35 
36 
37 #include "TSArgList.h"
38 
39 
40 
41 class TSDataSetMgr: public TSNamed {
42 
43 
44 public:
45 
46  TSDataSetMgr(TString name, TString tag, TString title);
47  virtual ~TSDataSetMgr();
48 
49  int Fill();
50  int Fill(const TSVariable &);
51  int Fill(const TSArgList &);
52  int FillHistosFromFile(TFile *, TString opt="");
53  TSDataBin* GetDataBin(int) const;
54  TSPhaseSpaceFld* GetPhaseSpaceFld() const {return fPhaseSpaceFld;}
55  TSPhaseSpaceMap* GetPhaseSpaceMap() const {return fPhaseSpaceMap;}
56  int GetNumOfDataBins() const {return fNumOfDataBins;}
57  int GetNumOfVars() const {return fNumOfVars;}
58  TString GetTag() const {return fTag;}
59  bool HasPhaseSpace() const {return fHasPhaseSpace;}
60  bool HasTag() const {return fHasTag;}
61  void Init();
62 
63  void Print(TString opt="") const;
64  void PrintVariables(TString opt="") const;
65 
66  bool SetDataBin(TSDataBin&);
68  void SetTag(TString);
69 
70  void SetBinning(const TSVariable& var_binned, const TSVariable& var_space, int N, TGraph& glow,TGraph& gup);
71 
72 
73 private:
74 
75  bool fBuildDataBins();
76  bool fSetVariable(const TSVariable &, int opt);
77  bool fVarIsPhaseSpace(int) const;
78  bool fVarIsData(int) const;
79 
80 
81  TString fTag;
82 
83  int fNumOfDataBins;
84  int fNumOfVars;
85 
86  bool fHasDataBin;
87  bool fHasPhaseSpace;
88  bool fHasTag;
89 
90  TSPhaseSpaceMap *fPhaseSpaceMap;
91  TSPhaseSpaceFld *fPhaseSpaceFld;
92 
93  std::map<int,const TSVariable *> fVarList;
94 
95  std::map<int,TSDataBin*> fDataBinList;
96 
97  struct fVarSettings{
98  bool IsPhaseSpace;
99  bool IsData;
100  bool IsGlobalData;
101 
102  fVarSettings():IsPhaseSpace(0),IsData(0),IsGlobalData(0)
103  {}
104  };
105 
106  std::map<int,fVarSettings*> fVarSetsList;
107 
108 
109 
110 };
111 
112 
113 
114 
115 #endif /* TSDATASETMGR_H_ */
Definition: TSArgList.h:30
Definition: TSDataBin.h:35
Definition: TSDataSetMgr.h:41
Definition: TSPhaseSpaceMap.h:35
bool SetDataBin(TSDataBin &)
Definition: TSDataSetMgr.cc:226
Definition: TSVariable.h:55
bool SetPhaseSpace(TSPhaseSpaceMap &)
Definition: TSDataSetMgr.cc:302
Definition: TSNamed.h:38
void SetBinning(const TSVariable &var_binned, const TSVariable &var_space, int N, TGraph &glow, TGraph &gup)
Definition: TSDataSetMgr.cc:66
Definition: TSPhaseSpaceFld.h:26