CMS 3D CMS Logo

LHCInfo.cc
Go to the documentation of this file.
3 #include <algorithm>
4 #include <iterator>
5 #include <vector>
6 #include <stdexcept>
7 
8 //helper function: returns the positions of the bits in the bitset that are set (i.e., have a value of 1).
9 static std::vector<unsigned short> bitsetToVector(std::bitset<LHCInfo::bunchSlots + 1> const& bs) {
10  std::vector<unsigned short> vec;
11  //reserve space only for the bits in the bitset that are set
12  vec.reserve(bs.count());
13  for (size_t i = 0; i < bs.size(); ++i) {
14  if (bs.test(i))
15  vec.push_back((unsigned short)i);
16  }
17  return vec;
18 }
19 
20 //helper function: returns the enum for fill types in string type
22  std::string s_fillType("UNKNOWN");
23  switch (fillType) {
24  case LHCInfo::UNKNOWN:
25  s_fillType = std::string("UNKNOWN");
26  break;
27  case LHCInfo::PROTONS:
28  s_fillType = std::string("PROTONS");
29  break;
30  case LHCInfo::IONS:
31  s_fillType = std::string("IONS");
32  break;
33  case LHCInfo::COSMICS:
34  s_fillType = std::string("COSMICS");
35  break;
36  case LHCInfo::GAP:
37  s_fillType = std::string("GAP");
38  break;
39  default:
40  s_fillType = std::string("UNKNOWN");
41  }
42  return s_fillType;
43 }
44 
45 //helper function: returns the enum for particle types in string type
47  std::string s_particleType("NONE");
48  switch (particleType) {
49  case LHCInfo::NONE:
50  s_particleType = std::string("NONE");
51  break;
52  case LHCInfo::PROTON:
53  s_particleType = std::string("PROTON");
54  break;
55  case LHCInfo::PB82:
56  s_particleType = std::string("PB82");
57  break;
58  case LHCInfo::AR18:
59  s_particleType = std::string("AR18");
60  break;
61  case LHCInfo::D:
62  s_particleType = std::string("D");
63  break;
64  case LHCInfo::XE54:
65  s_particleType = std::string("XE54");
66  break;
67  default:
68  s_particleType = std::string("NONE");
69  }
70  return s_particleType;
71 }
72 
74  m_intParams.resize(ISIZE, std::vector<unsigned int>(1, 0));
75  m_floatParams.resize(FSIZE, std::vector<float>(1, 0.));
76  m_floatParams[LUMI_PER_B] = std::vector<float>();
77  m_floatParams[BEAM1_VC] = std::vector<float>();
78  m_floatParams[BEAM2_VC] = std::vector<float>();
79  m_floatParams[BEAM1_RF] = std::vector<float>();
80  m_floatParams[BEAM2_RF] = std::vector<float>();
81  m_timeParams.resize(TSIZE, std::vector<unsigned long long>(1, 0ULL));
82  m_stringParams.resize(SSIZE, std::vector<std::string>(1, ""));
83  m_stringParams[INJECTION_SCHEME].push_back(std::string("None"));
84 }
85 
87  : m_intParams(rhs.m_intParams),
88  m_floatParams(rhs.m_floatParams),
89  m_timeParams(rhs.m_timeParams),
90  m_stringParams(rhs.m_stringParams),
91  m_bunchConfiguration1(rhs.m_bunchConfiguration1),
92  m_bunchConfiguration2(rhs.m_bunchConfiguration2) {}
93 
95 
97  LHCInfo* ret = new LHCInfo();
98  ret->m_isData = m_isData;
99  if (!m_intParams[0].empty()) {
100  for (size_t i = 0; i < LUMI_SECTION; i++)
101  ret->m_intParams[i] = m_intParams[i];
102  for (size_t i = 0; i < DELIV_LUMI; i++)
103  ret->m_floatParams[i] = m_floatParams[i];
104  ret->m_floatParams[LUMI_PER_B] = m_floatParams[LUMI_PER_B];
105  for (size_t i = 0; i < TSIZE; i++)
106  ret->m_timeParams[i] = m_timeParams[i];
107  for (size_t i = 0; i < LHC_STATE; i++)
108  ret->m_stringParams[i] = m_stringParams[i];
109  ret->m_bunchConfiguration1 = m_bunchConfiguration1;
110  ret->m_bunchConfiguration2 = m_bunchConfiguration2;
111  }
112  return ret;
113 }
114 
115 namespace LHCInfoImpl {
116  template <typename T>
117  const T& getParams(const std::vector<T>& params, size_t index) {
118  if (index >= params.size())
119  throw std::out_of_range("Parameter with index " + std::to_string(index) + " is out of range.");
120  return params[index];
121  }
122 
123  template <typename T>
124  T& accessParams(std::vector<T>& params, size_t index) {
125  if (index >= params.size())
126  throw std::out_of_range("Parameter with index " + std::to_string(index) + " is out of range.");
127  return params[index];
128  }
129 
130  template <typename T>
131  const T& getOneParam(const std::vector<std::vector<T> >& params, size_t index) {
132  if (index >= params.size())
133  throw std::out_of_range("Parameter with index " + std::to_string(index) + " is out of range.");
134  const std::vector<T>& inner = params[index];
135  if (inner.empty())
136  throw std::out_of_range("Parameter with index " + std::to_string(index) + " type=" + typeid(T).name() +
137  " has no value stored.");
138  return inner[0];
139  }
140 
141  template <typename T>
142  void setOneParam(std::vector<std::vector<T> >& params, size_t index, const T& value) {
143  if (index >= params.size())
144  throw std::out_of_range("Parameter with index " + std::to_string(index) + " is out of range.");
145  params[index] = std::vector<T>(1, value);
146  }
147 
148  template <typename T>
149  void setParams(std::vector<T>& params, size_t index, const T& value) {
150  if (index >= params.size())
151  throw std::out_of_range("Parameter with index " + std::to_string(index) + " is out of range.");
152  params[index] = value;
153  }
154 
155 } // namespace LHCInfoImpl
156 
157 //getters
158 unsigned short const LHCInfo::fillNumber() const { return LHCInfoImpl::getOneParam(m_intParams, LHC_FILL); }
159 
160 unsigned short const LHCInfo::bunchesInBeam1() const { return LHCInfoImpl::getOneParam(m_intParams, BUNCHES_1); }
161 
162 unsigned short const LHCInfo::bunchesInBeam2() const { return LHCInfoImpl::getOneParam(m_intParams, BUNCHES_2); }
163 
164 unsigned short const LHCInfo::collidingBunches() const {
166 }
167 
169 
172 }
173 
176 }
177 
180 }
181 
183 
185 
187 
189 
191 
193 
195 
197 
199 
201 
203 
205 
208 }
209 
210 std::vector<float> const& LHCInfo::lumiPerBX() const { return LHCInfoImpl::getParams(m_floatParams, LUMI_PER_B); }
211 
213 
215 
217 
219 
220 std::vector<float> const& LHCInfo::beam1VC() const { return LHCInfoImpl::getParams(m_floatParams, BEAM1_VC); }
221 
222 std::vector<float> const& LHCInfo::beam2VC() const { return LHCInfoImpl::getParams(m_floatParams, BEAM2_VC); }
223 
224 std::vector<float> const& LHCInfo::beam1RF() const { return LHCInfoImpl::getParams(m_floatParams, BEAM1_RF); }
225 
226 std::vector<float> const& LHCInfo::beam2RF() const { return LHCInfoImpl::getParams(m_floatParams, BEAM2_RF); }
227 
229 
231 
233 
235 
236 //returns a boolean, true if the injection scheme has a leading 25ns
237 //TODO: parse the circulating bunch configuration, instead of the string.
239  const std::string prefix("25ns");
240  return std::equal(prefix.begin(), prefix.end(), injectionScheme().begin());
241 }
242 
243 //returns a boolean, true if the bunch slot number is in the circulating bunch configuration
244 bool LHCInfo::isBunchInBeam1(size_t const& bunch) const {
245  if (bunch == 0)
246  throw std::out_of_range("0 not allowed"); //CMS starts counting bunch crossing from 1!
247  return m_bunchConfiguration1.test(bunch);
248 }
249 
250 bool LHCInfo::isBunchInBeam2(size_t const& bunch) const {
251  if (bunch == 0)
252  throw std::out_of_range("0 not allowed"); //CMS starts counting bunch crossing from 1!
253  return m_bunchConfiguration2.test(bunch);
254 }
255 
256 //member functions returning *by value* a vector with all filled bunch slots
257 std::vector<unsigned short> LHCInfo::bunchConfigurationForBeam1() const {
259 }
260 
261 std::vector<unsigned short> LHCInfo::bunchConfigurationForBeam2() const {
263 }
264 
265 void LHCInfo::setFillNumber(unsigned short lhcFill) {
266  LHCInfoImpl::setOneParam(m_intParams, LHC_FILL, static_cast<unsigned int>(lhcFill));
267 }
268 
269 //setters
270 void LHCInfo::setBunchesInBeam1(unsigned short const& bunches) {
271  LHCInfoImpl::setOneParam(m_intParams, BUNCHES_1, static_cast<unsigned int>(bunches));
272 }
273 
274 void LHCInfo::setBunchesInBeam2(unsigned short const& bunches) {
275  LHCInfoImpl::setOneParam(m_intParams, BUNCHES_2, static_cast<unsigned int>(bunches));
276 }
277 
278 void LHCInfo::setCollidingBunches(unsigned short const& collidingBunches) {
280 }
281 
282 void LHCInfo::setTargetBunches(unsigned short const& targetBunches) {
284 }
285 
287  LHCInfoImpl::setOneParam(m_intParams, FILL_TYPE, static_cast<unsigned int>(fillType));
288 }
289 
291  LHCInfoImpl::setOneParam(m_intParams, PARTICLES_1, static_cast<unsigned int>(particleType));
292 }
293 
295  LHCInfoImpl::setOneParam(m_intParams, PARTICLES_2, static_cast<unsigned int>(particleType));
296 }
297 
299 
301 
302 void LHCInfo::setIntensityForBeam1(float const& intensity) {
304 }
305 
306 void LHCInfo::setIntensityForBeam2(float const& intensity) {
308 }
309 
311 
313 
315 
317 
318 void LHCInfo::setInstLumiError(float const& instLumiError) {
320 }
321 
322 void LHCInfo::setCreationTime(cond::Time_t const& createTime) {
324 }
325 
326 void LHCInfo::setBeginTime(cond::Time_t const& beginTime) {
328 }
329 
331 
332 void LHCInfo::setInjectionScheme(std::string const& injectionScheme) {
334 }
335 
336 void LHCInfo::setLumiPerBX(std::vector<float> const& lumiPerBX) {
338 }
339 
340 void LHCInfo::setLhcState(std::string const& lhcState) {
342 }
343 
344 void LHCInfo::setLhcComment(std::string const& lhcComment) {
346 }
347 
348 void LHCInfo::setCtppsStatus(std::string const& ctppsStatus) {
350 }
351 
352 void LHCInfo::setLumiSection(unsigned int const& lumiSection) {
354 }
355 
356 void LHCInfo::setBeam1VC(std::vector<float> const& beam1VC) {
358 }
359 
360 void LHCInfo::setBeam2VC(std::vector<float> const& beam2VC) {
362 }
363 
364 void LHCInfo::setBeam1RF(std::vector<float> const& beam1RF) {
366 }
367 
368 void LHCInfo::setBeam2RF(std::vector<float> const& beam2RF) {
370 }
371 
372 //sets all values in one go
373 void LHCInfo::setInfo(unsigned short const& bunches1,
374  unsigned short const& bunches2,
375  unsigned short const& collidingBunches,
376  unsigned short const& targetBunches,
377  FillTypeId const& fillType,
378  ParticleTypeId const& particleType1,
379  ParticleTypeId const& particleType2,
380  float const& angle,
381  float const& beta,
382  float const& intensity1,
383  float const& intensity2,
384  float const& energy,
385  float const& delivLumi,
386  float const& recLumi,
387  float const& instLumi,
388  float const& instLumiError,
389  cond::Time_t const& createTime,
390  cond::Time_t const& beginTime,
391  cond::Time_t const& endTime,
392  std::string const& scheme,
393  std::vector<float> const& lumiPerBX,
394  std::string const& lhcState,
395  std::string const& lhcComment,
396  std::string const& ctppsStatus,
397  unsigned int const& lumiSection,
398  std::vector<float> const& beam1VC,
399  std::vector<float> const& beam2VC,
400  std::vector<float> const& beam1RF,
401  std::vector<float> const& beam2RF,
402  std::bitset<bunchSlots + 1> const& bunchConf1,
403  std::bitset<bunchSlots + 1> const& bunchConf2) {
404  this->setBunchesInBeam1(bunches1);
405  this->setBunchesInBeam2(bunches2);
406  this->setCollidingBunches(collidingBunches);
407  this->setTargetBunches(targetBunches);
408  this->setFillType(fillType);
409  this->setParticleTypeForBeam1(particleType1);
410  this->setParticleTypeForBeam2(particleType2);
411  this->setCrossingAngle(angle);
412  this->setBetaStar(beta);
413  this->setIntensityForBeam1(intensity1);
414  this->setIntensityForBeam2(intensity2);
415  this->setEnergy(energy);
416  this->setDelivLumi(delivLumi);
417  this->setRecLumi(recLumi);
418  this->setInstLumi(instLumi);
419  this->setInstLumiError(instLumiError);
420  this->setCreationTime(createTime);
421  this->setBeginTime(beginTime);
422  this->setEndTime(endTime);
423  this->setInjectionScheme(scheme);
424  this->setLumiPerBX(lumiPerBX);
425  this->setLhcState(lhcState);
426  this->setLhcComment(lhcComment);
427  this->setCtppsStatus(ctppsStatus);
428  this->setLumiSection(lumiSection);
429  this->setBeam1VC(beam1VC);
430  this->setBeam2VC(beam2VC);
431  this->setBeam1RF(beam1RF);
432  this->setBeam2RF(beam2RF);
433  this->setBunchBitsetForBeam1(bunchConf1);
434  this->setBunchBitsetForBeam2(bunchConf2);
435 }
436 
437 void LHCInfo::print(std::stringstream& ss) const {
438  ss << "LHC fill: " << this->fillNumber() << std::endl
439  << "Bunches in Beam 1: " << this->bunchesInBeam1() << std::endl
440  << "Bunches in Beam 2: " << this->bunchesInBeam2() << std::endl
441  << "Colliding bunches at IP5: " << this->collidingBunches() << std::endl
442  << "Target bunches at IP5: " << this->targetBunches() << std::endl
443  << "Fill type: " << fillTypeToString(static_cast<FillTypeId>(this->fillType())) << std::endl
444  << "Particle type for Beam 1: " << particleTypeToString(static_cast<ParticleTypeId>(this->particleTypeForBeam1()))
445  << std::endl
446  << "Particle type for Beam 2: " << particleTypeToString(static_cast<ParticleTypeId>(this->particleTypeForBeam2()))
447  << std::endl
448  << "Crossing angle (urad): " << this->crossingAngle() << std::endl
449  << "Beta star (cm): " << this->betaStar() << std::endl
450  << "Average Intensity for Beam 1 (number of charges): " << this->intensityForBeam1() << std::endl
451  << "Average Intensity for Beam 2 (number of charges): " << this->intensityForBeam2() << std::endl
452  << "Energy (GeV): " << this->energy() << std::endl
453  << "Delivered Luminosity (max): " << this->delivLumi() << std::endl
454  << "Recorded Luminosity (max): " << this->recLumi() << std::endl
455  << "Instantaneous Luminosity: " << this->instLumi() << std::endl
456  << "Instantaneous Luminosity Error: " << this->instLumiError() << std::endl
457  << "Creation time of the fill: "
458  << boost::posix_time::to_iso_extended_string(cond::time::to_boost(this->createTime())) << std::endl
459  << "Begin time of Stable Beam flag: "
460  << boost::posix_time::to_iso_extended_string(cond::time::to_boost(this->beginTime())) << std::endl
461  << "End time of the fill: " << boost::posix_time::to_iso_extended_string(cond::time::to_boost(this->endTime()))
462  << std::endl
463  << "Injection scheme as given by LPC: " << this->injectionScheme() << std::endl
464  << "LHC State: " << this->lhcState() << std::endl
465  << "LHC Comments: " << this->lhcComment() << std::endl
466  << "CTPPS Status: " << this->ctppsStatus() << std::endl
467  << "Lumi section: " << this->lumiSection() << std::endl;
468 
469  ss << "Luminosity per bunch (total " << this->lumiPerBX().size() << "): ";
470  std::copy(this->lumiPerBX().begin(), this->lumiPerBX().end(), std::ostream_iterator<float>(ss, ", "));
471  ss << std::endl;
472 
473  ss << "Beam 1 VC (total " << this->beam1VC().size() << "): ";
474  std::copy(this->beam1VC().begin(), this->beam1VC().end(), std::ostream_iterator<float>(ss, "\t"));
475  ss << std::endl;
476 
477  ss << "Beam 2 VC (total " << beam2VC().size() << "): ";
478  std::copy(beam2VC().begin(), beam2VC().end(), std::ostream_iterator<float>(ss, "\t"));
479  ss << std::endl;
480 
481  ss << "Beam 1 RF (total " << beam1RF().size() << "): ";
482  std::copy(beam1RF().begin(), beam1RF().end(), std::ostream_iterator<float>(ss, "\t"));
483  ss << std::endl;
484 
485  ss << "Beam 2 RF (total " << beam2RF().size() << "): ";
486  std::copy(beam2RF().begin(), beam2RF().end(), std::ostream_iterator<float>(ss, "\t"));
487  ss << std::endl;
488 
489  std::vector<unsigned short> bunchVector1 = this->bunchConfigurationForBeam1();
490  std::vector<unsigned short> bunchVector2 = this->bunchConfigurationForBeam2();
491  ss << "Bunches filled for Beam 1 (total " << bunchVector1.size() << "): ";
492  std::copy(bunchVector1.begin(), bunchVector1.end(), std::ostream_iterator<unsigned short>(ss, ", "));
493  ss << std::endl;
494  ss << "Bunches filled for Beam 2 (total " << bunchVector2.size() << "): ";
495  std::copy(bunchVector2.begin(), bunchVector2.end(), std::ostream_iterator<unsigned short>(ss, ", "));
496  ss << std::endl;
497 }
498 
499 //protected getters
500 std::bitset<LHCInfo::bunchSlots + 1> const& LHCInfo::bunchBitsetForBeam1() const { return m_bunchConfiguration1; }
501 
502 std::bitset<LHCInfo::bunchSlots + 1> const& LHCInfo::bunchBitsetForBeam2() const { return m_bunchConfiguration2; }
503 
504 //protected setters
505 void LHCInfo::setBunchBitsetForBeam1(std::bitset<LHCInfo::bunchSlots + 1> const& bunchConfiguration) {
506  m_bunchConfiguration1 = bunchConfiguration;
507 }
508 
509 void LHCInfo::setBunchBitsetForBeam2(std::bitset<LHCInfo::bunchSlots + 1> const& bunchConfiguration) {
510  m_bunchConfiguration2 = bunchConfiguration;
511 }
512 
513 std::ostream& operator<<(std::ostream& os, LHCInfo beamInfo) {
514  std::stringstream ss;
515  beamInfo.print(ss);
516  os << ss.str();
517  return os;
518 }
519 
520 bool LHCInfo::equals(const LHCInfo& rhs) const {
521  if (m_isData != rhs.m_isData)
522  return false;
523  if (m_intParams != rhs.m_intParams)
524  return false;
525  if (m_floatParams != rhs.m_floatParams)
526  return false;
527  if (m_timeParams != rhs.m_timeParams)
528  return false;
529  if (m_stringParams != rhs.m_stringParams)
530  return false;
532  return false;
534  return false;
535  return true;
536 }
537 
538 bool LHCInfo::empty() const { return m_intParams[0].empty(); }
void setBeam1RF(std::vector< float > const &beam1RF)
Definition: LHCInfo.cc:364
void setLumiSection(unsigned int const &lumiSection)
Definition: LHCInfo.cc:352
void setBeginTime(cond::Time_t const &beginTime)
Definition: LHCInfo.cc:326
bool m_isData
Definition: LHCInfo.h:256
void setInstLumi(float const &instLumi)
Definition: LHCInfo.cc:316
void setEnergy(float const &energy)
Definition: LHCInfo.cc:310
std::string const & ctppsStatus() const
Definition: LHCInfo.cc:216
float const instLumiError() const
Definition: LHCInfo.cc:198
ParticleTypeId const particleTypeForBeam2() const
Definition: LHCInfo.cc:178
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
ret
prodAgent to be discontinued
void setInstLumiError(float const &instLumiError)
Definition: LHCInfo.cc:318
void setParticleTypeForBeam2(ParticleTypeId const &particleType)
Definition: LHCInfo.cc:294
unsigned short const bunchesInBeam1() const
Definition: LHCInfo.cc:160
void print(std::stringstream &ss) const
Definition: LHCInfo.cc:437
cond::Time_t const beginTime() const
Definition: LHCInfo.cc:202
std::string const & lhcComment() const
Definition: LHCInfo.cc:214
FillTypeId const fillType() const
Definition: LHCInfo.cc:170
static std::string particleTypeToString(LHCInfo::ParticleTypeId const &particleType)
Definition: LHCInfo.cc:46
std::string to_string(const V &value)
Definition: OMSAccess.h:77
void setDelivLumi(float const &delivLumi)
Definition: LHCInfo.cc:312
float const energy() const
Definition: LHCInfo.cc:190
std::vector< float > const & beam1VC() const
Definition: LHCInfo.cc:220
std::vector< float > const & lumiPerBX() const
Definition: LHCInfo.cc:210
const T & getOneParam(const std::vector< std::vector< T > > &params, size_t index)
Definition: LHCInfo.cc:131
void setParams(std::vector< T > &params, size_t index, const T &value)
Definition: LHCInfo.cc:149
unsigned short const fillNumber() const
Definition: LHCInfo.cc:158
float const recLumi() const
Definition: LHCInfo.cc:194
std::bitset< bunchSlots+1 > const & bunchBitsetForBeam2() const
Definition: LHCInfo.cc:502
void setBeam1VC(std::vector< float > const &beam1VC)
Definition: LHCInfo.cc:356
std::vector< std::vector< float > > m_floatParams
Definition: LHCInfo.h:258
cond::Time_t const createTime() const
Definition: LHCInfo.cc:200
bool equal(const T &first, const T &second)
Definition: Equal.h:32
void setBunchesInBeam1(unsigned short const &bunches)
Definition: LHCInfo.cc:270
void setLhcComment(std::string const &lhcComment)
Definition: LHCInfo.cc:344
void setOneParam(std::vector< std::vector< T > > &params, size_t index, const T &value)
Definition: LHCInfo.cc:142
std::vector< std::vector< unsigned long long > > m_timeParams
Definition: LHCInfo.h:259
std::vector< float > const & beam2RF() const
Definition: LHCInfo.cc:226
void setFillNumber(unsigned short lhcFill)
Definition: LHCInfo.cc:265
unsigned long long Time_t
Definition: Time.h:14
ParticleTypeId const particleTypeForBeam1() const
Definition: LHCInfo.cc:174
float const betaStar() const
Definition: LHCInfo.cc:184
void setBetaStar(float const &betaStar)
Definition: LHCInfo.cc:300
unsigned short const collidingBunches() const
Definition: LHCInfo.cc:164
std::vector< float > const & beam1RF() const
Definition: LHCInfo.cc:224
T & accessParams(std::vector< T > &params, size_t index)
Definition: LHCInfo.cc:124
std::ostream & operator<<(std::ostream &os, LHCInfo beamInfo)
Definition: LHCInfo.cc:513
float const instLumi() const
Definition: LHCInfo.cc:196
std::vector< unsigned short > bunchConfigurationForBeam1() const
Definition: LHCInfo.cc:257
std::string const & injectionScheme() const
Definition: LHCInfo.cc:206
bool isBunchInBeam1(size_t const &bunch) const
Definition: LHCInfo.cc:244
void setLumiPerBX(std::vector< float > const &lumiPerBX)
Definition: LHCInfo.cc:336
void setBunchesInBeam2(unsigned short const &bunches)
Definition: LHCInfo.cc:274
float const crossingAngle() const
Definition: LHCInfo.cc:182
LHCInfo * cloneFill() const
Definition: LHCInfo.cc:96
void setBeam2RF(std::vector< float > const &beam2RF)
Definition: LHCInfo.cc:368
Definition: value.py:1
void setLhcState(std::string const &lhcState)
Definition: LHCInfo.cc:340
void setBeam2VC(std::vector< float > const &beam2VC)
Definition: LHCInfo.cc:360
void setCollidingBunches(unsigned short const &collidingBunches)
Definition: LHCInfo.cc:278
std::vector< std::vector< unsigned int > > m_intParams
Definition: LHCInfo.h:257
unsigned short const targetBunches() const
Definition: LHCInfo.cc:168
std::vector< unsigned short > bunchConfigurationForBeam2() const
Definition: LHCInfo.cc:261
void setRecLumi(float const &recLumi)
Definition: LHCInfo.cc:314
std::string const & lhcState() const
Definition: LHCInfo.cc:212
std::bitset< bunchSlots+1 > m_bunchConfiguration1
Definition: LHCInfo.h:261
std::bitset< bunchSlots+1 > m_bunchConfiguration2
Definition: LHCInfo.h:261
ParticleType
Definition: LHCInfo.h:15
std::vector< float > const & beam2VC() const
Definition: LHCInfo.cc:222
static std::string fillTypeToString(LHCInfo::FillTypeId const &fillType)
Definition: LHCInfo.cc:21
void setInfo(unsigned short const &bunches1, unsigned short const &bunches2, unsigned short const &collidingBunches, unsigned short const &targetBunches, FillTypeId const &fillType, ParticleTypeId const &particleType1, ParticleTypeId const &particleType2, float const &angle, float const &beta, float const &intensity1, float const &intensity2, float const &energy, float const &delivLumi, float const &recLumi, float const &instLumi, float const &instLumiError, cond::Time_t const &createTime, cond::Time_t const &beginTime, cond::Time_t const &endTime, std::string const &scheme, std::vector< float > const &lumiPerBX, std::string const &lhcState, std::string const &lhcComment, std::string const &ctppsStatus, unsigned int const &lumiSection, std::vector< float > const &beam1VC, std::vector< float > const &beam2VC, std::vector< float > const &beam1RF, std::vector< float > const &beam2RF, std::bitset< bunchSlots+1 > const &bunchConf1, std::bitset< bunchSlots+1 > const &bunchConf2)
Definition: LHCInfo.cc:373
void setParticleTypeForBeam1(ParticleTypeId const &particleType)
Definition: LHCInfo.cc:290
bool equals(const LHCInfo &rhs) const
Definition: LHCInfo.cc:520
void setInjectionScheme(std::string const &injectionScheme)
Definition: LHCInfo.cc:332
~LHCInfo()
Definition: LHCInfo.cc:94
void setCreationTime(cond::Time_t const &createTime)
Definition: LHCInfo.cc:322
void setTargetBunches(unsigned short const &targetBunches)
Definition: LHCInfo.cc:282
LHCInfo()
Definition: LHCInfo.cc:73
const T & getParams(const std::vector< T > &params, size_t index)
Definition: LHCInfo.cc:117
cond::Time_t const endTime() const
Definition: LHCInfo.cc:204
void setCtppsStatus(std::string const &ctppsStatus)
Definition: LHCInfo.cc:348
float const intensityForBeam1() const
Definition: LHCInfo.cc:186
bool empty() const
Definition: LHCInfo.cc:538
float const intensityForBeam2() const
Definition: LHCInfo.cc:188
void setBunchBitsetForBeam1(std::bitset< bunchSlots+1 > const &bunchConfiguration)
Definition: LHCInfo.cc:505
void setBunchBitsetForBeam2(std::bitset< bunchSlots+1 > const &bunchConfiguration)
Definition: LHCInfo.cc:509
unsigned int const & lumiSection() const
Definition: LHCInfo.cc:218
float const delivLumi() const
Definition: LHCInfo.cc:192
void setIntensityForBeam1(float const &intensity)
Definition: LHCInfo.cc:302
void setEndTime(cond::Time_t const &endTime)
Definition: LHCInfo.cc:330
long double T
bool is25nsBunchSpacing() const
Definition: LHCInfo.cc:238
void setIntensityForBeam2(float const &intensity)
Definition: LHCInfo.cc:306
unsigned short const bunchesInBeam2() const
Definition: LHCInfo.cc:162
void setFillType(FillTypeId const &fillType)
Definition: LHCInfo.cc:286
void setCrossingAngle(float const &angle)
Definition: LHCInfo.cc:298
std::bitset< bunchSlots+1 > const & bunchBitsetForBeam1() const
Definition: LHCInfo.cc:500
boost::posix_time::ptime to_boost(Time_t iValue)
static std::vector< unsigned short > bitsetToVector(std::bitset< LHCInfo::bunchSlots+1 > const &bs)
Definition: LHCInfo.cc:9
FillType
Definition: LHCInfo.h:14
bool isBunchInBeam2(size_t const &bunch) const
Definition: LHCInfo.cc:250
std::vector< std::vector< std::string > > m_stringParams
Definition: LHCInfo.h:260
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11