7 #include "nuevdb/EventDisplayBase/View2D.h" 8 #include "nuevdb/EventDisplayBase/EventHolder.h" 11 #include "TTimeStamp.h" 25 TText& titlet = view->AddText(0.03,0.80,layoutopt->
fDisplayName.c_str());
26 titlet.SetTextSize(0.13);
27 titlet.SetTextFont(72);
30 const art::Event*
evt = evdb::EventHolder::Instance()->GetEvent();
37 unsigned int year, month, day, dayofweek;
38 unsigned int hour, minute,
second;
44 unsigned long long int tsval = evt->
time().
value();
49 const unsigned long int mask32 = 0xFFFFFFFFUL;
50 unsigned long int lup = ( tsval >> 32 ) & mask32;
51 unsigned long int llo = tsval & mask32;
52 TTimeStamp ts(lup, (
int)llo);
54 ts.GetDate(kTRUE,0,&year,&month,&day);
55 ts.GetTime(kTRUE,0,&hour,&minute,&second);
56 nano = ts.GetNanoSec();
57 dayofweek = ts.GetDayOfWeek();
64 static const char* days[] = {
"",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
"Sun"};
65 static const char* months[] = {
"",
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"};
67 sprintf(runbuff,
"Run: %d/%d",run,srun);
68 sprintf(eventbuff,
"Event: %d",
event);
69 sprintf(datebuff,
"UTC %s %s %d, %d",
74 sprintf(timebuff,
"%.2d:%.2d:%2.9f",
77 (
float)second+(
float)nano/1.0E9);
79 TText& runt = view->AddText(0.04,0.60, runbuff);
80 TText& eventt = view->AddText(0.04,0.45, eventbuff);
81 TText& datet = view->AddText(0.04,0.25, datebuff);
82 TText& timet = view->AddText(0.04,0.10, timebuff);
84 runt.SetTextSize(0.13);
87 eventt.SetTextSize(0.13);
88 eventt.SetTextFont(42);
90 datet.SetTextSize(0.12);
91 datet.SetTextFont(42);
93 timet.SetTextSize(0.12);
94 timet.SetTextFont(42);
constexpr TimeValue_t value() const
SubRunNumber_t subRun() const
std::string fDisplayName
Name to apply to 2D display.
EventNumber_t event() const
second_as<> second
Type of time stored in seconds, in double precision.
Event finding and building.