StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StHbtTTreeReader.h
1 /***************************************************************************
2  *
3  * $Id: StHbtTTreeReader.h,v 1.3 2001/12/05 14:42:17 laue Exp $
4  *
5  * Author: Frank Laue, BNL, laue@bnl.gov
6  ***************************************************************************/
7 
8 #ifndef StHbtTTreeReader_hh
9 #define StHbtTTreeReader_hh
10 
11 #include "StHbtMaker/Base/StHbtEventReader.hh"
12 #include "StHbtMaker/Infrastructure/StHbtEnumeration.hh"
13 
14 #include "StMaker.h"
15 #include "StChain.h"
16 #include "St_DataSetIter.h"
17 
18 #include "StEvent/StEnumerations.h"
20 
21 
22 #include <string>
23 
24 class StHbtEvent;
25 class StHbtTTreeEvent;
26 class StIOMaker;
27 class TFile;
28 class TTree;
29 class TChain;
30 
32 
33 private:
34  StIOMaker* mIOMaker;
35 
36  StTrackType mTrackType;
37 
38  StHbtIOMode mIOMode;
39  string mCurrentFileName;
40  string mDir;
41  string mFile;
42  string mExtention;
43  string mFilter;
44 
45  int mMaxFiles;
46 
47  int mDebug;
48  TChain* mTChain;
49  TFile* mCurrentFile;
50  TTree* mTTree;
51  int split; // by default split Event into sub branches
52  int comp; // by default file is compressed
53  int bufsize; // buffersize
54  string mInputDir;
55  StHbtTTreeEvent* mHbtTTreeEvent;
56  StHbtEvent* mHbtEvent;
57  unsigned int mEventIndex;
58 
59  StHbtEvent* read();
60  int initRead(string dir, string file, string filter, string extention, int mMaxFiles);
61  int uninitRead();
62  StHbtEvent* write(StHbtEvent*);
63  int initWrite(string, string);
64  int uninitWrite();
65  int fillChain(TChain* chain, const char* dir, const char* filter, const char* extention, const int maxFiles);
66  int fillChain(TChain* chain, const char* list, const int maxFiles);
67 
68  protected:
69 
70  public:
71  StHbtTTreeReader(StHbtIOMode mode, StIOMaker* io,
72  const char* dirName, const char* fileName, const char* extention=".hbtTTreeMuDst",
73  const char* filter=".", int maxFiles=99999);
74 
76 
77  StHbtEvent* ReturnHbtEvent();
78  int WriteHbtEvent(StHbtEvent*);
79  StHbtString Report();
80 
81  StTrackType TrackType();
82  void SetTrackType(StTrackType);
83  void SetDebug(int);
84 
85 
86  ClassDef(StHbtTTreeReader, 1)
87 };
88 
89 inline StTrackType StHbtTTreeReader::TrackType() { return mTrackType;}
90 inline void StHbtTTreeReader::SetTrackType(StTrackType t) { mTrackType=t;}
91 inline void StHbtTTreeReader::SetDebug(int debug) {mDebug=debug;}
92 
93 #endif
94 
95 /***************************************************************************
96  *
97  * $Log: StHbtTTreeReader.h,v $
98  * Revision 1.3 2001/12/05 14:42:17 laue
99  * updated for trigger(action)word and l3TriggerAlgorithm
100  *
101  * Revision 1.1 2001/06/21 19:18:42 laue
102  * Modified Files: (to match the changed base classes)
103  * StHbtAsciiReader.cxx StHbtAsciiReader.h
104  * StHbtAssociationReader.cxx StHbtAssociationReader.h
105  * StHbtBinaryReader.cxx StHbtBinaryReader.h
106  * StHbtGstarTxtReader.cxx StHbtGstarTxtReader.h
107  * StHbtStrangeMuDstEventReader.cxx
108  * StHbtStrangeMuDstEventReader.h StStandardHbtEventReader.cxx
109  * Added Files: new reader
110  * StHbtTTreeReader.cxx StHbtTTreeReader.h
111  *
112  **************************************************************************/