FarTimingFid Class Reference

#include <FarTimingFid.h>

Inheritance diagram for FarTimingFid:
DbiTableRow

List of all members.

Public Member Functions

 FarTimingFid ()
 FarTimingFid (Int_t crate, Int_t sec, Int_t value)
 FarTimingFid (const FarTimingFid &from)
virtual ~FarTimingFid ()
Bool_t CanL2Cache () const
void SetAggregateNo (Int_t aggNo)
Int_t GetAggregateNo () const
Int_t GetCrate () const
Int_t GetSec () const
Int_t GetFidValue () const
void SetCrate (Int_t crate)
void SetSec (Int_t sec)
void SetFidValue (Int_t value)
virtual DbiTableRowCreateTableRow () const
virtual void Fill (DbiResultSet &rs, const DbiValidityRec *vrec)
virtual void Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const
virtual void Print (const Option_t *opt="") const

Private Attributes

Int_t fCrate
 crate # (also treated as AggregateNo)
Int_t fSec
 seconds part
Int_t fValue
 actual raw fid value

Friends

std::istream & operator>> (std::istream &is, FarTimingFid &row)
std::ostream & operator<< (std::ostream &os, const FarTimingFid &row)

Detailed Description

Definition at line 28 of file FarTimingFid.h.


Constructor & Destructor Documentation

FarTimingFid::FarTimingFid (  )  [inline]

Definition at line 37 of file FarTimingFid.h.

References LEA_CTOR.

00037 : fCrate(123), fSec(0), fValue(-9998) { LEA_CTOR; }

FarTimingFid::FarTimingFid ( Int_t  crate,
Int_t  sec,
Int_t  value 
) [inline]

Definition at line 39 of file FarTimingFid.h.

References LEA_CTOR.

00040      : fCrate(crate)
00041      , fSec(sec)
00042      , fValue(value)
00043     {  LEA_CTOR; }

FarTimingFid::FarTimingFid ( const FarTimingFid from  )  [inline]

Definition at line 45 of file FarTimingFid.h.

References LEA_CTOR.

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

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

Definition at line 48 of file FarTimingFid.h.

References LEA_DTOR.

00048 { LEA_DTOR; };


Member Function Documentation

Bool_t FarTimingFid::CanL2Cache (  )  const [inline, virtual]

Reimplemented from DbiTableRow.

Definition at line 51 of file FarTimingFid.h.

00051 { return kTRUE; }

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

Implements DbiTableRow.

Definition at line 66 of file FarTimingFid.h.

00066 { return new FarTimingFid; }

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

Implements DbiTableRow.

Definition at line 63 of file FarTimingFid.cxx.

References DbiRowStream::CurColName(), fCrate, fSec, fValue, DbiValidityRec::GetAggregateNo(), DbiRowStream::HasRowCounter(), DbiRowStream::IncrementCurCol(), Msg::kDebug, MSG, DbiRowStream::NumCols(), SetAggregateNo(), and DbiRowStream::TableName().

00064                                                      {
00065 
00066 //
00067 //
00068 //  Purpose:  Fill object from Result Set
00069 //
00070 //  Arguments: 
00071 //    rs           in    Result Set used to fill object
00072 //    vrec         in    Associated validity record (or 0 if filling
00073 //                                                    DbiValidityRec)
00074 //
00075 //  o Fill object from current row of Result Set.
00076 
00077 //  Program Notes:-
00078 //  =============
00079 
00080 //  This method demonstrates both the "dumb" fill method (just
00081 //  load the data as it comes) and the smart method (check column
00082 //  name and load according to column order). 
00083 
00084    // know internally what aggregate number this is
00085    if ( vrec ) { SetAggregateNo(vrec->GetAggregateNo()); }
00086 
00087    if ( rs.TableName() == "FARTIMINGFID" ) {
00088       // Dumb method.
00089      rs  >> fCrate >> fSec >> fValue;
00090 
00091    } else {      
00092       // Smart method allows for column reordering/addition/deletion
00093       Int_t numCol = rs.NumCols();
00094       //  The first column (SeqNo) has already been processed.
00095       for (Int_t curCol = rs.HasRowCounter() ? 3 : 2; curCol <= numCol; ++curCol) {
00096         string colName = rs.CurColName();
00097         if      ( colName == "CRATE" )       rs >> fCrate;
00098         else if ( colName == "SEC" )         rs >> fSec;
00099         else if ( colName == "VALUE" )       rs >> fValue;
00100         else {
00101           MSG("Dbi",Msg::kDebug) 
00102             << "Ignoring column " << curCol << "(" << colName << ")"
00103             << "; not part of FarTimingFid" << endl;
00104           rs.IncrementCurCol();
00105         }
00106       }
00107    }
00108    
00109 }

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

Reimplemented from DbiTableRow.

Definition at line 56 of file FarTimingFid.h.

References fCrate.

00056 { return fCrate; }

Int_t FarTimingFid::GetCrate (  )  const [inline]

Definition at line 58 of file FarTimingFid.h.

References fCrate.

Referenced by FarTimingFidFinder::RefreshQuery().

00058 { return fCrate; }

Int_t FarTimingFid::GetFidValue (  )  const [inline]

Definition at line 60 of file FarTimingFid.h.

References fValue.

Referenced by FarTimingFidFinder::RefreshQuery().

00060 { return fValue; }

Int_t FarTimingFid::GetSec (  )  const [inline]

Definition at line 59 of file FarTimingFid.h.

References fSec.

Referenced by FarTimingFidFinder::RefreshQuery().

00059 { return fSec; }

void FarTimingFid::Print ( const Option_t *  opt = ""  )  const [virtual]

Definition at line 130 of file FarTimingFid.cxx.

00131 {
00132   std::cout << *this << std::endl;
00133 }

void FarTimingFid::SetAggregateNo ( Int_t  aggNo  )  [inline]

Definition at line 55 of file FarTimingFid.h.

References fCrate.

Referenced by Fill().

00055 { fCrate = aggNo; }

void FarTimingFid::SetCrate ( Int_t  crate  )  [inline]

Definition at line 62 of file FarTimingFid.h.

References fCrate.

00062 { fCrate = crate; }

void FarTimingFid::SetFidValue ( Int_t  value  )  [inline]

Definition at line 64 of file FarTimingFid.h.

References fValue.

00064 { fValue = value; }

void FarTimingFid::SetSec ( Int_t  sec  )  [inline]

Definition at line 63 of file FarTimingFid.h.

References fSec.

00063 { fSec   = sec; }

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

Reimplemented from DbiTableRow.

Definition at line 113 of file FarTimingFid.cxx.

References fCrate, fSec, and fValue.

00114                                                                   {
00115   //
00116   //
00117   //  Purpose:  Stream object to output row stream
00118   //
00119   //  Arguments: 
00120   //    ors          in     Output row stream.
00121   //    vrec         in    Associated validity record (or 0 if filling
00122   
00123   // write a row to the stream
00124   // the ordering here must actually match the table column order
00125   ors << fCrate << fSec << fValue;
00126 
00127 }


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const FarTimingFid row 
) [friend]
std::istream& operator>> ( std::istream &  is,
FarTimingFid row 
) [friend]

Member Data Documentation

Int_t FarTimingFid::fCrate [private]

crate # (also treated as AggregateNo)

Definition at line 82 of file FarTimingFid.h.

Referenced by Fill(), GetAggregateNo(), GetCrate(), operator<<(), SetAggregateNo(), SetCrate(), and Store().

Int_t FarTimingFid::fSec [private]

seconds part

Definition at line 83 of file FarTimingFid.h.

Referenced by Fill(), GetSec(), operator<<(), SetSec(), and Store().

Int_t FarTimingFid::fValue [private]

actual raw fid value

Definition at line 84 of file FarTimingFid.h.

Referenced by Fill(), GetFidValue(), operator<<(), SetFidValue(), 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