CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | 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
float const betaStar () const
std::vector< unsigned short > bunchConfigurationForBeam1 () const
std::vector< unsigned short > bunchConfigurationForBeam2 () const
unsigned short const bunchesInBeam1 () const
unsigned short const bunchesInBeam2 () const
unsigned short const collidingBunches () const
cond::Time_t const createTime () const
float const crossingAngle () const
cond::Time_t const endTime () const
float const energy () const
 FillInfo (unsigned short const &lhcFill, bool const &fromData=true)
 FillInfo ()
unsigned short const fillNumber () const
FillTypeId const fillType () const
std::string const & injectionScheme () const
float const intensityForBeam1 () const
float const intensityForBeam2 () const
bool isBunchInBeam1 (size_t const &bunch) const
bool isBunchInBeam2 (size_t const &bunch) const
bool const isData () const
ParticleTypeId const particleTypeForBeam1 () const
ParticleTypeId const particleTypeForBeam2 () const
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 setBeginTime (cond::Time_t const &beginTime)
void setBetaStar (float const &betaStar)
void setBunchesInBeam1 (unsigned short const &bunches)
void setBunchesInBeam2 (unsigned short const &bunches)
void setCollidingBunches (unsigned short const &collidingBunches)
void setCreationTime (cond::Time_t const &createTime)
void setCrossingAngle (float const &angle)
void setEndTime (cond::Time_t const &endTime)
void setEnergy (float const &energy)
void setFill (unsigned short const &lhcFill, bool const &fromData=true)
void setFillType (FillTypeId const &fillType)
void setInjectionScheme (std::string const &injectionScheme)
void setIntensityForBeam1 (float const &intensity)
void setIntensityForBeam2 (float const &intensity)
void setParticleTypeForBeam1 (ParticleTypeId const &particleType)
void setParticleTypeForBeam2 (ParticleTypeId const &particleType)
void setTargetBunches (unsigned short const &targetBunches)
unsigned short const targetBunches () const
 ~FillInfo ()

Static Public Attributes

static size_t const availableBunchSlots = 2808
static size_t const bunchSlots = 3564

Protected Member Functions

std::bitset< bunchSlots+1 > const & bunchBitsetForBeam1 () const
std::bitset< bunchSlots+1 > const & bunchBitsetForBeam2 () const
void setBunchBitsetForBeam1 (std::bitset< bunchSlots+1 > const &bunchConfiguration)
void setBunchBitsetForBeam2 (std::bitset< bunchSlots+1 > const &bunchConfiguration)

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

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

                                     {
  return m_betastar;
}
std::bitset< FillInfo::bunchSlots+1 > const & FillInfo::bunchBitsetForBeam1 ( ) const [protected]

Definition at line 366 of file FillInfo.cc.

References m_bunchConfiguration1.

                                                                            {
  return m_bunchConfiguration1;  
}
std::bitset< FillInfo::bunchSlots+1 > const & FillInfo::bunchBitsetForBeam2 ( ) const [protected]

Definition at line 370 of file FillInfo.cc.

References m_bunchConfiguration2.

                                                                            {
  return m_bunchConfiguration2;  
}
std::vector< unsigned short > FillInfo::bunchConfigurationForBeam1 ( ) const

Definition at line 225 of file FillInfo.cc.

References bitsetToVector(), and m_bunchConfiguration1.

Referenced by print().

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

Definition at line 229 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().

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

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

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

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

Definition at line 175 of file FillInfo.cc.

References m_crossingAngle.

Referenced by cond::ValueExtractor< FillInfo >::compute().

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

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

Definition at line 191 of file FillInfo.cc.

References m_energy.

Referenced by cond::ValueExtractor< FillInfo >::compute(), and setEnergy().

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

                                                  {
  return m_fillType;
}
std::string const & FillInfo::injectionScheme ( ) const

Definition at line 207 of file FillInfo.cc.

References m_injectionScheme.

Referenced by setInjectionScheme().

                                                  {
  return m_injectionScheme;
}
float const FillInfo::intensityForBeam1 ( ) const

Definition at line 183 of file FillInfo.cc.

References m_intensity1.

Referenced by cond::ValueExtractor< FillInfo >::compute().

                                              {
  return m_intensity1;
}
float const FillInfo::intensityForBeam2 ( ) const

Definition at line 187 of file FillInfo.cc.

References m_intensity2.

Referenced by cond::ValueExtractor< FillInfo >::compute().

                                              {
  return m_intensity2;
}
bool FillInfo::isBunchInBeam1 ( size_t const &  bunch) const

Definition at line 212 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 218 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 const FillInfo::particleTypeForBeam1 ( ) const

Definition at line 167 of file FillInfo.cc.

References m_particles1.

                                                                  {
  return m_particles1;
}
FillInfo::ParticleTypeId const FillInfo::particleTypeForBeam2 ( ) const

Definition at line 171 of file FillInfo.cc.

References m_particles2.

                                                                  {
  return m_particles2;
}
void FillInfo::print ( std::stringstream &  ss) const

Definition at line 337 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::setBeginTime ( cond::Time_t const &  beginTime)

Definition at line 286 of file FillInfo.cc.

References beginTime(), and m_beginTime.

Referenced by setBeamInfo().

void FillInfo::setBetaStar ( float const &  betaStar)

Definition at line 266 of file FillInfo.cc.

References betaStar(), and m_betastar.

Referenced by setBeamInfo().

void FillInfo::setBunchBitsetForBeam1 ( std::bitset< bunchSlots+1 > const &  bunchConfiguration) [protected]

Definition at line 375 of file FillInfo.cc.

References m_bunchConfiguration1.

Referenced by setBeamInfo().

                                                                                                  {
  m_bunchConfiguration1 = bunchConfiguration;
}
void FillInfo::setBunchBitsetForBeam2 ( std::bitset< bunchSlots+1 > const &  bunchConfiguration) [protected]

Definition at line 379 of file FillInfo.cc.

References m_bunchConfiguration2.

Referenced by setBeamInfo().

                                                                                                  {
  m_bunchConfiguration2 = bunchConfiguration;
}
void FillInfo::setBunchesInBeam1 ( unsigned short const &  bunches)

Definition at line 234 of file FillInfo.cc.

References m_bunches1.

Referenced by setBeamInfo().

                                                                 {
  m_bunches1 = bunches;
}
void FillInfo::setBunchesInBeam2 ( unsigned short const &  bunches)

Definition at line 238 of file FillInfo.cc.

References m_bunches2.

Referenced by setBeamInfo().

                                                                 {
  m_bunches2 = bunches;
}
void FillInfo::setCollidingBunches ( unsigned short const &  collidingBunches)

Definition at line 242 of file FillInfo.cc.

References collidingBunches(), and m_collidingBunches.

Referenced by setBeamInfo().

void FillInfo::setCreationTime ( cond::Time_t const &  createTime)

Definition at line 282 of file FillInfo.cc.

References createTime(), and m_createTime.

Referenced by setBeamInfo().

void FillInfo::setCrossingAngle ( float const &  angle)

Definition at line 262 of file FillInfo.cc.

References angle(), and m_crossingAngle.

Referenced by setBeamInfo().

void FillInfo::setEndTime ( cond::Time_t const &  endTime)

Definition at line 290 of file FillInfo.cc.

References endTime(), and m_endTime.

Referenced by setBeamInfo().

void FillInfo::setEnergy ( float const &  energy)

Definition at line 278 of file FillInfo.cc.

References energy(), and m_energy.

Referenced by setBeamInfo().

                                               {
  m_energy = energy;
}
void FillInfo::setFill ( unsigned short const &  lhcFill,
bool const &  fromData = true 
)
void FillInfo::setFillType ( FillInfo::FillTypeId const &  fillType)

Definition at line 250 of file FillInfo.cc.

References fillType(), and m_fillType.

Referenced by setBeamInfo().

void FillInfo::setInjectionScheme ( std::string const &  injectionScheme)

Definition at line 294 of file FillInfo.cc.

References injectionScheme(), and m_injectionScheme.

Referenced by setBeamInfo().

void FillInfo::setIntensityForBeam1 ( float const &  intensity)

Definition at line 270 of file FillInfo.cc.

References m_intensity1.

Referenced by setBeamInfo().

                                                             {
  m_intensity1 = intensity;
}
void FillInfo::setIntensityForBeam2 ( float const &  intensity)

Definition at line 274 of file FillInfo.cc.

References m_intensity2.

Referenced by setBeamInfo().

                                                             {
  m_intensity2 = intensity;
}
void FillInfo::setParticleTypeForBeam1 ( FillInfo::ParticleTypeId const &  particleType)

Definition at line 254 of file FillInfo.cc.

References m_particles1.

Referenced by setBeamInfo().

                                                                                    {
  m_particles1 = particleType;
}
void FillInfo::setParticleTypeForBeam2 ( FillInfo::ParticleTypeId const &  particleType)

Definition at line 258 of file FillInfo.cc.

References m_particles2.

Referenced by setBeamInfo().

                                                                                    {
  m_particles2 = particleType;
}
void FillInfo::setTargetBunches ( unsigned short const &  targetBunches)

Definition at line 246 of file FillInfo.cc.

References m_targetBunches, and targetBunches().

Referenced by setBeamInfo().

unsigned short const FillInfo::targetBunches ( ) const

Definition at line 159 of file FillInfo.cc.

References m_targetBunches.

Referenced by cond::ValueExtractor< FillInfo >::compute(), and setTargetBunches().

                                                   {
  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 146 of file FillInfo.h.

Referenced by beginTime(), print(), setBeginTime(), and setFill().

float FillInfo::m_betastar [private]

Definition at line 145 of file FillInfo.h.

Referenced by betaStar(), print(), setBetaStar(), 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 142 of file FillInfo.h.

Referenced by bunchesInBeam1(), print(), setBunchesInBeam1(), and setFill().

unsigned short FillInfo::m_bunches2 [private]

Definition at line 142 of file FillInfo.h.

Referenced by bunchesInBeam2(), print(), setBunchesInBeam2(), and setFill().

unsigned short FillInfo::m_collidingBunches [private]

Definition at line 142 of file FillInfo.h.

Referenced by collidingBunches(), print(), setCollidingBunches(), and setFill().

Definition at line 146 of file FillInfo.h.

Referenced by createTime(), print(), setCreationTime(), and setFill().

float FillInfo::m_crossingAngle [private]

Definition at line 145 of file FillInfo.h.

Referenced by crossingAngle(), print(), setCrossingAngle(), and setFill().

Definition at line 146 of file FillInfo.h.

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

float FillInfo::m_energy [private]

Definition at line 145 of file FillInfo.h.

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

Definition at line 143 of file FillInfo.h.

Referenced by fillType(), print(), setFill(), and setFillType().

std::string FillInfo::m_injectionScheme [private]

Definition at line 147 of file FillInfo.h.

Referenced by injectionScheme(), print(), setFill(), and setInjectionScheme().

float FillInfo::m_intensity1 [private]

Definition at line 145 of file FillInfo.h.

Referenced by intensityForBeam1(), print(), setFill(), and setIntensityForBeam1().

float FillInfo::m_intensity2 [private]

Definition at line 145 of file FillInfo.h.

Referenced by intensityForBeam2(), print(), setFill(), and setIntensityForBeam2().

bool FillInfo::m_isData [private]

Definition at line 140 of file FillInfo.h.

Referenced by isData(), and setFill().

unsigned short FillInfo::m_lhcFill [private]

Definition at line 141 of file FillInfo.h.

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

Definition at line 144 of file FillInfo.h.

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

Definition at line 144 of file FillInfo.h.

Referenced by particleTypeForBeam2(), print(), setFill(), and setParticleTypeForBeam2().

unsigned short FillInfo::m_targetBunches [private]

Definition at line 142 of file FillInfo.h.

Referenced by print(), setFill(), setTargetBunches(), and targetBunches().