StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEmcMicroDstMaker.h
1 
25 #ifndef StEmcMicroDstMaker_h
26 #define StEmcMicroDstMaker_h
27 #include "StMaker.h"
28 #include "TH1.h"
29 #include "TFile.h"
30 #include "TTree.h"
31 #include "TChain.h"
32 
33 class StEvent;
34 class StEmcMicroEvent;
35 class StEmcFilter;
36 class StEmcMicroUtil;
37 
38 class StEmcMicroDstMaker : public StMaker
39 {
40  protected:
41 
42  TH1F* mAcc;
43 
44  StEvent *mStEvent;
45  StEmcMicroEvent *mMicroEvent;
46 
47  TFile *mMicroDstFile;
48  TTree *mEmcTree;
49  TString mEventFile;
50  TString mEventFileOld;
51  TString mEventDir;
52 
53  Int_t mFileCounter;
54  Int_t mAccEv;
55 
56  StEmcFilter *mPFilter;
57  StEmcFilter *mGFilter;
58 
59  StEmcMicroUtil *mMicroUtil;
60  StEmcMicroDstMaker *mOldMaker;
61 
62  TChain *mMicroEventChain;
63  Int_t mNMicroEvents;
64  Int_t mCurMicroEvent;
65  Int_t mStart;
66 
67  Bool_t mDoRead;
68  Bool_t mDoCreateStEvent;
69 
70  Bool_t mDoSavePrimaries;
71  Bool_t mDoSaveGlobals;
72  Bool_t mDoSaveEmc;
73  Bool_t mDoSaveFpd;
74  Bool_t mDoSaveV0;
75 
76  Int_t initMicroEventFile();
77 
78  private:
79 
80  public:
81 
82  StEmcMicroDstMaker(const Char_t *name="EmcMicroDst");
83  virtual ~StEmcMicroDstMaker();
84  Int_t Init();
85  Int_t Make();
86  Int_t Finish();
87 
88  const char* getOutputDir() { return mEventDir.Data(); }
89  const char* getCurrentFile() { return mEventFile.Data(); }
90 
91  StEmcFilter* getPrimaryFilter() { return mPFilter; }
92  StEmcFilter* getGlobalFilter() { return mGFilter; }
93  StEmcMicroEvent* getMicroEvent() { return mMicroEvent; }
94  Int_t getNEvents() { return mNMicroEvents; }
95  StEvent* getStEvent() { return mStEvent; }
96 
97  void setOutputDir(char *dir) { mEventDir = dir; }
98  void setCreateStEvent(Bool_t b) { mDoCreateStEvent = b; }
99  void setSavePrimaries(Bool_t a) { mDoSavePrimaries = a; }
100  void setSaveGlobals(Bool_t a) { mDoSaveGlobals = a; }
101  void setSaveEmc(Bool_t a) { mDoSaveEmc = a; }
102  void setSaveFpd(Bool_t a) { mDoSaveFpd = a; }
103  void setSaveV0(Bool_t a) { mDoSaveV0 = a; }
104  void setStart(Int_t a) { mStart = a; }
105  void setOldMaker(StEmcMicroDstMaker* a) { mOldMaker = a; }
106 
107  void addMicroEventFile(char*);
108 
109 
110  ClassDef(StEmcMicroDstMaker,1)
111 };
112 
113 #endif
void setSaveEmc(Bool_t a)
Save or don't EMC data. Default is kTRUE.
StEmcFilter * getGlobalFilter()
Return Global tracks filter.
void setOutputDir(char *dir)
Set output directory for micro DST's.
StEvent * getStEvent()
Return current StEvent.
void setSaveGlobals(Bool_t a)
Save or don't global tracks. Default is kTRUE. Track selection is done by GlobalFilter.
void setSavePrimaries(Bool_t a)
Save or don't primary tracks. Default is kTRUE. Track selection is done by PrimaryFilter.
StEmcMicroDstMaker(const Char_t *name="EmcMicroDst")
StEmcMicroEvent * getMicroEvent()
Return current StEmcMicroEvent.
const char * getCurrentFile()
Return currect .event.root file.
void setSaveV0(Bool_t a)
Save or don't V0. Default is kTRUE.
StEmcFilter * getPrimaryFilter()
Return Event and primary tracks filter.
void setOldMaker(StEmcMicroDstMaker *a)
Set Old Maker.
void setStart(Int_t a)
Set first event to be read.
Int_t getNEvents()
Return number of events in micro DST branch.
void setCreateStEvent(Bool_t b)
Enable/disable creation of StEvent object if a microDST file is being processed.
const char * getOutputDir()
Return output directory where micro DST's are being saved.
void addMicroEventFile(char *)
Add EMC micro DST file to read.
void setSaveFpd(Bool_t a)
Save or don't FPD data. Default is kTRUE.