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

DbuFarRunQuality.h

Go to the documentation of this file.
00001 #ifndef DBUFARRUNQUALITY_H
00002 #define DBUFARRUNQUALITY_H
00003 
00004 #include "Rtypes.h"
00005 #include "DatabaseInterface/DbiTableRow.h"
00006 #include "DatabaseInterface/DbiOutRowStream.h"
00007 #include "DatabaseInterface/DbiResultSet.h"
00008 
00009 class DbiValidityRec;
00010 
00011 class DbuFarRunQuality : public DbiTableRow
00012 {
00013 
00014 using TObject::Compare;  // So won't be hidden
00015 
00016 public:
00017 
00018 // Constructors and destructors.
00019   DbuFarRunQuality() :
00020     fRun(-1), 
00021     fSubRun(-1) ,
00022     fRunType(-1),
00023     fRopMask(-1),
00024     fCrateMask(-1),
00025     fTriggerMask(-1),
00026     fStartTime(0,0),
00027     fEndTime(0,0),
00028     fTimeFrames(0),
00029     fSnarls(0),
00030     fGoodSnarls(0),
00031     fSnarlRateMin(-1),
00032     fSnarlRateMax(-1),
00033     fSnarlRateMean(-1.0),
00034     fSnarlRateMedian(-1.0),
00035     fTriggersPlane(0),
00036     fTriggersEnergy(0),
00037     fTriggersSpill(0),
00038     fTriggersRealSpill(0),
00039     fTriggersFakeSpill(0),
00040     fPhysicsRun(-1),
00041     fModifiedRun(-1),
00042     fTestRun(-1)
00043   { }
00044 
00045   DbuFarRunQuality(const DbuFarRunQuality& from) : 
00046     DbiTableRow(from) 
00047   { *this = from; }
00048 
00049   DbuFarRunQuality(Int_t run, Int_t subrun, Int_t runtype, Int_t ropmask, Int_t cratemask, Int_t triggermask, VldTimeStamp start, VldTimeStamp end, Int_t timeframes, Int_t snarls, Int_t goodsnarls, Int_t minrate, Int_t maxrate, Float_t meanrate, Float_t medianrate, Int_t planetriggers, Int_t energytriggers, Int_t spilltriggers, Int_t realspilltriggers, Int_t fakespilltriggers, Int_t physicsrun, Int_t modifiedrun, Int_t testrun) :
00050     fRun(run), 
00051     fSubRun(subrun),
00052     fRunType(runtype),
00053     fRopMask(ropmask),
00054     fCrateMask(cratemask),
00055     fTriggerMask(triggermask),
00056     fStartTime(start),
00057     fEndTime(end),
00058     fTimeFrames(timeframes),
00059     fSnarls(snarls),
00060     fGoodSnarls(goodsnarls),
00061     fSnarlRateMin(minrate),
00062     fSnarlRateMax(maxrate),
00063     fSnarlRateMean(meanrate),
00064     fSnarlRateMedian(medianrate),
00065     fTriggersPlane(planetriggers),
00066     fTriggersEnergy(energytriggers),
00067     fTriggersSpill(spilltriggers),
00068     fTriggersRealSpill(realspilltriggers),
00069     fTriggersFakeSpill(fakespilltriggers),
00070     fPhysicsRun(physicsrun),
00071     fModifiedRun(modifiedrun),
00072     fTestRun(testrun)
00073   { }
00074 
00075   virtual ~DbuFarRunQuality(){ };
00076 
00077 // State testing member functions
00078   Bool_t CanL2Cache() const { return kTRUE; }
00079   Bool_t Compare(const DbuFarRunQuality& that ) const {
00080     return ( fRun == that.fRun
00081           && fSubRun == that.fSubRun
00082           && fRunType == that.fRunType
00083           && fRopMask == that.fRopMask
00084           && fCrateMask == that.fCrateMask
00085           && fTriggerMask == that.fTriggerMask 
00086           && fStartTime == that.fStartTime
00087           && fEndTime == that.fEndTime
00088           && fTimeFrames == that.fTimeFrames
00089           && fSnarls == that.fSnarls
00090           && fGoodSnarls == that.fGoodSnarls
00091           && fSnarlRateMin == that.fSnarlRateMin
00092           && fSnarlRateMax == that.fSnarlRateMax 
00093           && fSnarlRateMean == that.fSnarlRateMean
00094           && fSnarlRateMedian == that.fSnarlRateMedian 
00095           && fTriggersPlane == that.fTriggersPlane
00096           && fTriggersEnergy == that.fTriggersEnergy
00097           && fTriggersSpill == that.fTriggersSpill
00098           && fTriggersRealSpill == that.fTriggersRealSpill
00099           && fTriggersFakeSpill == that.fTriggersFakeSpill 
00100           && fPhysicsRun == that.fPhysicsRun
00101           && fModifiedRun == that.fModifiedRun
00102           && fTestRun == that.fTestRun ); }
00103 
00104 // Access functions
00105   Int_t GetRun() const                { return fRun; }
00106   Int_t GetSubRun() const             { return fSubRun; }
00107   Int_t GetRunType() const            { return fRunType; }
00108   Int_t GetRopMask() const            { return fRopMask; }
00109   Int_t GetCrateMask() const          { return fCrateMask; }
00110   Int_t GetTriggerMask() const        { return fTriggerMask; }
00111 
00112   VldTimeStamp GetStartTime() const   { return fStartTime; }
00113   VldTimeStamp GetEndTime() const     { return fEndTime; }
00114   Int_t GetTimeFrames() const         { return fTimeFrames; }  
00115   Int_t GetSnarls() const             { return fSnarls; }
00116   Int_t GetGoodSnarls() const         { return fGoodSnarls; }
00117   Int_t GetMinSnarlRate() const       { return fSnarlRateMin; }
00118   Int_t GetMaxSnarlRate() const       { return fSnarlRateMax; }
00119   Float_t GetMeanSnarlRate() const    { return fSnarlRateMean; }
00120   Float_t GetMedianSnarlRate() const  { return fSnarlRateMedian; }
00121   Int_t GetPlaneTriggers() const      { return fTriggersPlane; }
00122   Int_t GetEnergyTriggers() const     { return fTriggersEnergy; }
00123   Int_t GetSpillTriggers() const      { return fTriggersSpill; }
00124   Int_t GetSpillTriggersReal() const  { return fTriggersRealSpill; }
00125   Int_t GetSpillTriggersFake() const  { return fTriggersFakeSpill; }
00126 
00127   Int_t GetPhysicsRun() const         { return fPhysicsRun; }
00128   Int_t GetModifiedRun() const        { return fModifiedRun; }
00129   Int_t GetTestRun() const            { return fTestRun; }
00130 
00131   Bool_t GetGoodRun() const           { return this->IsOK(); }
00132   Bool_t GoodRun() const              { return this->IsOK(); }
00133   Bool_t IsOK() const;
00134 
00135   Bool_t GoodRunType() const;
00136   Bool_t GoodReadout() const;
00137   Bool_t Short() const;
00138   Bool_t LowRate() const;
00139   Bool_t HighRate() const;
00140 
00141   Int_t GetAggregateNo() const        { return fRun; }
00142 
00143   UInt_t GetIndex() const             { return this->GetIndex(fRun,fSubRun); }
00144   UInt_t GetIndex(UInt_t) const       { return this->GetIndex(fRun,fSubRun); } 
00145   static UInt_t GetIndex(Int_t run, Int_t subrun);
00146   
00147 // I/O  member functions
00148   virtual void Fill(DbiResultSet& rs, const DbiValidityRec* vrec);
00149   virtual void Store(DbiOutRowStream& ors, const DbiValidityRec* vrec) const;
00150 
00151   virtual DbiTableRow* CreateTableRow() const { return new DbuFarRunQuality; }
00152 
00153 private:  
00154 
00155   Int_t fRun;
00156   Int_t fSubRun;
00157   Int_t fRunType;
00158   Int_t fRopMask;
00159   Int_t fCrateMask;
00160   Int_t fTriggerMask;
00161   VldTimeStamp fStartTime;
00162   VldTimeStamp fEndTime;
00163   Int_t fTimeFrames;
00164   Int_t fSnarls;
00165   Int_t fGoodSnarls;
00166   Int_t fSnarlRateMin;
00167   Int_t fSnarlRateMax;
00168   Float_t fSnarlRateMean;
00169   Float_t fSnarlRateMedian;
00170   Int_t fTriggersPlane;
00171   Int_t fTriggersEnergy;
00172   Int_t fTriggersSpill;
00173   Int_t fTriggersRealSpill;
00174   Int_t fTriggersFakeSpill;
00175   Int_t fPhysicsRun;
00176   Int_t fModifiedRun;
00177   Int_t fTestRun;
00178 
00179   ClassDef(DbuFarRunQuality,0)
00180 
00181 };
00182 
00183 #endif  // DBUFARRUNQUALITY_H

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