CMS 3D CMS Logo

Classes | Public Types | Public Member Functions | Protected Attributes

Level1TriggerRates Class Reference

#include <Level1TriggerRates.h>

List of all members.

Classes

class  h
 Persistable copy of Level1 Trigger Rates. More...

Public Types

enum  { N_BX = 3654, N_BX_ACTIVE = 2808 }

Public Member Functions

timespec collectionTime ()
timespec collectionTime () const
timespec collectionTimeLumiSeg ()
timespec collectionTimeLumiSeg () const
void computeRates (Level1TriggerScalers const &t1, int runNumber)
void computeRates (Level1TriggerScalers const &t1, Level1TriggerScalers const &t2)
void computeRates (Level1TriggerScalers const &t1, Level1TriggerScalers const &t2, int runNumber)
void computeRates (Level1TriggerScalers const &t1)
double deadtimeBeamActiveCalibrationPercent () const
double deadtimeBeamActivePartitionControllerPercent () const
double deadtimeBeamActivePercent () const
double deadtimeBeamActivePrivateOrbitPercent () const
double deadtimeBeamActiveTimeSlotPercent () const
double deadtimeBeamActiveTriggerRulesPercent () const
double deadtimePercent () const
unsigned long long deltaNS () const
double deltaT () const
bool empty () const
 empty method (= false)
std::vector< double > gtAlgoCountsRate () const
double gtEventsRate () const
std::vector< double > gtTechCountsRate () const
double gtTriggersRate () const
double l1AsCalibrationRate () const
double l1AsPhysicsRate () const
double l1AsRandomRate () const
double l1AsTestRate () const
 Level1TriggerRates (Level1TriggerScalers const &s1, Level1TriggerScalers const &s2)
 Level1TriggerRates ()
 Level1TriggerRates (Level1TriggerScalers const &s)
 Level1TriggerRates (Level1TriggerScalers const &s1, Level1TriggerScalers const &s2, int runNumber)
 Level1TriggerRates (Level1TriggerScalers const &s, int runNumber)
std::string name () const
 name method
int operator!= (const Level1TriggerRates &e) const
 inequality operator
int operator== (const Level1TriggerRates &e) const
 equality operator
double triggersPhysicsGeneratedFDLRate () const
double triggersPhysicsLostBeamActiveRate () const
double triggersPhysicsLostBeamInactiveRate () const
double triggersPhysicsLostRate () const
int version () const
 get the data
virtual ~Level1TriggerRates ()

Protected Attributes

TimeSpec collectionTime_
TimeSpec collectionTimeLumiSeg_
double deadtimeBeamActiveCalibrationPercent_
double deadtimeBeamActivePartitionControllerPercent_
double deadtimeBeamActivePercent_
double deadtimeBeamActivePrivateOrbitPercent_
double deadtimeBeamActiveTimeSlotPercent_
double deadtimeBeamActiveTriggerRulesPercent_
double deadtimePercent_
unsigned long long deltaNS_
double deltaT_
std::vector< double > gtAlgoCountsRate_
double gtEventsRate_
std::vector< double > gtTechCountsRate_
double gtTriggersRate_
double l1AsCalibrationRate_
double l1AsPhysicsRate_
double l1AsRandomRate_
double l1AsTestRate_
double triggersPhysicsGeneratedFDLRate_
double triggersPhysicsLostBeamActiveRate_
double triggersPhysicsLostBeamInactiveRate_
double triggersPhysicsLostRate_
int version_

Detailed Description

Definition at line 31 of file Level1TriggerRates.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
N_BX 
N_BX_ACTIVE 

Definition at line 35 of file Level1TriggerRates.h.

  {
    N_BX = 3654,
    N_BX_ACTIVE = 2808
  };

Constructor & Destructor Documentation

Level1TriggerRates::Level1TriggerRates ( )
Level1TriggerRates::Level1TriggerRates ( Level1TriggerScalers const &  s)
Level1TriggerRates::Level1TriggerRates ( Level1TriggerScalers const &  s,
int  runNumber 
)
Level1TriggerRates::Level1TriggerRates ( Level1TriggerScalers const &  s1,
Level1TriggerScalers const &  s2 
)
Level1TriggerRates::Level1TriggerRates ( Level1TriggerScalers const &  s1,
Level1TriggerScalers const &  s2,
int  runNumber 
)

Definition at line 57 of file Level1TriggerRates.cc.

References computeRates(), and Level1TriggerRates().

Level1TriggerRates::~Level1TriggerRates ( ) [virtual]

Definition at line 65 of file Level1TriggerRates.cc.

{ } 

Member Function Documentation

timespec Level1TriggerRates::collectionTime ( ) [inline]

Definition at line 73 of file Level1TriggerRates.h.

References collectionTime_, and TimeSpec::get_timespec().

Referenced by operator<<().

timespec Level1TriggerRates::collectionTime ( ) const [inline]

Definition at line 127 of file Level1TriggerRates.h.

References collectionTime_, and TimeSpec::get_timespec().

timespec Level1TriggerRates::collectionTimeLumiSeg ( ) [inline]

Definition at line 84 of file Level1TriggerRates.h.

References collectionTimeLumiSeg_, and TimeSpec::get_timespec().

Referenced by operator<<().

timespec Level1TriggerRates::collectionTimeLumiSeg ( ) const [inline]
void Level1TriggerRates::computeRates ( Level1TriggerScalers const &  t1)
void Level1TriggerRates::computeRates ( Level1TriggerScalers const &  t1,
int  runNumber 
)

Definition at line 71 of file Level1TriggerRates.cc.

References Level1TriggerScalers::collectionTime(), collectionTime_, Level1TriggerScalers::collectionTimeLumiSeg(), collectionTimeLumiSeg_, Level1TriggerScalers::deadtime(), Level1TriggerScalers::deadtimeBeamActive(), Level1TriggerScalers::deadtimeBeamActiveCalibration(), deadtimeBeamActiveCalibrationPercent_, Level1TriggerScalers::deadtimeBeamActivePartitionController(), deadtimeBeamActivePartitionControllerPercent_, deadtimeBeamActivePercent_, Level1TriggerScalers::deadtimeBeamActivePrivateOrbit(), deadtimeBeamActivePrivateOrbitPercent_, Level1TriggerScalers::deadtimeBeamActiveTimeSlot(), deadtimeBeamActiveTimeSlotPercent_, Level1TriggerScalers::deadtimeBeamActiveTriggerRules(), deadtimeBeamActiveTriggerRulesPercent_, deadtimePercent_, deltaNS_, deltaT_, Level1TriggerScalers::gtAlgoCounts(), gtAlgoCountsRate_, Level1TriggerScalers::gtEventsRate(), gtEventsRate_, Level1TriggerScalers::gtTechCounts(), gtTechCountsRate_, Level1TriggerScalers::gtTriggersRate(), gtTriggersRate_, Level1TriggerScalers::l1AsCalibration(), l1AsCalibrationRate_, Level1TriggerScalers::l1AsPhysics(), l1AsPhysicsRate_, Level1TriggerScalers::l1AsRandom(), l1AsRandomRate_, Level1TriggerScalers::l1AsTest(), l1AsTestRate_, Level1TriggerScalers::percentLS(), Level1TriggerScalers::percentLSActive(), Level1TriggerScalers::rateLS(), DTTTrigCorrFirst::run, TimeSpec::set_tv_nsec(), TimeSpec::set_tv_sec(), Level1TriggerScalers::triggersPhysicsGeneratedFDL(), triggersPhysicsGeneratedFDLRate_, Level1TriggerScalers::triggersPhysicsLost(), Level1TriggerScalers::triggersPhysicsLostBeamActive(), triggersPhysicsLostBeamActiveRate_, Level1TriggerScalers::triggersPhysicsLostBeamInactive(), triggersPhysicsLostBeamInactiveRate_, triggersPhysicsLostRate_, Level1TriggerScalers::version(), and version_.

{
  version_ = t.version();

  collectionTime_.set_tv_sec(static_cast<long>(t.collectionTime().tv_sec));
  collectionTime_.set_tv_nsec(t.collectionTime().tv_nsec);

  gtTriggersRate_ = t.gtTriggersRate();
  gtEventsRate_   = t.gtEventsRate();

  collectionTimeLumiSeg_.set_tv_sec(static_cast<long>(t.collectionTimeLumiSeg().tv_sec));
  collectionTimeLumiSeg_.set_tv_nsec(t.collectionTimeLumiSeg().tv_nsec);

  triggersPhysicsGeneratedFDLRate_ 
    = Level1TriggerScalers::rateLS(t.triggersPhysicsGeneratedFDL(),run);
  triggersPhysicsLostRate_ 
    = Level1TriggerScalers::rateLS(t.triggersPhysicsLost(),run);
  triggersPhysicsLostBeamActiveRate_ 
    = Level1TriggerScalers::rateLS(t.triggersPhysicsLostBeamActive(),run);
  triggersPhysicsLostBeamInactiveRate_ 
    = Level1TriggerScalers::rateLS(t.triggersPhysicsLostBeamInactive(),run);

  l1AsPhysicsRate_ = Level1TriggerScalers::rateLS(t.l1AsPhysics(),run);
  l1AsRandomRate_ = Level1TriggerScalers::rateLS(t.l1AsRandom(),run);
  l1AsTestRate_ = Level1TriggerScalers::rateLS(t.l1AsTest(),run);
  l1AsCalibrationRate_ = Level1TriggerScalers::rateLS(t.l1AsCalibration(),run);

  deadtimePercent_ = Level1TriggerScalers::percentLS(t.deadtime(),run);
  deadtimeBeamActivePercent_ =
    Level1TriggerScalers::percentLSActive(t.deadtimeBeamActive(),run);
  deadtimeBeamActiveTriggerRulesPercent_ =
    Level1TriggerScalers::percentLSActive(t.deadtimeBeamActiveTriggerRules(),run);
  deadtimeBeamActiveCalibrationPercent_ =
    Level1TriggerScalers::percentLSActive(t.deadtimeBeamActiveCalibration(),run);
  deadtimeBeamActivePrivateOrbitPercent_ =
    Level1TriggerScalers::percentLSActive(t.deadtimeBeamActivePrivateOrbit(),run);
  deadtimeBeamActivePartitionControllerPercent_ =
    Level1TriggerScalers::percentLSActive(t.deadtimeBeamActivePartitionController(),run);
  deadtimeBeamActiveTimeSlotPercent_ =
    Level1TriggerScalers::percentLSActive(t.deadtimeBeamActiveTimeSlot(),run);

  const std::vector<unsigned int> gtAlgoCounts = t.gtAlgoCounts();
  for ( std::vector<unsigned int>::const_iterator counts = gtAlgoCounts.begin();
        counts != gtAlgoCounts.end(); ++counts)
  {
    gtAlgoCountsRate_.push_back(Level1TriggerScalers::rateLS(*counts,run));
  }

  const std::vector<unsigned int> gtTechCounts = t.gtTechCounts();
  for ( std::vector<unsigned int>::const_iterator counts = gtTechCounts.begin();
        counts != gtTechCounts.end(); ++counts)
  {
    gtTechCountsRate_.push_back(Level1TriggerScalers::rateLS(*counts,run));
  }

  deltaNS_ = 0ULL;
  deltaT_ = 0.0;
}
void Level1TriggerRates::computeRates ( Level1TriggerScalers const &  t1,
Level1TriggerScalers const &  t2,
int  runNumber 
)

Definition at line 137 of file Level1TriggerRates.cc.

References Level1TriggerScalers::collectionTime(), computeRates(), deltaNS_, deltaT_, Level1TriggerScalers::gtEvents(), gtEventsRate_, Level1TriggerScalers::gtTriggers(), and gtTriggersRate_.

{
  computeRates(t1,run);

  unsigned long long zeit1 = 
    ( (unsigned long long)t1.collectionTime().tv_sec * 1000000000ULL)| 
    ( (unsigned long long)t1.collectionTime().tv_nsec );
  unsigned long long zeit2 = 
    ( (unsigned long long)t2.collectionTime().tv_sec * 1000000000ULL)| 
    ( (unsigned long long)t2.collectionTime().tv_nsec );

  deltaT_  = 0.0;
  deltaNS_ = 0ULL;
  if ( zeit2 > zeit1 ) 
  {
    deltaNS_ = zeit2 - zeit1;
    deltaT_  = ((double)deltaNS_) / 1.0E9;
    gtTriggersRate_ = 
      ((double)(t2.gtTriggers()-t1.gtTriggers()))/deltaT_;
    gtEventsRate_   = 
      ((double)(t2.gtEvents()-t1.gtEvents()))/deltaT_;
  }
}
void Level1TriggerRates::computeRates ( Level1TriggerScalers const &  t1,
Level1TriggerScalers const &  t2 
)
double Level1TriggerRates::deadtimeBeamActiveCalibrationPercent ( ) const [inline]

Definition at line 115 of file Level1TriggerRates.h.

References deadtimeBeamActiveCalibrationPercent_.

Referenced by operator<<().

double Level1TriggerRates::deadtimeBeamActivePartitionControllerPercent ( ) const [inline]
double Level1TriggerRates::deadtimeBeamActivePercent ( ) const [inline]

Definition at line 109 of file Level1TriggerRates.h.

References deadtimeBeamActivePercent_.

Referenced by operator<<().

double Level1TriggerRates::deadtimeBeamActivePrivateOrbitPercent ( ) const [inline]
double Level1TriggerRates::deadtimeBeamActiveTimeSlotPercent ( ) const [inline]

Definition at line 124 of file Level1TriggerRates.h.

References deadtimeBeamActiveTimeSlotPercent_.

Referenced by operator<<().

double Level1TriggerRates::deadtimeBeamActiveTriggerRulesPercent ( ) const [inline]
double Level1TriggerRates::deadtimePercent ( ) const [inline]

Definition at line 107 of file Level1TriggerRates.h.

References deadtimePercent_.

Referenced by L1TScalersSCAL::analyze(), and operator<<().

{ return(deadtimePercent_);}
unsigned long long Level1TriggerRates::deltaNS ( ) const [inline]

Definition at line 75 of file Level1TriggerRates.h.

References deltaNS_.

Referenced by operator<<().

{ return(deltaNS_);}
double Level1TriggerRates::deltaT ( ) const [inline]

Definition at line 76 of file Level1TriggerRates.h.

References deltaT_.

Referenced by operator<<().

{ return(deltaT_);}
bool Level1TriggerRates::empty ( ) const [inline]

empty method (= false)

Definition at line 68 of file Level1TriggerRates.h.

{ return false; }
std::vector<double> Level1TriggerRates::gtAlgoCountsRate ( ) const [inline]

Definition at line 133 of file Level1TriggerRates.h.

References gtAlgoCountsRate_.

Referenced by L1TScalersSCAL::analyze(), and operator<<().

{ return(gtAlgoCountsRate_);}
double Level1TriggerRates::gtEventsRate ( ) const [inline]

Definition at line 81 of file Level1TriggerRates.h.

References gtEventsRate_.

Referenced by operator<<().

  { return(gtEventsRate_);}
std::vector<double> Level1TriggerRates::gtTechCountsRate ( ) const [inline]

Definition at line 134 of file Level1TriggerRates.h.

References gtTechCountsRate_.

Referenced by L1TScalersSCAL::analyze(), and operator<<().

{ return(gtTechCountsRate_);}
double Level1TriggerRates::gtTriggersRate ( ) const [inline]

Definition at line 78 of file Level1TriggerRates.h.

References gtTriggersRate_.

Referenced by operator<<().

  { return(gtTriggersRate_);}
double Level1TriggerRates::l1AsCalibrationRate ( ) const [inline]

Definition at line 105 of file Level1TriggerRates.h.

References l1AsCalibrationRate_.

Referenced by operator<<().

double Level1TriggerRates::l1AsPhysicsRate ( ) const [inline]

Definition at line 99 of file Level1TriggerRates.h.

References l1AsPhysicsRate_.

Referenced by L1TScalersSCAL::analyze(), and operator<<().

{ return(l1AsPhysicsRate_);}
double Level1TriggerRates::l1AsRandomRate ( ) const [inline]

Definition at line 101 of file Level1TriggerRates.h.

References l1AsRandomRate_.

Referenced by L1TScalersSCAL::analyze(), and operator<<().

{ return(l1AsRandomRate_);}
double Level1TriggerRates::l1AsTestRate ( ) const [inline]

Definition at line 103 of file Level1TriggerRates.h.

References l1AsTestRate_.

Referenced by operator<<().

{ return(l1AsTestRate_);}
std::string Level1TriggerRates::name ( ) const [inline]

name method

Definition at line 65 of file Level1TriggerRates.h.

{ return "Level1TriggerRates"; }
int Level1TriggerRates::operator!= ( const Level1TriggerRates e) const [inline]

inequality operator

Definition at line 140 of file Level1TriggerRates.h.

{ return false; }
int Level1TriggerRates::operator== ( const Level1TriggerRates e) const [inline]

equality operator

Definition at line 137 of file Level1TriggerRates.h.

{ return false; }
double Level1TriggerRates::triggersPhysicsGeneratedFDLRate ( ) const [inline]

Definition at line 87 of file Level1TriggerRates.h.

References triggersPhysicsGeneratedFDLRate_.

Referenced by operator<<().

double Level1TriggerRates::triggersPhysicsLostBeamActiveRate ( ) const [inline]
double Level1TriggerRates::triggersPhysicsLostBeamInactiveRate ( ) const [inline]

Definition at line 96 of file Level1TriggerRates.h.

References triggersPhysicsLostBeamInactiveRate_.

Referenced by operator<<().

double Level1TriggerRates::triggersPhysicsLostRate ( ) const [inline]

Definition at line 90 of file Level1TriggerRates.h.

References triggersPhysicsLostRate_.

Referenced by L1TScalersSCAL::analyze(), and operator<<().

int Level1TriggerRates::version ( ) const [inline]

get the data

Definition at line 72 of file Level1TriggerRates.h.

References version_.

Referenced by operator<<().

{ return(version_);}

Member Data Documentation

Definition at line 146 of file Level1TriggerRates.h.

Referenced by collectionTime(), and computeRates().

Definition at line 152 of file Level1TriggerRates.h.

Referenced by collectionTimeLumiSeg(), and computeRates().

Definition at line 164 of file Level1TriggerRates.h.

Referenced by computeRates(), and deadtimeBeamActiveCalibrationPercent().

Definition at line 162 of file Level1TriggerRates.h.

Referenced by computeRates(), and deadtimeBeamActivePercent().

Definition at line 165 of file Level1TriggerRates.h.

Referenced by computeRates(), and deadtimeBeamActivePrivateOrbitPercent().

Definition at line 167 of file Level1TriggerRates.h.

Referenced by computeRates(), and deadtimeBeamActiveTimeSlotPercent().

Definition at line 163 of file Level1TriggerRates.h.

Referenced by computeRates(), and deadtimeBeamActiveTriggerRulesPercent().

Definition at line 161 of file Level1TriggerRates.h.

Referenced by computeRates(), and deadtimePercent().

unsigned long long Level1TriggerRates::deltaNS_ [protected]

Definition at line 147 of file Level1TriggerRates.h.

Referenced by computeRates(), and deltaNS().

double Level1TriggerRates::deltaT_ [protected]

Definition at line 148 of file Level1TriggerRates.h.

Referenced by computeRates(), and deltaT().

std::vector<double> Level1TriggerRates::gtAlgoCountsRate_ [protected]

Definition at line 169 of file Level1TriggerRates.h.

Referenced by computeRates(), and gtAlgoCountsRate().

Definition at line 150 of file Level1TriggerRates.h.

Referenced by computeRates(), and gtEventsRate().

std::vector<double> Level1TriggerRates::gtTechCountsRate_ [protected]

Definition at line 170 of file Level1TriggerRates.h.

Referenced by computeRates(), and gtTechCountsRate().

Definition at line 149 of file Level1TriggerRates.h.

Referenced by computeRates(), and gtTriggersRate().

Definition at line 160 of file Level1TriggerRates.h.

Referenced by computeRates(), and l1AsCalibrationRate().

Definition at line 157 of file Level1TriggerRates.h.

Referenced by computeRates(), and l1AsPhysicsRate().

Definition at line 158 of file Level1TriggerRates.h.

Referenced by computeRates(), and l1AsRandomRate().

Definition at line 159 of file Level1TriggerRates.h.

Referenced by computeRates(), and l1AsTestRate().

Definition at line 153 of file Level1TriggerRates.h.

Referenced by computeRates(), and triggersPhysicsGeneratedFDLRate().

Definition at line 155 of file Level1TriggerRates.h.

Referenced by computeRates(), and triggersPhysicsLostBeamActiveRate().

Definition at line 156 of file Level1TriggerRates.h.

Referenced by computeRates(), and triggersPhysicsLostBeamInactiveRate().

Definition at line 154 of file Level1TriggerRates.h.

Referenced by computeRates(), and triggersPhysicsLostRate().

Definition at line 144 of file Level1TriggerRates.h.

Referenced by computeRates(), and version().