BeamMonFileSummary Class Reference
[BeamDataUtil]

A DbiTableRow for accessing BEAMMONFILESUMMARY table. More...

#include <BeamMonFileSummary.h>

Inheritance diagram for BeamMonFileSummary:
DbiTableRow

List of all members.

Public Member Functions

 BeamMonFileSummary ()
virtual DbiTableRowCreateTableRow () const
 DbiTableRow API.
void Fill (DbiResultSet &rs, const DbiValidityRec *vrec)
 DbiTableRow API.
virtual void Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const
 DbiTableRow API.
void SetFileInfo (const TFile &file)
 Set file related values. File should be accessible.
void SetTclkTrigger (int event, int delay)
 Set the TCLK trigger info. Should be called once per file.
void AddSpill (const VldTimeStamp &vts, double protons_in_spill)
 Set spill info. This should be called once for every spill in the file.

Public Attributes

VldTimeStamp fFirstSpillTime
VldTimeStamp fLastSpillTime
int fSpillCount
float fProtonCount
int fTclkTriggerEvent
int fTclkTriggerDelay
std::string fFileName
int fFileSize
int fRootVersion
VldTimeStamp fModTime

Detailed Description

A DbiTableRow for accessing BEAMMONFILESUMMARY table.

Author:
(last to touch it)
Author
minoscvs
Version:
Revision
1.3
Date:
Date
2005/04/29 20:17:56

Contact: bv@bnl.gov

Created on: Wed Apr 13 18:17:14 2005

Id
BeamMonFileSummary.h,v 1.3 2005/04/29 20:17:56 minoscvs Exp

Definition at line 40 of file BeamMonFileSummary.h.


Constructor & Destructor Documentation

BeamMonFileSummary::BeamMonFileSummary (  ) 

Definition at line 24 of file BeamMonFileSummary.cxx.

00025     : fFirstSpillTime()
00026     , fLastSpillTime()
00027     , fSpillCount(0)
00028     , fProtonCount(0)
00029     , fFileName("")
00030     , fFileSize(0)
00031     , fRootVersion(0)
00032     , fModTime()
00033 {
00034 }


Member Function Documentation

void BeamMonFileSummary::AddSpill ( const VldTimeStamp vts,
double  protons_in_spill 
)

Set spill info. This should be called once for every spill in the file.

Definition at line 72 of file BeamMonFileSummary.cxx.

References fFirstSpillTime, fLastSpillTime, fProtonCount, and fSpillCount.

Referenced by BMFileSummaryFiller::Timestamp().

00073 {
00074     if (!fSpillCount) {
00075         fFirstSpillTime = vts;
00076     }
00077     ++fSpillCount;
00078 
00079     fLastSpillTime = vts;
00080     fProtonCount += proton_count;
00081 }

DbiTableRow * BeamMonFileSummary::CreateTableRow (  )  const [virtual]

DbiTableRow API.

Implements DbiTableRow.

Definition at line 61 of file BeamMonFileSummary.cxx.

00062 { 
00063     return new BeamMonFileSummary; 
00064 }

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

DbiTableRow API.

Implements DbiTableRow.

Definition at line 36 of file BeamMonFileSummary.cxx.

References fFileName, fFileSize, fFirstSpillTime, fLastSpillTime, fModTime, fProtonCount, fRootVersion, fSpillCount, fTclkTriggerDelay, fTclkTriggerEvent, and Munits::ns.

00037 {
00038     // nominally:
00039     // rs >> fField1 >> fField2;
00040 
00041     int ns=0;
00042 
00043     rs >> fFirstSpillTime;
00044     rs >> ns;
00045     fFirstSpillTime.Add(VldTimeStamp(0,ns));
00046 
00047     rs >> fLastSpillTime;
00048     rs >> ns;
00049     fLastSpillTime.Add(VldTimeStamp(0,ns));
00050 
00051     rs >> fSpillCount
00052        >> fProtonCount
00053        >> fTclkTriggerEvent
00054        >> fTclkTriggerDelay
00055        >> fFileName
00056        >> fFileSize
00057        >> fRootVersion
00058        >> fModTime;
00059 
00060 }

void BeamMonFileSummary::SetFileInfo ( const TFile &  file  ) 

Set file related values. File should be accessible.

Definition at line 83 of file BeamMonFileSummary.cxx.

References fFileName, fFileSize, fModTime, fRootVersion, and gSystem().

Referenced by BMFileSummaryFiller::NewFile().

00084 {
00085     fFileName = gSystem->BaseName(file.GetName());
00086 
00087     fFileSize = file.GetSize();
00088     fRootVersion = file.GetVersion();
00089 
00090     FileStat_t file_stat;
00091     gSystem->GetPathInfo(file.GetName(),file_stat);
00092     fModTime = VldTimeStamp(file_stat.fMtime,0);
00093 }

void BeamMonFileSummary::SetTclkTrigger ( int  event,
int  delay 
)

Set the TCLK trigger info. Should be called once per file.

Definition at line 66 of file BeamMonFileSummary.cxx.

References fTclkTriggerDelay, and fTclkTriggerEvent.

Referenced by BMFileSummaryFiller::SetTclkTrigger().

00067 {
00068     fTclkTriggerEvent = event;
00069     fTclkTriggerDelay = delay;
00070 }

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

DbiTableRow API.

Reimplemented from DbiTableRow.

Definition at line 95 of file BeamMonFileSummary.cxx.

References fFileName, fFileSize, fFirstSpillTime, fLastSpillTime, fModTime, fProtonCount, fRootVersion, fSpillCount, fTclkTriggerDelay, fTclkTriggerEvent, and VldTimeStamp::GetNanoSec().

00097 {
00098     ors << fFirstSpillTime;
00099     ors << (fFirstSpillTime.GetNanoSec())
00100         << fLastSpillTime
00101         << (fLastSpillTime.GetNanoSec())
00102         << fSpillCount
00103         << fProtonCount
00104         << fTclkTriggerEvent
00105         << fTclkTriggerDelay
00106         << fFileName
00107         << fFileSize
00108         << fRootVersion
00109         << fModTime;
00110 }


Member Data Documentation

Definition at line 72 of file BeamMonFileSummary.h.

Referenced by dump_file_summary(), Fill(), SetFileInfo(), and Store().

Definition at line 74 of file BeamMonFileSummary.h.

Referenced by Fill(), SetFileInfo(), and Store().

Definition at line 68 of file BeamMonFileSummary.h.

Referenced by AddSpill(), dump_file_summary(), Fill(), and Store().

Definition at line 73 of file BeamMonFileSummary.h.

Referenced by Fill(), SetFileInfo(), and Store().

Definition at line 67 of file BeamMonFileSummary.h.

Referenced by AddSpill(), dump_file_summary(), Fill(), FileGap::GetFileBounds(), and Store().

Definition at line 70 of file BeamMonFileSummary.h.

Referenced by Fill(), SetTclkTrigger(), and Store().

Definition at line 69 of file BeamMonFileSummary.h.

Referenced by Fill(), FileGap::GetFileBounds(), SetTclkTrigger(), and Store().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1