// --------------------------------------------------------------------------------- // ----- HadaqDefines source file ----- // ----- ----- // ----- created by C. Simon on 2014-03-06 ----- // ----- ----- // ----- based on stream by S. Linev ----- // ----- https://subversion.gsi.de/go4/app/stream/framework/hadaq/defines.cxx ----- // ----- revision 1156, 2014-02-14 ----- // --------------------------------------------------------------------------------- #include "HadaqDefines.h" #include "TString.h" #include "FairLogger.h" #include // for function gettimeofday, and struct timeval (!!Unix!!) #include // for type time_t, functions time and gmtime, and struct tm void hadaq::RawEvent::Dump() { LOG(INFO)<tm_year << 16; date |= gmTime->tm_mon << 8; date |= gmTime->tm_mday; SetDate(date); clock |= gmTime->tm_hour << 16; clock |= gmTime->tm_min << 8; clock |= gmTime->tm_sec; SetTime(clock); } UInt_t hadaq::RawEvent::CreateRunId() { struct timeval tv; gettimeofday(&tv, NULL); return tv.tv_sec - hadaq::HADAQ_TIMEOFFSET; } // =========================================================== void hadaq::RawSubevent::Dump(Bool_t print_raw_data) { LOG(INFO)<=100) width = 3; if (size>=1000) width = 4; for (UInt_t ix=0; ix < size; ix++) { if (ix % 8 == 0) LOG(INFO)<