111 s <<
"L1TriggerScalers Version:" <<
c.version() <<
112 " SourceID: " <<
c.sourceID() << std::endl;
114 char line[kLineBufferSize];
115 char zeitHeaven[128];
118 struct tm * horaHeaven;
119 struct tm * horaHell;
120 struct tm * horaLimbo;
122 sprintf(line,
" TrigType: %d EventID: %d BunchNumber: %d",
123 c.trigType(),
c.eventID(),
c.bunchNumber());
124 s << line << std::endl;
126 timespec secondsToHeaven =
c.collectionTimeSummary();
127 horaHeaven = gmtime(&secondsToHeaven.tv_sec);
128 strftime(zeitHeaven,
sizeof(zeitHeaven),
"%Y.%m.%d %H:%M:%S", horaHeaven);
129 snprintf(line, kLineBufferSize,
" CollectionTimeSummary: %s.%9.9d" ,
130 zeitHeaven, (
int)secondsToHeaven.tv_nsec);
131 s << line << std::endl;
133 timespec secondsToHell=
c.collectionTimeSpecial();
134 horaHell = gmtime(&secondsToHell.tv_sec);
135 strftime(zeitHell,
sizeof(zeitHell),
"%Y.%m.%d %H:%M:%S", horaHell);
136 snprintf(line, kLineBufferSize,
" CollectionTimeSpecial: %s.%9.9d" ,
137 zeitHell, (
int)secondsToHell.tv_nsec);
138 s << line << std::endl;
140 timespec secondsToLimbo=
c.collectionTimeDetails();
141 horaLimbo = gmtime(&secondsToLimbo.tv_sec);
142 strftime(zeitLimbo,
sizeof(zeitLimbo),
"%Y.%m.%d %H:%M:%S", horaLimbo);
143 snprintf(line, kLineBufferSize,
" CollectionTimeDetails: %s.%9.9d" ,
144 zeitLimbo, (
int)secondsToLimbo.tv_nsec);
145 s << line << std::endl;
147 snprintf(line, kLineBufferSize,
148 " LuminositySection: %15d BunchCrossingErrors: %15d",
149 c.luminositySection(),
c.bunchCrossingErrors());
150 s << line << std::endl;
152 snprintf(line, kLineBufferSize,
153 " TriggerNumber: %15d EventNumber: %15d",
154 c.triggerNumber(),
c.eventNumber());
155 s << line << std::endl;
157 snprintf(line, kLineBufferSize,
158 " TriggersDistributed: %10d TriggersGenerated: %15d",
159 c.finalTriggersDistributed(),
160 c.finalTriggersGenerated());
161 s << line << std::endl;
163 snprintf(line, kLineBufferSize,
164 " TriggersInvalidBC: %15d CalibrationTriggers: %15d",
165 c.finalTriggersInvalidBC(),
c.calibrationTriggers());
166 s << line << std::endl;
168 snprintf(line, kLineBufferSize,
169 " TestTriggers: %15d RandomTriggers: %15d",
170 c.totalTestTriggers(),
c.randomTriggers());
171 s << line << std::endl;
173 snprintf(line, kLineBufferSize,
174 " DeadTime: %15d DeadTimeActiveTimeSlot: %15ld",
175 c.numberResets(), (
long int)
c.deadTime());
176 s << line << std::endl;
178 snprintf(line, kLineBufferSize,
179 " DeadTimeActive: %15ld DeadTimeActiveCalibration:%15ld",
180 (
long int)
c.deadTimeActive(),
181 (
long int)
c.deadTimeActiveCalibration());
182 s << line << std::endl;
184 snprintf(line, kLineBufferSize,
185 " LostTriggers: %15ld DeadTimeActivePartition: %15ld",
186 (
long int)
c.lostFinalTriggers(),
187 (
long int)
c.deadTimeActivePartition());
188 s << line << std::endl;
190 snprintf(line, kLineBufferSize,
191 " LostTriggersActive:%15ld DeadTimeActiveThrottle: %15ld",
192 (
long int)
c.lostFinalTriggersActive(),
193 (
long int)
c.deadTimeActiveThrottle());
194 s << line << std::endl;
196 snprintf(line, kLineBufferSize,
197 " NumberResets: %15d DeadTimeActivePrivate: %15ld",
199 (
long int)
c.deadTimeActivePrivate());
200 s << line << std::endl;
202 s <<
"Physics Triggers" << std::endl;
203 std::vector<unsigned int> triggers =
c.triggers();
204 int length = triggers.size() / 4;
205 for (
int i=0;
i<length;
i++)
207 snprintf(line, kLineBufferSize,
208 " %3.3d: %10d %3.3d: %10d %3.3d: %10d %3.3d: %10d",
210 (i+length), triggers[i+length],
211 (i+(length*2)), triggers[i+(length*2)],
212 (i+(length*3)), triggers[i+(length*3)]);
213 s << line << std::endl;
216 s <<
"Test Triggers" << std::endl;
217 std::vector<unsigned int> testTriggers =
c.testTriggers();
218 length = testTriggers.size() / 4;
219 for (
int i=0; i<length; i++)
221 snprintf(line, kLineBufferSize,
222 " %3.3d: %10d %3.3d: %10d %3.3d: %10d %3.3d: %10d",
224 (i+length), testTriggers[i+length],
225 (i+(length*2)), testTriggers[i+(length*2)],
226 (i+(length*3)), testTriggers[i+(length*3)]);
227 s << line << std::endl;