CMS 3D CMS Logo

Classes | Public Types | Public Member Functions | Protected Attributes

LumiScalers Class Reference

#include <LumiScalers.h>

List of all members.

Classes

class  h
 Persistable copy of HF Lumi Scalers. More...

Public Types

enum  { nOcc = 2 }

Public Member Functions

unsigned int bunchNumber () const
timespec collectionTime () const
float deadTimeNormalization () const
bool empty () const
 empty method (= false)
unsigned int eventID () const
float instantETLumi () const
float instantETLumiErr () const
unsigned char instantETLumiQlty () const
float instantLumi () const
float instantLumiErr () const
unsigned char instantLumiQlty () const
std::vector< float > instantOccLumi () const
std::vector< float > instantOccLumiErr () const
std::vector< unsigned char > instantOccLumiQlty () const
float liveLumiETFill () const
float liveLumiETRun () const
float liveLumiFill () const
std::vector< float > liveLumiOccFill () const
std::vector< float > liveLumiOccRun () const
float liveLumiRun () const
float lumiETFill () const
float lumiETRun () const
float lumiFill () const
std::vector< float > lumiNoise () const
std::vector< float > lumiOccFill () const
std::vector< float > lumiOccRun () const
float lumiRun () const
 LumiScalers (const unsigned char *rawData)
 LumiScalers ()
std::string name () const
 name method
float normalization () const
unsigned int numOrbits () const
int operator!= (const LumiScalers &e) const
 inequality operator
int operator== (const LumiScalers &e) const
 equality operator
unsigned int sectionNumber () const
unsigned int sourceID () const
unsigned int startOrbit () const
unsigned int trigType () const
int version () const
virtual ~LumiScalers ()

Protected Attributes

unsigned int bunchNumber_
TimeSpec collectionTime_
float deadTimeNormalization_
unsigned int eventID_
float instantETLumi_
float instantETLumiErr_
unsigned char instantETLumiQlty_
float instantLumi_
float instantLumiErr_
unsigned char instantLumiQlty_
std::vector< float > instantOccLumi_
std::vector< float > instantOccLumiErr_
std::vector< unsigned char > instantOccLumiQlty_
float liveLumiETFill_
float liveLumiETRun_
float liveLumiFill_
std::vector< float > liveLumiOccFill_
std::vector< float > liveLumiOccRun_
float liveLumiRun_
float lumiETFill_
float lumiETRun_
float lumiFill_
std::vector< float > lumiNoise_
std::vector< float > lumiOccFill_
std::vector< float > lumiOccRun_
float lumiRun_
float normalization_
unsigned int numOrbits_
unsigned int sectionNumber_
unsigned int sourceID_
unsigned int startOrbit_
unsigned int trigType_
int version_

Detailed Description

Definition at line 29 of file LumiScalers.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
nOcc 

Definition at line 37 of file LumiScalers.h.

  {
    nOcc = 2
  };

Constructor & Destructor Documentation

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

Definition at line 47 of file LumiScalers.cc.

References bunchNumber_, collectionTime_, LumiScalersRaw_v1::collectionTime_nsec, LumiScalersRaw_v1::collectionTime_sec, LumiScalersRaw_v1::DeadtimeNormalization, deadTimeNormalization_, eventID_, ScalersEventRecordRaw_v1::header, i, LumiScalersRaw_v1::InstantETLumi, instantETLumi_, LumiScalersRaw_v1::InstantETLumiErr, instantETLumiErr_, LumiScalersRaw_v1::InstantETLumiQlty, instantETLumiQlty_, LumiScalersRaw_v1::InstantLumi, instantLumi_, LumiScalersRaw_v1::InstantLumiErr, instantLumiErr_, LumiScalersRaw_v1::InstantLumiQlty, instantLumiQlty_, LumiScalersRaw_v1::InstantOccLumi, instantOccLumi_, LumiScalersRaw_v1::InstantOccLumiErr, instantOccLumiErr_, LumiScalersRaw_v1::InstantOccLumiQlty, instantOccLumiQlty_, LumiScalersRaw_v1::LiveLumiETFill, liveLumiETFill_, LumiScalersRaw_v1::LiveLumiETRun, liveLumiETRun_, LumiScalersRaw_v1::LiveLumiFill, liveLumiFill_, LumiScalersRaw_v1::LiveLumiOccFill, liveLumiOccFill_, LumiScalersRaw_v1::LiveLumiOccRun, liveLumiOccRun_, LumiScalersRaw_v1::LiveLumiRun, liveLumiRun_, ScalersEventRecordRaw_v3::lumi, ScalersEventRecordRaw_v1::lumi, fjr2json::lumi, LumiScalersRaw_v1::LumiETFill, lumiETFill_, LumiScalersRaw_v1::LumiETRun, lumiETRun_, LumiScalersRaw_v1::LumiFill, lumiFill_, LumiScalersRaw_v1::lumiNoise, lumiNoise_, LumiScalersRaw_v1::LumiOccFill, lumiOccFill_, LumiScalersRaw_v1::LumiOccRun, lumiOccRun_, LumiScalersRaw_v1::LumiRun, lumiRun_, LumiScalers(), ScalersRaw::N_LUMI_OCC_v1, LumiScalersRaw_v1::Normalization, normalization_, NULL, LumiScalersRaw_v1::numOrbits, numOrbits_, runTheMatrix_dev::raw, LumiScalersRaw_v1::sectionNumber, sectionNumber_, TimeSpec::set_tv_nsec(), TimeSpec::set_tv_sec(), sourceID_, LumiScalersRaw_v1::startOrbit, startOrbit_, trigType_, ScalersEventRecordRaw_v1::version, and version_.

{ 
  LumiScalers();

  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;

  struct LumiScalersRaw_v1 * lumi = NULL;

  if ( version_ >= 1 )
  {
    if ( version_ <= 2 )
    {
      lumi = & (raw->lumi);
    }
    else 
    {
      struct ScalersEventRecordRaw_v3 * raw3 
        = (struct ScalersEventRecordRaw_v3 *)rawData;
      lumi = & (raw3->lumi);
    }
    collectionTime_.set_tv_sec(static_cast<long>(lumi->collectionTime_sec));
    collectionTime_.set_tv_nsec(lumi->collectionTime_nsec);
    deadTimeNormalization_  = lumi->DeadtimeNormalization;
    normalization_          = lumi->Normalization;
    lumiFill_               = lumi->LumiFill;
    lumiRun_                = lumi->LumiRun;
    liveLumiFill_           = lumi->LiveLumiFill;
    liveLumiRun_            = lumi->LiveLumiRun;
    instantLumi_            = lumi->InstantLumi;
    instantLumiErr_         = lumi->InstantLumiErr;
    instantLumiQlty_        = lumi->InstantLumiQlty;
    lumiETFill_             = lumi->LumiETFill;
    lumiETRun_              = lumi->LumiETRun;
    liveLumiETFill_         = lumi->LiveLumiETFill;
    liveLumiETRun_          = lumi->LiveLumiETRun;
    instantETLumi_          = lumi->InstantETLumi;
    instantETLumiErr_       = lumi->InstantETLumiErr;
    instantETLumiQlty_      = lumi->InstantETLumiQlty;
    for ( int i=0; i<ScalersRaw::N_LUMI_OCC_v1; i++)
    {
      lumiOccFill_.push_back(lumi->LumiOccFill[i]);
      lumiOccRun_.push_back(lumi->LumiOccRun[i]);
      liveLumiOccFill_.push_back(lumi->LiveLumiOccFill[i]);
      liveLumiOccRun_.push_back(lumi->LiveLumiOccRun[i]);
      instantOccLumi_.push_back(lumi->InstantOccLumi[i]);
      instantOccLumiErr_.push_back(lumi->InstantOccLumiErr[i]);
      instantOccLumiQlty_.push_back(lumi->InstantOccLumiQlty[i]);
      lumiNoise_.push_back(lumi->lumiNoise[i]);
    }
    sectionNumber_ = lumi->sectionNumber;
    startOrbit_    = lumi->startOrbit;
    numOrbits_     = lumi->numOrbits;
  }
}
LumiScalers::~LumiScalers ( ) [virtual]

Definition at line 108 of file LumiScalers.cc.

{ } 

Member Function Documentation

unsigned int LumiScalers::bunchNumber ( ) const [inline]

Definition at line 51 of file LumiScalers.h.

References bunchNumber_.

Referenced by operator<<().

{ return(bunchNumber_);}
timespec LumiScalers::collectionTime ( ) const [inline]

Definition at line 54 of file LumiScalers.h.

References collectionTime_, and TimeSpec::get_timespec().

Referenced by operator<<().

float LumiScalers::deadTimeNormalization ( ) const [inline]

Definition at line 56 of file LumiScalers.h.

References deadTimeNormalization_.

Referenced by operator<<().

bool LumiScalers::empty ( ) const [inline]

empty method (= false)

Definition at line 46 of file LumiScalers.h.

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

Definition at line 49 of file LumiScalers.h.

References eventID_.

Referenced by operator<<().

{ return(eventID_);}
float LumiScalers::instantETLumi ( ) const [inline]

Definition at line 71 of file LumiScalers.h.

References instantETLumi_.

Referenced by operator<<().

{ return(instantETLumi_);}
float LumiScalers::instantETLumiErr ( ) const [inline]

Definition at line 72 of file LumiScalers.h.

References instantETLumiErr_.

Referenced by operator<<().

{ return(instantETLumiErr_);}
unsigned char LumiScalers::instantETLumiQlty ( ) const [inline]

Definition at line 73 of file LumiScalers.h.

References instantETLumiQlty_.

Referenced by operator<<().

{ return(instantETLumiQlty_);}
float LumiScalers::instantLumi ( ) const [inline]

Definition at line 63 of file LumiScalers.h.

References instantLumi_.

Referenced by operator<<().

{ return(instantLumi_);}
float LumiScalers::instantLumiErr ( ) const [inline]

Definition at line 64 of file LumiScalers.h.

References instantLumiErr_.

Referenced by operator<<().

{ return(instantLumiErr_);}
unsigned char LumiScalers::instantLumiQlty ( ) const [inline]

Definition at line 65 of file LumiScalers.h.

References instantLumiQlty_.

Referenced by operator<<().

{ return(instantLumiQlty_);}
std::vector<float> LumiScalers::instantOccLumi ( ) const [inline]

Definition at line 83 of file LumiScalers.h.

References instantOccLumi_.

Referenced by operator<<().

  { return(instantOccLumi_);}
std::vector<float> LumiScalers::instantOccLumiErr ( ) const [inline]

Definition at line 85 of file LumiScalers.h.

References instantOccLumiErr_.

Referenced by operator<<().

  { return(instantOccLumiErr_);}
std::vector<unsigned char> LumiScalers::instantOccLumiQlty ( ) const [inline]

Definition at line 87 of file LumiScalers.h.

References instantOccLumiQlty_.

Referenced by operator<<().

  { return(instantOccLumiQlty_);}
float LumiScalers::liveLumiETFill ( ) const [inline]

Definition at line 69 of file LumiScalers.h.

References liveLumiETFill_.

Referenced by operator<<().

{ return(liveLumiETFill_);}
float LumiScalers::liveLumiETRun ( ) const [inline]

Definition at line 70 of file LumiScalers.h.

References liveLumiETRun_.

Referenced by operator<<().

{ return(liveLumiETRun_);}
float LumiScalers::liveLumiFill ( ) const [inline]

Definition at line 61 of file LumiScalers.h.

References liveLumiFill_.

Referenced by operator<<().

{ return(liveLumiFill_);}
std::vector<float> LumiScalers::liveLumiOccFill ( ) const [inline]

Definition at line 79 of file LumiScalers.h.

References liveLumiOccFill_.

Referenced by operator<<().

  { return(liveLumiOccFill_);}
std::vector<float> LumiScalers::liveLumiOccRun ( ) const [inline]

Definition at line 81 of file LumiScalers.h.

References liveLumiOccRun_.

Referenced by operator<<().

  { return(liveLumiOccRun_);}
float LumiScalers::liveLumiRun ( ) const [inline]

Definition at line 62 of file LumiScalers.h.

References liveLumiRun_.

Referenced by operator<<().

{ return(liveLumiRun_);}
float LumiScalers::lumiETFill ( ) const [inline]

Definition at line 67 of file LumiScalers.h.

References lumiETFill_.

{ return(lumiETFill_);}
float LumiScalers::lumiETRun ( ) const [inline]

Definition at line 68 of file LumiScalers.h.

References lumiETRun_.

{ return(lumiETRun_);}
float LumiScalers::lumiFill ( ) const [inline]

Definition at line 59 of file LumiScalers.h.

References lumiFill_.

Referenced by operator<<().

{ return(lumiFill_);}
std::vector<float> LumiScalers::lumiNoise ( ) const [inline]

Definition at line 89 of file LumiScalers.h.

References lumiNoise_.

Referenced by operator<<().

{ return(lumiNoise_);}
std::vector<float> LumiScalers::lumiOccFill ( ) const [inline]

Definition at line 75 of file LumiScalers.h.

References lumiOccFill_.

Referenced by operator<<().

  { return(lumiOccFill_);}
std::vector<float> LumiScalers::lumiOccRun ( ) const [inline]

Definition at line 77 of file LumiScalers.h.

References lumiOccRun_.

Referenced by operator<<().

  { return(lumiOccRun_);}
float LumiScalers::lumiRun ( ) const [inline]

Definition at line 60 of file LumiScalers.h.

References lumiRun_.

Referenced by operator<<().

{ return(lumiRun_);}
std::string LumiScalers::name ( ) const [inline]

name method

Definition at line 43 of file LumiScalers.h.

{ return "LumiScalers"; }
float LumiScalers::normalization ( ) const [inline]

Definition at line 55 of file LumiScalers.h.

References normalization_.

Referenced by operator<<().

{ return(normalization_);}
unsigned int LumiScalers::numOrbits ( ) const [inline]

Definition at line 93 of file LumiScalers.h.

References numOrbits_.

Referenced by operator<<().

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

inequality operator

Definition at line 99 of file LumiScalers.h.

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

equality operator

Definition at line 96 of file LumiScalers.h.

{ return false; }
unsigned int LumiScalers::sectionNumber ( ) const [inline]

Definition at line 91 of file LumiScalers.h.

References sectionNumber_.

Referenced by operator<<().

{ return(sectionNumber_);}
unsigned int LumiScalers::sourceID ( ) const [inline]

Definition at line 50 of file LumiScalers.h.

References sourceID_.

Referenced by operator<<().

{ return(sourceID_);}
unsigned int LumiScalers::startOrbit ( ) const [inline]

Definition at line 92 of file LumiScalers.h.

References startOrbit_.

Referenced by operator<<().

{ return(startOrbit_);}
unsigned int LumiScalers::trigType ( ) const [inline]

Definition at line 48 of file LumiScalers.h.

References trigType_.

Referenced by operator<<().

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

Definition at line 53 of file LumiScalers.h.

References version_.

Referenced by operator<<().

{ return(version_);}

Member Data Documentation

unsigned int LumiScalers::bunchNumber_ [protected]

Definition at line 106 of file LumiScalers.h.

Referenced by bunchNumber(), and LumiScalers().

Definition at line 110 of file LumiScalers.h.

Referenced by collectionTime(), and LumiScalers().

Definition at line 113 of file LumiScalers.h.

Referenced by deadTimeNormalization(), and LumiScalers().

unsigned int LumiScalers::eventID_ [protected]

Definition at line 104 of file LumiScalers.h.

Referenced by eventID(), and LumiScalers().

float LumiScalers::instantETLumi_ [protected]

Definition at line 127 of file LumiScalers.h.

Referenced by instantETLumi(), and LumiScalers().

float LumiScalers::instantETLumiErr_ [protected]

Definition at line 128 of file LumiScalers.h.

Referenced by instantETLumiErr(), and LumiScalers().

unsigned char LumiScalers::instantETLumiQlty_ [protected]

Definition at line 130 of file LumiScalers.h.

Referenced by instantETLumiQlty(), and LumiScalers().

float LumiScalers::instantLumi_ [protected]

Definition at line 119 of file LumiScalers.h.

Referenced by instantLumi(), and LumiScalers().

float LumiScalers::instantLumiErr_ [protected]

Definition at line 120 of file LumiScalers.h.

Referenced by instantLumiErr(), and LumiScalers().

unsigned char LumiScalers::instantLumiQlty_ [protected]

Definition at line 121 of file LumiScalers.h.

Referenced by instantLumiQlty(), and LumiScalers().

std::vector<float> LumiScalers::instantOccLumi_ [protected]

Definition at line 136 of file LumiScalers.h.

Referenced by instantOccLumi(), and LumiScalers().

std::vector<float> LumiScalers::instantOccLumiErr_ [protected]

Definition at line 137 of file LumiScalers.h.

Referenced by instantOccLumiErr(), and LumiScalers().

std::vector<unsigned char> LumiScalers::instantOccLumiQlty_ [protected]

Definition at line 138 of file LumiScalers.h.

Referenced by instantOccLumiQlty(), and LumiScalers().

float LumiScalers::liveLumiETFill_ [protected]

Definition at line 125 of file LumiScalers.h.

Referenced by liveLumiETFill(), and LumiScalers().

float LumiScalers::liveLumiETRun_ [protected]

Definition at line 126 of file LumiScalers.h.

Referenced by liveLumiETRun(), and LumiScalers().

float LumiScalers::liveLumiFill_ [protected]

Definition at line 117 of file LumiScalers.h.

Referenced by liveLumiFill(), and LumiScalers().

std::vector<float> LumiScalers::liveLumiOccFill_ [protected]

Definition at line 134 of file LumiScalers.h.

Referenced by liveLumiOccFill(), and LumiScalers().

std::vector<float> LumiScalers::liveLumiOccRun_ [protected]

Definition at line 135 of file LumiScalers.h.

Referenced by liveLumiOccRun(), and LumiScalers().

float LumiScalers::liveLumiRun_ [protected]

Definition at line 118 of file LumiScalers.h.

Referenced by liveLumiRun(), and LumiScalers().

float LumiScalers::lumiETFill_ [protected]

Definition at line 123 of file LumiScalers.h.

Referenced by lumiETFill(), and LumiScalers().

float LumiScalers::lumiETRun_ [protected]

Definition at line 124 of file LumiScalers.h.

Referenced by lumiETRun(), and LumiScalers().

float LumiScalers::lumiFill_ [protected]

Definition at line 115 of file LumiScalers.h.

Referenced by lumiFill(), and LumiScalers().

std::vector<float> LumiScalers::lumiNoise_ [protected]

Definition at line 139 of file LumiScalers.h.

Referenced by lumiNoise(), and LumiScalers().

std::vector<float> LumiScalers::lumiOccFill_ [protected]

Definition at line 132 of file LumiScalers.h.

Referenced by lumiOccFill(), and LumiScalers().

std::vector<float> LumiScalers::lumiOccRun_ [protected]

Definition at line 133 of file LumiScalers.h.

Referenced by lumiOccRun(), and LumiScalers().

float LumiScalers::lumiRun_ [protected]

Definition at line 116 of file LumiScalers.h.

Referenced by lumiRun(), and LumiScalers().

float LumiScalers::normalization_ [protected]

Definition at line 112 of file LumiScalers.h.

Referenced by LumiScalers(), and normalization().

unsigned int LumiScalers::numOrbits_ [protected]

Definition at line 143 of file LumiScalers.h.

Referenced by LumiScalers(), and numOrbits().

unsigned int LumiScalers::sectionNumber_ [protected]

Definition at line 141 of file LumiScalers.h.

Referenced by LumiScalers(), and sectionNumber().

unsigned int LumiScalers::sourceID_ [protected]

Definition at line 105 of file LumiScalers.h.

Referenced by LumiScalers(), and sourceID().

unsigned int LumiScalers::startOrbit_ [protected]

Definition at line 142 of file LumiScalers.h.

Referenced by LumiScalers(), and startOrbit().

unsigned int LumiScalers::trigType_ [protected]

Definition at line 103 of file LumiScalers.h.

Referenced by LumiScalers(), and trigType().

int LumiScalers::version_ [protected]

Definition at line 108 of file LumiScalers.h.

Referenced by LumiScalers(), and version().