StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StJetSimuReader.h
1 //StJetSimuReader.h
2 //M.L. Miller
3 //MIT Software
4 //6/04
5 
6 #ifndef STJETSIMUREADER_H
7 #define STJETSIMUREADER_H
8 
9 #include "StMaker.h"
10 #include "StJetMaker/StJetMaker.h"
11 
12 class TTree;
13 class TFile;
14 class StMuDstMaker;
15 class StJetSkimEvent;
16 
17 class StJetSimuReader : public StMaker{
18 
19 
20  public:
21 
23  typedef map<string, StJets*, less<string> > JetBranchesMap;
24 
26  StJetSimuReader(const char* name, StMuDstMaker* uDstMaker);
27  virtual ~StJetSimuReader();
28 
29  virtual Int_t Init();
30  virtual Int_t Make();
31  virtual Int_t Finish();
32 
34  virtual void InitFile(const char* file);
35 
37  virtual void InitJetSkimFile(const char* file);
38 
41  virtual void InitTree(TTree* tree);
42 
44  int preparedForDualRead();
45 
48 
50  void exampleSimuAna();
51 
53  TTree* tree() {return mTree;}
54 
56  TTree* skimTree() {return mSkimTree;}
57 
59  StJetSkimEvent* skimEvent() {return mSkimEvent;}
60 
61  private:
62  JetBranchesMap mStJetsMap;
63  TFile *mFile;
64  TTree *mTree;
65  TFile* mSkimFile;
66  TTree* mSkimTree;
67  StMuDstMaker *mDstMaker;
68  int mCounter;
69  bool mValid;
70  StJetSkimEvent* mSkimEvent;
71  ofstream* mOfstream;
72 
73 
74  ClassDef(StJetSimuReader,1)
75  };
76 
77  //inlines ---
78 
80  return mStJetsMap;
81  }
82 
83 #endif // STJETSIMUREADER_H
TTree * skimTree()
Access to the StJetSkimEvent tree.
StJetSimuReader(const char *name, StMuDstMaker *uDstMaker)
The constructor requires a valid instance of StMuDstMaker.
void exampleSimuAna()
An example analysis method, look here for a demonstration of jet + event info.
StJetSkimEvent * skimEvent()
Acces to the StJetSkimEvent.
map< string, StJets *, less< string > > JetBranchesMap
A useful typedef for the StJets map.
virtual Int_t Make()
virtual void InitTree(TTree *tree)
virtual void InitJetSkimFile(const char *file)
Recover the &quot;fast&quot; tree of StJetSkimEvent.
TTree * tree()
Access to the StJets tree.
virtual void InitFile(const char *file)
Recover the TTree from file and prepare for reading.
virtual Int_t Finish()
JetBranchesMap & jetsMap()
Access to the StJetsMap.
int preparedForDualRead()
Check if we are all ready to read the Skim and Jet trees together.