StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFgtRawDaqReader.h
1 /*
2  *
3  * \class StFgtRawMaker
4  * \author S. Gliske (sgliske@anl.gov) based on StFgtComsicReader v1.15 written by A. Vossen (avossen@indiana.edu)
5  *
6  * Reads in a DAQ or SFS file taken on the cosmic test stand or from
7  * the actual DAQ machine, and fills the StEvent FGT containers.
8  * Should replace the StFgtComsicReader.
9  *
10  */
11 
12 #ifndef STAR_StFgtRawDaqReader_HH
13 #define STAR_StFgtRawDaqReader_HH
14 
15 #include "StRoot/St_base/Stypes.h"
16 #include "StMaker.h"
17 class daqReader;
18 class StFgtDbMaker;
19 class StFgtDb;
20 
21 class StFgtCollection;
22 
23 class StFgtRawDaqReader : public StMaker {
24  public:
25  StFgtRawDaqReader( const Char_t* name = "fgtRawDaqReader", const Char_t *daqFileName = "", const Char_t* dbMkrName = "fgtDb" );
26  virtual ~StFgtRawDaqReader();
27 
28  void setFilename( std::string filename );
29 
30  virtual Int_t Init();
31  virtual Int_t Make();
32  virtual void Clear( Option_t *opts = "" );
33  virtual Int_t prepareEnvironment();
34 
35  void cutShortEvents( Bool_t doIt = 1 );
36  void setIsCosmic( Bool_t itIs = 1 );
37 
38  void setAlldata() {mDataType=0;};
39  void setNoneZSdataOnly(){mDataType=1;};
40  void setZSdataOnly() {mDataType=2;};
41  void setZSfirst() {mDataType=3;};
42 
43  void setStartTbin(int v) {mStartTbin=v;}
44  void setNumTbin(int v) {mNumTbin=v;}
45 
46  // Get CVS
47  virtual const char *GetCVS() const;
48 
49  protected:
50  Bool_t mCutShortEvents, mIsCosmic;
51  Int_t mDate, mTime;
52  StFgtCollection *mFgtCollectionPtr;
53 
54  private:
55  std::string mDaqFileName, mDbMkrName;
56  daqReader *mRdr;
57  StFgtDbMaker *mFgtDbMkr;
58  int mDataType;
59  int mStartTbin; // move this tb to 0 [default=0]
60  int mNumTbin; // take only this # of tbin after mStartTbin as long as there is data [default=15]
61 
62  ClassDef(StFgtRawDaqReader,1);
63 };
64 
65 // inline functions
66 
67 inline void StFgtRawDaqReader::setFilename( std::string filename ){ mDaqFileName = filename; };
68 inline void StFgtRawDaqReader::cutShortEvents( Bool_t doIt ){ mCutShortEvents = doIt; };
69 inline void StFgtRawDaqReader::setIsCosmic( Bool_t itIs ){ mIsCosmic = itIs; };
70 inline const char *StFgtRawDaqReader::GetCVS() const {
71  static const char cvs[] = "Tag $Name: $ $Id: StFgtRawDaqReader.h,v 1.7 2014/08/06 11:43:12 jeromel Exp $ built " __DATE__ " " __TIME__ ;
72  return cvs;
73 };
74 
75 #endif
76 
77 /*
78  * $Id: StFgtRawDaqReader.h,v 1.7 2014/08/06 11:43:12 jeromel Exp $
79  * $Log: StFgtRawDaqReader.h,v $
80  * Revision 1.7 2014/08/06 11:43:12 jeromel
81  * Suffix on literals need to be space (later gcc compiler makes it an error) - first wave of fixes
82  *
83  * Revision 1.6 2013/03/10 05:45:29 akio
84  * added option to limit timebins to feed rest of makers
85  *
86  * Revision 1.5 2013/02/21 20:30:26 akio
87  * added ZS data first option
88  *
89  * Revision 1.4 2013/01/31 20:00:32 akio
90  * adding obtaining number of timebins from meta data
91  * adding options for zero suppressed data
92  *
93  * Revision 1.3 2012/01/31 11:23:34 sgliske
94  * No longer requires passing name of StFgtDbMaker
95  *
96  * Revision 1.2 2012/01/31 09:16:55 sgliske
97  * fixed cvs caption
98  *
99  * Revision 1.1 2012/01/31 09:15:34 sgliske
100  * Moved to StFgtPool
101  *
102  * Revision 1.2 2012/01/26 11:38:33 sgliske
103  * added GetCVS()
104  *
105  * Revision 1.1 2012/01/17 20:10:54 sgliske
106  * creation
107  *
108  *
109  */
virtual Int_t Make()
virtual void Clear(Option_t *opts="")
User defined functions.