CMS 3D CMS Logo

Classes | Public Types | Public Member Functions | Protected Attributes

L1TriggerScalers Class Reference

#include <L1TriggerScalers.h>

List of all members.

Classes

class  h
 Persistable copy of L1 Trigger Scalers. More...

Public Types

enum  { nL1Triggers = 128, nL1TestTriggers = 64 }

Public Member Functions

unsigned int bunchCrossingErrors () const
unsigned int bunchNumber () const
unsigned int calibrationTriggers () const
timespec collectionTimeDetails () const
timespec collectionTimeSpecial () const
timespec collectionTimeSummary () const
unsigned long long deadTime () const
unsigned long long deadTimeActive () const
unsigned long long deadTimeActiveCalibration () const
unsigned long long deadTimeActivePartition () const
unsigned long long deadTimeActivePrivate () const
unsigned long long deadTimeActiveThrottle () const
unsigned long long deadTimeActiveTimeSlot () const
bool empty () const
 empty method (= false)
unsigned int eventID () const
unsigned int eventNumber () const
unsigned int finalTriggersDistributed () const
unsigned int finalTriggersGenerated () const
unsigned int finalTriggersInvalidBC () const
 L1TriggerScalers ()
 L1TriggerScalers (const unsigned char *rawData)
unsigned long long lostFinalTriggers () const
unsigned long long lostFinalTriggersActive () const
unsigned int luminositySection () const
std::string name () const
 name method
unsigned int numberResets () const
int operator!= (const L1TriggerScalers &e) const
 inequality operator
int operator== (const L1TriggerScalers &e) const
 equality operator
unsigned int orbitNumber () const
unsigned int randomTriggers () const
unsigned int sourceID () const
std::vector< unsigned int > testTriggers () const
unsigned int totalTestTriggers () const
unsigned int triggerNumber () const
std::vector< unsigned int > triggers () const
unsigned int trigType () const
int version () const
virtual ~L1TriggerScalers ()

Protected Attributes

unsigned short bunchCrossingErrors_
unsigned int bunchNumber_
unsigned int calibrationTriggers_
TimeSpec collectionTimeDetails_
TimeSpec collectionTimeSpecial_
TimeSpec collectionTimeSummary_
unsigned long long deadTime_
unsigned long long deadTimeActive_
unsigned long long deadTimeActiveCalibration_
unsigned long long deadTimeActivePartition_
unsigned long long deadTimeActivePrivate_
unsigned long long deadTimeActiveThrottle_
unsigned long long deadTimeActiveTimeSlot_
unsigned int eventID_
unsigned int eventNumber_
unsigned int finalTriggersDistributed_
unsigned int finalTriggersGenerated_
unsigned int finalTriggersInvalidBC_
unsigned long long lostFinalTriggers_
unsigned long long lostFinalTriggersActive_
unsigned int luminositySection_
unsigned int numberResets_
unsigned int orbitNumber_
unsigned int randomTriggers_
unsigned int sourceID_
std::vector< unsigned int > testTriggers_
unsigned int totalTestTriggers_
unsigned int triggerNumber_
std::vector< unsigned int > triggers_
unsigned int trigType_
int version_

Detailed Description

Definition at line 29 of file L1TriggerScalers.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
nL1Triggers 
nL1TestTriggers 

Definition at line 33 of file L1TriggerScalers.h.

  {
    nL1Triggers          = 128,
    nL1TestTriggers      = 64
  };

Constructor & Destructor Documentation

L1TriggerScalers::L1TriggerScalers ( )
L1TriggerScalers::L1TriggerScalers ( const unsigned char *  rawData)

Definition at line 43 of file L1TriggerScalers.cc.

References TriggerScalersRaw_v1::ALGO_RATE, TriggerScalersRaw_v1::BC_ERRORS, bunchCrossingErrors_, bunchNumber_, TriggerScalersRaw_v1::CAL_TRIGGER, TriggerScalersRaw_v1::CALIBRATION_DEADTIMEA, calibrationTriggers_, collectionTimeDetails_, TriggerScalersRaw_v1::collectionTimeDetails_nsec, TriggerScalersRaw_v1::collectionTimeDetails_sec, collectionTimeSpecial_, TriggerScalersRaw_v1::collectionTimeSpecial_nsec, TriggerScalersRaw_v1::collectionTimeSpecial_sec, collectionTimeSummary_, TriggerScalersRaw_v1::collectionTimeSummary_nsec, TriggerScalersRaw_v1::collectionTimeSummary_sec, TriggerScalersRaw_v1::DEADTIME, deadTime_, TriggerScalersRaw_v1::DEADTIMEA, deadTimeActive_, deadTimeActiveCalibration_, deadTimeActivePartition_, deadTimeActivePrivate_, deadTimeActiveThrottle_, deadTimeActiveTimeSlot_, TriggerScalersRaw_v1::EVENT_NR, eventID_, eventNumber_, finalTriggersDistributed_, finalTriggersGenerated_, finalTriggersInvalidBC_, TriggerScalersRaw_v1::FINOR_DISTRIBUTED, TriggerScalersRaw_v1::FINOR_GENERATED, TriggerScalersRaw_v1::FINOR_IN_INVALID_BC, ScalersEventRecordRaw_v1::header, i, L1TriggerScalers(), TriggerScalersRaw_v1::LOST_FINOR, TriggerScalersRaw_v1::LOST_FINORA, lostFinalTriggers_, lostFinalTriggersActive_, TriggerScalersRaw_v1::LUMINOSITY_SEGMENT, luminositySection_, ScalersRaw::N_L1_TEST_TRIGGERS_v1, ScalersRaw::N_L1_TRIGGERS_v1, TriggerScalersRaw_v1::NR_OF_RESETS, numberResets_, TriggerScalersRaw_v1::ORBIT_NUMBER, orbitNumber_, TriggerScalersRaw_v1::PRIV_DEADTIMEA, TriggerScalersRaw_v1::PTCSTATUS_DEADTIMEA, TriggerScalersRaw_v1::RANDOM_TRIGGER, randomTriggers_, TimeSpec::set_tv_nsec(), TimeSpec::set_tv_sec(), sourceID_, TriggerScalersRaw_v1::TEST_RATE, TriggerScalersRaw_v1::TEST_TRIGGER, testTriggers_, TriggerScalersRaw_v1::THROTTLE_DEADTIMEA, TriggerScalersRaw_v1::TIMESLOT_DEADTIMEA, totalTestTriggers_, ScalersEventRecordRaw_v1::trig, TriggerScalersRaw_v1::TRIGGER_NR, triggerNumber_, triggers_, trigType_, ScalersEventRecordRaw_v1::version, and version_.

{ 
  L1TriggerScalers();

  struct ScalersEventRecordRaw_v1 * raw 
    = (struct ScalersEventRecordRaw_v1 *)rawData;

  trigType_     = ( raw->header >> 56 ) &        0xFULL;
  eventID_      = ( raw->header >> 32 ) & 0x00FFFFFFULL;
  sourceID_     = ( raw->header >>  8 ) & 0x00000FFFULL;
  bunchNumber_  = ( raw->header >> 20 ) &      0xFFFULL;

  version_ = raw->version;
  if ( ( version_ == 1 ) || ( version_ == 2 ) )
  {
    collectionTimeSpecial_.set_tv_sec( static_cast<long>(
      raw->trig.collectionTimeSpecial_sec));
    collectionTimeSpecial_.set_tv_nsec( 
      raw->trig.collectionTimeSpecial_nsec);
    orbitNumber_               = raw->trig.ORBIT_NUMBER;
    luminositySection_         = raw->trig.LUMINOSITY_SEGMENT;
    bunchCrossingErrors_       = raw->trig.BC_ERRORS;

    collectionTimeSummary_.set_tv_sec( static_cast<long>(
      raw->trig.collectionTimeSummary_sec));
    collectionTimeSummary_.set_tv_nsec( 
      raw->trig.collectionTimeSummary_nsec);

    triggerNumber_             = raw->trig.TRIGGER_NR;
    eventNumber_               = raw->trig.EVENT_NR;
    finalTriggersDistributed_  = raw->trig.FINOR_DISTRIBUTED;
    calibrationTriggers_       = raw->trig.CAL_TRIGGER;
    randomTriggers_            = raw->trig.RANDOM_TRIGGER;
    totalTestTriggers_         = raw->trig.TEST_TRIGGER;

    finalTriggersGenerated_    = raw->trig.FINOR_GENERATED;
    finalTriggersInvalidBC_    = raw->trig.FINOR_IN_INVALID_BC;

    deadTime_                  = raw->trig.DEADTIME;
    lostFinalTriggers_         = raw->trig.LOST_FINOR;
    deadTimeActive_            = raw->trig.DEADTIMEA;
    lostFinalTriggersActive_   = raw->trig.LOST_FINORA;
    deadTimeActivePrivate_     = raw->trig.PRIV_DEADTIMEA;
    deadTimeActivePartition_   = raw->trig.PTCSTATUS_DEADTIMEA;
    deadTimeActiveThrottle_    = raw->trig.THROTTLE_DEADTIMEA;
    deadTimeActiveCalibration_ = raw->trig.CALIBRATION_DEADTIMEA;
    deadTimeActiveTimeSlot_    = raw->trig.TIMESLOT_DEADTIMEA;
    numberResets_              = raw->trig.NR_OF_RESETS;

    collectionTimeDetails_.set_tv_sec( static_cast<long>(
      raw->trig.collectionTimeDetails_sec));
    collectionTimeDetails_.set_tv_nsec(
      raw->trig.collectionTimeDetails_nsec);

    for ( int i=0; i<ScalersRaw::N_L1_TRIGGERS_v1; i++)
    { triggers_.push_back( raw->trig.ALGO_RATE[i]);}

    for ( int i=0; i<ScalersRaw::N_L1_TEST_TRIGGERS_v1; i++)
    { testTriggers_.push_back( raw->trig.TEST_RATE[i]);}
  }
}
L1TriggerScalers::~L1TriggerScalers ( ) [virtual]

Definition at line 105 of file L1TriggerScalers.cc.

{ } 

Member Function Documentation

unsigned int L1TriggerScalers::bunchCrossingErrors ( ) const [inline]

Definition at line 64 of file L1TriggerScalers.h.

References bunchCrossingErrors_.

Referenced by operator<<().

  { return(bunchCrossingErrors_);}
unsigned int L1TriggerScalers::bunchNumber ( ) const [inline]

Definition at line 55 of file L1TriggerScalers.h.

References bunchNumber_.

Referenced by operator<<().

{ return(bunchNumber_);}
unsigned int L1TriggerScalers::calibrationTriggers ( ) const [inline]
timespec L1TriggerScalers::collectionTimeDetails ( ) const [inline]
timespec L1TriggerScalers::collectionTimeSpecial ( ) const [inline]

Definition at line 57 of file L1TriggerScalers.h.

References collectionTimeSpecial_, and TimeSpec::get_timespec().

Referenced by operator<<().

timespec L1TriggerScalers::collectionTimeSummary ( ) const [inline]
unsigned long long L1TriggerScalers::deadTime ( ) const [inline]

Definition at line 87 of file L1TriggerScalers.h.

References deadTime_.

Referenced by L1TriggerRates::computeRates(), L1TriggerRates::computeRunRates(), and operator<<().

  { return(deadTime_);}
unsigned long long L1TriggerScalers::deadTimeActive ( ) const [inline]
unsigned long long L1TriggerScalers::deadTimeActiveCalibration ( ) const [inline]
unsigned long long L1TriggerScalers::deadTimeActivePartition ( ) const [inline]
unsigned long long L1TriggerScalers::deadTimeActivePrivate ( ) const [inline]
unsigned long long L1TriggerScalers::deadTimeActiveThrottle ( ) const [inline]
unsigned long long L1TriggerScalers::deadTimeActiveTimeSlot ( ) const [inline]
bool L1TriggerScalers::empty ( ) const [inline]

empty method (= false)

Definition at line 47 of file L1TriggerScalers.h.

{ return false; }
unsigned int L1TriggerScalers::eventID ( ) const [inline]

Definition at line 53 of file L1TriggerScalers.h.

References eventID_.

Referenced by operator<<().

{ return(eventID_);}
unsigned int L1TriggerScalers::eventNumber ( ) const [inline]

Definition at line 72 of file L1TriggerScalers.h.

References eventNumber_.

Referenced by L1TriggerRates::computeRates(), L1TriggerRates::computeRunRates(), and operator<<().

  { return(eventNumber_);}
unsigned int L1TriggerScalers::finalTriggersDistributed ( ) const [inline]
unsigned int L1TriggerScalers::finalTriggersGenerated ( ) const [inline]
unsigned int L1TriggerScalers::finalTriggersInvalidBC ( ) const [inline]
unsigned long long L1TriggerScalers::lostFinalTriggers ( ) const [inline]
unsigned long long L1TriggerScalers::lostFinalTriggersActive ( ) const [inline]
unsigned int L1TriggerScalers::luminositySection ( ) const [inline]

Definition at line 62 of file L1TriggerScalers.h.

References luminositySection_.

Referenced by operator<<().

  { return(luminositySection_);}
std::string L1TriggerScalers::name ( ) const [inline]

name method

Definition at line 44 of file L1TriggerScalers.h.

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

inequality operator

Definition at line 122 of file L1TriggerScalers.h.

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

equality operator

Definition at line 119 of file L1TriggerScalers.h.

{ return false; }
unsigned int L1TriggerScalers::orbitNumber ( ) const [inline]
unsigned int L1TriggerScalers::randomTriggers ( ) const [inline]
unsigned int L1TriggerScalers::sourceID ( ) const [inline]

Definition at line 54 of file L1TriggerScalers.h.

References sourceID_.

Referenced by operator<<().

{ return(sourceID_);}
std::vector<unsigned int> L1TriggerScalers::testTriggers ( ) const [inline]

Definition at line 115 of file L1TriggerScalers.h.

References testTriggers_.

Referenced by L1TriggerRates::computeRates(), and operator<<().

  { return(testTriggers_);}
unsigned int L1TriggerScalers::totalTestTriggers ( ) const [inline]
unsigned int L1TriggerScalers::triggerNumber ( ) const [inline]
std::vector<unsigned int> L1TriggerScalers::triggers ( ) const [inline]

Definition at line 112 of file L1TriggerScalers.h.

References triggers_.

Referenced by L1TriggerRates::computeRates(), L1TriggerRates::computeRunRates(), and operator<<().

  { return(triggers_);}
unsigned int L1TriggerScalers::trigType ( ) const [inline]

Definition at line 52 of file L1TriggerScalers.h.

References trigType_.

Referenced by operator<<().

{ return(trigType_);}
int L1TriggerScalers::version ( ) const [inline]

Definition at line 50 of file L1TriggerScalers.h.

References version_.

Referenced by L1TriggerRates::computeRunRates(), and operator<<().

{ return(version_);}

Member Data Documentation

unsigned short L1TriggerScalers::bunchCrossingErrors_ [protected]

Definition at line 135 of file L1TriggerScalers.h.

Referenced by bunchCrossingErrors(), and L1TriggerScalers().

unsigned int L1TriggerScalers::bunchNumber_ [protected]

Definition at line 130 of file L1TriggerScalers.h.

Referenced by bunchNumber(), and L1TriggerScalers().

unsigned int L1TriggerScalers::calibrationTriggers_ [protected]

Definition at line 141 of file L1TriggerScalers.h.

Referenced by calibrationTriggers(), and L1TriggerScalers().

Definition at line 157 of file L1TriggerScalers.h.

Referenced by collectionTimeDetails(), and L1TriggerScalers().

Definition at line 132 of file L1TriggerScalers.h.

Referenced by collectionTimeSpecial(), and L1TriggerScalers().

Definition at line 137 of file L1TriggerScalers.h.

Referenced by collectionTimeSummary(), and L1TriggerScalers().

unsigned long long L1TriggerScalers::deadTime_ [protected]

Definition at line 146 of file L1TriggerScalers.h.

Referenced by deadTime(), and L1TriggerScalers().

unsigned long long L1TriggerScalers::deadTimeActive_ [protected]

Definition at line 148 of file L1TriggerScalers.h.

Referenced by deadTimeActive(), and L1TriggerScalers().

unsigned long long L1TriggerScalers::deadTimeActiveCalibration_ [protected]

Definition at line 153 of file L1TriggerScalers.h.

Referenced by deadTimeActiveCalibration(), and L1TriggerScalers().

unsigned long long L1TriggerScalers::deadTimeActivePartition_ [protected]

Definition at line 151 of file L1TriggerScalers.h.

Referenced by deadTimeActivePartition(), and L1TriggerScalers().

unsigned long long L1TriggerScalers::deadTimeActivePrivate_ [protected]

Definition at line 150 of file L1TriggerScalers.h.

Referenced by deadTimeActivePrivate(), and L1TriggerScalers().

unsigned long long L1TriggerScalers::deadTimeActiveThrottle_ [protected]

Definition at line 152 of file L1TriggerScalers.h.

Referenced by deadTimeActiveThrottle(), and L1TriggerScalers().

unsigned long long L1TriggerScalers::deadTimeActiveTimeSlot_ [protected]

Definition at line 154 of file L1TriggerScalers.h.

Referenced by deadTimeActiveTimeSlot(), and L1TriggerScalers().

unsigned int L1TriggerScalers::eventID_ [protected]

Definition at line 128 of file L1TriggerScalers.h.

Referenced by eventID(), and L1TriggerScalers().

unsigned int L1TriggerScalers::eventNumber_ [protected]

Definition at line 139 of file L1TriggerScalers.h.

Referenced by eventNumber(), and L1TriggerScalers().

Definition at line 140 of file L1TriggerScalers.h.

Referenced by finalTriggersDistributed(), and L1TriggerScalers().

Definition at line 144 of file L1TriggerScalers.h.

Referenced by finalTriggersGenerated(), and L1TriggerScalers().

Definition at line 145 of file L1TriggerScalers.h.

Referenced by finalTriggersInvalidBC(), and L1TriggerScalers().

unsigned long long L1TriggerScalers::lostFinalTriggers_ [protected]

Definition at line 147 of file L1TriggerScalers.h.

Referenced by L1TriggerScalers(), and lostFinalTriggers().

unsigned long long L1TriggerScalers::lostFinalTriggersActive_ [protected]

Definition at line 149 of file L1TriggerScalers.h.

Referenced by L1TriggerScalers(), and lostFinalTriggersActive().

unsigned int L1TriggerScalers::luminositySection_ [protected]

Definition at line 134 of file L1TriggerScalers.h.

Referenced by L1TriggerScalers(), and luminositySection().

unsigned int L1TriggerScalers::numberResets_ [protected]

Definition at line 155 of file L1TriggerScalers.h.

Referenced by L1TriggerScalers(), and numberResets().

unsigned int L1TriggerScalers::orbitNumber_ [protected]

Definition at line 133 of file L1TriggerScalers.h.

Referenced by L1TriggerScalers(), and orbitNumber().

unsigned int L1TriggerScalers::randomTriggers_ [protected]

Definition at line 142 of file L1TriggerScalers.h.

Referenced by L1TriggerScalers(), and randomTriggers().

unsigned int L1TriggerScalers::sourceID_ [protected]

Definition at line 129 of file L1TriggerScalers.h.

Referenced by L1TriggerScalers(), and sourceID().

std::vector<unsigned int> L1TriggerScalers::testTriggers_ [protected]

Definition at line 159 of file L1TriggerScalers.h.

Referenced by L1TriggerScalers(), and testTriggers().

unsigned int L1TriggerScalers::totalTestTriggers_ [protected]

Definition at line 143 of file L1TriggerScalers.h.

Referenced by L1TriggerScalers(), and totalTestTriggers().

unsigned int L1TriggerScalers::triggerNumber_ [protected]

Definition at line 138 of file L1TriggerScalers.h.

Referenced by L1TriggerScalers(), and triggerNumber().

std::vector<unsigned int> L1TriggerScalers::triggers_ [protected]

Definition at line 158 of file L1TriggerScalers.h.

Referenced by L1TriggerScalers(), and triggers().

unsigned int L1TriggerScalers::trigType_ [protected]

Definition at line 127 of file L1TriggerScalers.h.

Referenced by L1TriggerScalers(), and trigType().

int L1TriggerScalers::version_ [protected]

Definition at line 125 of file L1TriggerScalers.h.

Referenced by L1TriggerScalers(), and version().