RawTriggerTime.h
Go to the documentation of this file.
1 #ifndef DAQRAWTRIGGERTIME_H
2 #define DAQRAWTRIGGERTIME_H
3 
4 #include "DAQDataFormats/RawTriggerTimeV0.h"
5 #include "DAQDataFormats/TriggerDefines.h"
6 
7 /// It is requred to
8 /// 1. include DAQDataFormats/DataFormatFirst.inc
9 /// 2. define CURRENT_CLASS
10 /// 3. define CURRENT_CLASS_VERSION for version of the class
11 /// OR define LAST_CLASS_VERSION for the main structure of the class
12 /// 4. (optional) define CURRENT_FIELDS_SUB_NAMESPACE
13 /// 5. include DAQDataFormats/DataFormatLast.inc
14 /// before the declaration of the DataFormat version class in the header.
15 #include "DAQDataFormats/DataFormatFirst.inc"
16 #define CURRENT_CLASS RawTriggerTime
17 #define LAST_CLASS_VERSION 0
18 #define CURRENT_FIELDS_SUB_NAMESPACE triggertime
19 #include "DAQDataFormats/DataFormatLast.inc"
20 
21 namespace daqdataformats {
22 
25  }
26 
27  //! Class to hold the data corresponding to the trigger mask
28  /*!
29  The RawTriggerTime contains the information on the type of trigger
30  that is being issued.
31 
32  The class supports general initialization with an internal or external
33  data buffer as well as copyin style initialization for use with
34  STL containers.
35  */
36  class RawTriggerTime: public PREVIOUS_VERSION_CLASS_NAME {
37 
38  public:
39 
41  RawTriggerTime(const RawTriggerTime& copy_in); //!< Copyin Constructor
42  RawTriggerTime(const void* buffer, const version_t version = rawdaqdataformat::DAQDATAFORMAT_UNKNOWN_VERSION); //!< Constructor with data intialization
43  ~RawTriggerTime(); //!< Destructor
44 
46 
47  IMPLEMENT_GET_MAIN (Version , uint32_t);
48  IMPLEMENT_GET_AND_SET_MAIN(TriggerTimeStampLow , uint32_t);
49  IMPLEMENT_GET_AND_SET_MAIN(TriggerTimeStampHigh , uint32_t);
50  IMPLEMENT_GET_AND_SET_MAIN(TriggerTimeStamp_sec , uint32_t);
51  IMPLEMENT_GET_AND_SET_MAIN(TriggerTimeStamp_usec , uint32_t);
52  IMPLEMENT_GET_AND_SET_MAIN(ClockSource , uint32_t);
53  IMPLEMENT_GET_AND_SET_MAIN(TriggerOrigLength , uint32_t);
54  IMPLEMENT_GET_AND_SET_MAIN(TriggerTimeStamp , uint64_t);
55  IMPLEMENT_GET_AND_SET_MAIN(TriggerTimeStampTvUsec, suseconds_t);
56  IMPLEMENT_GET_AND_SET_MAIN(TriggerTimeStampTvSec , time_t);
57  IMPLEMENT_GET_AND_SET_MAIN(TriggerTimeStampTv , timeval);
58 
60 
61  protected:
62  IMPLEMENT_SET_MAIN(Version , uint32_t);
63  bool setFunctionPointers();
64 
65  };
66 
67 
68 } // END NAMESPACE daqdataformats
69 #endif /* DAQRAWTRIGGERTIME_H */
#define IMPLEMENT_SET_MAIN(FUNC, UNITS)
Definition: Macros.h:210
#define CURRENT_FIELDS_SUB_NAMESPACE
::xsd::cxx::tree::buffer< char > buffer
Definition: Database.h:179
Class to hold the data corresponding to the trigger mask.
static const version_t RAWTRIGGERTIME_LATEST_VERSION
const XML_Char * version
Definition: expat.h:187
#define IMPLEMENT_FIGUREOUT_VERSION_STATIC(CLASS)
This should be in the header.
Definition: Macros.h:295
int32_t version_t
Definition: RawDAQData.h:72
#define IMPLEMENT_GET_AND_SET_MAIN(FUNC, UNITS)
Definition: Macros.h:217
#define LAST_CLASS_VERSION
#define CURRENT_CLASS
static const version_t DAQDATAFORMAT_UNKNOWN_VERSION
Definition: RawDAQData.h:81
Class to hold the data from the FEBs in correct formats.
#define IMPLEMENT_GET_MAIN(FUNC, UNITS)
Definition: Macros.h:208