Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CalStripToStrip.h

Go to the documentation of this file.
00001 
00002 // $Id: CalStripToStrip.h,v 1.3 2005/03/22 12:28:12 tagg Exp $
00003 // CalStripToStrip
00004 //
00005 // DB Row class corresponding to a single strip-to-strip calibration.
00006 //
00007 // The fResponse constant is the relative light output for energy deposited in the center of the strip
00008 //  (as seen at the phototube) for the strip end
00009 //
00010 // Nathaniel Tagg n.tagg1@physics.ox.ac.uk
00012 
00013 #ifndef CALSTRIPTOSTRIP_H
00014 #define CALSTRIPTOSTRIP_H
00015 
00016 #include "DatabaseInterface/DbiTableRow.h"
00017 #include "DatabaseInterface/DbiValidityRec.h"
00018 #include "LeakChecker/Lea.h"
00019 #include "Plex/PlexStripEndId.h"
00020 
00021 class DbiValidityRec;
00022 
00023 class CalStripToStrip : public DbiTableRow
00024 {
00025 
00026 public:
00027    
00028    // Constructors and destructors.
00029   CalStripToStrip() { LEA_CTOR; }
00030 
00031   CalStripToStrip( const PlexStripEndId& seid, Float_t resp, Float_t respErr ) 
00032     : fSEIdEncoded(seid.GetEncoded()),
00033     fResponse(resp),
00034     fResponseErr(respErr),
00035     fSEIdKey(seid.BuildPlnStripEndKey())
00036     {  LEA_CTOR; }
00037 
00038   CalStripToStrip( Int_t seid_enc, Float_t resp, Float_t respErr ) 
00039     : fSEIdEncoded(seid_enc),
00040     fResponse(resp),
00041     fResponseErr(respErr),
00042     fSEIdKey(PlexStripEndId(seid_enc).BuildPlnStripEndKey())
00043     {  LEA_CTOR; }
00044     
00045    virtual ~CalStripToStrip(){ LEA_DTOR; };
00046    
00047    // State testing member functions
00048    Bool_t         CanL2Cache() const { return kTRUE; }
00049    UInt_t         GetIndex(UInt_t) const { return fSEIdKey; }
00050    PlexStripEndId GetStripEndId() const  { return PlexStripEndId(fSEIdEncoded); }
00051    UInt_t         GetSEIDkey()     const { return fSEIdKey; }
00052    Float_t        GetResponse()    const { return fResponse; };
00053    Float_t        GetResponseErr() const { return fResponseErr; };
00054   
00055    virtual DbiTableRow* CreateTableRow() const { return new CalStripToStrip; }
00056 
00057    // State changing member functions
00058    virtual void Fill(DbiResultSet& rs,
00059                     const DbiValidityRec* vrec);
00060    virtual void Store(DbiOutRowStream& ors,
00061                      const DbiValidityRec* vrec) const;
00062 
00063    
00064 private:  
00065    
00066   CalStripToStrip(const CalStripToStrip& from)
00067     : DbiTableRow(from) { LEA_CTOR; *this = from; }
00068 
00069    // Data members
00070    Int_t fSEIdEncoded;
00071    Float_t fResponse;
00072    Float_t fResponseErr;
00073 
00074    // Derived data members:
00075    UInt_t fSEIdKey;
00076    ClassDef(CalStripToStrip,0)    // Example of non-aggregated datadata type. 
00077 };
00078 
00079 
00080 #endif  // CALSTRIPTOSTRIP_H
00081 
00082 
00083 
00084 
00085 

Generated on Mon Feb 15 11:06:27 2010 for loon by  doxygen 1.3.9.1