00001 /*************************************************************************** 00002 * 00003 * $Id: StHbtEventReader.hh,v 1.13 2003/09/02 17:58:20 perev Exp $ 00004 * 00005 * Author: Mike Lisa, Ohio State, lisa@mps.ohio-state.edu 00006 *************************************************************************** 00007 * 00008 * Description: part of STAR HBT Framework: StHbtMaker package 00009 * base class for a StHbtEventReader 00010 * All HbtEventReaders should inherit from this. 00011 * Objects of these classes are required 00012 * to obtain the data and convert it somehow to the STAR StEvent object 00013 * 00014 * A major change is that on 3sep99, the StHbtReader classes _MUST_ implement 00015 * a Report() method, like the Cuts and CorrFctns. 00016 * Also, a StHbtReader MAY implement a WriteHbtEvent(StHbtEvent*) method. 00017 * 00018 *************************************************************************** 00019 * 00020 * $Log: StHbtEventReader.hh,v $ 00021 * Revision 1.13 2003/09/02 17:58:20 perev 00022 * gcc 3.2 updates + WarnOff 00023 * 00024 * Revision 1.12 2001/09/05 20:41:00 laue 00025 * Updates of the hbtMuDstTree microDSTs 00026 * 00027 * Revision 1.11 2001/06/21 19:06:49 laue 00028 * Some minor structural changes (forward declarations, etc) 00029 * 00030 * Revision 1.10 2001/05/25 23:23:58 lisa 00031 * Added in StHbtKink stuff 00032 * 00033 * Revision 1.9 2001/05/10 21:00:24 laue 00034 * new member 'mDebug' in order to reduce output 00035 * 00036 * Revision 1.8 2000/02/18 21:25:00 laue 00037 * Implementation of a collections of StHbtEventWriters. 00038 * We now can write multiple microDsts at a time. 00039 * 00040 * Revision 1.7 2000/01/07 23:21:17 laue 00041 * 0.) all 'ClassDef(...)' put inside #ifdef __ROOT__ #endif 00042 * 1.) unnecessary includes of 'StMaker.h' deleted 00043 * 00044 * Revision 1.6 1999/09/08 04:15:52 lisa 00045 * persistent microDST implementation tweaked to please fickle solaris details 00046 * 00047 * Revision 1.5 1999/09/05 02:58:11 lisa 00048 * add ASCII microDST reader/writer AND franksParticle cuts 00049 * 00050 * Revision 1.4 1999/09/04 04:41:01 lisa 00051 * StHbtEvent IO --and-- StHbtEventWriter (microDST) method added to framework 00052 * 00053 * Revision 1.3 1999/09/03 22:39:14 lisa 00054 * Readers now MUST have Report() methods and MAY have WriteHbtEvent() methods 00055 * 00056 * Revision 1.2 1999/06/29 17:50:26 fisyak 00057 * formal changes to account new StEvent, does not complie yet 00058 * 00059 * Revision 1.1.1.1 1999/06/29 16:02:56 lisa 00060 * Installation of StHbtMaker 00061 * 00062 **************************************************************************/ 00063 00064 #ifndef StHbtEventReader_hh 00065 #define StHbtEventReader_hh 00066 #include "Stiostream.h" 00067 class StHbtEvent; 00068 class StHbtEventCut; 00069 class StHbtTrackCut; 00070 class StHbtV0Cut; 00071 class StHbtXiCut; 00072 class StHbtKinkCut; 00073 00074 #include "StMaker.h" 00075 #include "StHbtMaker/Infrastructure/StHbtString.hh" 00076 00077 class StHbtEventReader { 00078 00079 protected: 00080 StHbtEventCut* mEventCut; 00081 StHbtTrackCut* mTrackCut; 00082 StHbtV0Cut* mV0Cut; 00083 StHbtXiCut* mXiCut; 00084 StHbtKinkCut* mKinkCut; 00085 int mReaderStatus; // 0="good" 00086 int mDebug; 00087 public: 00088 // even tho it's only a base class and never constructed, if you don't have an implementation, 00089 // you get "StHbtEventReader type_info node" upon dynamical loading 00090 StHbtEventReader() : mEventCut(0), mTrackCut(0), mV0Cut(0), mXiCut(0), mKinkCut(0), mDebug(1) { /* no-op */ } 00091 virtual ~StHbtEventReader(){/* no-op */} 00092 00093 virtual StHbtEvent* ReturnHbtEvent() =0; 00094 00095 virtual StHbtString Report(); // user-written method to return string describing reader 00096 // Including whatever "early" cuts are being done 00097 00098 // this next method does NOT need to be implemented, in which case the 00099 // "default" method below is executed 00100 virtual int WriteHbtEvent(StHbtEvent*){cout << "No WriteHbtEvent implemented\n"; return (0);} 00101 00102 // these next two are optional but would make sense for, e.g., opening and closing a file 00103 virtual int Init(const char* ReadWrite, StHbtString& Message){cout << "do-nothing StHbtEventReader::Init()\n"; return(0);} 00104 virtual void Finish(){/*no-op*/}; 00105 00106 int Status(){return mReaderStatus;} // StHbtManager looks at this for guidance if it gets null pointer from ReturnHbtEvent 00107 00108 virtual void SetEventCut(StHbtEventCut* ecut); 00109 virtual void SetTrackCut(StHbtTrackCut* pcut); 00110 virtual void SetV0Cut(StHbtV0Cut* pcut); 00111 virtual void SetXiCut(StHbtXiCut* pcut); 00112 virtual void SetKinkCut(StHbtKinkCut* pcut); 00113 virtual StHbtEventCut* EventCut(); 00114 virtual StHbtTrackCut* TrackCut(); 00115 virtual StHbtV0Cut* V0Cut(); 00116 virtual StHbtXiCut* XiCut(); 00117 virtual StHbtKinkCut* KinkCut(); 00118 00119 /* control of debug informations print out, my rule is: */ 00120 /* 0: no output at all */ 00121 /* 1: once (e.g. in constructor, finsh */ 00122 /* 2: once per event */ 00123 /* 3: once per track */ 00124 /* 4: once per pair */ 00125 int Debug(){return mDebug;} 00126 void SetDebug(int d){mDebug=d;} 00127 00128 #ifdef __ROOT__ 00129 ClassDef(StHbtEventReader,0) 00130 #endif 00131 }; 00132 00133 00134 #endif 00135
1.5.9