CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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 222 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(), 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().

223 {
224  s << "L1TriggerRates Version: " << c.version()
225  << " Differential Rates in Hz, DeltaT: " <<
226  c.deltaT() << " sec" << std::endl;
227  char line[128];
228 
229  sprintf(line,
230  " TriggerNumber: %e EventNumber: %e",
232  s << line << std::endl;
233 
234  sprintf(line,
235  " TriggersDistributed: %e TriggersGenerated: %e",
237  s << line << std::endl;
238 
239  sprintf(line,
240  " RandomTriggers: %e CalibrationTriggers: %e",
242  s << line << std::endl;
243 
244  sprintf(line,
245  " TotalTestTriggers: %e OrbitNumber: %e",
247  s << line << std::endl;
248 
249  sprintf(line,
250  " NumberResets: %e DeadTime: %3.3f%%",
252  s << line << std::endl;
253 
254  sprintf(line,
255  " DeadTimeActive: %3.3f%% DeadTimeActiveCalibration: %3.3f%%",
258  s << line << std::endl;
259 
260  sprintf(line,
261  " LostTriggers: %3.3f%% DeadTimeActivePartition: %3.3f%%",
264  s << line << std::endl;
265 
266  sprintf(line,
267  " LostTriggersActive: %3.3f%% DeadTimeActiveThrottle: %3.3f%%",
270  s << line << std::endl;
271 
272  sprintf(line,
273  " TriggersInvalidBC: %3.3f%% DeadTimeActivePrivate: %3.3f%%",
276  s << line << std::endl;
277 
278  sprintf(line,
279  " DeadTimeActiveTimeSlot: %3.3f%%",
281  s << line << std::endl;
282 
283  std::vector<double> triggersRate = c.triggersRate();
284  int length = triggersRate.size() / 4;
285  for ( int i=0; i<length; i++)
286  {
287  sprintf(line," %3.3d:%e %3.3d:%e %3.3d:%e %3.3d:%e",
288  i, triggersRate[i],
289  (i+length), triggersRate[i+length],
290  (i+(length*2)), triggersRate[i+(length*2)],
291  (i+(length*3)), triggersRate[i+(length*3)]);
292  s << line << std::endl;
293  }
294 
295  std::vector<double> testTriggersRate = c.testTriggersRate();
296  length = testTriggersRate.size() / 4;
297  for ( int i=0; i<length; i++)
298  {
299  sprintf(line," %3.3d:%e %3.3d:%e %3.3d:%e %3.3d:%e",
300  i, testTriggersRate[i],
301  (i+length), testTriggersRate[i+length],
302  (i+(length*2)), testTriggersRate[i+(length*2)],
303  (i+(length*3)), testTriggersRate[i+(length*3)]);
304  s << line << std::endl;
305  }
306 
307 
308  // Run Average rates
309 
310  s << "L1TriggerRates Version: " << c.version()
311  << " Run Average Rates in Hz, DeltaT: " <<
312  c.deltaTRun() << " sec" << std::endl;
313 
314  sprintf(line,
315  " TriggerNumber: %e EventNumber: %e",
317  s << line << std::endl;
318 
319  sprintf(line,
320  " TriggersDistributed: %e TriggersGenerated: %e",
323  s << line << std::endl;
324 
325  sprintf(line,
326  " RandomTriggers: %e CalibrationTriggers: %e",
328  s << line << std::endl;
329 
330  sprintf(line,
331  " TotalTestTriggers: %e OrbitNumber: %e",
333  s << line << std::endl;
334 
335  sprintf(line,
336  " NumberResets: %e DeadTime: %3.3f%%",
338  s << line << std::endl;
339 
340  sprintf(line,
341  " DeadTimeActive: %3.3f%% DeadTimeActiveCalibration: %3.3f%%",
344  s << line << std::endl;
345 
346  sprintf(line,
347  " LostTriggers: %3.3f%% DeadTimeActivePartition: %3.3f%%",
350  s << line << std::endl;
351 
352  sprintf(line,
353  " LostTriggersActive: %3.3f%% DeadTimeActiveThrottle: %3.3f%%",
356  s << line << std::endl;
357 
358  sprintf(line,
359  " FinalTriggersInvalidBC: %3.3f%% DeadTimeActivePrivate: %3.3f%%",
362  s << line << std::endl;
363 
364  sprintf(line,
365  " DeadTimeActiveTimeSlot: %3.3f%%",
367  s << line << std::endl;
368 
369  std::vector<double> triggersRunRate = c.triggersRunRate();
370  length = triggersRunRate.size() / 4;
371  for ( int i=0; i<length; i++)
372  {
373  sprintf(line," %3.3d:%e %3.3d:%e %3.3d:%e %3.3d:%e",
374  i, triggersRunRate[i],
375  (i+length), triggersRunRate[i+length],
376  (i+(length*2)), triggersRunRate[i+(length*2)],
377  (i+(length*3)), triggersRunRate[i+(length*3)]);
378  s << line << std::endl;
379  }
380 
381  return s;
382 }
double numberResetsRate() const
double totalTestTriggersRunRate() const
double lostFinalTriggersActivePercent() const
int i
Definition: DBlmapReader.cc:9
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