StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StJetReader.h
1 // -*- mode: c++ -*-
2 //StJetReader.h
3 //M.L. Miller
4 //MIT Software
5 //6/04
6 
7 #ifndef STJETREADER_H
8 #define STJETREADER_H
9 
10 class TTree;
11 class TFile;
12 class StJets;
13 class StJetSkimEvent;
14 
15 #include "StMaker.h"
16 
28 class StJetReader : public StMaker
29 {
30 public:
32  StJetReader(const char* name = "JetReader");
33  virtual ~StJetReader();
34 
35  virtual Int_t Init();
36  virtual Int_t Make();
37  virtual Int_t Finish();
38 
40  virtual void InitFile(const char* file);
41 
43  virtual void InitJetSkimFile(const char* file);
44 
47  virtual void InitTree(TTree* tree);
48 
50  int preparedForDualRead();
51 
53  int numberOfBranches() const;
54  const char* branchName(int i) const;
55  StJets* getStJets(int i) const;
56  StJets* getStJets(const char* bname) const;
57 
59  void exampleEventAna();
60 
62  void exampleFastAna();
63 
65  TTree* tree() const {return mTree;}
66 
68  TTree* skimTree() const {return mSkimTree;}
69 
71  StJetSkimEvent* skimEvent() const {return mSkimEvent;}
72 
73 private:
74  TFile* mFile;
75  TTree* mTree;
76  TFile* mSkimFile;
77  TTree* mSkimTree;
78  bool mValid;
79  StJetSkimEvent* mSkimEvent;
80  //temp, MLM
81  ofstream* mOfstream;
82 
83  ClassDef(StJetReader,0);
84 };
85 
86 #endif // STJETREADER_H
virtual Int_t Make()
virtual void InitJetSkimFile(const char *file)
Recover the "fast" tree of StJetSkimEvent.
int preparedForDualRead()
Check if we are all ready to read the Skim and StjJet trees together.
void exampleFastAna()
An example analysis method to read StJetSkimEvent and StJets trees together.
virtual void InitFile(const char *file)
Recover the TTree from file and prepare for reading.
Definition: StJetReader.cxx:61
StJetReader(const char *name="JetReader")
The constructor requires a valid instance of StMuDstMaker.
Definition: StJetReader.cxx:38
void exampleEventAna()
An example analysis method, look here for a demonstration of jet/track histogramming.
TTree * tree() const
Access to the StJets tree.
Definition: StJetReader.h:65
StJetSkimEvent * skimEvent() const
Acces to the StJetSkimEvent.
Definition: StJetReader.h:71
Definition: StJets.h:24
virtual Int_t Finish()
virtual void InitTree(TTree *tree)
int numberOfBranches() const
Access to jet branches.
TTree * skimTree() const
Access to the StJetSkimEvent tree.
Definition: StJetReader.h:68