StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StMuETofHeader.h
1 /***************************************************************************
2  *
3  * $Id: StMuETofHeader.h,v 1.2 2021/05/11 19:40:43 jdb Exp $
4  *
5  * Author: Florian Seck, November 2018
6  ***************************************************************************
7  *
8  * Description: This class stores ETofHeader information from the DAQ stream,
9  * e.g. trigger time and STAR time (reset time stamp of the bTOF clock)
10  * and other event-wise information in MuDsts
11  *
12  ***************************************************************************
13  *
14  * $Log: StMuETofHeader.h,v $
15  * Revision 1.2 2021/05/11 19:40:43 jdb
16  * StETofHeader update from philipp W. modified classes to include the front-end missmatch pattern
17  *
18  * Revision 1.1 2019/02/21 13:32:54 jdb
19  * Inclusion of ETOF MuDst code. This code adds support for the full set of ETOF data which includes EtofDigi, EtofHit, EtofHeader. The code essentially copies similar structures from StEvent and additionally rebuilds the maps between Digis and Hits. Accessor methods are added based on the pattern from BTOF to provide access to data at various levels. The code for accessing the PID traits provided by ETOF is also provided
20  *
21  *
22  ***************************************************************************/
23 #ifndef STMUETOFHEADER_H
24 #define STMUETOFHEADER_H
25 
26 #include <map>
27 #include <vector>
28 
29 #include "TObject.h"
30 
31 class StETofHeader;
32 
33 
34 class StMuETofHeader : public TObject {
35 public:
36 
41  StMuETofHeader( const StETofHeader* header );
45  StMuETofHeader( const double&, const double&, const std::map< unsigned int, uint64_t >&, const std::map< unsigned int, uint64_t >& ,
46  const unsigned int&, const unsigned int&, const unsigned int&, const uint64_t& );
50  StMuETofHeader( const double&, const double&, const std::map< unsigned int, uint64_t >&, const std::map< unsigned int, uint64_t >& ,
51  const unsigned int&, const unsigned int&, const unsigned int&, const uint64_t&, const std::vector< Bool_t >& );
55  StMuETofHeader( const double&, const double&, const std::map< unsigned int, uint64_t >&, const std::map< unsigned int, uint64_t >& ,
56  const unsigned int&, const unsigned int&, const unsigned int&, const uint64_t&, const std::vector<bool>&,
57  const std::vector<bool>& );
58 
59  ~StMuETofHeader();
60 
61  virtual void Clear( Option_t *opt = "" ){
62  // ensure allocations are destroyed
63  mRocGdpbTs.clear();
64  mRocStarTs.clear();
65  mMissMatchFlagVec.clear();
66  mGoodEventFlagVec.clear();
67  mMissMatchFlagVec.shrink_to_fit();
68  mGoodEventFlagVec.shrink_to_fit();
69  }
70 
71  double trgGdpbFullTime() const;
72  double trgStarFullTime() const;
73 
74  std::map< unsigned int, uint64_t > rocGdpbTs() const;
75  std::map< unsigned int, uint64_t > rocStarTs() const;
76 
77  unsigned int starToken() const;
78  unsigned int starDaqCmdIn() const;
79  unsigned int starTrgCmdIn() const;
80  uint64_t eventStatusFlag() const;
84  std::vector<bool> missMatchFlagVec() const;
88  std::vector<bool> goodEventFlagVec() const;
89 
90  std::vector<bool> hasPulsersVec() const;
91 
92  void setTrgGdpbFullTime( const double& gdpbFullTime );
93  void setTrgStarFullTime( const double& starFullTime );
94 
95  void setRocGdpbTs( const std::map< unsigned int, uint64_t >& gdpbTs );
96  void setRocStarTs( const std::map< unsigned int, uint64_t >& starTs );
97 
98  void setStarToken( const unsigned int& token );
99  void setStarDaqCmdIn( const unsigned int& daqCmdIn );
100  void setStarTrgCmdIn( const unsigned int& trgCmdIn );
101 
102  void setEventStatusFlag( const uint64_t& statusFlag );
103  void setGoodEventFlagVec( const std::vector<bool>& FlagVec );
104  void setHasPulsersVec( const std::vector<bool>& PulserVec );
105 
106 private:
107  Double_t mTrgGdpbFullTime;
108  Double_t mTrgStarFullTime;
109 
110  std::map< UInt_t, ULong64_t > mRocGdpbTs;
111  std::map< UInt_t, ULong64_t > mRocStarTs;
112 
113  UInt_t mStarToken;
114  UInt_t mStarDaqCmdIn;
115  UInt_t mStarTrgCmdIn;
116 
117  ULong64_t mEventStatusFlag;
118 
119  std::vector< Bool_t > mMissMatchFlagVec;
120  std::vector< Bool_t > mGoodEventFlagVec;
121  std::vector< Bool_t > mHasPulsersVec;
122 
123  ClassDef( StMuETofHeader, 4 )
124 };
125 
126 #endif // STMUETOFHEADER_H
std::vector< bool > missMatchFlagVec() const
Flag for each Get4 TDC to mark if it is available in this event.
std::vector< bool > goodEventFlagVec() const
Flag to mark if the event is good for physics analysis for each counter. A counter is considered good...