Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:32

0001 #include "CondFormats/RunInfo/interface/LHCInfoPerFill.h"
0002 #include "CondFormats/Common/interface/TimeConversions.h"
0003 #include <algorithm>
0004 #include <iterator>
0005 #include <vector>
0006 #include <stdexcept>
0007 
0008 //helper function: returns the positions of the bits in the bitset that are set (i.e., have a value of 1).
0009 static std::vector<unsigned short> bitsetToVector(std::bitset<LHCInfoPerFill::bunchSlots + 1> const& bs) {
0010   std::vector<unsigned short> vec;
0011   //reserve space only for the bits in the bitset that are set
0012   vec.reserve(bs.count());
0013   for (size_t i = 0; i < bs.size(); ++i) {
0014     if (bs.test(i))
0015       vec.push_back((unsigned short)i);
0016   }
0017   return vec;
0018 }
0019 
0020 //helper function: returns the enum for fill types in string type
0021 static std::string fillTypeToString(LHCInfoPerFill::FillTypeId const& fillType) {
0022   std::string s_fillType("UNKNOWN");
0023   switch (fillType) {
0024     case LHCInfoPerFill::UNKNOWN:
0025       s_fillType = std::string("UNKNOWN");
0026       break;
0027     case LHCInfoPerFill::PROTONS:
0028       s_fillType = std::string("PROTONS");
0029       break;
0030     case LHCInfoPerFill::IONS:
0031       s_fillType = std::string("IONS");
0032       break;
0033     case LHCInfoPerFill::COSMICS:
0034       s_fillType = std::string("COSMICS");
0035       break;
0036     case LHCInfoPerFill::GAP:
0037       s_fillType = std::string("GAP");
0038       break;
0039     default:
0040       s_fillType = std::string("UNKNOWN");
0041   }
0042   return s_fillType;
0043 }
0044 
0045 //helper function: returns the enum for particle types in string type
0046 static std::string particleTypeToString(LHCInfoPerFill::ParticleTypeId const& particleType) {
0047   std::string s_particleType("NONE");
0048   switch (particleType) {
0049     case LHCInfoPerFill::NONE:
0050       s_particleType = std::string("NONE");
0051       break;
0052     case LHCInfoPerFill::PROTON:
0053       s_particleType = std::string("PROTON");
0054       break;
0055     case LHCInfoPerFill::PB82:
0056       s_particleType = std::string("PB82");
0057       break;
0058     case LHCInfoPerFill::AR18:
0059       s_particleType = std::string("AR18");
0060       break;
0061     case LHCInfoPerFill::D:
0062       s_particleType = std::string("D");
0063       break;
0064     case LHCInfoPerFill::XE54:
0065       s_particleType = std::string("XE54");
0066       break;
0067     default:
0068       s_particleType = std::string("NONE");
0069   }
0070   return s_particleType;
0071 }
0072 
0073 LHCInfoPerFill::LHCInfoPerFill() : LHCInfoVectorizedFields(ISIZE, FSIZE, TSIZE, SSIZE) {
0074   m_floatParams[LUMI_PER_B] = std::vector<float>();
0075   m_floatParams[BEAM1_VC] = std::vector<float>();
0076   m_floatParams[BEAM2_VC] = std::vector<float>();
0077   m_floatParams[BEAM1_RF] = std::vector<float>();
0078   m_floatParams[BEAM2_RF] = std::vector<float>();
0079   m_stringParams[INJECTION_SCHEME].push_back(std::string("None"));
0080 }
0081 
0082 LHCInfoPerFill* LHCInfoPerFill::cloneFill() const {
0083   LHCInfoPerFill* ret = new LHCInfoPerFill();
0084   ret->m_isData = m_isData;
0085   if (!m_intParams[0].empty()) {
0086     for (size_t i = 0; i < ISIZE; i++)
0087       ret->m_intParams[i] = m_intParams[i];
0088     for (size_t i = 0; i < DELIV_LUMI; i++)
0089       ret->m_floatParams[i] = m_floatParams[i];
0090     ret->m_floatParams[LUMI_PER_B] = m_floatParams[LUMI_PER_B];
0091     for (size_t i = 0; i < TSIZE; i++)
0092       ret->m_timeParams[i] = m_timeParams[i];
0093     for (size_t i = 0; i < LHC_STATE; i++)
0094       ret->m_stringParams[i] = m_stringParams[i];
0095     ret->m_bunchConfiguration1 = m_bunchConfiguration1;
0096     ret->m_bunchConfiguration2 = m_bunchConfiguration2;
0097   }
0098   return ret;
0099 }
0100 
0101 //getters
0102 unsigned short const LHCInfoPerFill::fillNumber() const { return LHCInfoPerFill::getOneParam(m_intParams, LHC_FILL); }
0103 
0104 unsigned short const LHCInfoPerFill::bunchesInBeam1() const {
0105   return LHCInfoPerFill::getOneParam(m_intParams, BUNCHES_1);
0106 }
0107 
0108 unsigned short const LHCInfoPerFill::bunchesInBeam2() const {
0109   return LHCInfoPerFill::getOneParam(m_intParams, BUNCHES_2);
0110 }
0111 
0112 unsigned short const LHCInfoPerFill::collidingBunches() const {
0113   return LHCInfoPerFill::getOneParam(m_intParams, COLLIDING_BUNCHES);
0114 }
0115 
0116 unsigned short const LHCInfoPerFill::targetBunches() const {
0117   return LHCInfoPerFill::getOneParam(m_intParams, TARGET_BUNCHES);
0118 }
0119 
0120 LHCInfoPerFill::FillTypeId const LHCInfoPerFill::fillType() const {
0121   return static_cast<FillTypeId>(LHCInfoPerFill::getOneParam(m_intParams, FILL_TYPE));
0122 }
0123 
0124 LHCInfoPerFill::ParticleTypeId const LHCInfoPerFill::particleTypeForBeam1() const {
0125   return static_cast<ParticleTypeId>(LHCInfoPerFill::getOneParam(m_intParams, PARTICLES_1));
0126 }
0127 
0128 LHCInfoPerFill::ParticleTypeId const LHCInfoPerFill::particleTypeForBeam2() const {
0129   return static_cast<ParticleTypeId>(LHCInfoPerFill::getOneParam(m_intParams, PARTICLES_2));
0130 }
0131 
0132 float const LHCInfoPerFill::intensityForBeam1() const {
0133   return LHCInfoPerFill::getOneParam(m_floatParams, INTENSITY_1);
0134 }
0135 
0136 float const LHCInfoPerFill::intensityForBeam2() const {
0137   return LHCInfoPerFill::getOneParam(m_floatParams, INTENSITY_2);
0138 }
0139 
0140 float const LHCInfoPerFill::energy() const { return LHCInfoPerFill::getOneParam(m_floatParams, ENERGY); }
0141 
0142 float const LHCInfoPerFill::delivLumi() const { return LHCInfoPerFill::getOneParam(m_floatParams, DELIV_LUMI); }
0143 
0144 float const LHCInfoPerFill::recLumi() const { return LHCInfoPerFill::getOneParam(m_floatParams, REC_LUMI); }
0145 
0146 float const LHCInfoPerFill::instLumi() const { return LHCInfoPerFill::getOneParam(m_floatParams, INST_LUMI); }
0147 
0148 float const LHCInfoPerFill::instLumiError() const { return LHCInfoPerFill::getOneParam(m_floatParams, INST_LUMI_ERR); }
0149 
0150 cond::Time_t const LHCInfoPerFill::createTime() const { return LHCInfoPerFill::getOneParam(m_timeParams, CREATE_TIME); }
0151 
0152 cond::Time_t const LHCInfoPerFill::beginTime() const { return LHCInfoPerFill::getOneParam(m_timeParams, BEGIN_TIME); }
0153 
0154 cond::Time_t const LHCInfoPerFill::endTime() const { return LHCInfoPerFill::getOneParam(m_timeParams, END_TIME); }
0155 
0156 std::string const& LHCInfoPerFill::injectionScheme() const {
0157   return LHCInfoPerFill::getOneParam(m_stringParams, INJECTION_SCHEME);
0158 }
0159 
0160 std::vector<float> const& LHCInfoPerFill::lumiPerBX() const {
0161   return LHCInfoPerFill::getParams(m_floatParams, LUMI_PER_B);
0162 }
0163 
0164 std::string const& LHCInfoPerFill::lhcState() const { return LHCInfoPerFill::getOneParam(m_stringParams, LHC_STATE); }
0165 
0166 std::string const& LHCInfoPerFill::lhcComment() const {
0167   return LHCInfoPerFill::getOneParam(m_stringParams, LHC_COMMENT);
0168 }
0169 
0170 std::string const& LHCInfoPerFill::ctppsStatus() const {
0171   return LHCInfoPerFill::getOneParam(m_stringParams, CTPPS_STATUS);
0172 }
0173 
0174 std::vector<float> const& LHCInfoPerFill::beam1VC() const { return LHCInfoPerFill::getParams(m_floatParams, BEAM1_VC); }
0175 
0176 std::vector<float> const& LHCInfoPerFill::beam2VC() const { return LHCInfoPerFill::getParams(m_floatParams, BEAM2_VC); }
0177 
0178 std::vector<float> const& LHCInfoPerFill::beam1RF() const { return LHCInfoPerFill::getParams(m_floatParams, BEAM1_RF); }
0179 
0180 std::vector<float> const& LHCInfoPerFill::beam2RF() const { return LHCInfoPerFill::getParams(m_floatParams, BEAM2_RF); }
0181 
0182 std::vector<float>& LHCInfoPerFill::beam1VC() { return LHCInfoPerFill::accessParams(m_floatParams, BEAM1_VC); }
0183 
0184 std::vector<float>& LHCInfoPerFill::beam2VC() { return LHCInfoPerFill::accessParams(m_floatParams, BEAM2_VC); }
0185 
0186 std::vector<float>& LHCInfoPerFill::beam1RF() { return LHCInfoPerFill::accessParams(m_floatParams, BEAM1_RF); }
0187 
0188 std::vector<float>& LHCInfoPerFill::beam2RF() { return LHCInfoPerFill::accessParams(m_floatParams, BEAM2_RF); }
0189 
0190 //returns a boolean, true if the injection scheme has a leading 25ns
0191 //TODO: parse the circulating bunch configuration, instead of the string.
0192 bool LHCInfoPerFill::is25nsBunchSpacing() const {
0193   const std::string prefix("25ns");
0194   return std::equal(prefix.begin(), prefix.end(), injectionScheme().begin());
0195 }
0196 
0197 //returns a boolean, true if the bunch slot number is in the circulating bunch configuration
0198 bool LHCInfoPerFill::isBunchInBeam1(size_t const& bunch) const {
0199   if (bunch == 0)
0200     throw std::out_of_range("0 not allowed");  //CMS starts counting bunch crossing from 1!
0201   return m_bunchConfiguration1.test(bunch);
0202 }
0203 
0204 bool LHCInfoPerFill::isBunchInBeam2(size_t const& bunch) const {
0205   if (bunch == 0)
0206     throw std::out_of_range("0 not allowed");  //CMS starts counting bunch crossing from 1!
0207   return m_bunchConfiguration2.test(bunch);
0208 }
0209 
0210 //member functions returning *by value* a vector with all filled bunch slots
0211 std::vector<unsigned short> LHCInfoPerFill::bunchConfigurationForBeam1() const {
0212   return bitsetToVector(m_bunchConfiguration1);
0213 }
0214 
0215 std::vector<unsigned short> LHCInfoPerFill::bunchConfigurationForBeam2() const {
0216   return bitsetToVector(m_bunchConfiguration2);
0217 }
0218 
0219 void LHCInfoPerFill::setFillNumber(unsigned short lhcFill) {
0220   LHCInfoPerFill::setOneParam(m_intParams, LHC_FILL, static_cast<unsigned int>(lhcFill));
0221 }
0222 
0223 //setters
0224 void LHCInfoPerFill::setBunchesInBeam1(unsigned short const& bunches) {
0225   LHCInfoPerFill::setOneParam(m_intParams, BUNCHES_1, static_cast<unsigned int>(bunches));
0226 }
0227 
0228 void LHCInfoPerFill::setBunchesInBeam2(unsigned short const& bunches) {
0229   LHCInfoPerFill::setOneParam(m_intParams, BUNCHES_2, static_cast<unsigned int>(bunches));
0230 }
0231 
0232 void LHCInfoPerFill::setCollidingBunches(unsigned short const& collidingBunches) {
0233   LHCInfoPerFill::setOneParam(m_intParams, COLLIDING_BUNCHES, static_cast<unsigned int>(collidingBunches));
0234 }
0235 
0236 void LHCInfoPerFill::setTargetBunches(unsigned short const& targetBunches) {
0237   LHCInfoPerFill::setOneParam(m_intParams, TARGET_BUNCHES, static_cast<unsigned int>(targetBunches));
0238 }
0239 
0240 void LHCInfoPerFill::setFillType(LHCInfoPerFill::FillTypeId const& fillType) {
0241   LHCInfoPerFill::setOneParam(m_intParams, FILL_TYPE, static_cast<unsigned int>(fillType));
0242 }
0243 
0244 void LHCInfoPerFill::setParticleTypeForBeam1(LHCInfoPerFill::ParticleTypeId const& particleType) {
0245   LHCInfoPerFill::setOneParam(m_intParams, PARTICLES_1, static_cast<unsigned int>(particleType));
0246 }
0247 
0248 void LHCInfoPerFill::setParticleTypeForBeam2(LHCInfoPerFill::ParticleTypeId const& particleType) {
0249   LHCInfoPerFill::setOneParam(m_intParams, PARTICLES_2, static_cast<unsigned int>(particleType));
0250 }
0251 
0252 void LHCInfoPerFill::setIntensityForBeam1(float const& intensity) {
0253   LHCInfoPerFill::setOneParam(m_floatParams, INTENSITY_1, intensity);
0254 }
0255 
0256 void LHCInfoPerFill::setIntensityForBeam2(float const& intensity) {
0257   LHCInfoPerFill::setOneParam(m_floatParams, INTENSITY_2, intensity);
0258 }
0259 
0260 void LHCInfoPerFill::setEnergy(float const& energy) { LHCInfoPerFill::setOneParam(m_floatParams, ENERGY, energy); }
0261 
0262 void LHCInfoPerFill::setDelivLumi(float const& delivLumi) {
0263   LHCInfoPerFill::setOneParam(m_floatParams, DELIV_LUMI, delivLumi);
0264 }
0265 
0266 void LHCInfoPerFill::setRecLumi(float const& recLumi) { LHCInfoPerFill::setOneParam(m_floatParams, REC_LUMI, recLumi); }
0267 
0268 void LHCInfoPerFill::setInstLumi(float const& instLumi) {
0269   LHCInfoPerFill::setOneParam(m_floatParams, INST_LUMI, instLumi);
0270 }
0271 
0272 void LHCInfoPerFill::setInstLumiError(float const& instLumiError) {
0273   LHCInfoPerFill::setOneParam(m_floatParams, INST_LUMI_ERR, instLumiError);
0274 }
0275 
0276 void LHCInfoPerFill::setCreationTime(cond::Time_t const& createTime) {
0277   LHCInfoPerFill::setOneParam(m_timeParams, CREATE_TIME, createTime);
0278 }
0279 
0280 void LHCInfoPerFill::setBeginTime(cond::Time_t const& beginTime) {
0281   LHCInfoPerFill::setOneParam(m_timeParams, BEGIN_TIME, beginTime);
0282 }
0283 
0284 void LHCInfoPerFill::setEndTime(cond::Time_t const& endTime) {
0285   LHCInfoPerFill::setOneParam(m_timeParams, END_TIME, endTime);
0286 }
0287 
0288 void LHCInfoPerFill::setInjectionScheme(std::string const& injectionScheme) {
0289   LHCInfoPerFill::setOneParam(m_stringParams, INJECTION_SCHEME, injectionScheme);
0290 }
0291 
0292 void LHCInfoPerFill::setLumiPerBX(std::vector<float> const& lumiPerBX) {
0293   LHCInfoPerFill::setParams(m_floatParams, LUMI_PER_B, lumiPerBX);
0294 }
0295 
0296 void LHCInfoPerFill::setLhcState(std::string const& lhcState) {
0297   LHCInfoPerFill::setOneParam(m_stringParams, LHC_STATE, lhcState);
0298 }
0299 
0300 void LHCInfoPerFill::setLhcComment(std::string const& lhcComment) {
0301   LHCInfoPerFill::setOneParam(m_stringParams, LHC_COMMENT, lhcComment);
0302 }
0303 
0304 void LHCInfoPerFill::setCtppsStatus(std::string const& ctppsStatus) {
0305   LHCInfoPerFill::setOneParam(m_stringParams, CTPPS_STATUS, ctppsStatus);
0306 }
0307 
0308 void LHCInfoPerFill::setBeam1VC(std::vector<float> const& beam1VC) {
0309   LHCInfoPerFill::setParams(m_floatParams, BEAM1_VC, beam1VC);
0310 }
0311 
0312 void LHCInfoPerFill::setBeam2VC(std::vector<float> const& beam2VC) {
0313   LHCInfoPerFill::setParams(m_floatParams, BEAM2_VC, beam2VC);
0314 }
0315 
0316 void LHCInfoPerFill::setBeam1RF(std::vector<float> const& beam1RF) {
0317   LHCInfoPerFill::setParams(m_floatParams, BEAM1_RF, beam1RF);
0318 }
0319 
0320 void LHCInfoPerFill::setBeam2RF(std::vector<float> const& beam2RF) {
0321   LHCInfoPerFill::setParams(m_floatParams, BEAM2_RF, beam2RF);
0322 }
0323 
0324 //sets all values in one go
0325 void LHCInfoPerFill::setInfo(unsigned short const& bunches1,
0326                              unsigned short const& bunches2,
0327                              unsigned short const& collidingBunches,
0328                              unsigned short const& targetBunches,
0329                              FillTypeId const& fillType,
0330                              ParticleTypeId const& particleType1,
0331                              ParticleTypeId const& particleType2,
0332                              float const& intensity1,
0333                              float const& intensity2,
0334                              float const& energy,
0335                              float const& delivLumi,
0336                              float const& recLumi,
0337                              float const& instLumi,
0338                              float const& instLumiError,
0339                              cond::Time_t const& createTime,
0340                              cond::Time_t const& beginTime,
0341                              cond::Time_t const& endTime,
0342                              std::string const& scheme,
0343                              std::vector<float> const& lumiPerBX,
0344                              std::string const& lhcState,
0345                              std::string const& lhcComment,
0346                              std::string const& ctppsStatus,
0347                              std::vector<float> const& beam1VC,
0348                              std::vector<float> const& beam2VC,
0349                              std::vector<float> const& beam1RF,
0350                              std::vector<float> const& beam2RF,
0351                              std::bitset<bunchSlots + 1> const& bunchConf1,
0352                              std::bitset<bunchSlots + 1> const& bunchConf2) {
0353   this->setBunchesInBeam1(bunches1);
0354   this->setBunchesInBeam2(bunches2);
0355   this->setCollidingBunches(collidingBunches);
0356   this->setTargetBunches(targetBunches);
0357   this->setFillType(fillType);
0358   this->setParticleTypeForBeam1(particleType1);
0359   this->setParticleTypeForBeam2(particleType2);
0360   this->setIntensityForBeam1(intensity1);
0361   this->setIntensityForBeam2(intensity2);
0362   this->setEnergy(energy);
0363   this->setDelivLumi(delivLumi);
0364   this->setRecLumi(recLumi);
0365   this->setInstLumi(instLumi);
0366   this->setInstLumiError(instLumiError);
0367   this->setCreationTime(createTime);
0368   this->setBeginTime(beginTime);
0369   this->setEndTime(endTime);
0370   this->setInjectionScheme(scheme);
0371   this->setLumiPerBX(lumiPerBX);
0372   this->setLhcState(lhcState);
0373   this->setLhcComment(lhcComment);
0374   this->setCtppsStatus(ctppsStatus);
0375   this->setBeam1VC(beam1VC);
0376   this->setBeam2VC(beam2VC);
0377   this->setBeam1RF(beam1RF);
0378   this->setBeam2RF(beam2RF);
0379   this->setBunchBitsetForBeam1(bunchConf1);
0380   this->setBunchBitsetForBeam2(bunchConf2);
0381 }
0382 
0383 void LHCInfoPerFill::print(std::stringstream& ss) const {
0384   ss << "LHC fill: " << this->fillNumber() << std::endl
0385      << "Bunches in Beam 1: " << this->bunchesInBeam1() << std::endl
0386      << "Bunches in Beam 2: " << this->bunchesInBeam2() << std::endl
0387      << "Colliding bunches at IP5: " << this->collidingBunches() << std::endl
0388      << "Target bunches at IP5: " << this->targetBunches() << std::endl
0389      << "Fill type: " << fillTypeToString(static_cast<FillTypeId>(this->fillType())) << std::endl
0390      << "Particle type for Beam 1: " << particleTypeToString(static_cast<ParticleTypeId>(this->particleTypeForBeam1()))
0391      << std::endl
0392      << "Particle type for Beam 2: " << particleTypeToString(static_cast<ParticleTypeId>(this->particleTypeForBeam2()))
0393      << std::endl
0394      << "Average Intensity for Beam 1 (number of charges): " << this->intensityForBeam1() << std::endl
0395      << "Average Intensity for Beam 2 (number of charges): " << this->intensityForBeam2() << std::endl
0396      << "Energy (GeV): " << this->energy() << std::endl
0397      << "Delivered Luminosity (max): " << this->delivLumi() << std::endl
0398      << "Recorded Luminosity (max): " << this->recLumi() << std::endl
0399      << "Instantaneous Luminosity: " << this->instLumi() << std::endl
0400      << "Instantaneous Luminosity Error: " << this->instLumiError() << std::endl
0401      << "Creation time of the fill: "
0402      << boost::posix_time::to_iso_extended_string(cond::time::to_boost(this->createTime())) << std::endl
0403      << "Begin time of Stable Beam flag: "
0404      << boost::posix_time::to_iso_extended_string(cond::time::to_boost(this->beginTime())) << std::endl
0405      << "End time of the fill: " << boost::posix_time::to_iso_extended_string(cond::time::to_boost(this->endTime()))
0406      << std::endl
0407      << "Injection scheme as given by LPC: " << this->injectionScheme() << std::endl
0408      << "LHC State: " << this->lhcState() << std::endl
0409      << "LHC Comments: " << this->lhcComment() << std::endl
0410      << "CTPPS Status: " << this->ctppsStatus() << std::endl;
0411 
0412   ss << "Luminosity per bunch  (total " << this->lumiPerBX().size() << "): ";
0413   std::copy(this->lumiPerBX().begin(), this->lumiPerBX().end(), std::ostream_iterator<float>(ss, ", "));
0414   ss << std::endl;
0415 
0416   ss << "Beam 1 VC  (total " << this->beam1VC().size() << "): ";
0417   std::copy(this->beam1VC().begin(), this->beam1VC().end(), std::ostream_iterator<float>(ss, "\t"));
0418   ss << std::endl;
0419 
0420   ss << "Beam 2 VC  (total " << beam2VC().size() << "): ";
0421   std::copy(beam2VC().begin(), beam2VC().end(), std::ostream_iterator<float>(ss, "\t"));
0422   ss << std::endl;
0423 
0424   ss << "Beam 1 RF  (total " << beam1RF().size() << "): ";
0425   std::copy(beam1RF().begin(), beam1RF().end(), std::ostream_iterator<float>(ss, "\t"));
0426   ss << std::endl;
0427 
0428   ss << "Beam 2 RF  (total " << beam2RF().size() << "): ";
0429   std::copy(beam2RF().begin(), beam2RF().end(), std::ostream_iterator<float>(ss, "\t"));
0430   ss << std::endl;
0431 
0432   std::vector<unsigned short> bunchVector1 = this->bunchConfigurationForBeam1();
0433   std::vector<unsigned short> bunchVector2 = this->bunchConfigurationForBeam2();
0434   ss << "Bunches filled for Beam 1 (total " << bunchVector1.size() << "): ";
0435   std::copy(bunchVector1.begin(), bunchVector1.end(), std::ostream_iterator<unsigned short>(ss, ", "));
0436   ss << std::endl;
0437   ss << "Bunches filled for Beam 2 (total " << bunchVector2.size() << "): ";
0438   std::copy(bunchVector2.begin(), bunchVector2.end(), std::ostream_iterator<unsigned short>(ss, ", "));
0439   ss << std::endl;
0440 }
0441 
0442 //protected getters
0443 std::bitset<LHCInfoPerFill::bunchSlots + 1> const& LHCInfoPerFill::bunchBitsetForBeam1() const {
0444   return m_bunchConfiguration1;
0445 }
0446 
0447 std::bitset<LHCInfoPerFill::bunchSlots + 1> const& LHCInfoPerFill::bunchBitsetForBeam2() const {
0448   return m_bunchConfiguration2;
0449 }
0450 
0451 //protected setters
0452 void LHCInfoPerFill::setBunchBitsetForBeam1(std::bitset<LHCInfoPerFill::bunchSlots + 1> const& bunchConfiguration) {
0453   m_bunchConfiguration1 = bunchConfiguration;
0454 }
0455 
0456 void LHCInfoPerFill::setBunchBitsetForBeam2(std::bitset<LHCInfoPerFill::bunchSlots + 1> const& bunchConfiguration) {
0457   m_bunchConfiguration2 = bunchConfiguration;
0458 }
0459 
0460 std::ostream& operator<<(std::ostream& os, LHCInfoPerFill beamInfo) {
0461   std::stringstream ss;
0462   beamInfo.print(ss);
0463   os << ss.str();
0464   return os;
0465 }
0466 
0467 bool LHCInfoPerFill::equals(const LHCInfoPerFill& rhs) const {
0468   if (m_isData != rhs.m_isData)
0469     return false;
0470   if (m_intParams != rhs.m_intParams)
0471     return false;
0472   if (m_floatParams != rhs.m_floatParams)
0473     return false;
0474   if (m_timeParams != rhs.m_timeParams)
0475     return false;
0476   if (m_stringParams != rhs.m_stringParams)
0477     return false;
0478   if (m_bunchConfiguration1 != rhs.m_bunchConfiguration1)
0479     return false;
0480   if (m_bunchConfiguration2 != rhs.m_bunchConfiguration2)
0481     return false;
0482   return true;
0483 }
0484 
0485 bool LHCInfoPerFill::empty() const { return m_intParams[0].empty(); }