168 char line[kLineBufferSize];
169 char zeitHeaven[128];
170 struct tm * horaHeaven;
172 s <<
"Level1TriggerRates Version: " << c.
version()
173 <<
" Rates in Hz, DeltaT: ";
177 s << c.
deltaT() <<
" sec" << std::endl;
181 s <<
"n/a" << std::endl;
185 horaHeaven = gmtime(&secondsToHeaven.tv_sec);
186 strftime(zeitHeaven,
sizeof(zeitHeaven),
"%Y.%m.%d %H:%M:%S", horaHeaven);
187 snprintf(line, kLineBufferSize,
" CollectionTime: %s.%9.9d" ,
188 zeitHeaven, (
int)secondsToHeaven.tv_nsec);
189 s << line << std::endl;
191 snprintf(line, kLineBufferSize,
192 " GtTriggersRate: %22.3f Hz",
194 s << line << std::endl;
196 snprintf(line, kLineBufferSize,
197 " GtEventsRate: %22.3f Hz",
199 s << line << std::endl;
202 horaHeaven = gmtime(&secondsToHeaven.tv_sec);
203 strftime(zeitHeaven,
sizeof(zeitHeaven),
"%Y.%m.%d %H:%M:%S", horaHeaven);
204 snprintf(line, kLineBufferSize,
" CollectionTimeLumiSeg: %s.%9.9d" ,
205 zeitHeaven, (
int)secondsToHeaven.tv_nsec);
206 s << line << std::endl;
208 snprintf(line, kLineBufferSize,
209 " TriggersPhysicsGeneratedFDLRate: %22.3f Hz",
211 s << line << std::endl;
213 snprintf(line, kLineBufferSize,
214 " TriggersPhysicsLostRate: %22.3f Hz",
216 s << line << std::endl;
218 snprintf(line, kLineBufferSize,
219 " TriggersPhysicsLostBeamActiveRate: %22.3f Hz",
221 s << line << std::endl;
223 snprintf(line, kLineBufferSize,
224 " TriggersPhysicsLostBeamInactiveRate: %22.3f Hz",
226 s << line << std::endl;
228 snprintf(line, kLineBufferSize,
229 " L1AsPhysicsRate: %22.3f Hz",
231 s << line << std::endl;
233 snprintf(line, kLineBufferSize,
234 " L1AsRandomRate: %22.3f Hz",
236 s << line << std::endl;
238 snprintf(line, kLineBufferSize,
239 " L1AsTestRate: %22.3f Hz",
241 s << line << std::endl;
243 snprintf(line, kLineBufferSize,
244 " L1AsCalibrationRate: %22.3f Hz",
246 s << line << std::endl;
248 snprintf(line, kLineBufferSize,
249 " DeadtimePercent: %22.3f %%",
251 s << line << std::endl;
253 snprintf(line, kLineBufferSize,
254 " DeadtimeBeamActivePercent: %22.3f %%",
256 s << line << std::endl;
258 snprintf(line, kLineBufferSize,
259 " DeadtimeBeamActiveTriggerRulesPercent: %22.3f %%",
261 s << line << std::endl;
263 snprintf(line, kLineBufferSize,
264 " DeadtimeBeamActiveCalibrationPercent: %22.3f %%",
266 s << line << std::endl;
268 snprintf(line, kLineBufferSize,
269 " DeadtimeBeamActivePrivateOrbitPercent: %22.3f %%",
271 s << line << std::endl;
273 snprintf(line, kLineBufferSize,
274 " DeadtimeBeamActivePartitionControllerPercent:%22.3f %%",
276 s << line << std::endl;
278 snprintf(line, kLineBufferSize,
279 " DeadtimeBeamActiveTimeSlotPercent: %22.3f %%",
281 s << line << std::endl;
283 s <<
"Physics GtAlgoCountsRate, Hz" << std::endl;
285 int length = gtAlgoCountsRate.size() / 4;
286 for (
int i=0;
i<length;
i++)
288 snprintf(line, kLineBufferSize,
289 " %3.3d: %12.3f %3.3d: %12.3f %3.3d: %12.3f %3.3d: %12.3f",
290 i, gtAlgoCountsRate[
i],
291 (i+length), gtAlgoCountsRate[i+length],
292 (i+(length*2)), gtAlgoCountsRate[i+(length*2)],
293 (i+(length*3)), gtAlgoCountsRate[i+(length*3)]);
294 s << line << std::endl;
297 s <<
"Test GtTechCountsRate, Hz" << std::endl;
299 length = gtTechCountsRate.size() / 4;
300 for (
int i=0; i<length; i++)
302 snprintf(line, kLineBufferSize,
303 " %3.3d: %12.3f %3.3d: %12.3f %3.3d: %12.3f %3.3d: %12.3f",
304 i, gtTechCountsRate[i],
305 (i+length), gtTechCountsRate[i+length],
306 (i+(length*2)), gtTechCountsRate[i+(length*2)],
307 (i+(length*3)), gtTechCountsRate[i+(length*3)]);
308 s << line << std::endl;
double l1AsTestRate() const
double deadtimeBeamActivePartitionControllerPercent() const
double triggersPhysicsGeneratedFDLRate() const
timespec collectionTime()
double l1AsRandomRate() const
double triggersPhysicsLostBeamActiveRate() const
double gtTriggersRate() const
std::vector< double > gtAlgoCountsRate() const
int version() const
get the data
double triggersPhysicsLostBeamInactiveRate() const
double deadtimeBeamActivePercent() const
double deadtimeBeamActiveTriggerRulesPercent() const
double deadtimeBeamActivePrivateOrbitPercent() const
unsigned long long deltaNS() const
timespec collectionTimeLumiSeg()
double deadtimeBeamActiveTimeSlotPercent() const
double gtEventsRate() const
double deadtimePercent() const
double triggersPhysicsLostRate() const
double deadtimeBeamActiveCalibrationPercent() const
std::vector< double > gtTechCountsRate() const
double l1AsCalibrationRate() const
double l1AsPhysicsRate() const