Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages  

CalADCLogs.h

Go to the documentation of this file.
00001 
00002 #ifndef CALADCLOGS_H
00003 #define CALADCLOGS_H 1
00004 
00005 #include "CalRecon/CalBase.h"
00006 #include "CalRecon/CalLogID.h"
00007 #include "GaudiKernel/DataObject.h"
00008 
00009 extern const CLID& CLID_CalADCLogs;
00010 
00011 //##############################
00012 class CalADCLog : public CalLogID
00013 //##############################
00014 {
00015 public:
00016 
00017         // construct
00018         CalADCLog(int ilayer, int iview, int column);
00019         CalADCLog(int ilayer, int iview, int column, idents::ModuleId mod);
00020         ~CalADCLog() {};
00021                 
00022         void setNegADC(CalBase::RANGE r, double v)   {m_ADC[CalBase::NEG][r] = v;}
00023         void setPosADC(CalBase::RANGE r, double v)   {m_ADC[CalBase::POS][r] = v;}
00024         void addNegADC(CalBase::RANGE r, double v)   {m_ADC[CalBase::NEG][r] += v;}
00025         void addPosADC(CalBase::RANGE r, double v)   {m_ADC[CalBase::POS][r] += v;}
00026 
00027         // access                        
00028         double ADC(CalBase::SIDE s, CalBase::RANGE r) const {return m_ADC[s][r];}
00029 
00030         // operations
00031         void clear();
00032         void writeOut() const;
00033 
00034 private:
00035 
00036         double m_ADC[CALNSIDES][CALNRANGES];
00037 };
00038 
00039 //##############################
00040 class CalADCLogs : public DataObject
00041 //##############################
00042 {
00043 public:
00044 
00045         // constructor
00046         CalADCLogs(int nmodX=1, int nmodY=1, int nlogs=10, int nlayers=4)
00047         {ini(nmodX,nmodY,nlogs,nlayers);}
00048         virtual ~CalADCLogs();
00049 
00050         // GAUDI members to be use by the converters
00051         static const CLID& classID() {return CLID_CalADCLogs;}
00052         virtual const CLID& clID() const {return classID();}
00053 
00054         // access
00055         int num()                 const {return m_List.size();}
00056         CalADCLog* Log(int i)     const {return m_List[i];}     
00057         CalADCLog* getLogID(int i) const;
00058 
00059         // operation
00060         virtual void clear();
00061         virtual void make() {}
00062         virtual void writeOut() const;
00063 
00064 protected:
00065 
00066         virtual void ini(int nmodX=1, int nmodY=1, int nlogs=10, int nlayers=4);
00067 
00068 private:
00069 
00070         std::vector<CalADCLog*> m_List;
00071 };
00072 #endif

Generated on Thu Nov 29 16:38:48 2001 by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001