Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the CTPPS & ECAL attributes to CondFormats/LHCInfo #22527

Merged
merged 18 commits into from
Mar 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 66 additions & 39 deletions CondFormats/RunInfo/interface/LHCInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ class LHCInfo {
enum FillType { UNKNOWN = 0, PROTONS = 1, IONS = 2, COSMICS = 3, GAP = 4 };
enum ParticleType { NONE = 0, PROTON = 1, PB82 = 2, AR18 = 3, D = 4, XE54 = 5 };

enum IntParamIndex { LHC_FILL = 0, BUNCHES_1 = 1, BUNCHES_2 = 2, COLLIDING_BUNCHES = 3, TARGET_BUNCHES = 4, FILL_TYPE = 5, PARTICLES_1 = 6, PARTICLES_2 = 7, ISIZE = 8 };
enum FloatParamIndex { CROSSING_ANGLE = 0, BETA_STAR = 1, INTENSITY_1 = 2, INTENSITY_2 = 3, ENERGY = 4, DELIV_LUMI = 5, REC_LUMI = 7, LUMI_PER_B=8, FSIZE=9};
enum TimeParamIndex { CREATE_TIME = 0, BEGIN_TIME = 1, END_TIME = 2, TSIZE=3};
enum StringParamIndex { INJECTION_SCHEME = 0, SSIZE=1 };
enum IntParamIndex { LHC_FILL = 0, BUNCHES_1 = 1, BUNCHES_2 = 2, COLLIDING_BUNCHES = 3, TARGET_BUNCHES = 4, FILL_TYPE = 5, PARTICLES_1 = 6, PARTICLES_2 = 7, LUMI_SECTION = 8, ISIZE = 9 };
enum FloatParamIndex { CROSSING_ANGLE = 0, BETA_STAR = 1, INTENSITY_1 = 2, INTENSITY_2 = 3, ENERGY = 4, DELIV_LUMI = 5, REC_LUMI = 7, LUMI_PER_B = 8, BEAM1_VC = 9, BEAM2_VC = 10, BEAM1_RF = 11, BEAM2_RF = 12, FSIZE = 13};
enum TimeParamIndex { CREATE_TIME = 0, BEGIN_TIME = 1, END_TIME = 2, DIP_TIME = 3, TSIZE =4};
enum StringParamIndex { INJECTION_SCHEME = 0, LHC_STATE = 1, LHC_COMMENT = 2, CTPPS_STATUS = 3, SSIZE =4};

typedef FillType FillTypeId;
typedef ParticleType ParticleTypeId;
Expand All @@ -32,7 +32,7 @@ class LHCInfo {
static size_t const availableBunchSlots = 2808;

//reset instance
void setFill( unsigned short const & lhcFill, bool const & fromData = true );
void setFill( unsigned short const & lhcFill, bool const & fromData );

//getters
unsigned short const fillNumber() const;
Expand Down Expand Up @@ -76,6 +76,22 @@ class LHCInfo {
std::string const & injectionScheme() const;

std::vector<float> const & lumiPerBX() const;

std::string const & lhcState() const;

std::string const & lhcComment() const;

std::string const & ctppsStatus() const;

unsigned int const & lumiSection() const;

std::vector<float> const & beam1VC() const;

std::vector<float> const & beam2VC() const;

std::vector<float> const & beam1RF() const;

std::vector<float> const & beam2RF() const;

//returns a boolean, true if the injection scheme has a leading 25ns
//TODO: parse the circulating bunch configuration, instead of the string.
Expand Down Expand Up @@ -130,28 +146,52 @@ class LHCInfo {

void setLumiPerBX( std::vector<float> const & lumiPerBX);

void setLhcState( std::string const & lhcState);

void setLhcComment( std::string const & lhcComment);

void setCtppsStatus( std::string const & ctppsStatus);

void setLumiSection( unsigned int const & lumiSection);

void setBeam1VC( std::vector<float> const & beam1VC);

void setBeam2VC( std::vector<float> const & beam2VC);

void setBeam1RF( std::vector<float> const & beam1RF);

void setBeam2RF( std::vector<float> const & beam2RF);

//sets all values in one go
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
,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::bitset<bunchSlots+1> const & bunchConf1
,std::bitset<bunchSlots+1> const & bunchConf2 );
,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
,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 );

//dumping values on output stream
void print(std::stringstream & ss) const;
Expand All @@ -168,27 +208,14 @@ class LHCInfo {
private:
bool m_isData;
std::vector<std::vector<unsigned int> > m_intParams;
//unsigned short m_lhcFill;
//unsigned short m_bunches1, m_bunches2, m_collidingBunches, m_targetBunches;
//FillTypeId m_fillType;
//ParticleTypeId m_particles1, m_particles2;
std::vector<std::vector<float> > m_floatParams;
//float m_crossingAngle, m_betastar, m_intensity1, m_intensity2, m_energy, m_delivLumi, m_recLumi;
std::vector<std::vector<unsigned long long> > m_timeParams;
//cond::Time_t m_createTime, m_beginTime, m_endTime;
std::vector<std::vector<std::string> > m_stringParams;
//std::string m_injectionScheme;
//std::vector<std::vector<float> > m_farrayParams;
//std::vector<std::vector<float> > m_iarrayParams;
//std::vector<float> m_lumiPerBX;
//BEWARE: since CMS counts bunches starting from one,
//the size of the bitset must be incremented by one,
//in order to avoid off-by-one
std::bitset<bunchSlots+1> m_bunchConfiguration1, m_bunchConfiguration2;

COND_SERIALIZABLE;
};

std::ostream & operator<<( std::ostream &, LHCInfo fillInfo );
std::ostream & operator<<( std::ostream &, LHCInfo lhcInfo );

#endif // CondFormats_RunInfo_LHCInfo_H
Loading