8 static std::vector<unsigned short>
bitsetToVector( std::bitset<FillInfo::bunchSlots+1>
const & bs ) {
9 std::vector<unsigned short> vec;
11 vec.reserve( bs.count() );
12 for(
size_t i = 0;
i < bs.size(); ++
i ) {
14 vec.push_back( (
unsigned short)
i );
47 switch( particleType ) {
69 return s_particleType;
76 , m_collidingBunches( 0 )
77 , m_targetBunches( 0 )
81 , m_crossingAngle( 0. )
89 , m_injectionScheme(
"None" )
92 FillInfo::FillInfo(
unsigned short const & lhcFill,
bool const & fromData ): m_isData( fromData )
93 , m_lhcFill( lhcFill )
96 , m_collidingBunches( 0 )
97 , m_targetBunches( 0 )
101 , m_crossingAngle( 0. )
109 , m_injectionScheme(
"None" )
214 throw std::out_of_range(
"0 not allowed" );
220 throw std::out_of_range(
"0 not allowed" );
300 ,
unsigned short const & bunches2
301 ,
unsigned short const & collidingBunches
302 ,
unsigned short const & targetBunches
308 ,
float const & intensity1
309 ,
float const & intensity2
315 ,std::bitset<bunchSlots+1>
const & bunchConf1
316 ,std::bitset<bunchSlots+1>
const & bunchConf2 ) {
338 ss <<
"LHC fill: " <<
m_lhcFill << std::endl
339 <<
"Bunches in Beam 1: " <<
m_bunches1 << std::endl
340 <<
"Bunches in Beam 2: " <<
m_bunches2 << std::endl
347 <<
"Beta star (cm): " <<
m_betastar << std::endl
348 <<
"Average Intensity for Beam 1 (number of charges): " <<
m_intensity1 << std::endl
349 <<
"Average Intensity for Beam 2 (number of charges): " <<
m_intensity2 << std::endl
350 <<
"Energy (GeV): " <<
m_energy << std::endl
357 ss <<
"Bunches filled for Beam 1 (total " << bunchVector1.size() <<
"): ";
358 std::copy( bunchVector1.begin(), bunchVector1.end(), std::ostream_iterator<unsigned short>( ss,
", " ) );
360 ss <<
"Bunches filled for Beam 2 (total " << bunchVector2.size() <<
"): ";
361 std::copy( bunchVector2.begin(), bunchVector2.end(), std::ostream_iterator<unsigned short>( ss,
", " ) );
384 std::stringstream ss;
385 fillInfo.
print( ss );
ParticleTypeId m_particles1
void setBetaStar(float const &betaStar)
float const intensityForBeam1() const
void setCrossingAngle(float const &angle)
unsigned short m_bunches1
unsigned short m_bunches2
void setBeamInfo(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, cond::Time_t const &createTime, cond::Time_t const &beginTime, cond::Time_t const &endTime, std::string const &scheme, std::bitset< bunchSlots+1 > const &bunchConf1, std::bitset< bunchSlots+1 > const &bunchConf2)
void setCollidingBunches(unsigned short const &collidingBunches)
void setBunchBitsetForBeam2(std::bitset< bunchSlots+1 > const &bunchConfiguration)
0: Unidentified isolated particle
ParticleTypeId const particleTypeForBeam1() const
std::bitset< bunchSlots+1 > m_bunchConfiguration2
void setIntensityForBeam2(float const &intensity)
void setBunchBitsetForBeam1(std::bitset< bunchSlots+1 > const &bunchConfiguration)
cond::Time_t const beginTime() const
std::bitset< bunchSlots+1 > const & bunchBitsetForBeam2() const
void setFillType(FillTypeId const &fillType)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
std::bitset< bunchSlots+1 > const & bunchBitsetForBeam1() const
void setIntensityForBeam1(float const &intensity)
std::string m_injectionScheme
void setBunchesInBeam1(unsigned short const &bunches)
FillTypeId const fillType() const
unsigned short const fillNumber() const
unsigned long long Time_t
static std::vector< unsigned short > bitsetToVector(std::bitset< FillInfo::bunchSlots+1 > const &bs)
unsigned short const bunchesInBeam1() const
void setParticleTypeForBeam2(ParticleTypeId const &particleType)
void setEndTime(cond::Time_t const &endTime)
unsigned short m_targetBunches
void setTargetBunches(unsigned short const &targetBunches)
std::string const & injectionScheme() const
float const betaStar() const
bool isBunchInBeam1(size_t const &bunch) const
void setFill(unsigned short const &lhcFill, bool const &fromData=true)
cond::Time_t const createTime() const
unsigned short m_collidingBunches
void setParticleTypeForBeam1(ParticleTypeId const &particleType)
bool isBunchInBeam2(size_t const &bunch) const
cond::Time_t m_createTime
static std::string fillTypeToString(FillInfo::FillTypeId const &fillType)
std::bitset< bunchSlots+1 > m_bunchConfiguration1
cond::Time_t const endTime() const
static std::string particleTypeToString(FillInfo::ParticleTypeId const &particleType)
float const energy() const
ParticleTypeId const particleTypeForBeam2() const
void setBeginTime(cond::Time_t const &beginTime)
bool const isData() const
unsigned short const bunchesInBeam2() const
float const intensityForBeam2() const
std::vector< unsigned short > bunchConfigurationForBeam1() const
void setBunchesInBeam2(unsigned short const &bunches)
ParticleTypeId m_particles2
void setEnergy(float const &energy)
unsigned short const targetBunches() const
float const crossingAngle() const
boost::posix_time::ptime to_boost(Time_t iValue)
unsigned short const collidingBunches() const
void setCreationTime(cond::Time_t const &createTime)
std::vector< unsigned short > bunchConfigurationForBeam2() const
void setInjectionScheme(std::string const &injectionScheme)
void print(std::stringstream &ss) const
T angle(T x1, T y1, T z1, T x2, T y2, T z2)