Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:31

0001 #ifndef CondFormats_RunInfo_LHCInfoPerLS_H
0002 #define CondFormats_RunInfo_LHCInfoPerLS_H
0003 
0004 #include "CondFormats/Serialization/interface/Serializable.h"
0005 #include "CondFormats/RunInfo/interface/LHCInfoVectorizedFields.h"
0006 
0007 #include "CondCore/CondDB/interface/Types.h"
0008 
0009 #include <bitset>
0010 #include <iostream>
0011 #include <string>
0012 #include <sstream>
0013 #include <vector>
0014 
0015 class LHCInfoPerLS : public LHCInfoVectorizedFields {
0016 public:
0017   enum IntParamIndex { LHC_FILL = 0, LUMI_SECTION, ISIZE };
0018   enum FloatParamIndex { CROSSING_ANGLE_X = 0, CROSSING_ANGLE_Y, BETA_STAR_X, BETA_STAR_Y, FSIZE };
0019   enum TimeParamIndex { RUN_NUMBER = 0, TSIZE };
0020 
0021   LHCInfoPerLS();
0022 
0023   //getters
0024   unsigned short const fillNumber() const;
0025 
0026   unsigned int const& lumiSection() const;
0027 
0028   float const crossingAngleX() const;
0029 
0030   float const crossingAngleY() const;
0031 
0032   float const betaStarX() const;
0033 
0034   float const betaStarY() const;
0035 
0036   cond::Time_t runNumber() const;
0037 
0038   //setters
0039   void setFillNumber(unsigned short const& lhcFill);
0040 
0041   void setLumiSection(unsigned int const& lumiSection);
0042 
0043   void setCrossingAngleX(float const& angle);
0044 
0045   void setCrossingAngleY(float const& angle);
0046 
0047   void setBetaStarX(float const& betaStar);
0048 
0049   void setBetaStarY(float const& betaStar);
0050 
0051   void setRunNumber(cond::Time_t const& runNumber);
0052 
0053   //sets all values in one go
0054   void setInfo(unsigned short const& lhcFill,
0055                unsigned int const& lumiSection,
0056                float const& angleX,
0057                float const& angleY,
0058                float const& betaX,
0059                float const& betaY,
0060                cond::Time_t const& runNumber);
0061 
0062   bool equals(const LHCInfoPerLS& rhs) const;
0063 
0064   bool empty() const;
0065 
0066   //dumping values on output stream
0067   void print(std::stringstream& ss) const;
0068 
0069   COND_SERIALIZABLE;
0070 };
0071 
0072 std::ostream& operator<<(std::ostream&, LHCInfoPerLS lhcInfo);
0073 
0074 #endif  // CondFormats_RunInfo_LHCInfoPerLS_H