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

CalTimeJump.h

Go to the documentation of this file.
00001 #ifndef CALTIMEJUMP_H
00002 #define CALTIMEJUMP_H
00003 
00005 // DB row class to hold info
00006 // on timing jumps in the FD.
00007 //
00008 // Tables are built using Andy Blake's timing calibration.
00009 //
00010 // Nathaniel, Jan 2005. n.tagg1@physics.ox.ac.uk
00012 
00013 #include <TObject.h>
00014 #include "RawData/RawChannelId.h"
00015 #include "DatabaseInterface/DbiTableRow.h"
00016 #include "LeakChecker/Lea.h"
00017 
00018 class DbiValidityRec;
00019 
00020 class CalTimeJump : public DbiTableRow
00021 {
00022  public:
00023   CalTimeJump() :
00024     fChannelIndex( 0 ), fJump(0) { LEA_CTOR; };
00025 
00026   CalTimeJump(RawChannelId rcid, Float_t jump) :
00027     fChannelIndex( GetIndex(rcid) ), fJump(jump) { LEA_CTOR; };
00028 
00029   virtual ~CalTimeJump() { LEA_DTOR; };
00030 
00031   static Int_t        GetIndex(const RawChannelId& rcid);
00032   static RawChannelId GetRawChannelId(Int_t index);
00033 
00034   virtual UInt_t      GetIndex(UInt_t)  const {return fChannelIndex;};
00035   virtual UInt_t      GetIndex()        const {return fChannelIndex;};
00036 
00037   virtual Int_t GetAggregateNo() const { return fChannelIndex; } // One aggregate per chip
00038   RawChannelId  GetRawChannelId() const {return GetRawChannelId(fChannelIndex);};
00039 
00040   Float_t       GetJump() const { return fJump; };
00041   
00042   // Database stuff:
00043   virtual Bool_t CanL2Cache() const { return kTRUE; }
00044   virtual DbiTableRow* CreateTableRow() const { return new CalTimeJump; }
00045   virtual void Fill(DbiResultSet& rs, const DbiValidityRec* vrec);
00046   virtual void Store(DbiOutRowStream& ors, const DbiValidityRec* vrec) const;
00047 
00048  private:  
00049   // Data:
00050   UInt_t      fChannelIndex;
00051   Float_t     fJump;
00052 
00053   // Copy ctor:
00054   CalTimeJump(const CalTimeJump& from) 
00055     : DbiTableRow(from) { LEA_CTOR; *this = from; }
00056   
00057   ClassDef(CalTimeJump,0);
00058 };
00059 
00060 #endif

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