1 #ifndef artdaq_core_Data_detail_RawFragmentHeaderV1_hh
2 #define artdaq_core_Data_detail_RawFragmentHeaderV1_hh
9 #include "artdaq-core/Data/dictionarycontrol.hh"
10 #include "cetlib_except/exception.h"
12 #include "artdaq-core/Data/detail/RawFragmentHeader.hh"
23 struct RawFragmentHeaderV1;
72 return std::map<type_t, std::string>{
85 return std::map<type_t, std::string>{
115 return "EndOfSubrun";
154 static constexpr std::size_t
num_words();
200 "sizeof(RawFragmentHeaderV1) is not an integer "
201 "multiple of sizeof(RawDataType)!");
207 if (utype < FIRST_USER_TYPE || utype > LAST_USER_TYPE)
209 throw cet::exception(
"InvalidValue")
210 <<
"RawFragmentHeaderV1 user types must be in the range of "
211 << ((int)FIRST_USER_TYPE) <<
" to " << ((int)LAST_USER_TYPE)
212 <<
" (bad type is " << ((int)utype) <<
").";
221 if (stype < FIRST_SYSTEM_TYPE /*|| stype > LAST_SYSTEM_TYPE*/)
223 throw cet::exception(
"InvalidValue")
224 <<
"RawFragmentHeaderV1 system types must be in the range of "
225 << ((int)FIRST_SYSTEM_TYPE) <<
" to " << ((int)LAST_SYSTEM_TYPE);
struct timespec get_realtime_clock()
Get the current time of day as a pair of seconds and nanoseconds (from clock_gettime(CLOCK_REALTIME, ...) system call)