CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes | Friends
lumi::LumiSectionData Class Reference

#include <LumiSectionData.h>

Public Member Functions

BunchCrossingIterator bunchCrossingBegin (const LumiAlgoType lumialgotype) const
 
BunchCrossingIterator bunchCrossingEnd (const LumiAlgoType lumialgotype) const
 
const BunchCrossingInfo bunchCrossingInfo (const int BXIndex, const LumiAlgoType lumialgotype) const
 
void bunchCrossingInfo (const LumiAlgoType lumialgotype, std::vector< BunchCrossingInfo > &result) const
 
float deadFraction () const
 
HLTIterator hltBegin () const
 
HLTIterator hltEnd () const
 
bool HLThasData () const
 
float lumiAverage () const
 
float lumiError () const
 
int lumiquality () const
 
 LumiSectionData ()
 
int lumisectionID () const
 
std::string lumiVersion () const
 
size_t nBunchCrossing () const
 
size_t nHLTPath () const
 
void print (std::ostream &s) const
 
short qualityFlag () const
 
void setBunchCrossingData (const std::vector< BunchCrossingInfo > &BXs, const LumiAlgoType algotype)
 
void setDeadFraction (float deadfrac)
 
void setHLTData (const std::vector< HLTInfo > &hltdetail)
 
void setLumiAverage (float lumiavg)
 
void setLumiError (float lumierr)
 
void setLumiNull ()
 
void setLumiQuality (int lumiquality)
 
void setLumiSectionId (int sectionid)
 
void setLumiVersion (const std::string &versionid)
 
void setQualityFlag (short qualityflag)
 
void setStartOrbit (unsigned long long orbtnumber)
 
void setTriggerData (const std::vector< TriggerInfo > &triggerinfo)
 
unsigned long long startorbit () const
 
TriggerIterator trgBegin () const
 
TriggerIterator trgEnd () const
 
bool TriggerhasData () const
 
 ~LumiSectionData ()
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

std::vector< BunchCrossingInfom_bx
 
float m_deadfrac
 
std::vector< HLTInfom_hlt
 
float m_lumiavg
 
float m_lumierror
 
short m_quality
 
int m_sectionid
 
unsigned long long m_startorbit
 
std::vector< TriggerInfom_trigger
 
std::string m_versionid
 

Friends

class boost::serialization::access
 
template<typename CondSerializationT , typename Enabled >
struct cond::serialization::access
 

Detailed Description

Definition at line 69 of file LumiSectionData.h.

Constructor & Destructor Documentation

◆ LumiSectionData()

lumi::LumiSectionData::LumiSectionData ( )

Definition at line 3 of file LumiSectionData.cc.

3  : m_sectionid(0), m_versionid("-1") {
4  m_bx.reserve(lumi::BXMAX * LUMIALGOMAX);
5 }

References lumi::BXMAX, lumi::LUMIALGOMAX, and m_bx.

◆ ~LumiSectionData()

lumi::LumiSectionData::~LumiSectionData ( )
inline

Definition at line 72 of file LumiSectionData.h.

72 {}

Member Function Documentation

◆ bunchCrossingBegin()

lumi::BunchCrossingIterator lumi::LumiSectionData::bunchCrossingBegin ( const LumiAlgoType  lumialgotype) const

Definition at line 26 of file LumiSectionData.cc.

26  {
27  return m_bx.begin() + lumialgotype * BXMAX;
28 }

References lumi::BXMAX.

◆ bunchCrossingEnd()

lumi::BunchCrossingIterator lumi::LumiSectionData::bunchCrossingEnd ( const LumiAlgoType  lumialgotype) const

Definition at line 29 of file LumiSectionData.cc.

29  {
30  return m_bx.end() - (lumi::BXMAX)*lumialgotype;
31 }

References lumi::BXMAX.

◆ bunchCrossingInfo() [1/2]

const lumi::BunchCrossingInfo lumi::LumiSectionData::bunchCrossingInfo ( const int  BXIndex,
const LumiAlgoType  lumialgotype 
) const

Definition at line 21 of file LumiSectionData.cc.

22  {
23  int realIdx = BXIndex - lumi::BXMIN + lumialgotype * lumi::BXMAX;
24  return m_bx.at(realIdx);
25 }

References lumi::BXMAX, and lumi::BXMIN.

◆ bunchCrossingInfo() [2/2]

void lumi::LumiSectionData::bunchCrossingInfo ( const LumiAlgoType  lumialgotype,
std::vector< BunchCrossingInfo > &  result 
) const

Definition at line 14 of file LumiSectionData.cc.

15  {
16  result.clear();
17  size_t offset = lumialgotype * lumi::BXMAX;
18  std::copy(m_bx.begin() + offset, m_bx.begin() + offset + lumi::BXMAX, std::back_inserter(result));
19 }

References lumi::BXMAX, filterCSVwithJSON::copy, hltrates_dqm_sourceclient-live_cfg::offset, and mps_fire::result.

◆ deadFraction()

float lumi::LumiSectionData::deadFraction ( ) const

Definition at line 11 of file LumiSectionData.cc.

11 { return m_deadfrac; }

◆ hltBegin()

lumi::HLTIterator lumi::LumiSectionData::hltBegin ( ) const

Definition at line 34 of file LumiSectionData.cc.

34 { return m_hlt.begin(); }

◆ hltEnd()

lumi::HLTIterator lumi::LumiSectionData::hltEnd ( ) const

Definition at line 35 of file LumiSectionData.cc.

35 { return m_hlt.end(); }

◆ HLThasData()

bool lumi::LumiSectionData::HLThasData ( ) const

Definition at line 33 of file LumiSectionData.cc.

33 { return !m_hlt.empty(); }

◆ lumiAverage()

float lumi::LumiSectionData::lumiAverage ( ) const

Definition at line 9 of file LumiSectionData.cc.

9 { return m_lumiavg; }

◆ lumiError()

float lumi::LumiSectionData::lumiError ( ) const

Definition at line 10 of file LumiSectionData.cc.

10 { return m_lumierror; }

◆ lumiquality()

int lumi::LumiSectionData::lumiquality ( ) const

Definition at line 13 of file LumiSectionData.cc.

13 { return m_quality; }

◆ lumisectionID()

int lumi::LumiSectionData::lumisectionID ( ) const

Definition at line 7 of file LumiSectionData.cc.

7 { return m_sectionid; }

◆ lumiVersion()

std::string lumi::LumiSectionData::lumiVersion ( ) const

getter methods

Definition at line 6 of file LumiSectionData.cc.

6 { return m_versionid; }

◆ nBunchCrossing()

size_t lumi::LumiSectionData::nBunchCrossing ( ) const

Definition at line 8 of file LumiSectionData.cc.

8 { return m_bx.size() / lumi::LUMIALGOMAX; }

References lumi::LUMIALGOMAX.

◆ nHLTPath()

size_t lumi::LumiSectionData::nHLTPath ( ) const

Definition at line 32 of file LumiSectionData.cc.

32 { return m_hlt.size(); }

◆ print()

void lumi::LumiSectionData::print ( std::ostream &  s) const

Definition at line 59 of file LumiSectionData.cc.

59  {
60  s << "lumi section id :" << m_sectionid << ", ";
61  s << "lumi data version : " << m_versionid << ", ";
62  s << "lumi average : " << m_lumiavg << ", ";
63  s << "lumi error : " << m_lumierror << ", ";
64  s << "lumi quality : " << m_quality << ", ";
65  s << "lumi deadfrac : " << m_deadfrac << std::endl;
66  std::vector<lumi::TriggerInfo>::const_iterator trgit;
67  std::vector<lumi::TriggerInfo>::const_iterator trgitBeg = m_trigger.begin();
68  std::vector<lumi::TriggerInfo>::const_iterator trgitEnd = m_trigger.end();
69  unsigned int i = 0;
70  for (trgit = trgitBeg; trgit != trgitEnd; ++trgit) {
71  std::cout << " trg " << i << " : name : " << trgit->name << " : count : " << trgit->triggercount
72  << " : deadtime : " << trgit->deadtimecount << " : prescale : " << trgit->prescale << std::endl;
73  ++i;
74  }
75 }

References gather_cfg::cout, mps_fire::i, and alignCSCRings::s.

◆ qualityFlag()

short lumi::LumiSectionData::qualityFlag ( ) const

Definition at line 39 of file LumiSectionData.cc.

39 { return m_quality; }

◆ serialize()

template<class Archive >
void lumi::LumiSectionData::serialize ( Archive &  ar,
const unsigned int  version 
)
private

◆ setBunchCrossingData()

void lumi::LumiSectionData::setBunchCrossingData ( const std::vector< BunchCrossingInfo > &  BXs,
const LumiAlgoType  algotype 
)

Definition at line 48 of file LumiSectionData.cc.

49  {
50  std::copy(BXs.begin(), BXs.begin() + lumi::BXMAX, std::back_inserter(m_bx));
51 }

References lumi::BXMAX, and filterCSVwithJSON::copy.

◆ setDeadFraction()

void lumi::LumiSectionData::setDeadFraction ( float  deadfrac)

Definition at line 45 of file LumiSectionData.cc.

45 { m_deadfrac = deadfrac; }

◆ setHLTData()

void lumi::LumiSectionData::setHLTData ( const std::vector< HLTInfo > &  hltdetail)

Definition at line 52 of file LumiSectionData.cc.

52  {
53  std::copy(hltdetail.begin(), hltdetail.end(), std::back_inserter(m_hlt));
54 }

References filterCSVwithJSON::copy.

◆ setLumiAverage()

void lumi::LumiSectionData::setLumiAverage ( float  lumiavg)

Definition at line 43 of file LumiSectionData.cc.

43 { m_lumiavg = avg; }

◆ setLumiError()

void lumi::LumiSectionData::setLumiError ( float  lumierr)

Definition at line 46 of file LumiSectionData.cc.

46 { m_lumierror = lumierr; }

◆ setLumiNull()

void lumi::LumiSectionData::setLumiNull ( )

setter methods.

Definition at line 40 of file LumiSectionData.cc.

40 { m_versionid = -99; }

◆ setLumiQuality()

void lumi::LumiSectionData::setLumiQuality ( int  lumiquality)

Definition at line 44 of file LumiSectionData.cc.

◆ setLumiSectionId()

void lumi::LumiSectionData::setLumiSectionId ( int  sectionid)

Definition at line 42 of file LumiSectionData.cc.

42 { m_sectionid = sectionid; }

◆ setLumiVersion()

void lumi::LumiSectionData::setLumiVersion ( const std::string &  versionid)

Definition at line 41 of file LumiSectionData.cc.

41 { m_versionid = versionid; }

◆ setQualityFlag()

void lumi::LumiSectionData::setQualityFlag ( short  qualityflag)

Definition at line 58 of file LumiSectionData.cc.

58 { m_quality = qualityflag; }

◆ setStartOrbit()

void lumi::LumiSectionData::setStartOrbit ( unsigned long long  orbtnumber)

Definition at line 47 of file LumiSectionData.cc.

47 { m_startorbit = orbtnumber; }

◆ setTriggerData()

void lumi::LumiSectionData::setTriggerData ( const std::vector< TriggerInfo > &  triggerinfo)

Definition at line 55 of file LumiSectionData.cc.

55  {
56  std::copy(triggerinfo.begin(), triggerinfo.end(), std::back_inserter(m_trigger));
57 }

References filterCSVwithJSON::copy.

◆ startorbit()

unsigned long long lumi::LumiSectionData::startorbit ( ) const

Definition at line 12 of file LumiSectionData.cc.

12 { return m_startorbit; }

◆ trgBegin()

lumi::TriggerIterator lumi::LumiSectionData::trgBegin ( ) const

Definition at line 37 of file LumiSectionData.cc.

37 { return m_trigger.begin(); }

◆ trgEnd()

lumi::TriggerIterator lumi::LumiSectionData::trgEnd ( ) const

Definition at line 38 of file LumiSectionData.cc.

38 { return m_trigger.end(); }

◆ TriggerhasData()

bool lumi::LumiSectionData::TriggerhasData ( ) const

Definition at line 36 of file LumiSectionData.cc.

36 { return !m_trigger.empty(); }

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 134 of file LumiSectionData.h.

◆ cond::serialization::access

template<typename CondSerializationT , typename Enabled >
friend struct cond::serialization::access
friend

Definition at line 134 of file LumiSectionData.h.

Member Data Documentation

◆ m_bx

std::vector<BunchCrossingInfo> lumi::LumiSectionData::m_bx
private

Definition at line 123 of file LumiSectionData.h.

Referenced by LumiSectionData().

◆ m_deadfrac

float lumi::LumiSectionData::m_deadfrac
private

Definition at line 129 of file LumiSectionData.h.

◆ m_hlt

std::vector<HLTInfo> lumi::LumiSectionData::m_hlt
private

Definition at line 131 of file LumiSectionData.h.

◆ m_lumiavg

float lumi::LumiSectionData::m_lumiavg
private

Definition at line 126 of file LumiSectionData.h.

◆ m_lumierror

float lumi::LumiSectionData::m_lumierror
private

Definition at line 127 of file LumiSectionData.h.

◆ m_quality

short lumi::LumiSectionData::m_quality
private

Definition at line 128 of file LumiSectionData.h.

◆ m_sectionid

int lumi::LumiSectionData::m_sectionid
private

Definition at line 124 of file LumiSectionData.h.

◆ m_startorbit

unsigned long long lumi::LumiSectionData::m_startorbit
private

Definition at line 130 of file LumiSectionData.h.

◆ m_trigger

std::vector<TriggerInfo> lumi::LumiSectionData::m_trigger
private

Definition at line 132 of file LumiSectionData.h.

◆ m_versionid

std::string lumi::LumiSectionData::m_versionid
private

Definition at line 125 of file LumiSectionData.h.

lumi::LUMIALGOMAX
static const int LUMIALGOMAX
Definition: LumiSectionData.h:23
lumi::LumiSectionData::m_lumierror
float m_lumierror
Definition: LumiSectionData.h:127
lumi::LumiSectionData::m_quality
short m_quality
Definition: LumiSectionData.h:128
mps_fire.i
i
Definition: mps_fire.py:355
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
lumi::LumiSectionData::lumiquality
int lumiquality() const
Definition: LumiSectionData.cc:13
gather_cfg.cout
cout
Definition: gather_cfg.py:144
lumi::LumiSectionData::m_hlt
std::vector< HLTInfo > m_hlt
Definition: LumiSectionData.h:131
lumi::LumiSectionData::m_versionid
std::string m_versionid
Definition: LumiSectionData.h:125
alignCSCRings.s
s
Definition: alignCSCRings.py:92
lumi::LumiSectionData::m_trigger
std::vector< TriggerInfo > m_trigger
Definition: LumiSectionData.h:132
lumi::LumiSectionData::m_startorbit
unsigned long long m_startorbit
Definition: LumiSectionData.h:130
lumi::BXMAX
static const int BXMAX
Definition: LumiSectionData.h:22
lumi::LumiSectionData::m_deadfrac
float m_deadfrac
Definition: LumiSectionData.h:129
mps_fire.result
result
Definition: mps_fire.py:303
lumi::LumiSectionData::m_bx
std::vector< BunchCrossingInfo > m_bx
Definition: LumiSectionData.h:123
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
lumi::LumiSectionData::m_lumiavg
float m_lumiavg
Definition: LumiSectionData.h:126
lumi::LumiSectionData::m_sectionid
int m_sectionid
Definition: LumiSectionData.h:124
lumi::BXMIN
static const int BXMIN
Definition: LumiSectionData.h:21