Public Member Functions | List of all members
daqdataformats::VERSION_NAMESPACE::RawTriggerTime Class Reference

Class to hold the data corresponding to the generated time of the trigger. More...

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-02/DAQDataFormats/cxx/include/RawTriggerTimeV0.h"

Inheritance diagram for daqdataformats::VERSION_NAMESPACE::RawTriggerTime:

Public Member Functions

 RawTriggerTime (const version_t)
 The default constructor. More...
 
 RawTriggerTime (const RawTriggerTime &)
 
 ~RawTriggerTime ()
 Destructor. More...
 
void init ()
 
void print (std::ostream &os=std::cout) const
 
uint32_t sizeofdata () const
 
voidreadData (const void *pointer)
 
 IMPLEMENT_FIRST_GET_AND_SET (Version, uint32_t)
 
 IMPLEMENT_FIRST_GET_AND_SET (TriggerTimeStampLow, uint32_t)
 
 IMPLEMENT_FIRST_GET_AND_SET (TriggerTimeStampHigh, uint32_t)
 
 IMPLEMENT_FIRST_GET_AND_SET (TriggerTimeStamp_sec, uint32_t)
 
 IMPLEMENT_FIRST_GET_AND_SET (TriggerTimeStamp_usec, uint32_t)
 
 IMPLEMENT_FIRST_GET_AND_SET (ClockSource, uint32_t)
 
 IMPLEMENT_FIRST_GET_AND_SET (TriggerOrigLength, uint32_t)
 
 INIT_FIRST (getTriggerTimeStamp, const, uint64_t,)
 
 INIT_FIRST (setTriggerTimeStamp,, bool, const uint64_t)
 
 INIT_FIRST (getTriggerTimeStampTvUsec, const, suseconds_t,)
 
 INIT_FIRST (setTriggerTimeStampTvUsec,, bool, const suseconds_t)
 
 INIT_FIRST (getTriggerTimeStampTvSec, const, time_t,)
 
 INIT_FIRST (setTriggerTimeStampTvSec,, bool, const time_t)
 
 INIT_FIRST (getTriggerTimeStampTv, const, timeval,)
 
 INIT_FIRST (setTriggerTimeStampTv,, bool, const timeval)
 

Detailed Description

Class to hold the data corresponding to the generated time of the trigger.

The RawTriggerTimeV0 contains the information pertaining to the time at which the trigger was generated, and what device generated the timestamp.

The class supports general initialization with an internal or external data buffer as well as copyin style initialization for use with STL containers.

Definition at line 69 of file RawTriggerTimeV0.h.

Constructor & Destructor Documentation

daqdataformats::VERSION_NAMESPACE::RawTriggerTime::RawTriggerTime ( const version_t  version)

The default constructor.

Definition at line 23 of file RawTriggerTimeV0.cpp.

23  :
24  PREVIOUS_VERSION_CLASS_NAME(version)
25  ,ZEROOUT_GET_AND_SET(Version )
26  ,ZEROOUT_GET_AND_SET(TriggerTimeStampLow )
27  ,ZEROOUT_GET_AND_SET(TriggerTimeStampHigh )
28  ,ZEROOUT_GET_AND_SET(TriggerTimeStamp_sec )
29  ,ZEROOUT_GET_AND_SET(TriggerTimeStamp_usec)
30  ,ZEROOUT_GET_AND_SET(ClockSource )
31  ,ZEROOUT_GET_AND_SET(TriggerOrigLength )
32  ,ZEROOUT_GET_AND_SET(TriggerTimeStamp )
33  ,ZEROOUT_GET_AND_SET(TriggerTimeStampTvUsec)
34  ,ZEROOUT_GET_AND_SET(TriggerTimeStampTvSec )
35  ,ZEROOUT_GET_AND_SET(TriggerTimeStampTv )
36 {}
#define ZEROOUT_GET_AND_SET(FUNC)
Definition: FunctionBind.h:56
const XML_Char * version
Definition: expat.h:187
daqdataformats::VERSION_NAMESPACE::RawTriggerTime::RawTriggerTime ( const RawTriggerTime copyin)

Definition at line 39 of file RawTriggerTimeV0.cpp.

39  :
40  PREVIOUS_VERSION_CLASS_NAME(copyin)
41  ,DEEPCOPY_GET_AND_SET(Version )
42  ,DEEPCOPY_GET_AND_SET(TriggerTimeStampLow )
43  ,DEEPCOPY_GET_AND_SET(TriggerTimeStampHigh )
44  ,DEEPCOPY_GET_AND_SET(TriggerTimeStamp_sec )
45  ,DEEPCOPY_GET_AND_SET(TriggerTimeStamp_usec)
46  ,DEEPCOPY_GET_AND_SET(ClockSource )
47  ,DEEPCOPY_GET_AND_SET(TriggerOrigLength )
48  ,DEEPCOPY_GET_AND_SET(TriggerTimeStamp )
49  ,DEEPCOPY_GET_AND_SET(TriggerTimeStampTvUsec)
50  ,DEEPCOPY_GET_AND_SET(TriggerTimeStampTvSec )
51  ,DEEPCOPY_GET_AND_SET(TriggerTimeStampTv )
52 {}
#define DEEPCOPY_GET_AND_SET(FUNC)
Definition: FunctionBind.h:44
daqdataformats::VERSION_NAMESPACE::RawTriggerTime::~RawTriggerTime ( )

Destructor.

Definition at line 55 of file RawTriggerTimeV0.cpp.

55 {}

Member Function Documentation

daqdataformats::VERSION_NAMESPACE::RawTriggerTime::IMPLEMENT_FIRST_GET_AND_SET ( Version  ,
uint32_t   
)
daqdataformats::VERSION_NAMESPACE::RawTriggerTime::IMPLEMENT_FIRST_GET_AND_SET ( TriggerTimeStampLow  ,
uint32_t   
)
daqdataformats::VERSION_NAMESPACE::RawTriggerTime::IMPLEMENT_FIRST_GET_AND_SET ( TriggerTimeStampHigh  ,
uint32_t   
)
daqdataformats::VERSION_NAMESPACE::RawTriggerTime::IMPLEMENT_FIRST_GET_AND_SET ( TriggerTimeStamp_sec  ,
uint32_t   
)
daqdataformats::VERSION_NAMESPACE::RawTriggerTime::IMPLEMENT_FIRST_GET_AND_SET ( TriggerTimeStamp_usec  ,
uint32_t   
)
daqdataformats::VERSION_NAMESPACE::RawTriggerTime::IMPLEMENT_FIRST_GET_AND_SET ( ClockSource  ,
uint32_t   
)
daqdataformats::VERSION_NAMESPACE::RawTriggerTime::IMPLEMENT_FIRST_GET_AND_SET ( TriggerOrigLength  ,
uint32_t   
)
void daqdataformats::VERSION_NAMESPACE::RawTriggerTime::init ( )

Definition at line 59 of file RawTriggerTimeV0.cpp.

References samweb_client.client::_version, a, EXECUTE_FUNCTION, RETURN_FUNCTION, and submit_nova_art::timestamp.

Referenced by demo.App::__init__(), testem0.App::__init__(), Lesson1.App::__init__(), and ExN03.App::__init__().

59  {
60  EXECUTE_FUNCTION(setVersion)(_version);
61 }
#define EXECUTE_FUNCTION(FULLFUNCTIONNAME)
Execute and return the delegate.
Definition: Macros.h:54
daqdataformats::VERSION_NAMESPACE::RawTriggerTime::INIT_FIRST ( getTriggerTimeStamp  ,
const  ,
uint64_t   
)
daqdataformats::VERSION_NAMESPACE::RawTriggerTime::INIT_FIRST ( setTriggerTimeStamp  ,
bool  ,
const uint64_t   
)
daqdataformats::VERSION_NAMESPACE::RawTriggerTime::INIT_FIRST ( getTriggerTimeStampTvUsec  ,
const  ,
suseconds_t   
)
daqdataformats::VERSION_NAMESPACE::RawTriggerTime::INIT_FIRST ( setTriggerTimeStampTvUsec  ,
bool  ,
const suseconds_t   
)
daqdataformats::VERSION_NAMESPACE::RawTriggerTime::INIT_FIRST ( getTriggerTimeStampTvSec  ,
const  ,
time_t   
)
daqdataformats::VERSION_NAMESPACE::RawTriggerTime::INIT_FIRST ( setTriggerTimeStampTvSec  ,
bool  ,
const time_t   
)
daqdataformats::VERSION_NAMESPACE::RawTriggerTime::INIT_FIRST ( getTriggerTimeStampTv  ,
const  ,
timeval   
)
daqdataformats::VERSION_NAMESPACE::RawTriggerTime::INIT_FIRST ( setTriggerTimeStampTv  ,
bool  ,
const timeval   
)
void daqdataformats::VERSION_NAMESPACE::RawTriggerTime::print ( std::ostream &  os = std::cout) const

Definition at line 108 of file RawTriggerTimeV0.cpp.

References EXECUTE_FUNCTION, novadaq::HexUtils::format(), makeTrainCVSamples::int, and PRINT_ON_DEBUG.

108  {
109  os<<"++++ Trigger Time ++++\n";
110  os<<boost::format("Trigger Time Version:\t%u\n")%EXECUTE_FUNCTION(getVersion)();
111  os<<boost::format("Gen Timestamp Low:\t%u\n")%EXECUTE_FUNCTION(getTriggerTimeStampLow)();
112  os<<boost::format("Gen Timestamp High:\t%u\n")%EXECUTE_FUNCTION(getTriggerTimeStampHigh)();
113  os<<boost::format("Gen Timestamp:\t\t%Lu\n")%(long long unsigned int)EXECUTE_FUNCTION(getTriggerTimeStamp)();
114  time_t TrigSec = EXECUTE_FUNCTION(getTriggerTimeStampTvSec)();
115  char ctimestr[27]; ctime_r(&TrigSec,ctimestr);
116  os<<boost::format("Gen Time:\t\t%s")%ctimestr;
117  os<<boost::format("Gen usec:\t\t%d\n")%(uint32_t) EXECUTE_FUNCTION(getTriggerTimeStampTvUsec)();
118  os<<boost::format("Clock Source:\t\t0x%02x\n")%EXECUTE_FUNCTION(getClockSource)();
119  os<<boost::format("Original Trig Length:\t%u\n")%EXECUTE_FUNCTION(getTriggerOrigLength)();
120  PRINT_ON_DEBUG("Buffer is set to "<<_Buffer);
121 
122 }
#define EXECUTE_FUNCTION(FULLFUNCTIONNAME)
Execute and return the delegate.
Definition: Macros.h:54
std::string format(const int32_t &value, const int &ndigits=8)
Definition: HexUtils.cpp:14
#define PRINT_ON_DEBUG(x)
Definition: RawDAQData.h:35
void* daqdataformats::VERSION_NAMESPACE::RawTriggerTime::readData ( const void pointer)
inline

Definition at line 83 of file RawTriggerTimeV0.h.

References IMPLEMENT_FIRST_GET_AND_SET, INIT_FIRST, and daqdataformats::RawDAQData::readDataGeneral().

Referenced by PandAna.core.core.loader::Go().

83 {return RawDAQData::readDataGeneral(pointer);};
void * readDataGeneral(const void *buffer)
General ReadData method when the sizeofdata is known.
Definition: RawDAQData.cpp:186
uint32_t daqdataformats::VERSION_NAMESPACE::RawTriggerTime::sizeofdata ( ) const
inline

The documentation for this class was generated from the following files: