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
21 static std::string fillTypeToString( LHCInfo::FillTypeId const & fillType ) {
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 
86 LHCInfo::LHCInfo( const LHCInfo& rhs ):
87  m_intParams( rhs.m_intParams ),
93 }
94 
96 }
97 
99  LHCInfo* ret = new LHCInfo();
100  ret->m_isData = m_isData;
101  if( !m_intParams[0].empty()){
102  for(size_t i=0;i<LUMI_SECTION; i++) ret->m_intParams[i]=m_intParams[i];
103  for(size_t i=0;i<DELIV_LUMI; i++) ret->m_floatParams[i]=m_floatParams[i];
105  for(size_t i=0;i<TSIZE; i++) ret->m_timeParams[i]=m_timeParams[i];
106  for(size_t i=0;i<LHC_STATE; i++) ret->m_stringParams[i]=m_stringParams[i];
109  }
110  return ret;
111 }
112 
113 namespace LHCInfoImpl {
114  template <typename T> const T& getParams( const std::vector<T>& params, size_t index ){
115  if( index >= params.size() ) throw std::out_of_range("Parameter with index "+std::to_string(index)+" is out of range.");
116  return params[index];
117  }
118 
119  template <typename T> T& accessParams( std::vector<T>& params, size_t index ){
120  if( index >= params.size() ) throw std::out_of_range("Parameter with index "+std::to_string(index)+" is out of range.");
121  return params[index];
122  }
123 
124  template <typename T> const T& getOneParam( const std::vector< std::vector<T> >& params, size_t index ){
125  if( index >= params.size() ) throw std::out_of_range("Parameter with index "+std::to_string(index)+" is out of range.");
126  const std::vector<T>& inner = params[index];
127  if( inner.empty() ) throw std::out_of_range("Parameter with index "+std::to_string(index)+" type="+typeid(T).name()+" has no value stored.");
128  return inner[ 0 ];
129  }
130 
131  template <typename T> void setOneParam( std::vector< std::vector<T> >& params, size_t index, const T& value ){
132  if( index >= params.size() ) throw std::out_of_range("Parameter with index "+std::to_string(index)+" is out of range.");
133  params[ index ] = std::vector<T>(1,value);
134  }
135 
136  template <typename T> void setParams( std::vector<T>& params, size_t index, const T& value ){
137  if( index >= params.size() ) throw std::out_of_range("Parameter with index "+std::to_string(index)+" is out of range.");
138  params[ index ] = value;
139  }
140 
141 }
142 
143 //getters
144 unsigned short const LHCInfo::fillNumber() const {
146 }
147 
148 unsigned short const LHCInfo::bunchesInBeam1() const {
150 }
151 
152 unsigned short const LHCInfo::bunchesInBeam2() const {
154 }
155 
156 unsigned short const LHCInfo::collidingBunches() const {
158 }
159 
160 unsigned short const LHCInfo::targetBunches() const {
162 }
163 
165  return static_cast<FillTypeId>(LHCInfoImpl::getOneParam( m_intParams, FILL_TYPE ));
166 }
167 
170 }
171 
174 }
175 
176 float const LHCInfo::crossingAngle() const {
178 }
179 
180 float const LHCInfo::betaStar() const {
182 }
183 
184 float const LHCInfo::intensityForBeam1() const {
186 }
187 
188 float const LHCInfo::intensityForBeam2() const {
190 }
191 
192 float const LHCInfo::energy() const {
194 }
195 
196 float const LHCInfo::delivLumi() const {
198 }
199 
200 float const LHCInfo::recLumi() const {
202 }
203 
204 float const LHCInfo::instLumi() const {
206 }
207 
208 float const LHCInfo::instLumiError() const {
210 }
211 
214 }
215 
218 }
219 
222 }
223 
226 }
227 
228 std::vector<float> const & LHCInfo::lumiPerBX() const {
230 }
231 
234 }
235 
238 }
239 
242 }
243 
244 unsigned int const & LHCInfo::lumiSection() const {
246 }
247 
248 std::vector<float> const & LHCInfo::beam1VC() const {
250 }
251 
252 std::vector<float> const & LHCInfo::beam2VC() const {
254 }
255 
256 std::vector<float> const & LHCInfo::beam1RF() const {
258 }
259 
260 std::vector<float> const & LHCInfo::beam2RF() const {
262 }
263 
264 std::vector<float>& LHCInfo::beam1VC(){
266 }
267 
268 std::vector<float>& LHCInfo::beam2VC(){
270 }
271 
272 std::vector<float>& LHCInfo::beam1RF(){
274 }
275 
276 std::vector<float>& LHCInfo::beam2RF(){
278 }
279 
280 //returns a boolean, true if the injection scheme has a leading 25ns
281 //TODO: parse the circulating bunch configuration, instead of the string.
283  const std::string prefix( "25ns" );
284  return std::equal( prefix.begin(), prefix.end(), injectionScheme().begin() );
285 }
286 
287 //returns a boolean, true if the bunch slot number is in the circulating bunch configuration
288 bool LHCInfo::isBunchInBeam1( size_t const & bunch ) const {
289  if( bunch == 0 )
290  throw std::out_of_range( "0 not allowed" ); //CMS starts counting bunch crossing from 1!
291  return m_bunchConfiguration1.test( bunch );
292 }
293 
294 bool LHCInfo::isBunchInBeam2( size_t const & bunch ) const {
295  if( bunch == 0 )
296  throw std::out_of_range( "0 not allowed" ); //CMS starts counting bunch crossing from 1!
297  return m_bunchConfiguration2.test( bunch );
298 }
299 
300 //member functions returning *by value* a vector with all filled bunch slots
301 std::vector<unsigned short> LHCInfo::bunchConfigurationForBeam1() const {
303 }
304 
305 std::vector<unsigned short> LHCInfo::bunchConfigurationForBeam2() const {
307 }
308 
309 void LHCInfo::setFillNumber( unsigned short lhcFill ) {
310  LHCInfoImpl::setOneParam( m_intParams, LHC_FILL, static_cast<unsigned int>(lhcFill) );
311 }
312 
313 //setters
314 void LHCInfo::setBunchesInBeam1( unsigned short const & bunches ) {
315  LHCInfoImpl::setOneParam( m_intParams, BUNCHES_1, static_cast<unsigned int>(bunches) );
316 }
317 
318 void LHCInfo::setBunchesInBeam2( unsigned short const & bunches ) {
319  LHCInfoImpl::setOneParam( m_intParams, BUNCHES_2, static_cast<unsigned int>(bunches) );
320 }
321 
322 void LHCInfo::setCollidingBunches( unsigned short const & collidingBunches ) {
323  LHCInfoImpl::setOneParam( m_intParams, COLLIDING_BUNCHES, static_cast<unsigned int>(collidingBunches) );
324 }
325 
326 void LHCInfo::setTargetBunches( unsigned short const & targetBunches ) {
327  LHCInfoImpl::setOneParam( m_intParams, TARGET_BUNCHES, static_cast<unsigned int>(targetBunches) );
328 }
329 
331  LHCInfoImpl::setOneParam( m_intParams, FILL_TYPE, static_cast<unsigned int>(fillType) );
332 }
333 
335  LHCInfoImpl::setOneParam( m_intParams, PARTICLES_1, static_cast<unsigned int>(particleType) );
336 }
337 
339  LHCInfoImpl::setOneParam( m_intParams, PARTICLES_2, static_cast<unsigned int>(particleType) );
340 }
341 
342 void LHCInfo::setCrossingAngle( float const & angle ) {
344 }
345 
346 void LHCInfo::setBetaStar( float const & betaStar ) {
348 }
349 
350 void LHCInfo::setIntensityForBeam1( float const & intensity ) {
352 }
353 
354 void LHCInfo::setIntensityForBeam2( float const & intensity ) {
356 }
357 
358 void LHCInfo::setEnergy( float const & energy ) {
360 }
361 
362 void LHCInfo::setDelivLumi( float const & delivLumi ) {
364 }
365 
366 void LHCInfo::setRecLumi( float const & recLumi ) {
368 }
369 
370 void LHCInfo::setInstLumi( float const & instLumi ) {
372 }
373 
376 }
377 
380 }
381 
384 }
385 
388 }
389 
392 }
393 
394 void LHCInfo::setLumiPerBX( std::vector<float> const & lumiPerBX) {
396 }
397 
400 }
401 
404 }
405 
408 }
409 
410 void LHCInfo::setLumiSection( unsigned int const & lumiSection) {
412 }
413 
414 void LHCInfo::setBeam1VC( std::vector<float> const & beam1VC) {
416 }
417 
418 void LHCInfo::setBeam2VC( std::vector<float> const & beam2VC) {
420 }
421 
422 void LHCInfo::setBeam1RF( std::vector<float> const & beam1RF) {
424 }
425 
426 void LHCInfo::setBeam2RF( std::vector<float> const & beam2RF) {
428 }
429 
430 //sets all values in one go
431 void LHCInfo::setInfo( unsigned short const & bunches1
432  ,unsigned short const & bunches2
433  ,unsigned short const & collidingBunches
434  ,unsigned short const & targetBunches
435  ,FillTypeId const & fillType
436  ,ParticleTypeId const & particleType1
437  ,ParticleTypeId const & particleType2
438  ,float const & angle
439  ,float const & beta
440  ,float const & intensity1
441  ,float const & intensity2
442  ,float const & energy
443  ,float const & delivLumi
444  ,float const & recLumi
445  ,float const & instLumi
446  ,float const & instLumiError
447  ,cond::Time_t const & createTime
448  ,cond::Time_t const & beginTime
449  ,cond::Time_t const & endTime
450  ,std::string const & scheme
451  ,std::vector<float> const & lumiPerBX
452  ,std::string const & lhcState
453  ,std::string const & lhcComment
454  ,std::string const & ctppsStatus
455  ,unsigned int const & lumiSection
456  ,std::vector<float> const & beam1VC
457  ,std::vector<float> const & beam2VC
458  ,std::vector<float> const & beam1RF
459  ,std::vector<float> const & beam2RF
460  ,std::bitset<bunchSlots+1> const & bunchConf1
461  ,std::bitset<bunchSlots+1> const & bunchConf2 ) {
462  this->setBunchesInBeam1( bunches1 );
463  this->setBunchesInBeam2( bunches2 );
464  this->setCollidingBunches( collidingBunches );
465  this->setTargetBunches( targetBunches );
466  this->setFillType( fillType );
467  this->setParticleTypeForBeam1( particleType1 );
468  this->setParticleTypeForBeam2( particleType2 );
469  this->setCrossingAngle( angle );
470  this->setBetaStar( beta );
471  this->setIntensityForBeam1( intensity1 );
472  this->setIntensityForBeam2( intensity2 );
473  this->setEnergy( energy );
474  this->setDelivLumi( delivLumi );
475  this->setRecLumi( recLumi );
476  this->setInstLumi( instLumi );
477  this->setInstLumiError( instLumiError );
478  this->setCreationTime( createTime );
479  this->setBeginTime( beginTime );
480  this->setEndTime( endTime );
481  this->setInjectionScheme( scheme );
482  this->setLumiPerBX( lumiPerBX );
483  this->setLhcState( lhcState );
484  this->setLhcComment( lhcComment );
485  this->setCtppsStatus( ctppsStatus );
486  this->setLumiSection( lumiSection );
487  this->setBeam1VC( beam1VC );
488  this->setBeam2VC( beam2VC );
489  this->setBeam1RF( beam1RF );
490  this->setBeam2RF( beam2RF );
491  this->setBunchBitsetForBeam1( bunchConf1 );
492  this->setBunchBitsetForBeam2( bunchConf2 );
493 }
494 
495 void LHCInfo::print( std::stringstream & ss ) const {
496  ss << "LHC fill: " << this->fillNumber() << std::endl
497  << "Bunches in Beam 1: " << this->bunchesInBeam1() << std::endl
498  << "Bunches in Beam 2: " << this->bunchesInBeam2() << std::endl
499  << "Colliding bunches at IP5: " << this->collidingBunches() << std::endl
500  << "Target bunches at IP5: " <<this->targetBunches() << std::endl
501  << "Fill type: " << fillTypeToString( static_cast<FillTypeId> (this->fillType() ) ) << std::endl
502  << "Particle type for Beam 1: " << particleTypeToString( static_cast<ParticleTypeId>( this->particleTypeForBeam1() ) ) << std::endl
503  << "Particle type for Beam 2: " << particleTypeToString( static_cast<ParticleTypeId>( this->particleTypeForBeam2() ) ) << std::endl
504  << "Crossing angle (urad): " << this->crossingAngle() << std::endl
505  << "Beta star (cm): " << this->betaStar() << std::endl
506  << "Average Intensity for Beam 1 (number of charges): " << this->intensityForBeam1() << std::endl
507  << "Average Intensity for Beam 2 (number of charges): " << this->intensityForBeam2() << std::endl
508  << "Energy (GeV): " << this->energy() << std::endl
509  << "Delivered Luminosity (max): " << this->delivLumi() << std::endl
510  << "Recorded Luminosity (max): " << this->recLumi() << std::endl
511  << "Instantaneous Luminosity: " << this->instLumi() << std::endl
512  << "Instantaneous Luminosity Error: " << this->instLumiError() << std::endl
513  << "Creation time of the fill: " << boost::posix_time::to_iso_extended_string( cond::time::to_boost( this->createTime() ) ) << std::endl
514  << "Begin time of Stable Beam flag: " << boost::posix_time::to_iso_extended_string( cond::time::to_boost( this->beginTime() ) ) << std::endl
515  << "End time of the fill: " << boost::posix_time::to_iso_extended_string( cond::time::to_boost( this->endTime() ) ) << std::endl
516  << "Injection scheme as given by LPC: " << this->injectionScheme() << std::endl
517  << "LHC State: " << this->lhcState() << std::endl
518  << "LHC Comments: " << this->lhcComment() << std::endl
519  << "CTPPS Status: " << this->ctppsStatus() << std::endl
520  << "Lumi section: " << this->lumiSection() << std::endl;
521 
522  ss << "Luminosity per bunch (total " << this->lumiPerBX().size() << "): ";
523  std::copy( this->lumiPerBX().begin(), this->lumiPerBX().end(), std::ostream_iterator<float>( ss, ", " ) );
524  ss << std::endl;
525 
526  ss << "Beam 1 VC (total " << this->beam1VC().size() << "): ";
527  std::copy( this->beam1VC().begin(), this->beam1VC().end(), std::ostream_iterator<float>( ss, "\t" ) );
528  ss << std::endl;
529 
530  ss << "Beam 2 VC (total " << beam2VC().size() << "): ";
531  std::copy( beam2VC().begin(), beam2VC().end(), std::ostream_iterator<float>( ss, "\t" ) );
532  ss << std::endl;
533 
534  ss << "Beam 1 RF (total " << beam1RF().size() << "): ";
535  std::copy( beam1RF().begin(), beam1RF().end(), std::ostream_iterator<float>( ss, "\t" ) );
536  ss << std::endl;
537 
538  ss << "Beam 2 RF (total " << beam2RF().size() << "): ";
539  std::copy( beam2RF().begin(), beam2RF().end(), std::ostream_iterator<float>( ss, "\t" ) );
540  ss << std::endl;
541 
542  std::vector<unsigned short> bunchVector1 = this->bunchConfigurationForBeam1();
543  std::vector<unsigned short> bunchVector2 = this->bunchConfigurationForBeam2();
544  ss << "Bunches filled for Beam 1 (total " << bunchVector1.size() << "): ";
545  std::copy( bunchVector1.begin(), bunchVector1.end(), std::ostream_iterator<unsigned short>( ss, ", " ) );
546  ss << std::endl;
547  ss << "Bunches filled for Beam 2 (total " << bunchVector2.size() << "): ";
548  std::copy( bunchVector2.begin(), bunchVector2.end(), std::ostream_iterator<unsigned short>( ss, ", " ) );
549  ss << std::endl;
550 }
551 
552 //protected getters
553 std::bitset<LHCInfo::bunchSlots+1> const & LHCInfo::bunchBitsetForBeam1() const {
554  return m_bunchConfiguration1;
555 }
556 
557 std::bitset<LHCInfo::bunchSlots+1> const & LHCInfo::bunchBitsetForBeam2() const {
558  return m_bunchConfiguration2;
559 }
560 
561 //protected setters
562 void LHCInfo::setBunchBitsetForBeam1( std::bitset<LHCInfo::bunchSlots+1> const & bunchConfiguration ) {
563  m_bunchConfiguration1 = bunchConfiguration;
564 }
565 
566 void LHCInfo::setBunchBitsetForBeam2( std::bitset<LHCInfo::bunchSlots+1> const & bunchConfiguration ) {
567  m_bunchConfiguration2 = bunchConfiguration;
568 }
569 
570 std::ostream & operator<<( std::ostream & os, LHCInfo beamInfo ) {
571  std::stringstream ss;
572  beamInfo.print( ss );
573  os << ss.str();
574  return os;
575 }
576 
577 bool LHCInfo::equals( const LHCInfo& rhs ) const {
578  if( m_isData != rhs.m_isData ) return false;
579  if( m_intParams != rhs.m_intParams ) return false;
580  if( m_floatParams != rhs.m_floatParams ) return false;
581  if( m_timeParams != rhs.m_timeParams ) return false;
582  if( m_stringParams != rhs.m_stringParams ) return false;
583  if( m_bunchConfiguration1 != rhs.m_bunchConfiguration1 ) return false;
584  if( m_bunchConfiguration2 != rhs.m_bunchConfiguration2 ) return false;
585  return true;
586 }
587 
588 bool LHCInfo::empty() const {
589  return m_intParams[0].empty();
590 }
bool equals(const LHCInfo &rhs) const
Definition: LHCInfo.cc:577
std::string const & lhcState() const
Definition: LHCInfo.cc:232
void setBeam1RF(std::vector< float > const &beam1RF)
Definition: LHCInfo.cc:422
cond::Time_t const beginTime() const
Definition: LHCInfo.cc:216
void setLumiSection(unsigned int const &lumiSection)
Definition: LHCInfo.cc:410
unsigned short const bunchesInBeam1() const
Definition: LHCInfo.cc:148
void setBeginTime(cond::Time_t const &beginTime)
Definition: LHCInfo.cc:382
std::bitset< bunchSlots+1 > const & bunchBitsetForBeam1() const
Definition: LHCInfo.cc:553
void print(std::stringstream &ss) const
Definition: LHCInfo.cc:495
bool m_isData
Definition: LHCInfo.h:229
void setInstLumi(float const &instLumi)
Definition: LHCInfo.cc:370
void setEnergy(float const &energy)
Definition: LHCInfo.cc:358
FillTypeId const fillType() const
Definition: LHCInfo.cc:164
bool isBunchInBeam1(size_t const &bunch) const
Definition: LHCInfo.cc:288
def copy(args, dbName)
LHCInfo * cloneFill() const
Definition: LHCInfo.cc:98
void setInstLumiError(float const &instLumiError)
Definition: LHCInfo.cc:374
void setParticleTypeForBeam2(ParticleTypeId const &particleType)
Definition: LHCInfo.cc:338
unsigned short const targetBunches() const
Definition: LHCInfo.cc:160
std::string const & injectionScheme() const
Definition: LHCInfo.cc:224
std::bitset< bunchSlots+1 > m_bunchConfiguration1
Definition: LHCInfo.h:234
static std::string particleTypeToString(LHCInfo::ParticleTypeId const &particleType)
Definition: LHCInfo.cc:46
void setDelivLumi(float const &delivLumi)
Definition: LHCInfo.cc:362
const T & getOneParam(const std::vector< std::vector< T > > &params, size_t index)
Definition: LHCInfo.cc:124
void setParams(std::vector< T > &params, size_t index, const T &value)
Definition: LHCInfo.cc:136
std::string const & ctppsStatus() const
Definition: LHCInfo.cc:240
void setBeam1VC(std::vector< float > const &beam1VC)
Definition: LHCInfo.cc:414
std::vector< std::vector< float > > m_floatParams
Definition: LHCInfo.h:231
bool equal(const T &first, const T &second)
Definition: Equal.h:34
void setBunchesInBeam1(unsigned short const &bunches)
Definition: LHCInfo.cc:314
void setLhcComment(std::string const &lhcComment)
Definition: LHCInfo.cc:402
void setOneParam(std::vector< std::vector< T > > &params, size_t index, const T &value)
Definition: LHCInfo.cc:131
std::vector< std::vector< unsigned long long > > m_timeParams
Definition: LHCInfo.h:232
float const delivLumi() const
Definition: LHCInfo.cc:196
void setFillNumber(unsigned short lhcFill)
Definition: LHCInfo.cc:309
float const crossingAngle() const
Definition: LHCInfo.cc:176
float const instLumiError() const
Definition: LHCInfo.cc:208
bool is25nsBunchSpacing() const
Definition: LHCInfo.cc:282
unsigned long long Time_t
Definition: Time.h:16
std::string const & lhcComment() const
Definition: LHCInfo.cc:236
void setBetaStar(float const &betaStar)
Definition: LHCInfo.cc:346
std::vector< float > const & beam1VC() const
Definition: LHCInfo.cc:248
T & accessParams(std::vector< T > &params, size_t index)
Definition: LHCInfo.cc:119
std::vector< float > const & beam2RF() const
Definition: LHCInfo.cc:260
std::ostream & operator<<(std::ostream &os, LHCInfo beamInfo)
Definition: LHCInfo.cc:570
unsigned short const bunchesInBeam2() const
Definition: LHCInfo.cc:152
bool isBunchInBeam2(size_t const &bunch) const
Definition: LHCInfo.cc:294
void setLumiPerBX(std::vector< float > const &lumiPerBX)
Definition: LHCInfo.cc:394
void setBunchesInBeam2(unsigned short const &bunches)
Definition: LHCInfo.cc:318
std::vector< float > const & beam1RF() const
Definition: LHCInfo.cc:256
float const intensityForBeam2() const
Definition: LHCInfo.cc:188
#define end
Definition: vmac.h:39
void setBeam2RF(std::vector< float > const &beam2RF)
Definition: LHCInfo.cc:426
Definition: value.py:1
void setLhcState(std::string const &lhcState)
Definition: LHCInfo.cc:398
void setBeam2VC(std::vector< float > const &beam2VC)
Definition: LHCInfo.cc:418
void setCollidingBunches(unsigned short const &collidingBunches)
Definition: LHCInfo.cc:322
std::vector< std::vector< unsigned int > > m_intParams
Definition: LHCInfo.h:230
unsigned int const & lumiSection() const
Definition: LHCInfo.cc:244
bool empty() const
Definition: LHCInfo.cc:588
void setRecLumi(float const &recLumi)
Definition: LHCInfo.cc:366
ParticleType
Definition: LHCInfo.h:15
float const instLumi() const
Definition: LHCInfo.cc:204
cond::Time_t const endTime() const
Definition: LHCInfo.cc:220
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:431
void setParticleTypeForBeam1(ParticleTypeId const &particleType)
Definition: LHCInfo.cc:334
void setInjectionScheme(std::string const &injectionScheme)
Definition: LHCInfo.cc:390
~LHCInfo()
Definition: LHCInfo.cc:95
std::vector< float > const & beam2VC() const
Definition: LHCInfo.cc:252
std::vector< float > const & lumiPerBX() const
Definition: LHCInfo.cc:228
ParticleTypeId const particleTypeForBeam1() const
Definition: LHCInfo.cc:168
void setCreationTime(cond::Time_t const &createTime)
Definition: LHCInfo.cc:378
void setTargetBunches(unsigned short const &targetBunches)
Definition: LHCInfo.cc:326
LHCInfo()
Definition: LHCInfo.cc:73
const T & getParams(const std::vector< T > &params, size_t index)
Definition: LHCInfo.cc:114
float const recLumi() const
Definition: LHCInfo.cc:200
void setCtppsStatus(std::string const &ctppsStatus)
Definition: LHCInfo.cc:406
std::bitset< bunchSlots+1 > const & bunchBitsetForBeam2() const
Definition: LHCInfo.cc:557
unsigned short const collidingBunches() const
Definition: LHCInfo.cc:156
#define begin
Definition: vmac.h:32
float const betaStar() const
Definition: LHCInfo.cc:180
float const intensityForBeam1() const
Definition: LHCInfo.cc:184
float const energy() const
Definition: LHCInfo.cc:192
unsigned short const fillNumber() const
Definition: LHCInfo.cc:144
void setBunchBitsetForBeam1(std::bitset< bunchSlots+1 > const &bunchConfiguration)
Definition: LHCInfo.cc:562
void setBunchBitsetForBeam2(std::bitset< bunchSlots+1 > const &bunchConfiguration)
Definition: LHCInfo.cc:566
ParticleTypeId const particleTypeForBeam2() const
Definition: LHCInfo.cc:172
void setIntensityForBeam1(float const &intensity)
Definition: LHCInfo.cc:350
void setEndTime(cond::Time_t const &endTime)
Definition: LHCInfo.cc:386
long double T
void setIntensityForBeam2(float const &intensity)
Definition: LHCInfo.cc:354
std::bitset< bunchSlots+1 > m_bunchConfiguration2
Definition: LHCInfo.h:234
void setFillType(FillTypeId const &fillType)
Definition: LHCInfo.cc:330
cond::Time_t const createTime() const
Definition: LHCInfo.cc:212
void setCrossingAngle(float const &angle)
Definition: LHCInfo.cc:342
std::vector< unsigned short > bunchConfigurationForBeam2() const
Definition: LHCInfo.cc:305
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
std::vector< unsigned short > bunchConfigurationForBeam1() const
Definition: LHCInfo.cc:301
FillType
Definition: LHCInfo.h:14
std::vector< std::vector< std::string > > m_stringParams
Definition: LHCInfo.h:233
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
Definition: angle.h:11