00001 // 00002 // Bes EMC Rec Hit 00003 // 00004 // Created by Wang.Zhe 2003, 12, 15 00005 // 00006 00007 #ifndef REC_EMC_DIGIT_H 00008 #define REC_EMC_DIGIT_H 00009 00010 #include <map> 00011 00012 #include "EmcRecEventModel/RecEmcDataType.h" 00013 00014 using namespace std; 00015 00016 class RecEmcDigit 00017 { 00018 public: 00019 //Constructors and destructors 00020 RecEmcDigit(); 00021 RecEmcDigit(const RecEmcID& CellId, 00022 const RecEmcADC& ADC, 00023 const RecEmcTDC& TDC); 00024 ~RecEmcDigit(); 00025 00026 //Copy and assignment 00027 RecEmcDigit(const RecEmcDigit& aDigit); 00028 RecEmcDigit& operator=(const RecEmcDigit& aDigit); 00029 00030 //Access 00031 //Read 00032 RecEmcID CellId() const; 00033 RecEmcADC ADC() const; 00034 RecEmcTDC TDC() const; 00035 00036 //Write 00037 RecEmcID CellId(const RecEmcID& CellId); 00038 RecEmcADC ADC(const RecEmcADC& ADC); 00039 RecEmcTDC TDC(const RecEmcTDC& TDC); 00040 00041 void Assign(const RecEmcID& CellId, 00042 const RecEmcADC& ADC, 00043 const RecEmcTDC& TDC); 00044 00045 void Assign(const RecEmcDigit& aDigit); 00046 00047 //others 00048 void Dump() const; 00049 00050 protected: 00051 //Data members 00052 RecEmcID fCellId; 00053 RecEmcADC fADC; 00054 RecEmcTDC fTDC; 00055 }; 00056 00057 ostream& operator<<(ostream & os, const RecEmcDigit& aDigit); 00058 00059 typedef map<RecEmcID,RecEmcDigit,less<RecEmcID> > RecEmcDigitMap; 00060 00061 #endif /* REC_EMC_DIGIT_H */