StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StHiBaseAnalysis.h
1 #ifndef StHiBaseAnalysis_H
2 #define StHiBaseAnalysis_H
3 
4 #include "Stiostream.h"
5 #include <utility>
6 #include <cstdlib>
7 
8 #include "StHighptPool/StHiMicroEvent/StHiMicroEvent.h"
9 #include "StHighptPool/Common/Centrality.h"
10 #include "StHighptPool/Common/Name.h"
11 #include "StHighptPool/Common/CutRc.h"
12 #include "StHighptPool/Common/Cut.h"
13 #include "StHighptPool/Common/IO.h"
14 #include "StHighptPool/Common/Bin.h"
15 #include "TObject.h"
16 #include "TString.h"
17 #include "TArrayD.h"
18 #include "TSystem.h"
19 #include "TChain.h"
20 #include "TH1.h"
21 #include "TH2.h"
22 #include "TH3.h"
23 #include "TProfile.h"
24 #include "TProfile2D.h"
25 #include "TFile.h"
26 #include "TStyle.h"
27 #include "TBenchmark.h"
28 #include "TString.h"
29 #include "TF1.h"
30 #include "TF2.h"
31 #include "TRandom.h"
32 #include "TGraphAsymmErrors.h"
33 
34 #include <utility>
35 #include "Stiostream.h"
36 #include <cstdlib>
37 
38 
39 class StHiBaseAnalysis : public TObject{
40  public:
41  StHiBaseAnalysis(const char* inDir, const char* outRootName);
42  virtual ~StHiBaseAnalysis();
43 
44  virtual Int_t Init();
45  virtual void Run();
46  virtual void Finish();
47 
48  void setNEvent(Int_t n) { mNEvent = n; }
49  void setNFile(Int_t n) {mNFile = n; }
50  void setDebug(Int_t a=1) { mDebug = a; }
51 
52  protected:
53 
54  virtual Int_t initMore();
55  virtual void initChain();
56  virtual void initHistograms() = 0; // must override
57  virtual void fillEventHistograms();
58  virtual void finishHistograms();
59 
60  Bool_t trackOk(StHiMicroTrack*);
61  virtual Bool_t acceptEvent(StHiMicroEvent*);
62 
63  virtual void trackLoop();
64 
65  TChain* mHiMicroChain;
66  StHiMicroEvent* mHiMicroEvent;
67  TString mInputDir;
68  TFile* mOutRootFile;
69  TString mOutRootName;
70  TBenchmark* mBenchmark;
71 
72  Int_t mNEvent;
73  Int_t mNFile;
74 
75  Int_t mDebug;
76  Int_t mNEventAccepted;
77  Int_t mNHiPtTrack;
78 
79  ClassDef(StHiBaseAnalysis,1)
80 };
81 
82 #endif