00001 #ifndef CSCVTMBHeaderFormat_h 00002 #define CSCVTMBHeaderFormat_h 00003 00004 #include "DataFormats/CSCDigi/interface/CSCCLCTDigi.h" 00005 #include "DataFormats/CSCDigi/interface/CSCALCTDigi.h" 00006 #include "DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigi.h" 00007 #include "DataFormats/MuonDetId/interface/CSCDetId.h" 00008 #include <vector> 00009 #include <iosfwd> 00010 #include <strings.h> 00011 class CSCDMBHeader; 00012 00013 00014 class CSCVTMBHeaderFormat { 00015 public: 00016 virtual ~CSCVTMBHeaderFormat() {} 00017 void init() { 00018 bzero(this, sizeInWords()*2); 00019 } 00020 00021 virtual void setEventInformation(const CSCDMBHeader &) = 0; 00022 virtual uint16_t BXNCount() const = 0; 00023 virtual uint16_t ALCTMatchTime() const = 0; 00024 virtual uint16_t CLCTOnly() const = 0; 00025 virtual uint16_t ALCTOnly() const = 0; 00026 virtual uint16_t TMBMatch() const = 0; 00027 virtual uint16_t Bxn0Diff() const = 0; 00028 virtual uint16_t Bxn1Diff() const = 0; 00029 virtual uint16_t L1ANumber() const = 0; 00030 uint16_t sizeInBytes() const { 00031 return sizeInWords()*2; 00032 } 00033 virtual uint16_t NTBins() const = 0; 00034 virtual uint16_t NCFEBs() const = 0; 00035 virtual uint16_t firmwareRevision() const = 0; 00037 virtual std::vector<CSCCLCTDigi> CLCTDigis(uint32_t idlayer) = 0; 00039 virtual std::vector<CSCCorrelatedLCTDigi> CorrelatedLCTDigis(uint32_t idlayer) const = 0; 00040 00041 00044 virtual unsigned short int sizeInWords() const = 0; 00045 00046 virtual unsigned short int NHeaderFrames() const = 0; 00047 virtual unsigned short * data() = 0; 00048 virtual bool check() const = 0; 00049 00051 //void setChamberId(const CSCDetId & detId) {theChamberId = detId;} 00052 00054 virtual void addCLCT0(const CSCCLCTDigi & digi) = 0; 00055 virtual void addCLCT1(const CSCCLCTDigi & digi) = 0; 00056 virtual void addALCT0(const CSCALCTDigi & digi) = 0; 00057 virtual void addALCT1(const CSCALCTDigi & digi) = 0; 00058 virtual void addCorrelatedLCT0(const CSCCorrelatedLCTDigi & digi) = 0; 00059 virtual void addCorrelatedLCT1(const CSCCorrelatedLCTDigi & digi) = 0; 00060 00061 00062 virtual void print(std::ostream & os) const = 0; 00063 protected: 00064 00065 void swapCLCTs(CSCCLCTDigi& digi1, CSCCLCTDigi& digi2); 00066 }; 00067 00068 #endif 00069