CMS 3D CMS Logo

EcalDCCHeaderBlock.h

Go to the documentation of this file.
00001 #ifndef RAWECAL_ECALDCCHEADERBLOCK_H
00002 #define RAWECAL_ECALDCCHEADERBLOCK_H
00003 
00004 #include <boost/cstdint.hpp>
00005 
00013 #include <vector>
00014 
00015 #define MAX_TCC_SIZE 4
00016 #define MAX_TT_SIZE 70
00017 
00018 
00019 
00020 class EcalDCCHeaderBlock
00021 {
00022 
00023  public:
00024 
00025   typedef int key_type; 
00026 
00027   enum EcalDCCRuntype{
00028 
00029     // run types pre-global runs
00030     COSMIC                   =0,
00031     BEAMH4                   =1, 
00032     BEAMH2                   =2,  
00033     MTCC                     =3,
00034     LASER_STD                =4,
00035     LASER_POWER_SCAN         =5,
00036     LASER_DELAY_SCAN         =6,
00037     TESTPULSE_SCAN_MEM       =7,
00038     TESTPULSE_MGPA           =8,
00039     PEDESTAL_STD             =9,
00040     PEDESTAL_OFFSET_SCAN     =10,
00041     PEDESTAL_25NS_SCAN       =11,
00042     LED_STD                  =12,
00043 
00044     // physics triggers in global runs
00045     PHYSICS_GLOBAL           =13,
00046     COSMICS_GLOBAL           =14,
00047     HALO_GLOBAL              =15,
00048 
00049     // gap events in global runs
00050     LASER_GAP                =16,
00051     TESTPULSE_GAP            =17,
00052     PEDESTAL_GAP             =18,
00053     LED_GAP                  =19,
00054 
00055     // physics triggers in local runs
00056     PHYSICS_LOCAL            =20,
00057     COSMICS_LOCAL            =21,
00058     HALO_LOCAL               =22,
00059     CALIB_LOCAL              =23
00060 
00061   };
00062   
00063   enum EcalBasicTriggerType{
00064     PHYSICS_TRIGGER            =1,
00065     CALIBRATION_TRIGGER        =2,
00066     TEST_TRIGGER               =3,
00067     TECHNICAL_EXTERNAL_TRIGGER =4
00068   };
00069   
00070   enum TTC_DTT_TYPE{
00071     TTC_LASER     = 4,
00072     TTC_LED       = 5,
00073     TTC_TESTPULSE = 6,
00074     TTC_PEDESTAL  = 7
00075   };
00076 
00077   struct EcalDCCEventSettings{
00078     short LaserPower;
00079     short LaserFilter;
00080     short wavelength;
00081     short delay;
00082     short MEMVinj;
00083     short mgpa_content;
00084     short ped_offset;
00085   };
00086 
00087   EcalDCCHeaderBlock();
00088   EcalDCCHeaderBlock(const int& dccId);
00089 
00090   // partitional and geometrical:
00091   // CMS: 1-9 EE-, 10-45 EB, 46-54 EE+
00092   // TB and COSM: 1  (10 in case of EcalRawToDigiDev)
00093   const int& id() const { return dccId_; }
00094 
00095   // as found in raw data, namely
00096   // CMS: 601-654         TB and COSM: 0-35
00097   const int fedId() const { return fedId_; }
00098 
00099   void setId(const int& dccId) { dccId_=dccId; };
00100   void setFedId(const int& fedId) { fedId_=fedId; };
00101 
00102   void setErrors(const int& dccErrors) { dccErrors_=dccErrors; };
00103   void setDccInTTCCommand(const int& dccInTTCCommand) { dccInTTCCommand_=dccInTTCCommand; };
00104   void setRunNumber(const int& run){runNumber_ = run;}
00105   void setLV1(const int& LV1){LV1event_ = LV1;}
00106   void setBX(const int& BX){BX_ = BX;}
00107   void setOrbit(const int& orbit){orbitNumber_ = orbit;}
00108   void setEventSettings(const  EcalDCCEventSettings& EventSettings) { EventSettings_=EventSettings; };
00109   void setRunType(const short& runType) { runType_=runType; };
00110   void setBasicTriggerType(const short& triggerType) { basic_trigger_type_=triggerType; };
00111   //void setSequence(const short& sequence) { sequence_=sequence; } ;
00112   void setRtHalf(const short& rtHalf) { rtHalf_=rtHalf; } ;
00113   void setMgpaGain(const short& mgpaGain) { mgpaGain_=mgpaGain; };
00114   void setMemGain(const short& memGain) { memGain_=memGain; };
00115   void setSelectiveReadout(const bool& selectiveReadout) { selectiveReadout_=selectiveReadout; };
00116   void setZeroSuppression(const bool& zeroSuppression) { zeroSuppression_=zeroSuppression; };
00117   void setTestZeroSuppression(const bool& testZeroSuppression) { testZeroSuppression_ = testZeroSuppression; };
00118   void setSrpStatus(const short& srpStatus) { srpStatus_=srpStatus; };
00119   void setTccStatus(const std::vector<short>& tccStatus) { tccStatus_=tccStatus; };
00120   void setTriggerTowerFlags(const std::vector<short>& triggerTowerFlag) { triggerTowerFlag_ = triggerTowerFlag; };
00121   void setFEStatus(const std::vector<short>& feStatus) { feStatus_ = feStatus; };
00122 
00123   //TODO add all the get methods
00124   
00125   int getDCCErrors() const{ return dccErrors_;}
00126   int getDccInTCCCommand() const{ return dccInTTCCommand_; };
00127   int getRunNumber() const {return runNumber_ ;}
00128   int getLV1() const {return LV1event_ ;}
00129   int getBX() const {return BX_ ;}
00130   int getOrbit() const {return orbitNumber_;}
00131   EcalDCCEventSettings getEventSettings() const { return EventSettings_;}
00132   short getRunType() const {return runType_ ;}
00133   short getBasicTriggerType() const {return basic_trigger_type_ ;}
00134 
00135   short getRtHalf() const { return rtHalf_; } 
00136   short getMgpaGain() const { return mgpaGain_;}
00137   short getMemGain() const  { return memGain_;}
00138   short getSelectiveReadout() const { return selectiveReadout_;}
00139   bool getZeroSuppression() const { return zeroSuppression_;}
00140   bool getTestZeroSuppression() const {return testZeroSuppression_ ;}
00141   short getSrpStatus() const  { return srpStatus_;}
00142   std::vector<short> getTccStatus() const { return tccStatus_ ;}
00143   std::vector<short> getTriggerTowerFlag() const { return triggerTowerFlag_ ;}
00144   std::vector<short> getFEStatus() const { return feStatus_ ;}
00145  private:
00146 
00147   int dccId_;  //to be used as the Key
00148   int fedId_;
00149   int dccErrors_;
00150   int dccInTTCCommand_;
00151   int orbitNumber_;
00152   short runType_;
00153 
00154   short basic_trigger_type_;
00155 
00156   int LV1event_;
00157   int runNumber_;
00158   int BX_;
00159   EcalDCCEventSettings  EventSettings_;
00160   
00161   short rtHalf_;
00162   short mgpaGain_;
00163   short memGain_;
00164   bool selectiveReadout_;
00165   bool testZeroSuppression_;
00166   bool zeroSuppression_;
00167   
00168   short srpStatus_;
00169   std::vector<short> tccStatus_;
00170   std::vector<short> triggerTowerFlag_;
00171   std::vector<short> feStatus_;
00172  
00173 };
00174 
00175 #endif

Generated on Tue Jun 9 17:30:42 2009 for CMSSW by  doxygen 1.5.4