9 static std::vector<unsigned short>
bitsetToVector(std::bitset<LHCInfo::bunchSlots + 1>
const&
bs) {
10 std::vector<unsigned short> vec;
12 vec.reserve(
bs.count());
13 for (
size_t i = 0;
i <
bs.size(); ++
i) {
15 vec.push_back((
unsigned short)
i);
70 return s_particleType;
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) {}
116 template <
typename T>
119 throw std::out_of_range(
"Parameter with index " +
std::to_string(
index) +
" is out of range.");
123 template <
typename T>
126 throw std::out_of_range(
"Parameter with index " +
std::to_string(
index) +
" is out of range.");
130 template <
typename T>
133 throw std::out_of_range(
"Parameter with index " +
std::to_string(
index) +
" is out of range.");
137 " has no value stored.");
141 template <
typename T>
144 throw std::out_of_range(
"Parameter with index " +
std::to_string(
index) +
" is out of range.");
148 template <
typename T>
151 throw std::out_of_range(
"Parameter with index " +
std::to_string(
index) +
" is out of range.");
246 throw std::out_of_range(
"0 not allowed");
252 throw std::out_of_range(
"0 not allowed");
374 unsigned short const& bunches2,
375 unsigned short const& collidingBunches,
376 unsigned short const& targetBunches,
382 float const& intensity1,
383 float const& intensity2,
385 float const& delivLumi,
386 float const& recLumi,
388 float const& instLumiError,
393 std::vector<float>
const& lumiPerBX,
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) {
442 <<
"Target bunches at IP5: " << this->
targetBunches() << 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: " 459 <<
"Begin time of Stable Beam flag: " 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;
469 ss <<
"Luminosity per bunch (total " << this->
lumiPerBX().size() <<
"): ";
473 ss <<
"Beam 1 VC (total " << this->
beam1VC().size() <<
"): ";
477 ss <<
"Beam 2 VC (total " <<
beam2VC().size() <<
"): ";
481 ss <<
"Beam 1 RF (total " <<
beam1RF().size() <<
"): ";
485 ss <<
"Beam 2 RF (total " <<
beam2RF().size() <<
"): ";
491 ss <<
"Bunches filled for Beam 1 (total " << bunchVector1.size() <<
"): ";
492 std::copy(bunchVector1.begin(), bunchVector1.end(), std::ostream_iterator<unsigned short>(
ss,
", "));
494 ss <<
"Bunches filled for Beam 2 (total " << bunchVector2.size() <<
"): ";
495 std::copy(bunchVector2.begin(), bunchVector2.end(), std::ostream_iterator<unsigned short>(
ss,
", "));
514 std::stringstream
ss;
void setBeam1RF(std::vector< float > const &beam1RF)
void setLumiSection(unsigned int const &lumiSection)
void setBeginTime(cond::Time_t const &beginTime)
void setInstLumi(float const &instLumi)
void setEnergy(float const &energy)
std::string const & ctppsStatus() const
float const instLumiError() const
ParticleTypeId const particleTypeForBeam2() const
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
ret
prodAgent to be discontinued
void setInstLumiError(float const &instLumiError)
void setParticleTypeForBeam2(ParticleTypeId const &particleType)
unsigned short const bunchesInBeam1() const
void print(std::stringstream &ss) const
cond::Time_t const beginTime() const
std::string const & lhcComment() const
FillTypeId const fillType() const
static std::string particleTypeToString(LHCInfo::ParticleTypeId const &particleType)
std::string to_string(const V &value)
void setDelivLumi(float const &delivLumi)
float const energy() const
std::vector< float > const & beam1VC() const
std::vector< float > const & lumiPerBX() const
const T & getOneParam(const std::vector< std::vector< T > > ¶ms, size_t index)
void setParams(std::vector< T > ¶ms, size_t index, const T &value)
unsigned short const fillNumber() const
float const recLumi() const
std::bitset< bunchSlots+1 > const & bunchBitsetForBeam2() const
void setBeam1VC(std::vector< float > const &beam1VC)
std::vector< std::vector< float > > m_floatParams
cond::Time_t const createTime() const
bool equal(const T &first, const T &second)
void setBunchesInBeam1(unsigned short const &bunches)
void setLhcComment(std::string const &lhcComment)
void setOneParam(std::vector< std::vector< T > > ¶ms, size_t index, const T &value)
std::vector< std::vector< unsigned long long > > m_timeParams
std::vector< float > const & beam2RF() const
void setFillNumber(unsigned short lhcFill)
unsigned long long Time_t
ParticleTypeId const particleTypeForBeam1() const
float const betaStar() const
void setBetaStar(float const &betaStar)
unsigned short const collidingBunches() const
std::vector< float > const & beam1RF() const
T & accessParams(std::vector< T > ¶ms, size_t index)
std::ostream & operator<<(std::ostream &os, LHCInfo beamInfo)
float const instLumi() const
std::vector< unsigned short > bunchConfigurationForBeam1() const
std::string const & injectionScheme() const
bool isBunchInBeam1(size_t const &bunch) const
void setLumiPerBX(std::vector< float > const &lumiPerBX)
void setBunchesInBeam2(unsigned short const &bunches)
float const crossingAngle() const
LHCInfo * cloneFill() const
void setBeam2RF(std::vector< float > const &beam2RF)
void setLhcState(std::string const &lhcState)
void setBeam2VC(std::vector< float > const &beam2VC)
void setCollidingBunches(unsigned short const &collidingBunches)
std::vector< std::vector< unsigned int > > m_intParams
unsigned short const targetBunches() const
std::vector< unsigned short > bunchConfigurationForBeam2() const
void setRecLumi(float const &recLumi)
std::string const & lhcState() const
std::bitset< bunchSlots+1 > m_bunchConfiguration1
std::bitset< bunchSlots+1 > m_bunchConfiguration2
std::vector< float > const & beam2VC() const
static std::string fillTypeToString(LHCInfo::FillTypeId const &fillType)
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)
void setParticleTypeForBeam1(ParticleTypeId const &particleType)
bool equals(const LHCInfo &rhs) const
void setInjectionScheme(std::string const &injectionScheme)
void setCreationTime(cond::Time_t const &createTime)
void setTargetBunches(unsigned short const &targetBunches)
const T & getParams(const std::vector< T > ¶ms, size_t index)
cond::Time_t const endTime() const
void setCtppsStatus(std::string const &ctppsStatus)
float const intensityForBeam1() const
float const intensityForBeam2() const
void setBunchBitsetForBeam1(std::bitset< bunchSlots+1 > const &bunchConfiguration)
void setBunchBitsetForBeam2(std::bitset< bunchSlots+1 > const &bunchConfiguration)
unsigned int const & lumiSection() const
float const delivLumi() const
void setIntensityForBeam1(float const &intensity)
void setEndTime(cond::Time_t const &endTime)
bool is25nsBunchSpacing() const
void setIntensityForBeam2(float const &intensity)
unsigned short const bunchesInBeam2() const
void setFillType(FillTypeId const &fillType)
void setCrossingAngle(float const &angle)
std::bitset< bunchSlots+1 > const & bunchBitsetForBeam1() const
boost::posix_time::ptime to_boost(Time_t iValue)
static std::vector< unsigned short > bitsetToVector(std::bitset< LHCInfo::bunchSlots+1 > const &bs)
bool isBunchInBeam2(size_t const &bunch) const
std::vector< std::vector< std::string > > m_stringParams
T angle(T x1, T y1, T z1, T x2, T y2, T z2)