2 #define GEVENTHEADER_H 1
12 #include "../gdataConventions.h"
29 timeStamp = assignTimeStamp();
30 log->debug(CONSTRUCTOR,
"GEventDataCollectionHeader");
31 log->info(1, TPOINTITEM,
" Event Number: ", g4localEventNumber);
32 log->info(1, TPOINTITEM,
" Thread ID: ", threadID);
33 log->info(1, TPOINTITEM,
" Time Stamp: ", timeStamp);
40 log->debug(DESTRUCTOR,
"GEventDataCollectionHeader");
47 inline std::string
const getTimeStamp()
const {
return timeStamp; }
62 int g4localEventNumber;
73 std::string assignTimeStamp() {
74 time_t now = time(NULL);
75 struct tm *ptm = localtime(&now);
78 strftime(buffer, 32,
"%a, %m.%d.%Y %H:%M:%S", ptm);
79 return std::string(buffer);
82 std::string timeStamp;