8 #include "nuevdb/EventDisplayBase/Colors.h" 9 #include "nuevdb/EventDisplayBase/View2D.h" 10 #include "nuevdb/EventDisplayBase/View3D.h" 11 #include "nuevdb/EventDisplayBase/EventHolder.h" 14 #include "TTimeStamp.h" 36 titles =
"DUNE ND MPD";
39 const art::Event*
evt = evdb::EventHolder::Instance()->GetEvent();
46 unsigned int year, month, day, dayofweek;
47 unsigned int hour, minute,
second;
53 unsigned long long int tsval = evt->
time().
value();
58 const unsigned long int mask32 = 0xFFFFFFFFUL;
59 unsigned long int lup = ( tsval >> 32 ) & mask32;
60 unsigned long int llo = tsval & mask32;
61 TTimeStamp ts(lup, (
int)llo);
63 ts.GetDate(kTRUE,0,&year,&month,&day);
64 ts.GetTime(kTRUE,0,&hour,&minute,&second);
65 nano = ts.GetNanoSec();
66 dayofweek = ts.GetDayOfWeek();
73 static const char* days[] = {
"",
74 "Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
"Sun" 76 static const char* months[] = {
"",
77 "Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
78 "Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec" 81 sprintf(runbuff,
"Run: %d/%d",run,srun);
84 sprintf(eventbuff,
"Event: %d",
event);
87 sprintf(datebuff,
"UTC %s %s %u, %u",
94 sprintf(timebuff,
"%.2u:%.2u:%2.9f",
97 (
float)second+(
float)nano/1.0E9);
108 this->
Text(title,run,event,date,time);
111 int c = colors->Foreground(0);
113 TText& titlet = view->AddText(0.03,0.80, title.c_str());
114 TText& runt = view->AddText(0.04,0.60, run.c_str());
115 TText& eventt = view->AddText(0.04,0.45, event.c_str());
116 TText& datet = view->AddText(0.04,0.25, date.c_str());
117 TText& timet = view->AddText(0.04,0.10, time.c_str());
119 titlet.SetTextSize(0.1);
120 titlet.SetTextFont(62);
121 titlet.SetTextColor(c);
123 runt.SetTextSize(0.08);
124 runt.SetTextFont(42);
125 runt.SetTextColor(c);
127 eventt.SetTextSize(0.08);
128 eventt.SetTextFont(42);
129 eventt.SetTextColor(c);
131 datet.SetTextSize(0.08);
132 datet.SetTextFont(42);
133 datet.SetTextColor(c);
135 timet.SetTextSize(0.08);
136 timet.SetTextFont(42);
137 timet.SetTextColor(c);
146 this->
Text(title,run,event,date,time);
149 int c = colors->Foreground(0);
151 TText& titlet = view->AddText(-0.98,-0.75, title.c_str());
152 TText& runt = view->AddText(-0.98,-0.80, run.c_str());
153 TText& eventt = view->AddText(-0.98,-0.85, event.c_str());
154 TText& datet = view->AddText(-0.98,-0.90, date.c_str());
155 TText& timet = view->AddText(-0.98,-0.95, time.c_str());
157 titlet.SetTextSize(0.04);
158 titlet.SetTextFont(62);
159 titlet.SetTextColor(c);
161 runt.SetTextSize(0.03);
162 runt.SetTextFont(42);
163 runt.SetTextColor(c);
165 eventt.SetTextSize(0.03);
166 eventt.SetTextFont(42);
167 eventt.SetTextColor(c);
169 datet.SetTextSize(0.03);
170 datet.SetTextFont(42);
171 datet.SetTextColor(c);
173 timet.SetTextSize(0.03);
174 timet.SetTextFont(42);
175 timet.SetTextColor(c);
constexpr TimeValue_t value() const
SubRunNumber_t subRun() const
General GArSoft Utilities.
EventNumber_t event() const
second_as<> second
Type of time stored in seconds, in double precision.
Event finding and building.