PlexVetoShieldMuxToMdl Class Reference

#include <PlexVetoShieldMuxToMdl.h>

Inheritance diagram for PlexVetoShieldMuxToMdl:
DbiTableRow

List of all members.

Public Member Functions

 PlexVetoShieldMuxToMdl ()
 PlexVetoShieldMuxToMdl (UShort_t muxpln, UShort_t muxmdl, Short_t cntdir, UShort_t mdlpln, Char_t viewc, Char_t coverc, Char_t f1sidec)
virtual ~PlexVetoShieldMuxToMdl ()
virtual UInt_t GetIndex (UInt_t) const
UShort_t GetMuxPln () const
UShort_t GetMuxMdl () const
Short_t GetCountDir () const
UShort_t GetMdlPln () const
Char_t GetViewChar () const
Char_t GetCoverChar () const
Char_t GetF1SideChar () const
PlexPlaneId GetSingleMdlPlaneId () const
PlexScintMdlId GetSingleMdlScintMdlId () const
PlexPlaneId GetMuxPlaneId () const
PlexScintMdlId GetMuxScintMdlId () 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

static void SetDefensiveUnpkg (Bool_t defensive)
static Bool_t GetDefensiveUnpkg ()

Private Member Functions

 PlexVetoShieldMuxToMdl (const PlexVetoShieldMuxToMdl &from)

Private Attributes

UShort_t fMuxPln
UShort_t fMuxMdl
Short_t fCountDir
UShort_t fMdlPln
Char_t fViewChar
Char_t fCoverChar
Char_t fF1SideChar
PlexPlaneId fSingleMdlPlaneId

Static Private Attributes

static Bool_t fgDefensiveUnpkg = kFALSE

Detailed Description

Definition at line 29 of file PlexVetoShieldMuxToMdl.h.


Constructor & Destructor Documentation

PlexVetoShieldMuxToMdl::PlexVetoShieldMuxToMdl (  )  [inline]

Definition at line 36 of file PlexVetoShieldMuxToMdl.h.

References LEA_CTOR.

00036                             :
00037      fMuxPln(kBadVetoPln), fMuxMdl(8), fCountDir(0), fMdlPln(kBadVetoPln),
00038      fViewChar('?'), fCoverChar('?'), fF1SideChar('?') { LEA_CTOR; }

PlexVetoShieldMuxToMdl::PlexVetoShieldMuxToMdl ( UShort_t  muxpln,
UShort_t  muxmdl,
Short_t  cntdir,
UShort_t  mdlpln,
Char_t  viewc,
Char_t  coverc,
Char_t  f1sidec 
) [inline]

Definition at line 40 of file PlexVetoShieldMuxToMdl.h.

References LEA_CTOR.

00042                                           :
00043      fMuxPln(muxpln), fMuxMdl(muxmdl), fCountDir(cntdir),
00044      fMdlPln(mdlpln), fViewChar(viewc), fCoverChar(coverc),
00045      fF1SideChar(f1sidec) { LEA_CTOR; };

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

Definition at line 47 of file PlexVetoShieldMuxToMdl.h.

References LEA_DTOR.

00047 { LEA_DTOR; };

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

Definition at line 84 of file PlexVetoShieldMuxToMdl.h.

References LEA_CTOR.

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


Member Function Documentation

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

Implements DbiTableRow.

Definition at line 66 of file PlexVetoShieldMuxToMdl.h.

00067      { return new PlexVetoShieldMuxToMdl; }

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

Implements DbiTableRow.

Definition at line 75 of file PlexVetoShieldMuxToMdl.cxx.

References PlaneView::CharToEnum(), DbiRowStream::CurColName(), DbiRowStream::CurColNum(), det, fCountDir, fCoverChar, fF1SideChar, fgDefensiveUnpkg, fMdlPln, fMuxMdl, fMuxPln, fSingleMdlPlaneId, fViewChar, VldRange::GetDetectorMask(), GetSingleMdlPlaneId(), DbiValidityRec::GetVldRange(), DbiRowStream::HasRowCounter(), DbiRowStream::IncrementCurCol(), Msg::kDebug, Msg::kWarning, MSG, DbiRowStream::NumCols(), and PlaneCoverage::StringToEnum().

00076                                                                   {
00077 //
00078 //
00079 //  Purpose:  Fill object from Result Set
00080 //
00081 //  Arguments: 
00082 //    rs           in    Result Set used to fill object
00083 //    vrec         in    Associated validity record (or 0 if filling
00084 //                                                    DbiValidityRec)
00085 //
00086 //  Return:    
00087 //
00088 //  Contact:   R. Hatcher
00089 //
00090 //  Specification:-
00091 //  =============
00092 //
00093 //  o Fill object from current row of Result Set.
00094 
00095 //  Program Notes:-
00096 //  =============
00097 
00098 //  None.
00099 
00100    Detector::Detector_t det =
00101       (Detector::Detector_t) 
00102       ((vrec) ? vrec->GetVldRange().GetDetectorMask() : 0);
00103 
00104    if (fgDefensiveUnpkg) {
00105 
00106       // unpack allowing for various column names and ordering
00107 
00108       Int_t numCol = rs.NumCols();
00109       //  The first column (SeqNo) has already been processed.
00110       for (Int_t curCol = rs.HasRowCounter() ? 3 : 2; curCol <= numCol; ++curCol) {
00111          string colName = rs.CurColName();
00112          if      ( colName == "MUXPLN"     ) rs >> fMuxPln;
00113          else if ( colName == "MUXMDL"     ) rs >> fMuxMdl;
00114          else if ( colName == "COUNTDIR"   ) rs >> fCountDir;
00115          else if ( colName == "MDLPLN"     ) rs >> fMdlPln;
00116          else if ( colName == "VIEWCHAR"   ) rs >> fViewChar;
00117          else if ( colName == "COVERCHAR"  ) rs >> fCoverChar;
00118          else if ( colName == "F1SIDECHAR" ) rs >> fF1SideChar;
00119          else {
00120             static int nmsg = 25;
00121             if (nmsg-- > 0) {
00122               MSG("Plex",Msg::kWarning) 
00123                 << "Ignoring column " << rs.CurColNum()
00124                 << " (of " << rs.NumCols() << ")"
00125                 << " \""<< colName << "\"; not part of "
00126                 << ClassName() << endl;
00127             }
00128             rs.IncrementCurCol();
00129          }
00130       }
00131    } // end defensive unpacking
00132    else {
00133 //       SeqNo         int,
00134 //       MuxPln        smallint unsigned,
00135 //       MuxMdl        smallint unsigned,
00136 //       CountDir      smallint,
00137 //       MdlPln        smallint unsigned,
00138 //       ViewChar      char(1),
00139 //       CoverChar     char(1),
00140 //       F1SideChar    char(1)
00141 
00142       rs >> fMuxPln
00143          >> fMuxMdl
00144          >> fCountDir
00145          >> fMdlPln
00146          >> fViewChar
00147          >> fCoverChar
00148          >> fF1SideChar;
00149    }
00150 
00151    // get the mdl-based plane id
00152 
00153    Char_t covername[3] = { '?','?','\0' };
00154    covername[0] = fCoverChar;
00155    covername[1] = fF1SideChar;
00156 
00157    fSingleMdlPlaneId = PlexPlaneId(det,fMdlPln,kFALSE,
00158                                    PlaneView::CharToEnum(fViewChar),
00159                                    PlaneCoverage::StringToEnum(covername));
00160 
00161    MSG("Plex",Msg::kDebug)
00162      << "PlexVetoShieldMuxToMdl::Fill  Mux ("
00163      << fMuxPln << "," << fMuxMdl << "of" << fCountDir << ") is " 
00164      << GetSingleMdlPlaneId() << endl;
00165 
00166 }

Short_t PlexVetoShieldMuxToMdl::GetCountDir (  )  const [inline]
Char_t PlexVetoShieldMuxToMdl::GetCoverChar (  )  const [inline]

Definition at line 59 of file PlexVetoShieldMuxToMdl.h.

References fCoverChar.

00059 { return fCoverChar; }

static Bool_t PlexVetoShieldMuxToMdl::GetDefensiveUnpkg (  )  [inline, static]

Definition at line 78 of file PlexVetoShieldMuxToMdl.h.

References fgDefensiveUnpkg.

00078 { return fgDefensiveUnpkg; }

Char_t PlexVetoShieldMuxToMdl::GetF1SideChar (  )  const [inline]

Definition at line 60 of file PlexVetoShieldMuxToMdl.h.

References fF1SideChar.

00060 { return fF1SideChar; }

virtual UInt_t PlexVetoShieldMuxToMdl::GetIndex ( UInt_t   )  const [inline, virtual]

Reimplemented from DbiTableRow.

Definition at line 52 of file PlexVetoShieldMuxToMdl.h.

References fMdlPln.

00052 { return fMdlPln; }

UShort_t PlexVetoShieldMuxToMdl::GetMdlPln (  )  const [inline]
UShort_t PlexVetoShieldMuxToMdl::GetMuxMdl (  )  const [inline]
PlexPlaneId PlexVetoShieldMuxToMdl::GetMuxPlaneId (  )  const
UShort_t PlexVetoShieldMuxToMdl::GetMuxPln (  )  const [inline]

Definition at line 54 of file PlexVetoShieldMuxToMdl.h.

References fMuxPln.

Referenced by PlexVetoShieldHack::LookForMuxMdl(), operator<<(), and PlexVetoShieldHack::RenumberMuxToMdl().

00054 { return fMuxPln; }

PlexScintMdlId PlexVetoShieldMuxToMdl::GetMuxScintMdlId (  )  const

Definition at line 70 of file PlexVetoShieldMuxToMdl.cxx.

References fMuxMdl, and GetMuxPlaneId().

Referenced by PlexVetoShieldHack::RenumberMdlToMux().

00071 { return PlexScintMdlId(GetMuxPlaneId(),fMuxMdl); }

PlexPlaneId PlexVetoShieldMuxToMdl::GetSingleMdlPlaneId (  )  const [inline]
PlexScintMdlId PlexVetoShieldMuxToMdl::GetSingleMdlScintMdlId (  )  const

Definition at line 56 of file PlexVetoShieldMuxToMdl.cxx.

References fSingleMdlPlaneId.

Referenced by PlexVetoShieldHack::RenumberMuxToMdl().

00057 { return PlexScintMdlId(fSingleMdlPlaneId,0); }

Char_t PlexVetoShieldMuxToMdl::GetViewChar (  )  const [inline]

Definition at line 58 of file PlexVetoShieldMuxToMdl.h.

References fViewChar.

00058 { return fViewChar; }

static void PlexVetoShieldMuxToMdl::SetDefensiveUnpkg ( Bool_t  defensive  )  [inline, static]

Definition at line 76 of file PlexVetoShieldMuxToMdl.h.

References fgDefensiveUnpkg.

00077       { fgDefensiveUnpkg = defensive; }

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

Reimplemented from DbiTableRow.

Definition at line 169 of file PlexVetoShieldMuxToMdl.cxx.

References fCountDir, fCoverChar, fF1SideChar, fMdlPln, fMuxMdl, fMuxPln, and fViewChar.

00170                                                                            {
00171 //
00172 //
00173 //  Purpose:  Stream object to output row stream
00174 //
00175 //  Arguments: 
00176 //    ors          in     Output row stream.
00177 //    vrec         in     Associated validity record (or 0 if filling
00178 //                                                    DbiValidityRec)
00179 //
00180 //  Return:    
00181 //
00182 //  Contact:   R. Hatcher
00183 //
00184 //  Specification:-
00185 //  =============
00186 //
00187 //  o  Stream object to output row stream.
00188 
00189 //  Program Notes:-
00190 //  =============
00191 
00192 //  None.
00193 
00194    ors << fMuxPln
00195        << fMuxMdl
00196        << fCountDir
00197        << fMdlPln
00198        << fViewChar
00199        << fCoverChar
00200        << fF1SideChar;
00201 }


Member Data Documentation

Definition at line 91 of file PlexVetoShieldMuxToMdl.h.

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

Definition at line 94 of file PlexVetoShieldMuxToMdl.h.

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

Definition at line 95 of file PlexVetoShieldMuxToMdl.h.

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

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

Definition at line 100 of file PlexVetoShieldMuxToMdl.h.

Referenced by Fill(), GetDefensiveUnpkg(), and SetDefensiveUnpkg().

UShort_t PlexVetoShieldMuxToMdl::fMdlPln [private]

Definition at line 92 of file PlexVetoShieldMuxToMdl.h.

Referenced by Fill(), GetIndex(), GetMdlPln(), and Store().

UShort_t PlexVetoShieldMuxToMdl::fMuxMdl [private]

Definition at line 90 of file PlexVetoShieldMuxToMdl.h.

Referenced by Fill(), GetMuxMdl(), GetMuxScintMdlId(), and Store().

UShort_t PlexVetoShieldMuxToMdl::fMuxPln [private]

Definition at line 89 of file PlexVetoShieldMuxToMdl.h.

Referenced by Fill(), GetMuxPlaneId(), GetMuxPln(), and Store().

Definition at line 93 of file PlexVetoShieldMuxToMdl.h.

Referenced by Fill(), GetViewChar(), 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