CMS 3D CMS Logo

LumiInfoRunHeader.h
Go to the documentation of this file.
1 #ifndef DataFormats_Luminosity_LumiInfoRunHeader_h
2 #define DataFormats_Luminosity_LumiInfoRunHeader_h
3 
17 #include <string>
18 #include <bitset>
20 
22 {
23 public:
24  //----------------------------------------------------------------
25 
28 
30  LumiInfoRunHeader(std::string& lumiProvider, std::string& fillingSchemeName,
31  std::bitset<LumiConstants::numBX>& fillingScheme);
32 
35 
37  bool isProductEqual(LumiInfoRunHeader const& o) const;
38 
39  //----------------------------------------------------------------
40 
42  void setLumiProvider(const std::string& lumiProvider) { lumiProvider_ = lumiProvider; }
43 
45  void setFillingSchemeName(const std::string& fillingSchemeName) { fillingSchemeName_ = fillingSchemeName; }
46 
48  void setFillingScheme(const std::bitset<LumiConstants::numBX>& fillingScheme);
49 
50  //----------------------------------------------------------------
51 
54 
57 
59  bool getBunchFilled(unsigned int bunch) const { return fillingScheme_[bunch]; }
60 
62  const std::bitset<LumiConstants::numBX>& getFillingScheme() const { return fillingScheme_; }
63 
65  int getBunchSpacing() const { return bunchSpacing_; }
66 
67  //----------------------------------------------------------------
68 
69 private:
70  std::string lumiProvider_; // string with name of lumi provider
71  std::string fillingSchemeName_; // name of filling scheme
72  std::bitset<LumiConstants::numBX> fillingScheme_; // filling scheme
74 
75  void setBunchSpacing();
76 };
77 
78 #endif
bool getBunchFilled(unsigned int bunch) const
Get filling scheme for given bunch.
~LumiInfoRunHeader()
Destructor.
std::bitset< LumiConstants::numBX > fillingScheme_
const std::bitset< LumiConstants::numBX > & getFillingScheme() const
Get full filling scheme.
std::string getLumiProvider() const
Get lumi provider.
int getBunchSpacing() const
Get bunch spacing (in ns).
LumiInfoRunHeader()
Default constructor.
std::string lumiProvider_
std::string fillingSchemeName_
std::string getFillingSchemeName() const
Get filling scheme name.
void setLumiProvider(const std::string &lumiProvider)
Set lumi provider.
bool isProductEqual(LumiInfoRunHeader const &o) const
Product compare function.
void setFillingSchemeName(const std::string &fillingSchemeName)
Set filling scheme name.
void setFillingScheme(const std::bitset< LumiConstants::numBX > &fillingScheme)
Set filling scheme.