CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Attributes | Private Attributes

FillInfo Class Reference

#include <FillInfo.h>

List of all members.

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_tbeginTime ()
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_tcreateTime ()
float & crossingAngle ()
float const & crossingAngle () const
cond::Time_t const & endTime () const
cond::Time_tendTime ()
float const & energy () const
float & energy ()
 FillInfo (unsigned short const &lhcFill, bool const &fromData=true)
 FillInfo ()
unsigned short const & fillNumber () const
FillTypeIdfillType ()
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
ParticleTypeIdparticleTypeForBeam1 ()
ParticleTypeId const & particleTypeForBeam1 () const
ParticleTypeId const & particleTypeForBeam2 () const
ParticleTypeIdparticleTypeForBeam2 ()
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

Detailed Description

Definition at line 8 of file FillInfo.h.


Member Typedef Documentation

Definition at line 12 of file FillInfo.h.

Definition at line 13 of file FillInfo.h.


Member Enumeration Documentation

Enumerator:
UNKNOWN 
PROTONS 
IONS 
COSMICS 
GAP 

Definition at line 10 of file FillInfo.h.

{ UNKNOWN = 0, PROTONS = 1, IONS = 2, COSMICS = 3, GAP = 4 };
Enumerator:
NONE 
PROTON 
PB82 
AR18 
D 
XE54 

Definition at line 11 of file FillInfo.h.

{ NONE = 0, PROTON = 1, PB82 = 2, AR18 = 3, D = 4, XE54 = 5 };

Constructor & Destructor Documentation

FillInfo::FillInfo ( )

Definition at line 72 of file FillInfo.cc.

FillInfo::FillInfo ( unsigned short const &  lhcFill,
bool const &  fromData = true 
)

Definition at line 92 of file FillInfo.cc.

FillInfo::~FillInfo ( )

Definition at line 112 of file FillInfo.cc.

{}

Member Function Documentation

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 ( )

Definition at line 294 of file FillInfo.cc.

References m_beginTime.

                                 {
  return m_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 ( )

Definition at line 274 of file FillInfo.cc.

References m_betastar.

                           {
  return m_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().

std::vector< unsigned short > FillInfo::bunchConfigurationForBeam2 ( ) const

Definition at line 237 of file FillInfo.cc.

References bitsetToVector(), and m_bunchConfiguration2.

Referenced by print().

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 ( )

Definition at line 242 of file FillInfo.cc.

References m_bunches1.

                                          {
  return m_bunches1;
}
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 ( )

Definition at line 246 of file FillInfo.cc.

References m_bunches2.

                                          {
  return m_bunches2;
}
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 ( )

Definition at line 290 of file FillInfo.cc.

References m_createTime.

                                  {
  return m_createTime;
}
float & FillInfo::crossingAngle ( )

Definition at line 270 of file FillInfo.cc.

References m_crossingAngle.

                                {
  return m_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 ( )

Definition at line 298 of file FillInfo.cc.

References m_endTime.

                               {
  return m_endTime;
}
float & FillInfo::energy ( )

Definition at line 286 of file FillInfo.cc.

References m_energy.

                         {
  return m_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 ( )

Definition at line 258 of file FillInfo.cc.

References m_fillType.

                                        {
  return m_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 ( )

Definition at line 278 of file FillInfo.cc.

References m_intensity1.

                                    {
  return m_intensity1;
}
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 ( )

Definition at line 282 of file FillInfo.cc.

References m_intensity2.

                                    {
  return m_intensity2;
}
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

Definition at line 143 of file FillInfo.cc.

References m_isData.

                                    {
  return m_isData;
}
FillInfo::ParticleTypeId & FillInfo::particleTypeForBeam1 ( )

Definition at line 262 of file FillInfo.cc.

References m_particles1.

                                                        {
  return m_particles1;
}
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 ( )

Definition at line 266 of file FillInfo.cc.

References m_particles2.

                                                        {
  return m_particles2;
}
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 
)
void FillInfo::setFill ( unsigned short const &  lhcFill,
bool const &  fromData = true 
)
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 ( )

Definition at line 254 of file FillInfo.cc.

References m_targetBunches.

                                         {
  return m_targetBunches;
}

Member Data Documentation

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.

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]
std::bitset<bunchSlots+1> FillInfo::m_bunchConfiguration2 [private]
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().

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().

Definition at line 145 of file FillInfo.h.

Referenced by endTime(), print(), and setFill().

float FillInfo::m_energy [private]

Definition at line 144 of file FillInfo.h.

Referenced by energy(), print(), and setFill().

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.

Referenced by isData(), and setFill().

unsigned short FillInfo::m_lhcFill [private]

Definition at line 140 of file FillInfo.h.

Referenced by fillNumber(), print(), and setFill().

Definition at line 143 of file FillInfo.h.

Referenced by particleTypeForBeam1(), print(), and setFill().

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().