CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
L1TriggerRates.cc File Reference
#include "DataFormats/Scalers/interface/L1TriggerRates.h"
#include "DataFormats/Scalers/interface/L1TriggerScalers.h"
#include <iostream>
#include <cstdio>

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &s, const L1TriggerRates &c)
 Pretty-print operator for L1TriggerRates. More...
 

Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const L1TriggerRates c 
)

Pretty-print operator for L1TriggerRates.

Definition at line 191 of file L1TriggerRates.cc.

References L1TriggerRates::calibrationTriggersRate(), L1TriggerRates::calibrationTriggersRunRate(), L1TriggerRates::deadTimeActiveCalibrationPercent(), L1TriggerRates::deadTimeActiveCalibrationRunPercent(), L1TriggerRates::deadTimeActivePartitionPercent(), L1TriggerRates::deadTimeActivePartitionRunPercent(), L1TriggerRates::deadTimeActivePercent(), L1TriggerRates::deadTimeActivePrivatePercent(), L1TriggerRates::deadTimeActivePrivateRunPercent(), L1TriggerRates::deadTimeActiveRunPercent(), L1TriggerRates::deadTimeActiveThrottlePercent(), L1TriggerRates::deadTimeActiveThrottleRunPercent(), L1TriggerRates::deadTimeActiveTimeSlotPercent(), L1TriggerRates::deadTimeActiveTimeSlotRunPercent(), L1TriggerRates::deadTimePercent(), L1TriggerRates::deadTimeRunPercent(), L1TriggerRates::deltaT(), L1TriggerRates::deltaTRun(), L1TriggerRates::eventNumberRate(), L1TriggerRates::eventNumberRunRate(), L1TriggerRates::finalTriggersDistributedRate(), L1TriggerRates::finalTriggersDistributedRunRate(), L1TriggerRates::finalTriggersGeneratedRate(), L1TriggerRates::finalTriggersGeneratedRunRate(), L1TriggerRates::finalTriggersInvalidBCPercent(), L1TriggerRates::finalTriggersInvalidBCRunPercent(), mps_fire::i, geometryCSVtoXML::line, L1TriggerRates::lostFinalTriggersActivePercent(), L1TriggerRates::lostFinalTriggersActiveRunPercent(), L1TriggerRates::lostFinalTriggersPercent(), L1TriggerRates::lostFinalTriggersRunPercent(), L1TriggerRates::numberResetsRate(), L1TriggerRates::numberResetsRunRate(), L1TriggerRates::orbitNumberRate(), L1TriggerRates::orbitNumberRunRate(), L1TriggerRates::randomTriggersRate(), L1TriggerRates::randomTriggersRunRate(), alignCSCRings::s, L1TriggerRates::testTriggersRate(), L1TriggerRates::totalTestTriggersRate(), L1TriggerRates::totalTestTriggersRunRate(), L1TriggerRates::triggerNumberRate(), L1TriggerRates::triggerNumberRunRate(), L1TriggerRates::triggersRate(), L1TriggerRates::triggersRunRate(), and L1TriggerRates::version().

191  {
192  s << "L1TriggerRates Version: " << c.version() << " Differential Rates in Hz, DeltaT: " << c.deltaT() << " sec"
193  << std::endl;
194  char line[128];
195 
196  sprintf(line, " TriggerNumber: %e EventNumber: %e", c.triggerNumberRate(), c.eventNumberRate());
197  s << line << std::endl;
198 
199  sprintf(line,
200  " TriggersDistributed: %e TriggersGenerated: %e",
203  s << line << std::endl;
204 
205  sprintf(line,
206  " RandomTriggers: %e CalibrationTriggers: %e",
207  c.randomTriggersRate(),
209  s << line << std::endl;
210 
211  sprintf(
212  line, " TotalTestTriggers: %e OrbitNumber: %e", c.totalTestTriggersRate(), c.orbitNumberRate());
213  s << line << std::endl;
214 
215  sprintf(
216  line, " NumberResets: %e DeadTime: %3.3f%%", c.numberResetsRate(), c.deadTimePercent());
217  s << line << std::endl;
218 
219  sprintf(line,
220  " DeadTimeActive: %3.3f%% DeadTimeActiveCalibration: %3.3f%%",
223  s << line << std::endl;
224 
225  sprintf(line,
226  " LostTriggers: %3.3f%% DeadTimeActivePartition: %3.3f%%",
229  s << line << std::endl;
230 
231  sprintf(line,
232  " LostTriggersActive: %3.3f%% DeadTimeActiveThrottle: %3.3f%%",
235  s << line << std::endl;
236 
237  sprintf(line,
238  " TriggersInvalidBC: %3.3f%% DeadTimeActivePrivate: %3.3f%%",
241  s << line << std::endl;
242 
243  sprintf(line,
244  " DeadTimeActiveTimeSlot: %3.3f%%",
246  s << line << std::endl;
247 
248  std::vector<double> triggersRate = c.triggersRate();
249  int length = triggersRate.size() / 4;
250  for (int i = 0; i < length; i++) {
251  sprintf(line,
252  " %3.3d:%e %3.3d:%e %3.3d:%e %3.3d:%e",
253  i,
254  triggersRate[i],
255  (i + length),
256  triggersRate[i + length],
257  (i + (length * 2)),
258  triggersRate[i + (length * 2)],
259  (i + (length * 3)),
260  triggersRate[i + (length * 3)]);
261  s << line << std::endl;
262  }
263 
264  std::vector<double> testTriggersRate = c.testTriggersRate();
265  length = testTriggersRate.size() / 4;
266  for (int i = 0; i < length; i++) {
267  sprintf(line,
268  " %3.3d:%e %3.3d:%e %3.3d:%e %3.3d:%e",
269  i,
270  testTriggersRate[i],
271  (i + length),
272  testTriggersRate[i + length],
273  (i + (length * 2)),
274  testTriggersRate[i + (length * 2)],
275  (i + (length * 3)),
276  testTriggersRate[i + (length * 3)]);
277  s << line << std::endl;
278  }
279 
280  // Run Average rates
281 
282  s << "L1TriggerRates Version: " << c.version() << " Run Average Rates in Hz, DeltaT: " << c.deltaTRun() << " sec"
283  << std::endl;
284 
285  sprintf(
286  line, " TriggerNumber: %e EventNumber: %e", c.triggerNumberRunRate(), c.eventNumberRunRate());
287  s << line << std::endl;
288 
289  sprintf(line,
290  " TriggersDistributed: %e TriggersGenerated: %e",
293  s << line << std::endl;
294 
295  sprintf(line,
296  " RandomTriggers: %e CalibrationTriggers: %e",
299  s << line << std::endl;
300 
301  sprintf(line,
302  " TotalTestTriggers: %e OrbitNumber: %e",
304  c.orbitNumberRunRate());
305  s << line << std::endl;
306 
307  sprintf(line,
308  " NumberResets: %e DeadTime: %3.3f%%",
310  c.deadTimeRunPercent());
311  s << line << std::endl;
312 
313  sprintf(line,
314  " DeadTimeActive: %3.3f%% DeadTimeActiveCalibration: %3.3f%%",
317  s << line << std::endl;
318 
319  sprintf(line,
320  " LostTriggers: %3.3f%% DeadTimeActivePartition: %3.3f%%",
323  s << line << std::endl;
324 
325  sprintf(line,
326  " LostTriggersActive: %3.3f%% DeadTimeActiveThrottle: %3.3f%%",
329  s << line << std::endl;
330 
331  sprintf(line,
332  " FinalTriggersInvalidBC: %3.3f%% DeadTimeActivePrivate: %3.3f%%",
335  s << line << std::endl;
336 
337  sprintf(line, " DeadTimeActiveTimeSlot: %3.3f%%", c.deadTimeActiveTimeSlotRunPercent());
338  s << line << std::endl;
339 
340  std::vector<double> triggersRunRate = c.triggersRunRate();
341  length = triggersRunRate.size() / 4;
342  for (int i = 0; i < length; i++) {
343  sprintf(line,
344  " %3.3d:%e %3.3d:%e %3.3d:%e %3.3d:%e",
345  i,
346  triggersRunRate[i],
347  (i + length),
348  triggersRunRate[i + length],
349  (i + (length * 2)),
350  triggersRunRate[i + (length * 2)],
351  (i + (length * 3)),
352  triggersRunRate[i + (length * 3)]);
353  s << line << std::endl;
354  }
355 
356  return s;
357 }
double numberResetsRate() const
double totalTestTriggersRunRate() const
double lostFinalTriggersActivePercent() const
double finalTriggersInvalidBCRunPercent() const
double lostFinalTriggersRunPercent() const
double lostFinalTriggersActiveRunPercent() const
double deltaTRun() const
double eventNumberRunRate() const
double finalTriggersGeneratedRunRate() const
double finalTriggersGeneratedRate() const
double deadTimeActivePartitionRunPercent() const
double deadTimeActiveTimeSlotPercent() const
double deadTimeActivePercent() const
int version() const
get the data
double deadTimeRunPercent() const
double finalTriggersDistributedRunRate() const
double deadTimePercent() const
double deadTimeActiveCalibrationRunPercent() const
double eventNumberRate() const
double deadTimeActivePartitionPercent() const
double finalTriggersDistributedRate() const
double calibrationTriggersRunRate() const
double numberResetsRunRate() const
double deadTimeActiveThrottlePercent() const
double deltaT() const
double triggerNumberRate() const
double deadTimeActiveTimeSlotRunPercent() const
double finalTriggersInvalidBCPercent() const
double randomTriggersRunRate() const
double calibrationTriggersRate() const
double orbitNumberRate() const
double triggerNumberRunRate() const
double totalTestTriggersRate() const
std::vector< double > triggersRunRate() const
double deadTimeActiveCalibrationPercent() const
std::vector< double > testTriggersRate() const
double deadTimeActiveRunPercent() const
double randomTriggersRate() const
double deadTimeActiveThrottleRunPercent() const
double lostFinalTriggersPercent() const
double deadTimeActivePrivateRunPercent() const
double deadTimeActivePrivatePercent() const
double orbitNumberRunRate() const
std::vector< double > triggersRate() const