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

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

void SetDefensiveUnpkg (Bool_t defensive)
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

Bool_t fgDefensiveUnpkg = kFALSE

Constructor & Destructor Documentation

PlexVetoShieldMuxToMdl::PlexVetoShieldMuxToMdl  )  [inline]
 

Definition at line 36 of file PlexVetoShieldMuxToMdl.h.

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

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 fCountDir, fCoverChar, fF1SideChar, fMdlPln, fMuxMdl, fMuxPln, and fViewChar.

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.

00047 { LEA_DTOR; };

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

Definition at line 84 of file PlexVetoShieldMuxToMdl.h.

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 DbiRowStream::CurColName(), DbiRowStream::CurColNum(), det, fCountDir, fCoverChar, fMdlPln, fMuxMdl, fMuxPln, fSingleMdlPlaneId, fViewChar, VldRange::GetDetectorMask(), GetSingleMdlPlaneId(), DbiValidityRec::GetVldRange(), DbiRowStream::HasRowCounter(), DbiRowStream::IncrementCurCol(), MSG, and DbiRowStream::NumCols().

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) MSG("Plex",Msg::kWarning) 
00122                << "Ignoring column " << rs.CurColNum()
00123                << " (of " << rs.NumCols() << ")"
00124                << " \""<< colName << "\"; not part of "
00125                << ClassName() << endl;
00126             rs.IncrementCurCol();
00127          }
00128       }
00129    } // end defensive unpacking
00130    else {
00131 //       SeqNo         int,
00132 //       MuxPln        smallint unsigned,
00133 //       MuxMdl        smallint unsigned,
00134 //       CountDir      smallint,
00135 //       MdlPln        smallint unsigned,
00136 //       ViewChar      char(1),
00137 //       CoverChar     char(1),
00138 //       F1SideChar    char(1)
00139 
00140       rs >> fMuxPln
00141          >> fMuxMdl
00142          >> fCountDir
00143          >> fMdlPln
00144          >> fViewChar
00145          >> fCoverChar
00146          >> fF1SideChar;
00147    }
00148 
00149    // get the mdl-based plane id
00150 
00151    Char_t covername[3] = { '?','?','\0' };
00152    covername[0] = fCoverChar;
00153    covername[1] = fF1SideChar;
00154 
00155    fSingleMdlPlaneId = PlexPlaneId(det,fMdlPln,kFALSE,
00156                                    PlaneView::CharToEnum(fViewChar),
00157                                    PlaneCoverage::StringToEnum(covername));
00158 
00159    MSG("Plex",Msg::kDebug)
00160      << "PlexVetoShieldMuxToMdl::Fill  Mux ("
00161      << fMuxPln << "," << fMuxMdl << "of" << fCountDir << ") is " 
00162      << GetSingleMdlPlaneId() << endl;
00163 
00164 }

Short_t PlexVetoShieldMuxToMdl::GetCountDir  )  const [inline]
 

Definition at line 56 of file PlexVetoShieldMuxToMdl.h.

Referenced by PlexVetoShieldHack::RenumberMdlToMux(), and PlexVetoShieldHack::RenumberMuxToMdl().

00056 { return fCountDir; }

Char_t PlexVetoShieldMuxToMdl::GetCoverChar  )  const [inline]
 

Definition at line 59 of file PlexVetoShieldMuxToMdl.h.

00059 { return fCoverChar; }

Bool_t PlexVetoShieldMuxToMdl::GetDefensiveUnpkg  )  [inline, static]
 

Definition at line 78 of file PlexVetoShieldMuxToMdl.h.

00078 { return fgDefensiveUnpkg; }

Char_t PlexVetoShieldMuxToMdl::GetF1SideChar  )  const [inline]
 

Definition at line 60 of file PlexVetoShieldMuxToMdl.h.

00060 { return fF1SideChar; }

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

Reimplemented from DbiTableRow.

Definition at line 52 of file PlexVetoShieldMuxToMdl.h.

00052 { return fMdlPln; }

UShort_t PlexVetoShieldMuxToMdl::GetMdlPln  )  const [inline]
 

Definition at line 57 of file PlexVetoShieldMuxToMdl.h.

Referenced by PlexVetoShieldHack::GetMdlPlaneCoverage(), PlexVetoShieldHack::GetMdlPlaneView(), PlexVetoShieldHack::LookForSingleMdl(), and PlexVetoShieldHack::RenumberMdlToMux().

00057 { return fMdlPln; }

UShort_t PlexVetoShieldMuxToMdl::GetMuxMdl  )  const [inline]
 

Definition at line 55 of file PlexVetoShieldMuxToMdl.h.

Referenced by PlexVetoShieldHack::LookForMuxMdl(), PlexVetoShieldHack::RenumberMdlToMux(), and PlexVetoShieldHack::RenumberMuxToMdl().

00055 { return fMuxMdl; }

PlexPlaneId PlexVetoShieldMuxToMdl::GetMuxPlaneId  )  const
 

Definition at line 59 of file PlexVetoShieldMuxToMdl.cxx.

References fMuxPln, fSingleMdlPlaneId, PlexPlaneId::GetPlaneCoverage(), PlexPlaneId::GetPlaneView(), and PlexPlaneId::SetPlane().

Referenced by GetMuxScintMdlId(), and PlexVetoShieldHack::RenumberMdlToMux().

00060 {
00061 
00062   PlexPlaneId ambiguous = fSingleMdlPlaneId;
00063   ambiguous.SetPlane(fMuxPln,
00064                      fSingleMdlPlaneId.GetPlaneView(),
00065                      fSingleMdlPlaneId.GetPlaneCoverage());
00066   return ambiguous;
00067   
00068 }

UShort_t PlexVetoShieldMuxToMdl::GetMuxPln  )  const [inline]
 

Definition at line 54 of file PlexVetoShieldMuxToMdl.h.

Referenced by PlexVetoShieldHack::LookForMuxMdl(), 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]
 

Definition at line 61 of file PlexVetoShieldMuxToMdl.h.

Referenced by Fill(), PlexVetoShieldHack::GetMdlPlaneCoverage(), PlexVetoShieldHack::GetMdlPlaneView(), and PlexVetoShieldHack::RenumberMuxToMdl().

00061 { return fSingleMdlPlaneId; }

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.

00058 { return fViewChar; }

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 167 of file PlexVetoShieldMuxToMdl.cxx.

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

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


Member Data Documentation

Short_t PlexVetoShieldMuxToMdl::fCountDir [private]
 

Definition at line 91 of file PlexVetoShieldMuxToMdl.h.

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

Char_t PlexVetoShieldMuxToMdl::fCoverChar [private]
 

Definition at line 94 of file PlexVetoShieldMuxToMdl.h.

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

Char_t PlexVetoShieldMuxToMdl::fF1SideChar [private]
 

Definition at line 95 of file PlexVetoShieldMuxToMdl.h.

Referenced by PlexVetoShieldMuxToMdl().

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

Definition at line 28 of file PlexVetoShieldMuxToMdl.cxx.

Referenced by SetDefensiveUnpkg().

UShort_t PlexVetoShieldMuxToMdl::fMdlPln [private]
 

Definition at line 92 of file PlexVetoShieldMuxToMdl.h.

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

UShort_t PlexVetoShieldMuxToMdl::fMuxMdl [private]
 

Definition at line 90 of file PlexVetoShieldMuxToMdl.h.

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

UShort_t PlexVetoShieldMuxToMdl::fMuxPln [private]
 

Definition at line 89 of file PlexVetoShieldMuxToMdl.h.

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

PlexPlaneId PlexVetoShieldMuxToMdl::fSingleMdlPlaneId [private]
 

Definition at line 96 of file PlexVetoShieldMuxToMdl.h.

Referenced by Fill(), GetMuxPlaneId(), and GetSingleMdlScintMdlId().

Char_t PlexVetoShieldMuxToMdl::fViewChar [private]
 

Definition at line 93 of file PlexVetoShieldMuxToMdl.h.

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