StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTofHitMaker.h
1 #ifndef STAR_StTofHitMaker_H
2 #define STAR_StTofHitMaker_H
3 
4 /***************************************************************************
5  *
6  * $Id: StTofHitMaker.h,v 1.6 2014/08/06 11:43:47 jeromel Exp $
7  * StTofHitMaker - class to fille the StEvewnt from DAQ reader
8  *--------------------------------------------------------------------------
9  *
10  ***************************************************************************/
11 #include "StRTSBaseMaker.h"
12 
13 #include <vector>
14 #ifndef ST_NO_NAMESPACES
15 using std::vector;
16 #endif
17 
18 #ifndef NEW_DAQ_READER
19  class evpReader;
20 #else
21  struct tof_t;
22 #endif /* ! NEW_DAQ_READER */
23 
24 class StEvent;
25 class StTofCollection;
26 class StTofData;
27 class StTofRawData;
28 class StTofCollection;
31 
33 {
34  public:
35 
37  struct TofRawHit {
38  unsigned short fiberid;
39  unsigned short trayID;
40  unsigned short globaltdcchan;
41  unsigned int tdc;
42  unsigned int timestamp;
43  unsigned int triggertimestamp;
44  };
45 
46  private:
47  StEvent *mStEvent;
48 #ifndef __CINT__
49 #ifndef NEW_DAQ_READER
50  evpReader *fDaqReader;
51 #else /* NEW_DAQ_READER */
52  tof_t *fTof;
53 #endif /* NEW_DAQ_READER */
54 #endif
55  Int_t UnpackTofRawData();
56  void fillTofDataCollection();
57  void fillStEvent();
58  vector<TofRawHit> TofLeadingHits;
59  vector<TofRawHit> TofTrailingHits;
60 
61  StTofCollection* tofCollection;
62  StTofDataCollection* mDataCollection;
63  StTofRawDataCollection* mRawDataCollection;
64  Bool_t mInitialized;
65 
66  protected:
68 
70 #ifndef NEW_DAQ_READER
72 #endif /* ! NEW_DAQ_READER */
73 
74  public:
75 
76  StTofHitMaker(const char *name="tof_raw");
77 
78  ~StTofHitMaker() ;
79 
80  Int_t Make();
81  Int_t InitRun(Int_t);
82  Int_t FinishRun(Int_t);
83 
85  virtual const char *GetCVS() const
86  {
87  static const char cvs[]="Tag $Name: $Id: built " __DATE__ " " __TIME__ ; return cvs;
88  }
89 
90  ClassDef(StTofHitMaker, 1)
91 };
92 
93 #endif
StRtsTable * GetNextRaw()
This is an overloaded member function, provided for convenience.
TOF Raw hits info. struct.
Definition: StTofHitMaker.h:37
Class StRTSBaseMaker - is an abstract StMaker to define the interface to access the DAQ data from the...
Definition: daq_tof.h:7
unsigned int tdc
0,1,......,191
Definition: StTofHitMaker.h:41
StTofCollection * GetTofCollection()
unsigned int triggertimestamp
data word before unpack
Definition: StTofHitMaker.h:43
unsigned short trayID
0 1 2,3
Definition: StTofHitMaker.h:39
virtual const char * GetCVS() const
cvs
Definition: StTofHitMaker.h:85
evpReader * InitReader()
unsigned short globaltdcchan
1,2,......,120,for tray, 121, 122 for upvpd
Definition: StTofHitMaker.h:40
unsigned int timestamp
tdc time (in bin) per hit.
Definition: StTofHitMaker.h:42