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

CalDetBeamMomentum.h

Go to the documentation of this file.
00001 #ifndef CALDETBEAMMOMENTUM_H
00002 #define CALDETBEAMMOMENTUM_H
00003 #include <iosfwd>
00004 #include <string>
00005 
00006 #include "DatabaseInterface/DbiTableRow.h"
00007 #include "LeakChecker/Lea.h"
00008 
00009 class DbiValidityRec;
00010 
00011 
00012 class CalDetBeamMomentum : public DbiTableRow
00013 {
00014 public:
00015      
00016      // Constructors and destructors.
00017      CalDetBeamMomentum() { LEA_CTOR; }
00018      CalDetBeamMomentum(UInt_t run, Double_t beamp)
00019           : fRunNo(run), fBeamMomentum(beamp)
00020           { LEA_CTOR; }
00021 
00022      virtual ~CalDetBeamMomentum(){ LEA_DTOR; }
00023    
00024      // State testing member functions
00025      
00026      virtual DbiTableRow* CreateTableRow() const { 
00027           return new CalDetBeamMomentum; }
00028 
00029      UInt_t GetIndex(UInt_t /* defIndex */) const { return fRunNo; }
00030      UInt_t GetRun() const {return fRunNo;}
00031      Double_t GetMomentum() const {return fBeamMomentum;}
00032 
00033      virtual void Print(Option_t* option="") const;
00034      std::ostream& Print(std::ostream&, Option_t* option = "") const;
00035      // static member function to provide the table description 
00036      // for temp table writing
00037      static std::string GetTableDesc() ; 
00038 
00039    // State changing member functions
00040      virtual void Fill(DbiResultSet& rs,
00041                        const DbiValidityRec* vrec);
00042      virtual void Store(DbiOutRowStream& ors,
00043                         const DbiValidityRec* vrec) const;
00044  
00045 private:  
00046    
00047      CalDetBeamMomentum(const CalDetBeamMomentum& from)
00048           : DbiTableRow() { LEA_CTOR; *this = from; }
00049      
00050      // Data members
00051      
00052 
00053      UInt_t   fRunNo;// the run number
00054      Double_t fBeamMomentum; // the beam momentum (can be negative)
00055 
00056      ClassDef(CalDetBeamMomentum,0)
00057 };
00058 
00059 std::ostream& operator<<(std::ostream&, const CalDetBeamMomentum&);
00060 
00061 #endif

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