Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:10:21

0001 #ifndef EventFilter_CSCRawToDigi_CSCChamberDataItr_h
0002 #define EventFilter_CSCRawToDigi_CSCChamberDataItr_h
0003 
0004 /** a class to help users iterate over CSC chambers,
0005     without having to know about DCCs and DDUs
0006     \Author Rick Wilkinson, Caltech
0007 */
0008 
0009 #include "EventFilter/CSCRawToDigi/interface/CSCDDUDataItr.h"
0010 class CSCDCCEventData;
0011 class CSCDDUEventData;
0012 class CSCEventData;
0013 #include <vector>
0014 
0015 class CSCChamberDataItr {
0016 public:
0017   /// construct from data buffer.  Will figure out whether it's
0018   /// DCC or DDU
0019   CSCChamberDataItr(const char *buf);
0020   ~CSCChamberDataItr();
0021 
0022   bool next();
0023 
0024   const CSCEventData &operator*();
0025 
0026 private:
0027   /// for DCC data.
0028   void constructFromDCC(const CSCDCCEventData &);
0029   /// for DDU-only data
0030   void constructFromDDU(const CSCDDUEventData &);
0031 
0032   /// sets theDDU & theNumberOfCSCs
0033   void initDDU();
0034 
0035   /// a little confusing here.  This class will either
0036   /// own theDCCData, in which case the DDUs points inside it,
0037   //  or if there's no DCC, it will
0038   /// make a new vector of DDUs (length 1).
0039   const CSCDCCEventData *theDCCData;
0040   CSCDDUDataItr *theDDUItr;
0041   unsigned theCurrentDDU;
0042   unsigned theNumberOfDDUs;
0043 };
0044 
0045 #endif