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

PlexStripEndToLed Class Reference

#include <PlexStripEndToLed.h>

Inheritance diagram for PlexStripEndToLed:

DbiTableRow List of all members.

Public Member Functions

 PlexStripEndToLed ()
 PlexStripEndToLed (Detector::Detector_t det, Int_t plane, Int_t strip, StripEnd::StripEnd_t end, Int_t pulserBox, Int_t ledInBox)
virtual ~PlexStripEndToLed ()
virtual Int_t GetAggregateNo () const
PlexStripEndId GetPlexStripEndId () const
PlexLedId GetPlexLedId () const
virtual DbiTableRowCreateTableRow () const
virtual void Fill (DbiResultSet &rs, const DbiValidityRec *vrec)
virtual void Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const

Static Public Member Functions

void SetDefensiveUnpkg (Bool_t defensive)
Bool_t GetDefensiveUnpkg ()

Private Member Functions

 PlexStripEndToLed (const PlexStripEndToLed &from)

Private Attributes

Int_t fAggregate
PlexStripEndId fPlexStripEndId
PlexLedId fPlexLedId

Static Private Attributes

Bool_t fgDefensiveUnpkg = kFALSE

Constructor & Destructor Documentation

PlexStripEndToLed::PlexStripEndToLed  )  [inline]
 

Definition at line 32 of file PlexStripEndToLed.h.

00032 { LEA_CTOR; }

PlexStripEndToLed::PlexStripEndToLed Detector::Detector_t  det,
Int_t  plane,
Int_t  strip,
StripEnd::StripEnd_t  end,
Int_t  pulserBox,
Int_t  ledInBox
[inline]
 

Definition at line 33 of file PlexStripEndToLed.h.

References det, fPlexLedId, and fPlexStripEndId.

00036                                                             :
00037       fPlexStripEndId(det,plane,strip,end),
00038       fPlexLedId(det,pulserBox,ledInBox) { LEA_CTOR; };
   virtual ~PlexStripEndToLed(){ LEA_DTOR; };

virtual PlexStripEndToLed::~PlexStripEndToLed  )  [inline, virtual]
 

Definition at line 39 of file PlexStripEndToLed.h.

00039 { LEA_DTOR; };

PlexStripEndToLed::PlexStripEndToLed const PlexStripEndToLed from  )  [inline, private]
 

Definition at line 64 of file PlexStripEndToLed.h.

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


Member Function Documentation

virtual DbiTableRow* PlexStripEndToLed::CreateTableRow  )  const [inline, virtual]
 

Implements DbiTableRow.

Definition at line 47 of file PlexStripEndToLed.h.

00047 { return new PlexStripEndToLed; }

void PlexStripEndToLed::Fill DbiResultSet rs,
const DbiValidityRec vrec
[virtual]
 

Implements DbiTableRow.

Definition at line 43 of file PlexStripEndToLed.cxx.

References StripEnd::CharToEnum(), det, and MSG.

00044                                                                {
00045 //
00046 //
00047 //  Purpose:  Fill object from Result Set
00048 //
00049 //  Arguments: 
00050 //    rs           in    Result Set used to fill object
00051 //    vrec         in    Associated validity record (or 0 if filling
00052 //                                                    DbiValidityRec)
00053 //
00054 //  Return:    
00055 //
00056 //  Contact:   R. Hatcher
00057 //
00058 //  Specification:-
00059 //  =============
00060 //
00061 //  o Fill object from current row of Result Set.
00062 
00063 //  Program Notes:-
00064 //  =============
00065 
00066 //  None.
00067 
00068    Detector::Detector_t det =
00069       (Detector::Detector_t) 
00070       ((vrec) ? vrec->GetVldRange().GetDetectorMask() : 0);
00071    
00072    int    plane, strip, pulserBox, ledInBox;
00073    char   endchar;
00074 
00075    if (fgDefensiveUnpkg) {
00076 
00077       // unpack allowing for various column names and ordering
00078 
00079       Int_t numCol = rs.NumCols();
00080       //  The first column (SeqNo) has already been processed.
00081       for (Int_t curCol = rs.HasRowCounter() ? 3 : 2; curCol <= numCol; ++curCol) {
00082          string colName = rs.CurColName();
00083          if (      colName == "AGGREGATENO" ) rs >> fAggregate;
00084          else if ( colName == "PLANE"       ) rs >> plane;
00085          else if ( colName == "STRIP"       ) rs >> strip;
00086          else if ( colName == "STRIPEND"    ) rs >> endchar;
00087          else if ( colName == "PULSERBOX"   ) rs >> pulserBox;
00088          else if ( colName == "LEDINBOX"    ) rs >> ledInBox;
00089          else {
00090             static int nmsg = 25;
00091             if (nmsg-- > 0) MSG("Plex",Msg::kWarning) 
00092                << "Ignoring column " << rs.CurColNum() 
00093                << " (of " << rs.NumCols() << ")"
00094                << " \""<< colName << "\"; not part of "
00095                << ClassName() << endl;
00096             rs.IncrementCurCol();
00097          }
00098       }
00099    } // end defensive unpacking
00100    else {
00101 //       SeqNo         int,
00102 //       AggregateNo   int,
00103 //       Plane         smallint,
00104 //       Strip         smallint,
00105 //       StripEnd      char(1)
00106 //       PulserBox     tinyint,
00107 //       LedInBox      tinyint
00108 
00109       rs >> fAggregate
00110          >> plane
00111          >> strip
00112          >> endchar
00113          >> pulserBox
00114          >> ledInBox;
00115       
00116    }
00117    
00118    StripEnd::StripEnd_t end  = StripEnd::CharToEnum(endchar);
00119 
00120    fPlexStripEndId = PlexStripEndId(det,plane,strip,end);
00121    fPlexLedId      = PlexLedId(det,pulserBox,ledInBox);
00122 
00123 }

virtual Int_t PlexStripEndToLed::GetAggregateNo  )  const [inline, virtual]
 

Reimplemented from DbiTableRow.

Definition at line 43 of file PlexStripEndToLed.h.

00043 { return fAggregate; }

Bool_t PlexStripEndToLed::GetDefensiveUnpkg  )  [inline, static]
 

Definition at line 58 of file PlexStripEndToLed.h.

00058 { return fgDefensiveUnpkg; }

PlexLedId PlexStripEndToLed::GetPlexLedId  )  const [inline]
 

Definition at line 45 of file PlexStripEndToLed.h.

Referenced by Plexus::BuildLedMaps(), and LIPatternFinderFancy::BuildPlexMaps().

00045 { return fPlexLedId; }

PlexStripEndId PlexStripEndToLed::GetPlexStripEndId  )  const [inline]
 

Definition at line 44 of file PlexStripEndToLed.h.

Referenced by Plexus::BuildLedMaps(), and LIPatternFinderFancy::BuildPlexMaps().

00044 { return fPlexStripEndId; }

void PlexStripEndToLed::SetDefensiveUnpkg Bool_t  defensive  )  [inline, static]
 

Definition at line 56 of file PlexStripEndToLed.h.

References fgDefensiveUnpkg.

00057       { fgDefensiveUnpkg = defensive; }

void PlexStripEndToLed::Store DbiOutRowStream ors,
const DbiValidityRec vrec
const [virtual]
 

Reimplemented from DbiTableRow.

Definition at line 126 of file PlexStripEndToLed.cxx.

References StripEnd::AsString(), fAggregate, fPlexLedId, fPlexStripEndId, PlexStripEndId::GetEnd(), PlexLedId::GetLedInBox(), PlexPlaneId::GetPlane(), PlexLedId::GetPulserBox(), and PlexStripEndId::GetStrip().

00127                                                                       {
00128 //
00129 //
00130 //  Purpose:  Stream object to output row stream
00131 //
00132 //  Arguments: 
00133 //    ors          in     Output row stream.
00134 //    vrec         in     Associated validity record (or 0 if filling
00135 //                                                    DbiValidityRec)
00136 //
00137 //  Return:    
00138 //
00139 //  Contact:   R. Hatcher
00140 //
00141 //  Specification:-
00142 //  =============
00143 //
00144 //  o  Stream object to output row stream.
00145 
00146 //  Program Notes:-
00147 //  =============
00148 
00149 //  None.
00150 
00151    ors << fAggregate 
00152        << fPlexStripEndId.GetPlane()
00153        << fPlexStripEndId.GetStrip()
00154        << StripEnd::AsString(fPlexStripEndId.GetEnd())[0]
00155        << fPlexLedId.GetPulserBox()
00156        << fPlexLedId.GetLedInBox();
00157    
00158 }


Member Data Documentation

Int_t PlexStripEndToLed::fAggregate [private]
 

Definition at line 69 of file PlexStripEndToLed.h.

Referenced by Store().

Bool_t PlexStripEndToLed::fgDefensiveUnpkg = kFALSE [static, private]
 

Definition at line 29 of file PlexStripEndToLed.cxx.

Referenced by SetDefensiveUnpkg().

PlexLedId PlexStripEndToLed::fPlexLedId [private]
 

Definition at line 71 of file PlexStripEndToLed.h.

Referenced by PlexStripEndToLed(), and Store().

PlexStripEndId PlexStripEndToLed::fPlexStripEndId [private]
 

Definition at line 70 of file PlexStripEndToLed.h.

Referenced by PlexStripEndToLed(), and Store().


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:10:04 2010 for loon by  doxygen 1.3.9.1