![]() |
![]() |
#include <FillInfo.h>
Public Types | |
enum | FillType { UNKNOWN = 0, PROTONS = 1, IONS = 2, COSMICS = 3, GAP = 4 } |
typedef FillType | FillTypeId |
enum | ParticleType { NONE = 0, PROTON = 1, PB82 = 2, AR18 = 3, D = 4, XE54 = 5 } |
typedef ParticleType | ParticleTypeId |
Public Member Functions | |
cond::Time_t const & | beginTime () const |
cond::Time_t & | beginTime () |
float & | betaStar () |
float const & | betaStar () const |
std::bitset< bunchSlots+1 > const & | bunchBitsetForBeam1 () const |
std::bitset< bunchSlots+1 > & | bunchBitsetForBeam1 () |
std::bitset< bunchSlots+1 > & | bunchBitsetForBeam2 () |
std::bitset< bunchSlots+1 > const & | bunchBitsetForBeam2 () const |
std::vector< unsigned short > | bunchConfigurationForBeam1 () const |
std::vector< unsigned short > | bunchConfigurationForBeam2 () const |
unsigned short const & | bunchesInBeam1 () const |
unsigned short & | bunchesInBeam1 () |
unsigned short const & | bunchesInBeam2 () const |
unsigned short & | bunchesInBeam2 () |
unsigned short const & | collidingBunches () const |
unsigned short & | collidingBunches () |
cond::Time_t const & | createTime () const |
cond::Time_t & | createTime () |
float & | crossingAngle () |
float const & | crossingAngle () const |
cond::Time_t const & | endTime () const |
cond::Time_t & | endTime () |
float const & | energy () const |
float & | energy () |
FillInfo (unsigned short const &lhcFill, bool const &fromData=true) | |
FillInfo () | |
unsigned short const & | fillNumber () const |
FillTypeId & | fillType () |
FillTypeId const & | fillType () const |
std::string const & | injectionScheme () const |
std::string & | injectionScheme () |
float const & | intensityForBeam1 () const |
float & | intensityForBeam1 () |
float const & | intensityForBeam2 () const |
float & | intensityForBeam2 () |
bool | isBunchInBeam1 (size_t const &bunch) const |
bool | isBunchInBeam2 (size_t const &bunch) const |
bool const & | isData () const |
ParticleTypeId & | particleTypeForBeam1 () |
ParticleTypeId const & | particleTypeForBeam1 () const |
ParticleTypeId const & | particleTypeForBeam2 () const |
ParticleTypeId & | particleTypeForBeam2 () |
void | print (std::stringstream &ss) const |
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 | setFill (unsigned short const &lhcFill, bool const &fromData=true) |
unsigned short & | targetBunches () |
unsigned short const & | targetBunches () const |
~FillInfo () | |
Static Public Attributes | |
static size_t const | availableBunchSlots = 2808 |
static size_t const | bunchSlots = 3564 |
Private Attributes | |
cond::Time_t | m_beginTime |
float | m_betastar |
std::bitset< bunchSlots+1 > | m_bunchConfiguration1 |
std::bitset< bunchSlots+1 > | m_bunchConfiguration2 |
unsigned short | m_bunches1 |
unsigned short | m_bunches2 |
unsigned short | m_collidingBunches |
cond::Time_t | m_createTime |
float | m_crossingAngle |
cond::Time_t | m_endTime |
float | m_energy |
FillTypeId | m_fillType |
std::string | m_injectionScheme |
float | m_intensity1 |
float | m_intensity2 |
bool | m_isData |
unsigned short | m_lhcFill |
ParticleTypeId | m_particles1 |
ParticleTypeId | m_particles2 |
unsigned short | m_targetBunches |
Definition at line 8 of file FillInfo.h.
typedef FillType FillInfo::FillTypeId |
Definition at line 12 of file FillInfo.h.
typedef ParticleType FillInfo::ParticleTypeId |
Definition at line 13 of file FillInfo.h.
enum FillInfo::FillType |
FillInfo::FillInfo | ( | ) |
Definition at line 72 of file FillInfo.cc.
: m_isData( false ) , m_lhcFill( 0 ) , m_bunches1( 0 ) , m_bunches2( 0 ) , m_collidingBunches( 0 ) , m_targetBunches( 0 ) , m_fillType( FillTypeId::UNKNOWN ) , m_particles1( ParticleTypeId::NONE ) , m_particles2( ParticleTypeId::NONE ) , m_crossingAngle( 0. ) , m_betastar( 0. ) , m_intensity1( 0. ) , m_intensity2( 0. ) , m_energy( 0. ) , m_createTime( 0 ) , m_beginTime( 0 ) , m_endTime( 0 ) , m_injectionScheme( "None" ) {}
FillInfo::FillInfo | ( | unsigned short const & | lhcFill, |
bool const & | fromData = true |
||
) |
Definition at line 92 of file FillInfo.cc.
: m_isData( fromData ) , m_lhcFill( lhcFill ) , m_bunches1( 0 ) , m_bunches2( 0 ) , m_collidingBunches( 0 ) , m_targetBunches( 0 ) , m_fillType( FillTypeId::UNKNOWN ) , m_particles1( ParticleTypeId::NONE ) , m_particles2( ParticleTypeId::NONE ) , m_crossingAngle( 0. ) , m_betastar( 0. ) , m_intensity1( 0. ) , m_intensity2( 0. ) , m_energy( 0. ) , m_createTime( 0 ) , m_beginTime( 0 ) , m_endTime( 0 ) , m_injectionScheme( "None" ) {}
FillInfo::~FillInfo | ( | ) |
Definition at line 112 of file FillInfo.cc.
{}
cond::Time_t const & FillInfo::beginTime | ( | ) | const |
Definition at line 199 of file FillInfo.cc.
References m_beginTime.
Referenced by cond::ValueExtractor< FillInfo >::compute(), and setBeamInfo().
{ return m_beginTime; }
cond::Time_t & FillInfo::beginTime | ( | ) |
float const & FillInfo::betaStar | ( | ) | const |
Definition at line 179 of file FillInfo.cc.
References m_betastar.
Referenced by cond::ValueExtractor< FillInfo >::compute(), and setBeamInfo().
{ return m_betastar; }
float & FillInfo::betaStar | ( | ) |
std::bitset< FillInfo::bunchSlots+1 > const & FillInfo::bunchBitsetForBeam1 | ( | ) | const |
Definition at line 211 of file FillInfo.cc.
References m_bunchConfiguration1.
Referenced by setBeamInfo().
{ return m_bunchConfiguration1; }
std::bitset< FillInfo::bunchSlots+1 > & FillInfo::bunchBitsetForBeam1 | ( | ) |
Definition at line 306 of file FillInfo.cc.
References m_bunchConfiguration1.
{ return m_bunchConfiguration1; }
std::bitset< FillInfo::bunchSlots+1 > & FillInfo::bunchBitsetForBeam2 | ( | ) |
Definition at line 310 of file FillInfo.cc.
References m_bunchConfiguration2.
{ return m_bunchConfiguration2; }
std::bitset< FillInfo::bunchSlots+1 > const & FillInfo::bunchBitsetForBeam2 | ( | ) | const |
Definition at line 215 of file FillInfo.cc.
References m_bunchConfiguration2.
Referenced by setBeamInfo().
{ return m_bunchConfiguration2; }
std::vector< unsigned short > FillInfo::bunchConfigurationForBeam1 | ( | ) | const |
Definition at line 233 of file FillInfo.cc.
References bitsetToVector(), and m_bunchConfiguration1.
Referenced by print().
{ return bitsetToVector( m_bunchConfiguration1 ); }
std::vector< unsigned short > FillInfo::bunchConfigurationForBeam2 | ( | ) | const |
Definition at line 237 of file FillInfo.cc.
References bitsetToVector(), and m_bunchConfiguration2.
Referenced by print().
{ return bitsetToVector( m_bunchConfiguration2 ); }
unsigned short const & FillInfo::bunchesInBeam1 | ( | ) | const |
Definition at line 147 of file FillInfo.cc.
References m_bunches1.
Referenced by cond::ValueExtractor< FillInfo >::compute(), and setBeamInfo().
{ return m_bunches1; }
unsigned short & FillInfo::bunchesInBeam1 | ( | ) |
unsigned short const & FillInfo::bunchesInBeam2 | ( | ) | const |
Definition at line 151 of file FillInfo.cc.
References m_bunches2.
Referenced by cond::ValueExtractor< FillInfo >::compute(), and setBeamInfo().
{ return m_bunches2; }
unsigned short & FillInfo::bunchesInBeam2 | ( | ) |
unsigned short const & FillInfo::collidingBunches | ( | ) | const |
Definition at line 155 of file FillInfo.cc.
References m_collidingBunches.
Referenced by cond::ValueExtractor< FillInfo >::compute(), and setBeamInfo().
{ return m_collidingBunches; }
unsigned short & FillInfo::collidingBunches | ( | ) |
Definition at line 250 of file FillInfo.cc.
References m_collidingBunches.
{ return m_collidingBunches; }
cond::Time_t const & FillInfo::createTime | ( | ) | const |
Definition at line 195 of file FillInfo.cc.
References m_createTime.
Referenced by cond::ValueExtractor< FillInfo >::compute(), and setBeamInfo().
{ return m_createTime; }
cond::Time_t & FillInfo::createTime | ( | ) |
float & FillInfo::crossingAngle | ( | ) |
float const & FillInfo::crossingAngle | ( | ) | const |
Definition at line 175 of file FillInfo.cc.
References m_crossingAngle.
Referenced by cond::ValueExtractor< FillInfo >::compute(), and setBeamInfo().
{ return m_crossingAngle; }
cond::Time_t const & FillInfo::endTime | ( | ) | const |
Definition at line 203 of file FillInfo.cc.
References m_endTime.
Referenced by cond::ValueExtractor< FillInfo >::compute(), and setBeamInfo().
{ return m_endTime; }
cond::Time_t & FillInfo::endTime | ( | ) |
float & FillInfo::energy | ( | ) |
float const & FillInfo::energy | ( | ) | const |
Definition at line 191 of file FillInfo.cc.
References m_energy.
Referenced by cond::ValueExtractor< FillInfo >::compute(), and setBeamInfo().
{ return m_energy; }
unsigned short const & FillInfo::fillNumber | ( | ) | const |
Definition at line 139 of file FillInfo.cc.
References m_lhcFill.
Referenced by cond::ValueExtractor< FillInfo >::compute().
{ return m_lhcFill; }
FillInfo::FillTypeId const & FillInfo::fillType | ( | ) | const |
Definition at line 163 of file FillInfo.cc.
References m_fillType.
Referenced by setBeamInfo().
{ return m_fillType; }
FillInfo::FillTypeId & FillInfo::fillType | ( | ) |
std::string & FillInfo::injectionScheme | ( | ) |
Definition at line 302 of file FillInfo.cc.
References m_injectionScheme.
{ return m_injectionScheme; }
std::string const & FillInfo::injectionScheme | ( | ) | const |
Definition at line 207 of file FillInfo.cc.
References m_injectionScheme.
Referenced by setBeamInfo().
{ return m_injectionScheme; }
float & FillInfo::intensityForBeam1 | ( | ) |
float const & FillInfo::intensityForBeam1 | ( | ) | const |
Definition at line 183 of file FillInfo.cc.
References m_intensity1.
Referenced by cond::ValueExtractor< FillInfo >::compute(), and setBeamInfo().
{ return m_intensity1; }
float & FillInfo::intensityForBeam2 | ( | ) |
float const & FillInfo::intensityForBeam2 | ( | ) | const |
Definition at line 187 of file FillInfo.cc.
References m_intensity2.
Referenced by cond::ValueExtractor< FillInfo >::compute(), and setBeamInfo().
{ return m_intensity2; }
bool FillInfo::isBunchInBeam1 | ( | size_t const & | bunch | ) | const |
Definition at line 220 of file FillInfo.cc.
References m_bunchConfiguration1.
{ if( bunch == 0 ) throw std::out_of_range( "0 not allowed" ); //CMS starts counting bunch crossing from 1! return m_bunchConfiguration1.test( bunch ); }
bool FillInfo::isBunchInBeam2 | ( | size_t const & | bunch | ) | const |
Definition at line 226 of file FillInfo.cc.
References m_bunchConfiguration2.
{ if( bunch == 0 ) throw std::out_of_range( "0 not allowed" ); //CMS starts counting bunch crossing from 1! return m_bunchConfiguration2.test( bunch ); }
bool const & FillInfo::isData | ( | ) | const |
FillInfo::ParticleTypeId & FillInfo::particleTypeForBeam1 | ( | ) |
FillInfo::ParticleTypeId const & FillInfo::particleTypeForBeam1 | ( | ) | const |
Definition at line 167 of file FillInfo.cc.
References m_particles1.
Referenced by setBeamInfo().
{ return m_particles1; }
FillInfo::ParticleTypeId & FillInfo::particleTypeForBeam2 | ( | ) |
FillInfo::ParticleTypeId const & FillInfo::particleTypeForBeam2 | ( | ) | const |
Definition at line 171 of file FillInfo.cc.
References m_particles2.
Referenced by setBeamInfo().
{ return m_particles2; }
void FillInfo::print | ( | std::stringstream & | ss | ) | const |
Definition at line 353 of file FillInfo.cc.
References bunchConfigurationForBeam1(), bunchConfigurationForBeam2(), filterCSVwithJSON::copy, fillTypeToString(), m_beginTime, m_betastar, m_bunches1, m_bunches2, m_collidingBunches, m_createTime, m_crossingAngle, m_endTime, m_energy, m_fillType, m_injectionScheme, m_intensity1, m_intensity2, m_lhcFill, m_particles1, m_particles2, m_targetBunches, particleTypeToString(), and cond::time::to_boost().
Referenced by operator<<().
{ ss << "LHC fill: " << m_lhcFill << std::endl << "Bunches in Beam 1: " << m_bunches1 << std::endl << "Bunches in Beam 2: " << m_bunches2 << std::endl << "Colliding bunches at IP5: " << m_collidingBunches << std::endl << "Target bunches at IP5: " << m_targetBunches << std::endl << "Fill type: " << fillTypeToString( m_fillType ) << std::endl << "Particle type for Beam 1: " << particleTypeToString( m_particles1 ) << std::endl << "Particle type for Beam 2: " << particleTypeToString( m_particles2 ) << std::endl << "Crossing angle (urad): " << m_crossingAngle << std::endl << "Beta star (cm): " << m_betastar << std::endl << "Average Intensity for Beam 1 (number of charges): " << m_intensity1 << std::endl << "Average Intensity for Beam 2 (number of charges): " << m_intensity2 << std::endl << "Energy (GeV): " << m_energy << std::endl << "Creation time of the fill: " << boost::posix_time::to_iso_extended_string( cond::time::to_boost( m_createTime ) ) << std::endl << "Begin time of Stable Beam flag: " << boost::posix_time::to_iso_extended_string( cond::time::to_boost( m_beginTime ) ) << std::endl << "End time of the fill: " << boost::posix_time::to_iso_extended_string( cond::time::to_boost( m_endTime ) ) << std::endl << "Injection scheme as given by LPC: " << m_injectionScheme << std::endl; std::vector<unsigned short> bunchVector1 = this->bunchConfigurationForBeam1(); std::vector<unsigned short> bunchVector2 = this->bunchConfigurationForBeam2(); ss << "Bunches filled for Beam 1 (total " << bunchVector1.size() << "): "; std::copy( bunchVector1.begin(), bunchVector1.end(), std::ostream_iterator<unsigned short>( ss, ", " ) ); ss << std::endl; ss << "Bunches filled for Beam 2 (total " << bunchVector2.size() << "): "; std::copy( bunchVector2.begin(), bunchVector2.end(), std::ostream_iterator<unsigned short>( ss, ", " ) ); ss << std::endl; }
void FillInfo::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 | ||
) |
Definition at line 315 of file FillInfo.cc.
References angle(), beginTime(), beta, betaStar(), bunchBitsetForBeam1(), bunchBitsetForBeam2(), bunchesInBeam1(), bunchesInBeam2(), collidingBunches(), createTime(), crossingAngle(), endTime(), energy(), fillType(), injectionScheme(), intensityForBeam1(), intensityForBeam2(), particleTypeForBeam1(), particleTypeForBeam2(), and targetBunches().
Referenced by FillInfoPopConSourceHandler::getNewObjects().
{ this->bunchesInBeam1() = bunches1; this->bunchesInBeam2() = bunches2; this->collidingBunches() = collidingBunches; this->targetBunches() = targetBunches; this->fillType() = fillType; this->particleTypeForBeam1() = particleType1; this->particleTypeForBeam2() = particleType2; this->crossingAngle() = angle; this->betaStar() = beta; this->intensityForBeam1() = intensity1; this->intensityForBeam2() = intensity2; this->energy() = energy; this->createTime() = createTime; this->beginTime() = beginTime; this->endTime() = endTime; this->injectionScheme() = scheme; this->bunchBitsetForBeam1() = bunchConf1; this->bunchBitsetForBeam2() = bunchConf2; }
void FillInfo::setFill | ( | unsigned short const & | lhcFill, |
bool const & | fromData = true |
||
) |
Definition at line 115 of file FillInfo.cc.
References m_beginTime, m_betastar, m_bunchConfiguration1, m_bunchConfiguration2, m_bunches1, m_bunches2, m_collidingBunches, m_createTime, m_crossingAngle, m_endTime, m_energy, m_fillType, m_injectionScheme, m_intensity1, m_intensity2, m_isData, m_lhcFill, m_particles1, m_particles2, m_targetBunches, NONE, and UNKNOWN.
{ m_isData = fromData; m_lhcFill = lhcFill; m_bunches1 = 0; m_bunches2 = 0; m_collidingBunches = 0; m_targetBunches = 0; m_fillType = FillTypeId::UNKNOWN; m_particles1 = ParticleTypeId::NONE; m_particles2 = ParticleTypeId::NONE; m_crossingAngle = 0.; m_betastar = 0.; m_intensity1 = 0; m_intensity2 = 0; m_energy = 0.; m_createTime = 0; m_beginTime = 0; m_endTime = 0; m_injectionScheme = "None"; m_bunchConfiguration1.reset(); m_bunchConfiguration2.reset(); }
unsigned short const & FillInfo::targetBunches | ( | ) | const |
Definition at line 159 of file FillInfo.cc.
References m_targetBunches.
Referenced by cond::ValueExtractor< FillInfo >::compute(), and setBeamInfo().
{ return m_targetBunches; }
unsigned short & FillInfo::targetBunches | ( | ) |
size_t const FillInfo::availableBunchSlots = 2808 [static] |
Definition at line 22 of file FillInfo.h.
Referenced by FillInfoPopConSourceHandler::getNewObjects().
size_t const FillInfo::bunchSlots = 3564 [static] |
Definition at line 19 of file FillInfo.h.
cond::Time_t FillInfo::m_beginTime [private] |
Definition at line 145 of file FillInfo.h.
Referenced by beginTime(), print(), and setFill().
float FillInfo::m_betastar [private] |
Definition at line 144 of file FillInfo.h.
Referenced by betaStar(), print(), and setFill().
std::bitset<bunchSlots+1> FillInfo::m_bunchConfiguration1 [private] |
Definition at line 150 of file FillInfo.h.
Referenced by bunchBitsetForBeam1(), bunchConfigurationForBeam1(), isBunchInBeam1(), and setFill().
std::bitset<bunchSlots+1> FillInfo::m_bunchConfiguration2 [private] |
Definition at line 150 of file FillInfo.h.
Referenced by bunchBitsetForBeam2(), bunchConfigurationForBeam2(), isBunchInBeam2(), and setFill().
unsigned short FillInfo::m_bunches1 [private] |
Definition at line 141 of file FillInfo.h.
Referenced by bunchesInBeam1(), print(), and setFill().
unsigned short FillInfo::m_bunches2 [private] |
Definition at line 141 of file FillInfo.h.
Referenced by bunchesInBeam2(), print(), and setFill().
unsigned short FillInfo::m_collidingBunches [private] |
Definition at line 141 of file FillInfo.h.
Referenced by collidingBunches(), print(), and setFill().
cond::Time_t FillInfo::m_createTime [private] |
Definition at line 145 of file FillInfo.h.
Referenced by createTime(), print(), and setFill().
float FillInfo::m_crossingAngle [private] |
Definition at line 144 of file FillInfo.h.
Referenced by crossingAngle(), print(), and setFill().
cond::Time_t FillInfo::m_endTime [private] |
Definition at line 145 of file FillInfo.h.
float FillInfo::m_energy [private] |
Definition at line 144 of file FillInfo.h.
FillTypeId FillInfo::m_fillType [private] |
Definition at line 142 of file FillInfo.h.
Referenced by fillType(), print(), and setFill().
std::string FillInfo::m_injectionScheme [private] |
Definition at line 146 of file FillInfo.h.
Referenced by injectionScheme(), print(), and setFill().
float FillInfo::m_intensity1 [private] |
Definition at line 144 of file FillInfo.h.
Referenced by intensityForBeam1(), print(), and setFill().
float FillInfo::m_intensity2 [private] |
Definition at line 144 of file FillInfo.h.
Referenced by intensityForBeam2(), print(), and setFill().
bool FillInfo::m_isData [private] |
Definition at line 139 of file FillInfo.h.
unsigned short FillInfo::m_lhcFill [private] |
Definition at line 140 of file FillInfo.h.
Referenced by fillNumber(), print(), and setFill().
ParticleTypeId FillInfo::m_particles1 [private] |
Definition at line 143 of file FillInfo.h.
Referenced by particleTypeForBeam1(), print(), and setFill().
ParticleTypeId FillInfo::m_particles2 [private] |
Definition at line 143 of file FillInfo.h.
Referenced by particleTypeForBeam2(), print(), and setFill().
unsigned short FillInfo::m_targetBunches [private] |
Definition at line 141 of file FillInfo.h.
Referenced by print(), setFill(), and targetBunches().