StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuIOMaker.h
1 /***************************************************************************
2  *
3  * $Id: StMuIOMaker.h,v 1.11 2014/08/06 11:43:31 jeromel Exp $
4  * Author: Frank Laue, BNL, laue@bnl.gov
5  *
6  * Made it integrated to StIOMaker for applying Grid Collector
7  * Wei-Ming Zhang KSU 3/8/2004
8  ***************************************************************************/
9 #ifndef StMuIOMaker_hh
10 #define StMuIOMaker_hh
11 
12 #include <string>
13 
14 #ifndef ST_NO_NAMESPACES
15 using namespace std;
16 #endif
17 
18 #include "StMuDstMaker.h"
19 
20 class StMuDst;
21 
23 //#include "StMuPmdCollection.h"
24 class StMuEmcUtil;
25 class StMuPmdUtil;
26 class StMuTofUtil;
27 
28 class TFile;
29 class TChain;
30 class TClonesArray;
31 
43 class StMuIOMaker : public StMuDstMaker {
44  public:
46  StMuIOMaker(const char* name="",const char *ioFile="");
47  ~StMuIOMaker();
48 
49  int Init();
50  int Make();
51  int Make(int index);
52  int Make(int major, int minor);
53  int Make(const StUKey &RunEvent);
54  int Skip(int nskip) { return Make(mCurrentIndex+nskip); }
55  int Finish();
56 
57 // virtual methods of inherited StIOInterFace
58  virtual Int_t Open(const Char_t *ioFile=0);
59  virtual void Close(Option_t *opt=0);
60  virtual Int_t MakeRead(const StUKey &RunEvent);
61  virtual Int_t MakeRead(){StUKey uk; return MakeRead(uk);};
62 
63 
64  int currentIndex() { return mCurrentIndex; }
65  int eventCounter() { return mEventCounter; }
66  int numberOfEvents() { return mNumberOfEvents; }
67 
68 
69  virtual const char *GetCVS() const {
70  static const char cvs[]="Tag $Name: $ $Id: StMuIOMaker.h,v 1.11 2014/08/06 11:43:31 jeromel Exp $ built " __DATE__ " " __TIME__ ;
71  return cvs;
72  }
73 
74 protected:
75 
76  TTree* mOutTree;
77 
78  string mOutFileName;
79  TFile* mOutFile;
80 
81  int mNumberOfEvents;
83  bool mMuSave;
84  bool mBadInFile;
85  bool mCloseWrite;
86 
87  int openRead();
88  void openMuWrite();
89  void closeMuWrite();
90 
91 //@
92 
93  ClassDef(StMuIOMaker, 0)
94 };
95 
96 #endif
97 
98 /***************************************************************************
99  *
100  * $Log: StMuIOMaker.h,v $
101  * Revision 1.11 2014/08/06 11:43:31 jeromel
102  * Suffix on literals need to be space (later gcc compiler makes it an error) - first wave of fixes
103  *
104  * Revision 1.10 2004/07/02 01:51:09 perev
105  * Wei-Ming Zhang developments
106  *
107  * Revision 1.9 2004/04/20 18:49:10 perev
108  * Big reorganization, now StMuIOMkaer inherits from StMuDstMaker
109  *
110  * Revision 1.7 2004/04/09 22:02:50 subhasis
111  * after tof createevent fix by Xin
112  *
113  * Revision 1.6 2004/04/09 03:36:15 jeromel
114  * Removed TOF support entirely for now as we need a working version ... Will
115  * revisit later.
116  *
117  * Revision 1.5 2004/04/02 03:24:54 jeromel
118  * Changes implements PMD and TOF. TOF is clearly incomplete.
119  *
120  * Revision 1.4 2003/09/12 21:31:50 jeromel
121  * No changes (ident)
122  *
123  * Revision 1.3 2003/09/11 05:49:20 perev
124  * ansi corrs
125  *
126  * Revision 1.2 2003/09/09 18:16:53 laue
127  * StMuIOMaker: embedded documentation added
128  * StMuTimer: name of define changed (was same as StTimer)
129  *
130  **************************************************************************/
virtual const char * GetCVS() const
Definition: StMuIOMaker.h:69
int mCurrentIndex
holds the # of events in the current chain (file)
Definition: StMuIOMaker.h:82
bool mMuSave
holds the index of the last event read
Definition: StMuIOMaker.h:83
Definition: StFileI.h:13