Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef EventFilter_CSCRawToDigi_CSCDDUDataItr_h
0002 #define EventFilter_CSCRawToDigi_CSCDDUDataItr_h
0003 
0004 /** a class to help users iterate over CSC chambers,
0005     without having to know about DDUs
0006     \Author Rick Wilkinson, Caltech
0007 */
0008 
0009 class CSCDDUEventData;
0010 class CSCEventData;
0011 #include <vector>
0012 
0013 class CSCDDUDataItr {
0014 public:
0015   /// default constructor
0016   CSCDDUDataItr();
0017 
0018   /// construct from data buffer. so makes a new DDUEventData
0019   CSCDDUDataItr(const char *buf);
0020 
0021   /// uses someone else's data, so doesn't delete
0022   CSCDDUDataItr(const CSCDDUEventData *dduData);
0023 
0024   ~CSCDDUDataItr();
0025 
0026   /// if I own the data, I need to do special copy & assign
0027   CSCDDUDataItr(const CSCDDUDataItr &);
0028   void operator=(const CSCDDUDataItr &);
0029 
0030   bool next();
0031 
0032   const CSCEventData &operator*();
0033 
0034 private:
0035   const CSCDDUEventData *theDDUData;
0036   int theCurrentCSC;
0037   int theNumberOfCSCs;
0038   bool theDataIsOwnedByMe;
0039 };
0040 
0041 #endif