CMS 3D CMS Logo

Functions

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/DataFormats/Scalers/src/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.

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().

{
  s << "L1TriggerRates Version: " << c.version() 
    << " Differential Rates in Hz, DeltaT: " <<
    c.deltaT() << " sec" << std::endl;
  char line[128];

  sprintf(line,
          " TriggerNumber:       %e  EventNumber:             %e",
          c.triggerNumberRate(), c.eventNumberRate());
  s << line << std::endl;

  sprintf(line,
          " TriggersDistributed: %e  TriggersGenerated:     %e",
          c.finalTriggersDistributedRate(), c.finalTriggersGeneratedRate());
  s << line << std::endl;

  sprintf(line,
          " RandomTriggers:      %e  CalibrationTriggers:    %e",
          c.randomTriggersRate(), c.calibrationTriggersRate());
  s << line << std::endl;

  sprintf(line,
          " TotalTestTriggers:   %e  OrbitNumber:             %e",
          c.totalTestTriggersRate(), c.orbitNumberRate());
  s << line << std::endl;

  sprintf(line,
          " NumberResets:        %e  DeadTime:                %3.3f%%",
          c.numberResetsRate(), c.deadTimePercent());
  s << line << std::endl;

  sprintf(line,
          " DeadTimeActive:        %3.3f%%    DeadTimeActiveCalibration:  %3.3f%%",
          c.deadTimeActivePercent(), 
          c.deadTimeActiveCalibrationPercent());
  s << line << std::endl;

  sprintf(line,
          " LostTriggers:          %3.3f%%    DeadTimeActivePartition:    %3.3f%%",
          c.lostFinalTriggersPercent(), 
          c.deadTimeActivePartitionPercent());
  s << line << std::endl;

  sprintf(line,
          " LostTriggersActive:    %3.3f%%    DeadTimeActiveThrottle:     %3.3f%%",
          c.lostFinalTriggersActivePercent(),
          c.deadTimeActiveThrottlePercent());
  s << line << std::endl;

  sprintf(line,
          " TriggersInvalidBC:     %3.3f%%    DeadTimeActivePrivate:      %3.3f%%",
          c.finalTriggersInvalidBCPercent(), 
          c.deadTimeActivePrivatePercent());
  s << line << std::endl;

  sprintf(line,
          "                                   DeadTimeActiveTimeSlot:     %3.3f%%",
          c.deadTimeActiveTimeSlotPercent());
  s << line << std::endl;

  std::vector<double> triggersRate = c.triggersRate();
  int length = triggersRate.size() / 4;
  for ( int i=0; i<length; i++)
  {
    sprintf(line," %3.3d:%e    %3.3d:%e    %3.3d:%e    %3.3d:%e",
            i,              triggersRate[i], 
            (i+length),     triggersRate[i+length], 
            (i+(length*2)), triggersRate[i+(length*2)], 
            (i+(length*3)), triggersRate[i+(length*3)]);
    s << line << std::endl;
  }

  std::vector<double> testTriggersRate = c.testTriggersRate();
  length = testTriggersRate.size() / 4;
  for ( int i=0; i<length; i++)
  {
    sprintf(line," %3.3d:%e    %3.3d:%e    %3.3d:%e    %3.3d:%e",
            i,              testTriggersRate[i], 
            (i+length),     testTriggersRate[i+length], 
            (i+(length*2)), testTriggersRate[i+(length*2)], 
            (i+(length*3)), testTriggersRate[i+(length*3)]);
    s << line << std::endl;
  }


  // Run Average rates

  s << "L1TriggerRates Version: " << c.version() 
    << " Run Average Rates in Hz, DeltaT: " <<
    c.deltaTRun() << " sec" << std::endl;

  sprintf(line,
          " TriggerNumber:     %e  EventNumber:             %e",
          c.triggerNumberRunRate(), c.eventNumberRunRate());
  s << line << std::endl;

  sprintf(line,
          " TriggersDistributed:  %e  TriggersGenerated:     %e",
          c.finalTriggersDistributedRunRate(), 
          c.finalTriggersGeneratedRunRate());
  s << line << std::endl;

  sprintf(line,
          " RandomTriggers:   %e  CalibrationTriggers:    %e",
          c.randomTriggersRunRate(), c.calibrationTriggersRunRate());
  s << line << std::endl;

  sprintf(line,
          " TotalTestTriggers: %e  OrbitNumber:             %e",
          c.totalTestTriggersRunRate(), c.orbitNumberRunRate());
  s << line << std::endl;

  sprintf(line,
          " NumberResets:      %e  DeadTime:                %3.3f%%",
          c.numberResetsRunRate(), c.deadTimeRunPercent());
  s << line << std::endl;

  sprintf(line,
          " DeadTimeActive:        %3.3f%%    DeadTimeActiveCalibration:  %3.3f%%",
          c.deadTimeActiveRunPercent(), 
          c.deadTimeActiveCalibrationRunPercent());
  s << line << std::endl;

  sprintf(line,
          " LostTriggers:          %3.3f%%    DeadTimeActivePartition:    %3.3f%%",
          c.lostFinalTriggersRunPercent(), 
          c.deadTimeActivePartitionRunPercent());
  s << line << std::endl;

  sprintf(line,
          " LostTriggersActive:    %3.3f%%    DeadTimeActiveThrottle:     %3.3f%%",
          c.lostFinalTriggersActiveRunPercent(),
          c.deadTimeActiveThrottleRunPercent());
  s << line << std::endl;

  sprintf(line,
          " FinalTriggersInvalidBC:    %3.3f%%    DeadTimeActivePrivate:      %3.3f%%",
          c.finalTriggersInvalidBCRunPercent(), 
          c.deadTimeActivePrivateRunPercent());
  s << line << std::endl;

  sprintf(line,
          " DeadTimeActiveTimeSlot:      %3.3f%%",
          c.deadTimeActiveTimeSlotRunPercent());
  s << line << std::endl;

  std::vector<double> triggersRunRate = c.triggersRunRate();
  length = triggersRunRate.size() / 4;
  for ( int i=0; i<length; i++)
  {
    sprintf(line," %3.3d:%e    %3.3d:%e    %3.3d:%e    %3.3d:%e",
            i,              triggersRunRate[i], 
            (i+length),     triggersRunRate[i+length], 
            (i+(length*2)), triggersRunRate[i+(length*2)], 
            (i+(length*3)), triggersRunRate[i+(length*3)]);
    s << line << std::endl;
  }

  return s;
}