6 #ifndef StHbtMuDstReader_hh
7 #define StHbtMuDstReader_hh
13 #include "St_DataSetIter.h"
14 #include "StMuDSTMaker/COMMON/StMuArrays.h"
16 #include "Base/StHbtEventReader.hh"
59 StHbtMuDstReader(
int mode,
int nameMode,
const char* dirName=
"./",
const char* fileName=
"test.event.root",
const char* filter=
".",
int maxfiles=10 );
64 int Init(
const char* ReadWrite, StHbtString& Message)
65 {
return StHbtEventReader::Init(ReadWrite,Message);}
73 unsigned int trackType();
80 void setTrackFilter(
StMuCut* c);
81 void setL3TrackFilter(
StMuCut* c);
82 void setProbabilityPidFile(
const char* file);
85 void setTrackType(
unsigned int);
86 void setReadTracks(
bool);
87 void setReadV0s(
bool);
88 void setReadXis(
bool);
89 void setReadKinks(
bool);
91 enum ioMode {ioRead, ioWrite};
92 enum ioNameMode {ioFix, ioAuto};
102 ioNameMode mIoNameMode;
108 unsigned int mTrackType;
119 string mCurrentFileName;
135 string buildFileName(
string dir,
string fileName,
string extention);
136 void openWrite(
string fileName);
140 void makeChain(
const char* dir,
const char* filter,
int maxFiles=10);
145 void clear(TClonesArray* t,
int& counter);
147 TClonesArray* clonesArray(TClonesArray* p,
const char* type,
int size,
int& counter);
155 void fillDetectorStates(
StEvent* ev);
156 void fillL3AlgorithmInfo(
StEvent* ev);
157 template <
class T>
void addType(TClonesArray* tcaFrom, TClonesArray* tcaTo , T t);
158 template <
class T>
int addType(TClonesArray* tcaTo , T t);
159 template <
class T,
class U>
int addType(TClonesArray* tcaTo , U u, T t);
160 void addTrackNode(
const StEvent* ev,
const StTrackNode* node,
StMuCut* cut, TClonesArray* gTCA=0, TClonesArray* pTCA=0, TClonesArray* oTCA=0,
bool l3=
false);
169 string basename(
string);
173 TClonesArray*
arrays[__NARRAYS__];
174 TClonesArray* mArrays[__NARRAYS__];
177 TClonesArray* mStrangeArrays[__NSTRANGEARRAYS__];
182 inline StMuDst* StHbtMuDstReader::muDst() {
return mStMuDst;}
183 inline TChain* StHbtMuDstReader::chain() {
return mChain; }
184 inline TTree* StHbtMuDstReader::tree() {
return mTTree; }
185 inline void StHbtMuDstReader::setTrackFilter(
StMuCut* c) { mTrackFilter=c;}
186 inline void StHbtMuDstReader::setL3TrackFilter(
StMuCut* c) { mL3TrackFilter=c;}
187 inline void StHbtMuDstReader::setStStrangeMuDstMaker(
StStrangeMuDstMaker* s) {mStStrangeMuDstMaker=s;}
188 inline StStrangeMuDstMaker* StHbtMuDstReader::stStrangeMuDstMaker() {
return mStStrangeMuDstMaker;}
189 inline void StHbtMuDstReader::setTrackType(
unsigned int t) {mTrackType=t;}
190 inline unsigned int StHbtMuDstReader::trackType() {
return mTrackType;}
192 inline bool StHbtMuDstReader::readTracks() {
return mReadTracks;}
193 inline bool StHbtMuDstReader::readV0s() {
return mReadV0s;}
194 inline bool StHbtMuDstReader::readXis() {
return mReadXis;}
195 inline bool StHbtMuDstReader::readKinks() {
return mReadKinks;}
196 inline void StHbtMuDstReader::setReadTracks(
bool b) { mReadTracks=b;}
197 inline void StHbtMuDstReader::setReadV0s(
bool b) { mReadV0s=b;}
198 inline void StHbtMuDstReader::setReadXis(
bool b) { mReadXis=b;}
199 inline void StHbtMuDstReader::setReadKinks(
bool b) { mReadKinks=b;}
static TClonesArray ** strangeArrays
array of TClonesArrays for the stuff inherited from the StStrangeMuDst
StHbtMuDstReader(int mode, int nameMode, const char *dirName="./", const char *fileName="test.event.root", const char *filter=".", int maxfiles=10)
static TClonesArray ** arrays
array of TClonesArrays