14 collectionTimeSpecial_(0, 0),
16 luminositySection_(0),
17 bunchCrossingErrors_(0),
18 collectionTimeSummary_(0, 0),
21 finalTriggersDistributed_(0),
22 calibrationTriggers_(0),
24 totalTestTriggers_(0),
25 finalTriggersGenerated_(0),
26 finalTriggersInvalidBC_(0),
28 lostFinalTriggers_(0),
30 lostFinalTriggersActive_(0),
31 deadTimeActivePrivate_(0),
32 deadTimeActivePartition_(0),
33 deadTimeActiveThrottle_(0),
34 deadTimeActiveCalibration_(0),
35 deadTimeActiveTimeSlot_(0),
37 collectionTimeDetails_(0, 0),
38 triggers_(nL1Triggers),
39 testTriggers_(nL1TestTriggers) {}
100 s <<
"L1TriggerScalers Version:" <<
c.version() <<
" SourceID: " <<
c.sourceID() << std::endl;
102 char line[kLineBufferSize];
103 char zeitHeaven[128];
106 struct tm* horaHeaven;
108 struct tm* horaLimbo;
110 sprintf(
line,
" TrigType: %d EventID: %d BunchNumber: %d",
c.trigType(),
c.eventID(),
c.bunchNumber());
111 s <<
line << std::endl;
113 timespec secondsToHeaven =
c.collectionTimeSummary();
114 horaHeaven = gmtime(&secondsToHeaven.tv_sec);
115 strftime(zeitHeaven,
sizeof(zeitHeaven),
"%Y.%m.%d %H:%M:%S", horaHeaven);
116 snprintf(
line, kLineBufferSize,
" CollectionTimeSummary: %s.%9.9d", zeitHeaven, (
int)secondsToHeaven.tv_nsec);
117 s <<
line << std::endl;
119 timespec secondsToHell =
c.collectionTimeSpecial();
120 horaHell = gmtime(&secondsToHell.tv_sec);
121 strftime(zeitHell,
sizeof(zeitHell),
"%Y.%m.%d %H:%M:%S", horaHell);
122 snprintf(
line, kLineBufferSize,
" CollectionTimeSpecial: %s.%9.9d", zeitHell, (
int)secondsToHell.tv_nsec);
123 s <<
line << std::endl;
125 timespec secondsToLimbo =
c.collectionTimeDetails();
126 horaLimbo = gmtime(&secondsToLimbo.tv_sec);
127 strftime(zeitLimbo,
sizeof(zeitLimbo),
"%Y.%m.%d %H:%M:%S", horaLimbo);
128 snprintf(
line, kLineBufferSize,
" CollectionTimeDetails: %s.%9.9d", zeitLimbo, (
int)secondsToLimbo.tv_nsec);
129 s <<
line << std::endl;
133 " LuminositySection: %15d BunchCrossingErrors: %15d",
134 c.luminositySection(),
135 c.bunchCrossingErrors());
136 s <<
line << std::endl;
140 " TriggerNumber: %15d EventNumber: %15d",
143 s <<
line << std::endl;
147 " TriggersDistributed: %10d TriggersGenerated: %15d",
148 c.finalTriggersDistributed(),
149 c.finalTriggersGenerated());
150 s <<
line << std::endl;
154 " TriggersInvalidBC: %15d CalibrationTriggers: %15d",
155 c.finalTriggersInvalidBC(),
156 c.calibrationTriggers());
157 s <<
line << std::endl;
161 " TestTriggers: %15d RandomTriggers: %15d",
162 c.totalTestTriggers(),
164 s <<
line << std::endl;
168 " DeadTime: %15d DeadTimeActiveTimeSlot: %15ld",
170 (
long int)
c.deadTime());
171 s <<
line << std::endl;
175 " DeadTimeActive: %15ld DeadTimeActiveCalibration:%15ld",
176 (
long int)
c.deadTimeActive(),
177 (
long int)
c.deadTimeActiveCalibration());
178 s <<
line << std::endl;
182 " LostTriggers: %15ld DeadTimeActivePartition: %15ld",
183 (
long int)
c.lostFinalTriggers(),
184 (
long int)
c.deadTimeActivePartition());
185 s <<
line << std::endl;
189 " LostTriggersActive:%15ld DeadTimeActiveThrottle: %15ld",
190 (
long int)
c.lostFinalTriggersActive(),
191 (
long int)
c.deadTimeActiveThrottle());
192 s <<
line << std::endl;
196 " NumberResets: %15d DeadTimeActivePrivate: %15ld",
198 (
long int)
c.deadTimeActivePrivate());
199 s <<
line << std::endl;
201 s <<
"Physics Triggers" << std::endl;
202 std::vector<unsigned int>
triggers =
c.triggers();
204 for (
int i = 0;
i < length;
i++) {
207 " %3.3d: %10d %3.3d: %10d %3.3d: %10d %3.3d: %10d",
216 s <<
line << std::endl;
219 s <<
"Test Triggers" << std::endl;
220 std::vector<unsigned int> testTriggers =
c.testTriggers();
221 length = testTriggers.size() / 4;
222 for (
int i = 0;
i < length;
i++) {
225 " %3.3d: %10d %3.3d: %10d %3.3d: %10d %3.3d: %10d",
229 testTriggers[
i + length],
231 testTriggers[
i + (length * 2)],
233 testTriggers[
i + (length * 3)]);
234 s <<
line << std::endl;
unsigned long long deadTimeActive_
unsigned long long deadTimeActivePrivate_
unsigned long long PRIV_DEADTIMEA
TimeSpec collectionTimeSpecial_
unsigned long long deadTimeActivePartition_
void set_tv_nsec(long value)
unsigned long long header
unsigned int FINOR_GENERATED
unsigned int FINOR_IN_INVALID_BC
unsigned int LUMINOSITY_SEGMENT
unsigned int ALGO_RATE[ScalersRaw::N_L1_TRIGGERS_v1]
unsigned long long LOST_FINOR
struct TriggerScalersRaw_v1 trig
unsigned int finalTriggersDistributed_
unsigned int eventNumber_
unsigned int numberResets_
unsigned int orbitNumber_
unsigned long long DEADTIMEA
unsigned long long TIMESLOT_DEADTIMEA
virtual ~L1TriggerScalers()
unsigned long long deadTimeActiveTimeSlot_
unsigned int totalTestTriggers_
std::vector< unsigned int > testTriggers_
unsigned long long LOST_FINORA
TimeSpec collectionTimeDetails_
unsigned int collectionTimeSummary_sec
unsigned int TEST_TRIGGER
unsigned int luminositySection_
unsigned int collectionTimeSpecial_sec
unsigned int ORBIT_NUMBER
unsigned long long THROTTLE_DEADTIMEA
unsigned long long deadTimeActiveCalibration_
std::ostream & operator<<(std::ostream &s, L1TriggerScalers const &c)
Pretty-print operator for L1TriggerScalers.
unsigned int triggerNumber_
unsigned int FINOR_DISTRIBUTED
unsigned int collectionTimeSpecial_nsec
unsigned long long deadTimeActiveThrottle_
unsigned int collectionTimeDetails_nsec
unsigned long long lostFinalTriggers_
unsigned int finalTriggersInvalidBC_
unsigned int NR_OF_RESETS
unsigned long long PTCSTATUS_DEADTIMEA
unsigned int collectionTimeDetails_sec
unsigned int RANDOM_TRIGGER
unsigned long long deadTime_
unsigned int bunchNumber_
unsigned int TEST_RATE[ScalersRaw::N_L1_TEST_TRIGGERS_v1]
void set_tv_sec(long value)
TimeSpec collectionTimeSummary_
unsigned int collectionTimeSummary_nsec
unsigned int calibrationTriggers_
unsigned long long lostFinalTriggersActive_
unsigned int randomTriggers_
unsigned long long DEADTIME
unsigned long long CALIBRATION_DEADTIMEA
unsigned int finalTriggersGenerated_
unsigned short bunchCrossingErrors_
std::vector< unsigned int > triggers_