222 s <<
"Level1TriggerScalers Version:" <<
c.version() <<
223 " SourceID: " <<
c.sourceID() << std::endl;
225 char line[kLineBufferSize];
226 char zeitHeaven[128];
227 struct tm * horaHeaven;
229 snprintf(line, kLineBufferSize,
" TrigType: %d EventID: %d BunchNumber: %d",
230 c.trigType(),
c.eventID(),
c.bunchNumber());
231 s << line << std::endl;
233 struct timespec secondsToHeaven =
c.collectionTime();
234 horaHeaven = gmtime(&secondsToHeaven.tv_sec);
235 strftime(zeitHeaven,
sizeof(zeitHeaven),
"%Y.%m.%d %H:%M:%S", horaHeaven);
236 snprintf(line, kLineBufferSize,
" CollectionTime: %s.%9.9d" ,
237 zeitHeaven, (
int)secondsToHeaven.tv_nsec);
238 s << line << std::endl;
240 snprintf(line, kLineBufferSize,
241 " LumiSegmentNr: %10u LumiSegmentOrbits: %10u",
242 c.lumiSegmentNr(),
c.lumiSegmentOrbits());
243 s << line << std::endl;
245 snprintf(line, kLineBufferSize,
246 " LumiSegmentNrLumiSeg: %10u OrbitNr: %10u ",
247 c.lumiSegmentNrLumiSeg(),
c.orbitNr());
248 s << line << std::endl;
250 snprintf(line, kLineBufferSize,
251 " GtResets: %10u BunchCrossingErrors: %10u",
252 c.gtResets(),
c.bunchCrossingErrors());
253 s << line << std::endl;
255 snprintf(line, kLineBufferSize,
256 " PrescaleIndexAlgo: %10d PrescaleIndexTech: %10d",
257 c.prescaleIndexAlgo(),
c.prescaleIndexTech());
258 s << line << std::endl;
260 snprintf(line, kLineBufferSize,
" GtTriggers: %20llu %22.3f Hz",
261 c.gtTriggers(),
c.gtTriggersRate());
262 s << line << std::endl;
264 snprintf(line, kLineBufferSize,
" GtEvents: %20llu %22.3f Hz",
265 c.gtEvents(),
c.gtEventsRate());
266 s << line << std::endl;
268 secondsToHeaven =
c.collectionTimeLumiSeg();
269 horaHeaven = gmtime(&secondsToHeaven.tv_sec);
270 strftime(zeitHeaven,
sizeof(zeitHeaven),
"%Y.%m.%d %H:%M:%S", horaHeaven);
271 snprintf(line, kLineBufferSize,
" CollectionTimeLumiSeg: %s.%9.9d" ,
272 zeitHeaven, (
int)secondsToHeaven.tv_nsec);
273 s << line << std::endl;
276 snprintf(line, kLineBufferSize,
" TriggersPhysicsGeneratedFDL: %20llu %22.3f Hz",
277 c.triggersPhysicsGeneratedFDL(),
279 s << line << std::endl;
281 snprintf(line, kLineBufferSize,
" TriggersPhysicsLost: %20llu %22.3f Hz",
282 c.triggersPhysicsLost(),
284 s << line << std::endl;
286 snprintf(line, kLineBufferSize,
" TriggersPhysicsLostBeamActive: %20llu %22.3f Hz",
287 c.triggersPhysicsLostBeamActive(),
289 s << line << std::endl;
291 snprintf(line, kLineBufferSize,
" TriggersPhysicsLostBeamInactive: %20llu %22.3f Hz",
292 c.triggersPhysicsLostBeamInactive(),
294 s << line << std::endl;
296 snprintf(line, kLineBufferSize,
" L1AsPhysics: %20llu %22.3f Hz",
299 s << line << std::endl;
301 snprintf(line, kLineBufferSize,
" L1AsRandom: %20llu %22.3f Hz",
304 s << line << std::endl;
306 snprintf(line, kLineBufferSize,
" L1AsTest: %20llu %22.3f Hz",
309 s << line << std::endl;
311 snprintf(line, kLineBufferSize,
" L1AsCalibration: %20llu %22.3f Hz",
314 s << line << std::endl;
316 snprintf(line, kLineBufferSize,
" Deadtime: %20llu %17.3f%%",
319 s << line << std::endl;
321 snprintf(line, kLineBufferSize,
" DeadtimeBeamActive: %20llu %17.3f%%",
322 c.deadtimeBeamActive(),
324 s << line << std::endl;
326 snprintf(line, kLineBufferSize,
" DeadtimeBeamActiveTriggerRules: %20llu %17.3f%%",
327 c.deadtimeBeamActiveTriggerRules(),
329 s << line << std::endl;
331 snprintf(line, kLineBufferSize,
" DeadtimeBeamActiveCalibration: %20llu %17.3f%%",
332 c.deadtimeBeamActiveCalibration(),
334 s << line << std::endl;
336 snprintf(line, kLineBufferSize,
" DeadtimeBeamActivePrivateOrbit: %20llu %17.3f%%",
337 c.deadtimeBeamActivePrivateOrbit(),
339 s << line << std::endl;
341 snprintf(line, kLineBufferSize,
" DeadtimeBeamActivePartitionController:%20llu %17.3f%%",
342 c.deadtimeBeamActivePartitionController(),
344 s << line << std::endl;
346 snprintf(line, kLineBufferSize,
" DeadtimeBeamActiveTimeSlot: %20llu %17.3f%%",
347 c.deadtimeBeamActiveTimeSlot(),
349 s << line << std::endl;
351 s <<
"Physics GtAlgoCounts" << std::endl;
352 const std::vector<unsigned int> gtAlgoCounts =
c.gtAlgoCounts();
353 int length = gtAlgoCounts.size() / 4;
354 for (
int i=0;
i<length;
i++)
356 snprintf(line, kLineBufferSize,
" %3.3d: %10u %3.3d: %10u %3.3d: %10u %3.3d: %10u",
358 (i+length), gtAlgoCounts[i+length],
359 (i+(length*2)), gtAlgoCounts[i+(length*2)],
360 (i+(length*3)), gtAlgoCounts[i+(length*3)]);
361 s << line << std::endl;
364 s <<
"Test GtTechCounts" << std::endl;
365 const std::vector<unsigned int> gtTechCounts =
c.gtTechCounts();
366 length = gtTechCounts.size() / 4;
367 for (
int i=0; i<length; i++)
369 snprintf(line, kLineBufferSize,
" %3.3d: %10u %3.3d: %10u %3.3d: %10u %3.3d: %10u",
371 (i+length), gtTechCounts[i+length],
372 (i+(length*2)), gtTechCounts[i+(length*2)],
373 (i+(length*3)), gtTechCounts[i+(length*3)]);
374 s << line << std::endl;
377 if (
c.version() >= 5 )
379 snprintf(line, kLineBufferSize,
" LastOrbitCounter0: %10u 0x%8.8X",
c.lastOrbitCounter0(),
380 c.lastOrbitCounter0());
381 s << line << std::endl;
383 snprintf(line, kLineBufferSize,
" LastTestEnable: %10u 0x%8.8X",
c.lastTestEnable(),
385 s << line << std::endl;
387 snprintf(line, kLineBufferSize,
" LastResync: %10u 0x%8.8X",
c.lastResync(),
389 s << line << std::endl;
391 snprintf(line, kLineBufferSize,
" LastStart: %10u 0x%8.8X",
c.lastStart(),
393 s << line << std::endl;
395 snprintf(line, kLineBufferSize,
" LastEventCounter0: %10u 0x%8.8X",
c.lastEventCounter0(),
396 c.lastEventCounter0());
397 s << line << std::endl;
399 snprintf(line, kLineBufferSize,
" LastHardReset: %10u 0x%8.8X",
c.lastHardReset(),
401 s << line << std::endl;
static double rateLS(unsigned long long counts)
static double percentLSActive(unsigned long long counts)
static double percentLS(unsigned long long counts)