DbuSubRunSummary Class Reference

#include <DbuSubRunSummary.h>

Inheritance diagram for DbuSubRunSummary:

DbiTableRow List of all members.

Public Types

typedef enum DbuSubRunSummary::EConsistencyBits ConsistencyBits_t
 kRecCountUnverified = 0x00000001
 kSawNoRunStart = 0x00000002
 kSawNoRunComment = 0x00000004
 kSawNoRunEnd = 0x00000008
 kInProgress = 0x00000010
enum  EConsistencyBits {
  kRecCountUnverified = 0x00000001, kSawNoRunStart = 0x00000002, kSawNoRunComment = 0x00000004, kSawNoRunEnd = 0x00000008,
  kInProgress = 0x00000010
}

Public Member Functions

 DbuSubRunSummary ()
 DbuSubRunSummary (Detector::Detector_t det, Int_t run, Short_t subrun, Short_t runtype, VldTimeStamp starttime, VldTimeStamp endtime, Int_t termcode, Int_t snarlrec, Int_t monitorrec, Int_t nerr, Int_t timeframes, Int_t droppedframes, Int_t consistency, string comment)
virtual ~DbuSubRunSummary ()
virtual Int_t GetAggregateNo () const
Bool_t IsSameSubRun (Detector::Detector_t det, Int_t run, Short_t subrun)
virtual DbiTableRowCreateTableRow () const
virtual void Fill (DbiResultSet &rs, const DbiValidityRec *vrec)
virtual void Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const
Int_t GetSeqNo () const

Static Public Member Functions

static Int_t CalcUniqueSeqNo (Detector::Detector_t det, Int_t run, Short_t subrun)
static const char * GetTableDescr ()

Public Attributes

Detector::Detector_t fDetector
SimFlag::SimFlag_t fSimFlag
Int_t fRun
Short_t fSubRun
Short_t fRunType
VldTimeStamp fStartTime
VldTimeStamp fEndTime
Int_t fTermCode
Int_t fSnarlRec
Int_t fMonitorRec
Int_t fLightInjRec
Int_t fNErr
Int_t fTimeFrames
Int_t fDroppedFrames
Int_t fConsistency
string fComment

Private Member Functions

 DbuSubRunSummary (const DbuSubRunSummary &from)

Detailed Description

Definition at line 30 of file DbuSubRunSummary.h.


Member Typedef Documentation

typedef enum DbuSubRunSummary::EConsistencyBits DbuSubRunSummary::ConsistencyBits_t


Member Enumeration Documentation

enum DbuSubRunSummary::EConsistencyBits

Enumerator:
kRecCountUnverified 
kSawNoRunStart 
kSawNoRunComment 
kSawNoRunEnd 
kInProgress 

Definition at line 94 of file DbuSubRunSummary.h.

00094                                  {
00095       kRecCountUnverified = 0x00000001, 
00096       kSawNoRunStart      = 0x00000002,
00097       kSawNoRunComment    = 0x00000004,
00098       kSawNoRunEnd        = 0x00000008,
00099       kInProgress         = 0x00000010
00100    } ConsistencyBits_t;


Constructor & Destructor Documentation

DbuSubRunSummary::DbuSubRunSummary (  )  [inline]

Definition at line 37 of file DbuSubRunSummary.h.

References LEA_CTOR.

00037                       :
00038      fDetector(Detector::kUnknown), 
00039      fRun(0), fSubRun(0), fRunType(0), 
00040      fStartTime((time_t)0,0), fEndTime((time_t)0,0),
00041      fTermCode(-1), fSnarlRec(-1), fMonitorRec(-1), fLightInjRec(-1),
00042      fNErr(0), fTimeFrames(0), fDroppedFrames(0), fConsistency(0),
00043      fComment("No Comment")
00044      { LEA_CTOR; }

DbuSubRunSummary::DbuSubRunSummary ( Detector::Detector_t  det,
Int_t  run,
Short_t  subrun,
Short_t  runtype,
VldTimeStamp  starttime,
VldTimeStamp  endtime,
Int_t  termcode,
Int_t  snarlrec,
Int_t  monitorrec,
Int_t  nerr,
Int_t  timeframes,
Int_t  droppedframes,
Int_t  consistency,
string  comment 
) [inline]

Definition at line 46 of file DbuSubRunSummary.h.

References LEA_CTOR.

00051                                                        :
00052      fDetector(det), fRun(run), fSubRun(subrun), fRunType(runtype), 
00053      fStartTime(starttime), fEndTime(endtime), fTermCode(termcode),
00054      fSnarlRec(snarlrec), fMonitorRec(monitorrec), fLightInjRec(0),
00055      fNErr(nerr), fTimeFrames(timeframes), fDroppedFrames(droppedframes), 
00056      fConsistency(consistency), fComment(comment)
00057      { LEA_CTOR; }

virtual DbuSubRunSummary::~DbuSubRunSummary (  )  [inline, virtual]

Definition at line 59 of file DbuSubRunSummary.h.

References LEA_DTOR.

00059 { LEA_DTOR; };

DbuSubRunSummary::DbuSubRunSummary ( const DbuSubRunSummary from  )  [inline, private]

Definition at line 106 of file DbuSubRunSummary.h.

References LEA_CTOR.

00107      : DbiTableRow() { LEA_CTOR; *this = from; }


Member Function Documentation

Int_t DbuSubRunSummary::CalcUniqueSeqNo ( Detector::Detector_t  det,
Int_t  run,
Short_t  subrun 
) [static]

Definition at line 182 of file DbuSubRunSummary.cxx.

Referenced by GetAggregateNo(), and GetSeqNo().

00184 {
00185 //
00186 //
00187 //  Purpose:  Calculate unique SeqNo
00188 //
00189 //  Return:   an integer
00190 //
00191 //  Contact:   R. Hatcher
00192 //
00193 //  Specification:-
00194 //  =============
00195 //
00196 
00197 //  Program Notes:-
00198 //  =============
00199 
00200 //  None.
00201 
00202 // similar to file naming convention
00203 //   Char_t detchar = Detector::AsString(det)[0];
00204 //   string fname = Form("%c%8.8d_%4.4d",detchar,run,subrun);
00205 // take care since can overflow int
00206 //  use two fewers places for sub and two fewer for run
00207 //  "drrrrrrss"
00208 
00209    return subrun + 100*(run + 1000000*det);
00210 }

virtual DbiTableRow* DbuSubRunSummary::CreateTableRow (  )  const [inline, virtual]

Implements DbiTableRow.

Definition at line 75 of file DbuSubRunSummary.h.

00075 { return new DbuSubRunSummary; }

void DbuSubRunSummary::Fill ( DbiResultSet rs,
const DbiValidityRec vrec 
) [virtual]

Implements DbiTableRow.

Definition at line 79 of file DbuSubRunSummary.cxx.

References Detector::CharToEnum(), det, fComment, fConsistency, fDetector, fDroppedFrames, fEndTime, fLightInjRec, fMonitorRec, fNErr, fRun, fRunType, fSnarlRec, fStartTime, fSubRun, fTermCode, fTimeFrames, VldRange::GetDetectorMask(), DbiValidityRec::GetVldRange(), Msg::kWarning, and MSG.

00080                                                                   {
00081 //
00082 //
00083 //  Purpose:  Fill object from Result Set
00084 //
00085 //  Arguments: 
00086 //    rs           in    Result Set used to fill object
00087 //    vrec         in    Associated validity record (or 0 if filling
00088 //                                                    DbiValidityRec)
00089 //
00090 //  Return:    
00091 //
00092 //  Contact:   R. Hatcher
00093 //
00094 //  Specification:-
00095 //  =============
00096 //
00097 //  o Fill object from current row of Result Set.
00098 
00099 //  Program Notes:-
00100 //  =============
00101 
00102 //  None.
00103 
00104    Detector::Detector_t det =
00105       (Detector::Detector_t) 
00106       ((vrec) ? vrec->GetVldRange().GetDetectorMask() : 0);
00107 
00108    string detname, runtypename;
00109    
00110    rs >> detname
00111       >> fRun
00112       >> fSubRun
00113       >> fRunType
00114       >> runtypename
00115       >> fStartTime
00116       >> fEndTime
00117       >> fTermCode
00118       >> fSnarlRec
00119       >> fMonitorRec
00120       >> fLightInjRec
00121       >> fNErr
00122       >> fTimeFrames
00123       >> fDroppedFrames
00124       >> fConsistency
00125       >> fComment;
00126    
00127    fDetector = Detector::CharToEnum(detname.c_str()[0]);
00128    if (fDetector != det) 
00129       MSG("Dbu",Msg::kWarning)
00130          << "Detector column '" << detname << "' (" << (int)fDetector
00131          << ") did not match DetectorMask (" << (int)det << ")" << endl;
00132 }

virtual Int_t DbuSubRunSummary::GetAggregateNo (  )  const [inline, virtual]

Reimplemented from DbiTableRow.

Definition at line 63 of file DbuSubRunSummary.h.

References CalcUniqueSeqNo(), fDetector, fRun, and fSubRun.

00065       { return CalcUniqueSeqNo(fDetector,fRun,fSubRun); }
00066 #else
00067       { return -1; }

Int_t DbuSubRunSummary::GetSeqNo (  )  const [inline]

Definition at line 84 of file DbuSubRunSummary.h.

References CalcUniqueSeqNo(), fDetector, fRun, and fSubRun.

Referenced by DbuDaqMonitorModule::WriteSubRunSummaryEntry().

const char * DbuSubRunSummary::GetTableDescr (  )  [static]

Definition at line 239 of file DbuSubRunSummary.cxx.

00240 {
00241 //
00242 //
00243 //  Purpose:  Return a string describing rows in the table
00244 //            Used in creating temporary tables
00245 //
00246 //  Return:   const char* to parenthesized comma separated list
00247 //            of column name and type pairs
00248 //
00249 //  Contact:   R. Hatcher
00250 //
00251 //  Specification:-
00252 //  =============
00253 //
00254 
00255 //  Program Notes:-
00256 //  =============
00257 
00258 //  None.
00259 
00260    const char* const_tabledescr = "(\
00261        SEQNO             int not null,     \
00262        ROW_COUNTER       int not null,     \
00263        DETECTOR          tinytext,         \
00264        RUN               int,              \
00265        SUBRUN            smallint,         \
00266        RUNTYPE           smallint,         \
00267        RUNTYPENAME       varchar(24),      \
00268        STARTTIME         datetime,         \
00269        ENDTIME           datetime,         \
00270        TERMCODE          int,              \
00271        SNARLREC          int,              \
00272        MONITORREC        int,              \
00273        LIGHTINJREC       int,              \
00274        NERR              int,              \
00275        TIMEFRAMES        int,              \
00276        DROPPEDFRAMES     int,              \
00277        CONSISTENCY       int,              \
00278        RUN_COMMENT       text,             \
00279        PRIMARY KEY (SEQNO,ROW_COUNTER)     \
00280        )";
00281 
00282    return const_tabledescr;
00283 }

Bool_t DbuSubRunSummary::IsSameSubRun ( Detector::Detector_t  det,
Int_t  run,
Short_t  subrun 
)

Definition at line 214 of file DbuSubRunSummary.cxx.

References fDetector, fRun, and fSubRun.

Referenced by DbuDaqMonitorModule::ProcessRawRecord().

00216 {
00217 //
00218 //
00219 //  Purpose:  Same characteristics?
00220 //
00221 //  Return:   a bool
00222 //
00223 //  Contact:   R. Hatcher
00224 //
00225 //  Specification:-
00226 //  =============
00227 //
00228 
00229 //  Program Notes:-
00230 //  =============
00231 
00232 //  None.
00233 
00234    return (fDetector == det) && (fRun == run) && (fSubRun == subrun);
00235 }

void DbuSubRunSummary::Store ( DbiOutRowStream ors,
const DbiValidityRec vrec 
) const [virtual]

Reimplemented from DbiTableRow.

Definition at line 136 of file DbuSubRunSummary.cxx.

References Detector::AsString(), fComment, fConsistency, fDetector, fDroppedFrames, fEndTime, fLightInjRec, fMonitorRec, fNErr, fRun, fRunType, fSnarlRec, fStartTime, fSubRun, fTermCode, fTimeFrames, and RunTypeName().

00137                                                                      {
00138 //
00139 //
00140 //  Purpose:  Stream object to output row stream
00141 //
00142 //  Arguments: 
00143 //    ors          in     Output row stream.
00144 //    vrec         in     Associated validity record (or 0 if filling
00145 //                                                    DbiValidityRec)
00146 //
00147 //  Return:    
00148 //
00149 //  Contact:   R. Hatcher
00150 //
00151 //  Specification:-
00152 //  =============
00153 //
00154 //  o  Stream object to output row stream.
00155 
00156 //  Program Notes:-
00157 //  =============
00158 
00159 //  None.
00160 
00161    ors << Detector::AsString(fDetector)
00162        << fRun
00163        << fSubRun
00164        << fRunType
00165        << RunTypeName(fRunType,fDetector,fRun)
00166        << fStartTime
00167        << fEndTime
00168        << fTermCode
00169        << fSnarlRec
00170        << fMonitorRec
00171        << fLightInjRec
00172        << fNErr
00173        << fTimeFrames
00174        << fDroppedFrames
00175        << fConsistency
00176        << fComment;
00177    
00178 }


Member Data Documentation

string DbuSubRunSummary::fComment

Definition at line 128 of file DbuSubRunSummary.h.

Referenced by Fill(), operator<<(), DbuDaqMonitorModule::ProcessRawRecord(), Store(), and DbuDaqMonitorModule::WriteSubRunSummaryEntry().

Int_t DbuSubRunSummary::fConsistency

Definition at line 127 of file DbuSubRunSummary.h.

Referenced by DbuDaqMonitorModule::EndJob(), Fill(), operator<<(), DbuDaqMonitorModule::ProcessRawRecord(), Store(), and DbuDaqMonitorModule::WriteSubRunSummaryEntry().

Detector::Detector_t DbuSubRunSummary::fDetector

Definition at line 113 of file DbuSubRunSummary.h.

Referenced by DbuDaqMonitorModule::EndJob(), Fill(), GetAggregateNo(), GetSeqNo(), IsSameSubRun(), operator<<(), DbuDaqMonitorModule::ProcessRawRecord(), Store(), and DbuDaqMonitorModule::WriteSubRunSummaryEntry().

Int_t DbuSubRunSummary::fDroppedFrames

Definition at line 126 of file DbuSubRunSummary.h.

Referenced by Fill(), operator<<(), DbuDaqMonitorModule::ProcessRawRecord(), Store(), and DbuDaqMonitorModule::WriteSubRunSummaryEntry().

VldTimeStamp DbuSubRunSummary::fEndTime

Definition at line 119 of file DbuSubRunSummary.h.

Referenced by Fill(), main(), operator<<(), DbuDaqMonitorModule::ProcessRawRecord(), Store(), and DbuDaqMonitorModule::WriteSubRunSummaryEntry().

Int_t DbuSubRunSummary::fLightInjRec

Definition at line 123 of file DbuSubRunSummary.h.

Referenced by Fill(), operator<<(), DbuDaqMonitorModule::ProcessRawRecord(), Store(), and DbuDaqMonitorModule::WriteSubRunSummaryEntry().

Int_t DbuSubRunSummary::fMonitorRec

Definition at line 122 of file DbuSubRunSummary.h.

Referenced by Fill(), operator<<(), DbuDaqMonitorModule::ProcessRawRecord(), Store(), and DbuDaqMonitorModule::WriteSubRunSummaryEntry().

Int_t DbuSubRunSummary::fNErr

Definition at line 124 of file DbuSubRunSummary.h.

Referenced by Fill(), operator<<(), DbuDaqMonitorModule::ProcessRawRecord(), Store(), and DbuDaqMonitorModule::WriteSubRunSummaryEntry().

Int_t DbuSubRunSummary::fRun

Definition at line 115 of file DbuSubRunSummary.h.

Referenced by RateSummary::Ana(), DbuDaqMonitorModule::EndJob(), Fill(), GetAggregateNo(), GetSeqNo(), IsSameSubRun(), main(), operator<<(), DbuDaqMonitorModule::ProcessRawRecord(), Store(), and DbuDaqMonitorModule::WriteSubRunSummaryEntry().

Short_t DbuSubRunSummary::fRunType

Definition at line 117 of file DbuSubRunSummary.h.

Referenced by Fill(), operator<<(), DbuDaqMonitorModule::ProcessRawRecord(), Store(), and DbuDaqMonitorModule::WriteSubRunSummaryEntry().

SimFlag::SimFlag_t DbuSubRunSummary::fSimFlag

Definition at line 114 of file DbuSubRunSummary.h.

Referenced by DbuDaqMonitorModule::ProcessRawRecord(), and DbuDaqMonitorModule::WriteSubRunSummaryEntry().

Int_t DbuSubRunSummary::fSnarlRec

Definition at line 121 of file DbuSubRunSummary.h.

Referenced by Fill(), operator<<(), DbuDaqMonitorModule::ProcessRawRecord(), Store(), and DbuDaqMonitorModule::WriteSubRunSummaryEntry().

VldTimeStamp DbuSubRunSummary::fStartTime

Definition at line 118 of file DbuSubRunSummary.h.

Referenced by Fill(), main(), operator<<(), DbuDaqMonitorModule::ProcessRawRecord(), Store(), and DbuDaqMonitorModule::WriteSubRunSummaryEntry().

Short_t DbuSubRunSummary::fSubRun

Definition at line 116 of file DbuSubRunSummary.h.

Referenced by DbuDaqMonitorModule::EndJob(), Fill(), GetAggregateNo(), GetSeqNo(), IsSameSubRun(), operator<<(), DbuDaqMonitorModule::ProcessRawRecord(), Store(), and DbuDaqMonitorModule::WriteSubRunSummaryEntry().

Int_t DbuSubRunSummary::fTermCode

Definition at line 120 of file DbuSubRunSummary.h.

Referenced by Fill(), operator<<(), DbuDaqMonitorModule::ProcessRawRecord(), Store(), and DbuDaqMonitorModule::WriteSubRunSummaryEntry().

Int_t DbuSubRunSummary::fTimeFrames

Definition at line 125 of file DbuSubRunSummary.h.

Referenced by Fill(), operator<<(), DbuDaqMonitorModule::ProcessRawRecord(), Store(), and DbuDaqMonitorModule::WriteSubRunSummaryEntry().


The documentation for this class was generated from the following files:
Generated on Mon Aug 11 01:05:44 2014 for loon by  doxygen 1.4.7