CMS 3D CMS Logo

DTControlData.h

Go to the documentation of this file.
00001 #ifndef DTRawToDigi_DTControlData_h
00002 #define DTRawToDigi_DTControlData_h
00003 
00013 #include <EventFilter/DTRawToDigi/interface/DTDDUWords.h>
00014 #include <DataFormats/FEDRawData/interface/FEDHeader.h>
00015 #include <DataFormats/FEDRawData/interface/FEDTrailer.h>
00016 
00017 #include <vector>
00018 
00019 typedef std::pair<int, DTROBHeaderWord> DTROBHeader;   
00020 typedef std::pair<int, DTTDCMeasurementWord> DTTDCData;
00021 typedef std::pair<int, DTTDCErrorWord> DTTDCError;
00022 typedef std::pair<DTLocalTriggerDataWord, int> DTSectorCollectorData;
00023 
00024 class DTROS25Data {
00025 
00026 public:
00027 
00029  DTROS25Data(int ROSId = 0): theROSId(ROSId) {}
00030 
00031 
00033  virtual ~DTROS25Data() {}
00034 
00036  inline void setROSId(const int & ID) { theROSId = ID; }
00037 
00038  inline void addROSHeader( const DTROSHeaderWord & word)  { theROSHeader = DTROSHeaderWord(word) ; }
00039  inline void addROSTrailer( const DTROSTrailerWord & word)  { theROSTrailer = DTROSTrailerWord(word) ; }
00040  inline void addROSError( const DTROSErrorWord & word)  { theROSErrors.push_back(word); }
00041  inline void addROSDebug( const DTROSDebugWord & word)  { theROSDebugs.push_back(word); }
00042  inline void addROBHeader( const DTROBHeader & robHeader)  { theROBHeaders.push_back(robHeader); }   // IJ
00043  inline void addROBTrailer( const DTROBTrailerWord & word)  { theROBTrailers.push_back(word); }
00044  inline void addTDCMeasurement( const DTTDCMeasurementWord & word)  { theTDCMeasurements.push_back(word); }
00045  inline void addTDCData( const DTTDCData & tdcData)  { theTDCData.push_back(tdcData); }
00046  inline void addTDCError( const DTTDCError & tdcError)  { theTDCError.push_back(tdcError); }
00047  inline void addSCData ( const DTSectorCollectorData & scData) { theSCData.push_back(scData); }
00048 
00050  inline int getROSID() const { return theROSId; }
00051 
00052  inline const DTROSTrailerWord & getROSTrailer() const {return theROSTrailer;}
00053  inline const DTROSHeaderWord & getROSHeader() const {return theROSHeader;}
00054  inline const std::vector<DTROSErrorWord>& getROSErrors() const {return theROSErrors;}
00055  inline const std::vector<DTROSDebugWord>& getROSDebugs() const {return theROSDebugs;}
00056  inline const std::vector<DTROBHeader>& getROBHeaders() const {return theROBHeaders;}
00057  inline const std::vector<DTROBTrailerWord>& getROBTrailers() const {return theROBTrailers;}
00058  inline const std::vector<DTTDCMeasurementWord>& getTDCMeasurements() const {return theTDCMeasurements;}
00059  inline const std::vector<DTTDCData>& getTDCData() const {return theTDCData;}
00060  inline const std::vector<DTTDCError>& getTDCError() const {return theTDCError;}
00061  inline const std::vector<DTSectorCollectorData>& getSCData() const {return theSCData;}
00062 
00063  inline void clean() {
00064    theROSHeader = 0; 
00065    theROSTrailer = 0;
00066    theROSErrors.clear(); 
00067    theROSDebugs.clear(); 
00068    theROBHeaders.clear(); 
00069    theROBTrailers.clear(); 
00070    theTDCMeasurements.clear(); 
00071    theTDCData.clear(); 
00072    theTDCError.clear(); 
00073    theSCData.clear(); 
00074  }
00075  
00076 
00077 private:
00078 
00079  int theROSId;
00080 
00081  DTROSHeaderWord theROSHeader;
00082  DTROSTrailerWord theROSTrailer;
00083  std::vector<DTROSErrorWord> theROSErrors;
00084  std::vector<DTROSDebugWord> theROSDebugs;
00085  std::vector<DTROBHeader> theROBHeaders;    
00086  std::vector<DTROBTrailerWord> theROBTrailers;
00087  std::vector<DTTDCMeasurementWord> theTDCMeasurements;
00088  std::vector<DTTDCData> theTDCData;
00089  std::vector<DTTDCError> theTDCError;
00090  std::vector<DTSectorCollectorData> theSCData;
00091 
00092 };
00093 
00094 
00095 class DTDDUData {
00096 
00097 public:
00098 
00100  DTDDUData(const FEDHeader & dduHeader, const FEDTrailer & dduTrailer):
00101    theDDUHeader(dduHeader),
00102    theDDUTrailer(dduTrailer)
00103  {}
00104 
00105 
00107  virtual ~DTDDUData() {}
00108 
00110  inline void addDDUHeader( const FEDHeader & word)  { theDDUHeader = word; }
00111  inline void addDDUTrailer( const FEDTrailer & word)  { theDDUTrailer = word; }
00112  inline void addROSStatusWord( const DTDDUFirstStatusWord & word) {
00113    theROSStatusWords.push_back(word);
00114  }
00115  inline void addDDUStatusWord( const DTDDUSecondStatusWord & word) {
00116    theDDUStatusWord = word;
00117  }
00118 
00120  inline const FEDHeader & getDDUHeader() const {return theDDUHeader;}
00121  inline const FEDTrailer & getDDUTrailer() const {return theDDUTrailer;}
00122  inline const std::vector<DTDDUFirstStatusWord> & getFirstStatusWord() const {
00123    return theROSStatusWords;}
00124  inline const DTDDUSecondStatusWord & getSecondStatusWord() const {
00125    return theDDUStatusWord;}
00126 
00127 
00128 private:
00129 
00130  FEDHeader theDDUHeader;
00131  FEDTrailer theDDUTrailer;
00132  std::vector<DTDDUFirstStatusWord> theROSStatusWords;
00133  DTDDUSecondStatusWord theDDUStatusWord;
00134 
00135 };
00136 
00137 
00138 #endif

Generated on Tue Jun 9 17:34:28 2009 for CMSSW by  doxygen 1.5.4