StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StFcsRawDaqReader.h
1 /*
2  *
3  * \class StFcsRawMaker
4  *
5  */
6 
7 #ifndef STAR_StFcsRawDaqReader_HH
8 #define STAR_StFcsRawDaqReader_HH
9 
10 #include "StRoot/St_base/Stypes.h"
11 #include "StMaker.h"
12 class daqReader;
13 
14 class StEvent;
15 class StFcsCollection;
16 class StTriggerData;
17 class StFcsDb;
18 
19 class StFcsRawDaqReader : public StMaker {
20  public:
21  StFcsRawDaqReader( const Char_t* name = "fcsRawDaqReader", const Char_t *daqFileName = "");
22  virtual ~StFcsRawDaqReader();
23 
24  void setFilename( std::string filename ){mDaqFileName = filename;};
25 
26  virtual Int_t Init();
27  virtual Int_t Make();
28  virtual void Clear( Option_t *opts = "" );
29 
30  void setReadMode(int v) {mReadMode=v;}
31  void setRun(int v) {mRun=v;}
32  void setDebug(int v=1) {mDebug=v;}
33 
34  //reading multiple sfs files from different daq conputers(sectors)
35  //with limit of maxevt per file
36  void setMaxSector(int max, int min=1, int maxevt=100) {mMaxSector=max; mSector=min; mMaxEvtPerSector=maxevt;}
37 
38  //this gives event# in a file (sector)
39  int getEvtInSec() {return mEvtInSector;}
40 
41  virtual Int_t prepareEnvironment();
42  unsigned long long trgMask(){return mTrgMask;}
43  StTriggerData* trgdata(){return mTrg;}
44  int fcsTcuBit() {return mFcsTcuBit;}
45  int fcsDepOut() {return mFcsDepOut;}
46 
47  protected:
48  Int_t mDate, mTime;
49  StEvent *mEvent;
50  StFcsCollection *mFcsCollectionPtr;
51 
52  private:
53  std::string mDaqFileName, mDbMkrName;
54  daqReader *mRdr=0;
55  unsigned int mRun=0;
56  unsigned int mMaxSector=0;
57  unsigned int mSector=0;
58  unsigned int mMaxEvtPerSector=100;
59  unsigned int mEvtInSector=0;
60  StTriggerData* mTrg=0;
61  StFcsDb* mFcsDb=0;
62  unsigned int mReadMode=0;
63  unsigned long long mTrgMask=0;
64  int mDebug=0;
65  int mFcsTcuBit=0;
66  int mFcsDepOut=0;
67 
68  virtual const Char_t *GetCVS() const {static const Char_t cvs[]="Tag " __DATE__ " " __TIME__ ; return cvs;}
69  ClassDef(StFcsRawDaqReader,1)
70 };
71 
72 #endif
73 
74 /*
75  * $Id: StFcsRawDaqReader.h,v 1.4 2021/05/27 13:10:39 akio Exp $
76  * $Log: StFcsRawDaqReader.h,v $
77  * Revision 1.4 2021/05/27 13:10:39 akio
78  * Many updates for trigger bits and around Clear()
79  *
80  * Revision 1.3 2021/03/30 13:30:11 akio
81  * StFcsDbMAker->StFcsDB
82  *
83  * Revision 1.2 2021/01/11 14:39:12 akio
84  * Change logic to skip over none standard events at the begining of files.
85  * Added function to get event# in a sector=file.
86  *
87  * Revision 1.1 2019/03/14 14:45:35 akio
88  * FCS raw daq reader for online monitoring
89  *
90  * Revision 1.1 2019/03/13 20:31:34 akio
91  * FCS daqfile/evp reader for online
92  *
93  *
94  */
virtual void Clear(Option_t *opts="")
User defined functions.
virtual Int_t Make()