CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
 
void bunchCrossingInfo (const LumiAlgoType lumialgotype, std::vector< BunchCrossingInfo > &result) const
 
const BunchCrossingInfo bunchCrossingInfo (const int BXIndex, const LumiAlgoType lumialgotype) 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 68 of file LumiSectionData.h.

Constructor & Destructor Documentation

lumi::LumiSectionData::LumiSectionData ( )

Definition at line 3 of file LumiSectionData.cc.

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

3  : m_sectionid(0),m_versionid("-1"){
5 }
static const int LUMIALGOMAX
std::vector< BunchCrossingInfo > m_bx
static const int BXMAX
lumi::LumiSectionData::~LumiSectionData ( )
inline

Definition at line 71 of file LumiSectionData.h.

71 {}

Member Function Documentation

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

Definition at line 52 of file LumiSectionData.cc.

References lumi::BXMAX.

52  {
53  return m_bx.begin()+lumialgotype*BXMAX;
54 }
std::vector< BunchCrossingInfo > m_bx
static const int BXMAX
lumi::BunchCrossingIterator lumi::LumiSectionData::bunchCrossingEnd ( const LumiAlgoType  lumialgotype) const

Definition at line 56 of file LumiSectionData.cc.

References lumi::BXMAX.

56  {
57  return m_bx.end()-(lumi::BXMAX)*lumialgotype;
58 }
std::vector< BunchCrossingInfo > m_bx
static const int BXMAX
void lumi::LumiSectionData::bunchCrossingInfo ( const LumiAlgoType  lumialgotype,
std::vector< BunchCrossingInfo > &  result 
) const

Definition at line 39 of file LumiSectionData.cc.

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

39  {
40  result.clear();
41  size_t offset=lumialgotype*lumi::BXMAX;
42  std::copy(m_bx.begin()+offset,m_bx.begin()+offset+lumi::BXMAX,std::back_inserter(result));
43 }
tuple result
Definition: query.py:137
std::vector< BunchCrossingInfo > m_bx
static const int BXMAX
const lumi::BunchCrossingInfo lumi::LumiSectionData::bunchCrossingInfo ( const int  BXIndex,
const LumiAlgoType  lumialgotype 
) const

Definition at line 46 of file LumiSectionData.cc.

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

47  {
48  int realIdx=BXIndex-lumi::BXMIN+lumialgotype*lumi::BXMAX;
49  return m_bx.at(realIdx);
50 }
std::vector< BunchCrossingInfo > m_bx
static const int BXMAX
static const int BXMIN
float lumi::LumiSectionData::deadFraction ( ) const

Definition at line 27 of file LumiSectionData.cc.

27  {
28  return m_deadfrac;
29 }
lumi::HLTIterator lumi::LumiSectionData::hltBegin ( ) const

Definition at line 68 of file LumiSectionData.cc.

68  {
69  return m_hlt.begin();
70 }
std::vector< HLTInfo > m_hlt
lumi::HLTIterator lumi::LumiSectionData::hltEnd ( ) const

Definition at line 72 of file LumiSectionData.cc.

72  {
73  return m_hlt.end();
74 }
std::vector< HLTInfo > m_hlt
bool lumi::LumiSectionData::HLThasData ( ) const

Definition at line 64 of file LumiSectionData.cc.

64  {
65  return m_hlt.size()>0;
66 }
std::vector< HLTInfo > m_hlt
float lumi::LumiSectionData::lumiAverage ( ) const

Definition at line 19 of file LumiSectionData.cc.

19  {
20  return m_lumiavg;
21 }
float lumi::LumiSectionData::lumiError ( ) const

Definition at line 23 of file LumiSectionData.cc.

23  {
24  return m_lumierror;
25 }
int lumi::LumiSectionData::lumiquality ( ) const

Definition at line 35 of file LumiSectionData.cc.

35  {
36  return m_quality;
37 }
int lumi::LumiSectionData::lumisectionID ( ) const

Definition at line 11 of file LumiSectionData.cc.

11  {
12  return m_sectionid;
13 }
std::string lumi::LumiSectionData::lumiVersion ( ) const

getter methods

Definition at line 7 of file LumiSectionData.cc.

7  {
8  return m_versionid;
9 }
size_t lumi::LumiSectionData::nBunchCrossing ( ) const

Definition at line 15 of file LumiSectionData.cc.

References lumi::LUMIALGOMAX.

15  {
16  return m_bx.size()/lumi::LUMIALGOMAX;
17 }
static const int LUMIALGOMAX
std::vector< BunchCrossingInfo > m_bx
size_t lumi::LumiSectionData::nHLTPath ( ) const

Definition at line 60 of file LumiSectionData.cc.

60  {
61  return m_hlt.size();
62 }
std::vector< HLTInfo > m_hlt
void lumi::LumiSectionData::print ( std::ostream &  s) const

Definition at line 140 of file LumiSectionData.cc.

References gather_cfg::cout, and i.

140  {
141  s<<"lumi section id :"<<m_sectionid <<", ";
142  s<<"lumi data version : "<<m_versionid<<", ";
143  s<<"lumi average : "<<m_lumiavg<<", ";
144  s<<"lumi error : "<<m_lumierror<<", ";
145  s<<"lumi quality : "<<m_quality<<", ";
146  s<<"lumi deadfrac : "<<m_deadfrac<<std::endl;
147  std::vector<lumi::TriggerInfo>::const_iterator trgit;
148  std::vector<lumi::TriggerInfo>::const_iterator trgitBeg=m_trigger.begin();
149  std::vector<lumi::TriggerInfo>::const_iterator trgitEnd=m_trigger.end();
150  unsigned int i=0;
151  for(trgit=trgitBeg;trgit!=trgitEnd;++trgit){
152  std::cout<<" trg "<<i<<" : name : "<<trgit->name<<" : count : "<<trgit->triggercount<<" : deadtime : "<< trgit->deadtimecount<<" : prescale : "<<trgit->prescale<<std::endl;
153  ++i;
154  }
155 }
int i
Definition: DBlmapReader.cc:9
std::vector< TriggerInfo > m_trigger
tuple cout
Definition: gather_cfg.py:145
short lumi::LumiSectionData::qualityFlag ( ) const

Definition at line 88 of file LumiSectionData.cc.

88  {
89  return m_quality;
90 }
template<class Archive >
void lumi::LumiSectionData::serialize ( Archive &  ar,
const unsigned int  version 
)
private
void lumi::LumiSectionData::setBunchCrossingData ( const std::vector< BunchCrossingInfo > &  BXs,
const LumiAlgoType  algotype 
)

Definition at line 124 of file LumiSectionData.cc.

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

124  {
125  std::copy(BXs.begin(),BXs.begin()+lumi::BXMAX,std::back_inserter(m_bx));
126 }
std::vector< BunchCrossingInfo > m_bx
static const int BXMAX
void lumi::LumiSectionData::setDeadFraction ( float  deadfrac)

Definition at line 112 of file LumiSectionData.cc.

112  {
113  m_deadfrac=deadfrac;
114 }
void lumi::LumiSectionData::setHLTData ( const std::vector< HLTInfo > &  hltdetail)

Definition at line 128 of file LumiSectionData.cc.

References filterCSVwithJSON::copy.

128  {
129  std::copy(hltdetail.begin(),hltdetail.end(),std::back_inserter(m_hlt));
130 }
std::vector< HLTInfo > m_hlt
void lumi::LumiSectionData::setLumiAverage ( float  lumiavg)

Definition at line 104 of file LumiSectionData.cc.

104  {
105  m_lumiavg=avg;
106 }
void lumi::LumiSectionData::setLumiError ( float  lumierr)

Definition at line 116 of file LumiSectionData.cc.

116  {
117  m_lumierror=lumierr;
118 }
void lumi::LumiSectionData::setLumiNull ( )

setter methods.

Definition at line 92 of file LumiSectionData.cc.

92  {
93  m_versionid=-99;
94 }
void lumi::LumiSectionData::setLumiQuality ( int  lumiquality)

Definition at line 108 of file LumiSectionData.cc.

108  {
110 }
void lumi::LumiSectionData::setLumiSectionId ( int  sectionid)

Definition at line 100 of file LumiSectionData.cc.

100  {
101  m_sectionid=sectionid;
102 }
void lumi::LumiSectionData::setLumiVersion ( const std::string &  versionid)

Definition at line 96 of file LumiSectionData.cc.

96  {
97  m_versionid=versionid;
98 }
void lumi::LumiSectionData::setQualityFlag ( short  qualityflag)

Definition at line 136 of file LumiSectionData.cc.

136  {
137  m_quality=qualityflag;
138 }
void lumi::LumiSectionData::setStartOrbit ( unsigned long long  orbtnumber)

Definition at line 120 of file LumiSectionData.cc.

120  {
121  m_startorbit=orbtnumber;
122 }
unsigned long long m_startorbit
void lumi::LumiSectionData::setTriggerData ( const std::vector< TriggerInfo > &  triggerinfo)

Definition at line 132 of file LumiSectionData.cc.

References filterCSVwithJSON::copy.

132  {
133  std::copy(triggerinfo.begin(),triggerinfo.end(),std::back_inserter(m_trigger));
134 }
std::vector< TriggerInfo > m_trigger
unsigned long long lumi::LumiSectionData::startorbit ( ) const

Definition at line 31 of file LumiSectionData.cc.

31  {
32  return m_startorbit;
33 }
unsigned long long m_startorbit
lumi::TriggerIterator lumi::LumiSectionData::trgBegin ( ) const

Definition at line 80 of file LumiSectionData.cc.

80  {
81  return m_trigger.begin();
82 }
std::vector< TriggerInfo > m_trigger
lumi::TriggerIterator lumi::LumiSectionData::trgEnd ( ) const

Definition at line 84 of file LumiSectionData.cc.

84  {
85  return m_trigger.end();
86 }
std::vector< TriggerInfo > m_trigger
bool lumi::LumiSectionData::TriggerhasData ( ) const

Definition at line 76 of file LumiSectionData.cc.

76  {
77  return m_trigger.size()>0;
78 }
std::vector< TriggerInfo > m_trigger

Friends And Related Function Documentation

friend class boost::serialization::access
friend

Definition at line 134 of file LumiSectionData.h.

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

Definition at line 134 of file LumiSectionData.h.

Member Data Documentation

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

Definition at line 123 of file LumiSectionData.h.

Referenced by LumiSectionData().

float lumi::LumiSectionData::m_deadfrac
private

Definition at line 129 of file LumiSectionData.h.

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

Definition at line 131 of file LumiSectionData.h.

float lumi::LumiSectionData::m_lumiavg
private

Definition at line 126 of file LumiSectionData.h.

float lumi::LumiSectionData::m_lumierror
private

Definition at line 127 of file LumiSectionData.h.

short lumi::LumiSectionData::m_quality
private

Definition at line 128 of file LumiSectionData.h.

int lumi::LumiSectionData::m_sectionid
private

Definition at line 124 of file LumiSectionData.h.

unsigned long long lumi::LumiSectionData::m_startorbit
private

Definition at line 130 of file LumiSectionData.h.

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

Definition at line 132 of file LumiSectionData.h.

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

Definition at line 125 of file LumiSectionData.h.