#include <PlexPinDiodeToLed.h>
Inheritance diagram for PlexPinDiodeToLed:

Public Member Functions | |
| PlexPinDiodeToLed () | |
| PlexPinDiodeToLed (Detector::Detector_t det, ElecType::Elec_t elec, Char_t eastwest, Char_t racklevel, Int_t rackbay, Int_t inrack, Int_t inbox, Int_t gain, Int_t pulserBox, Int_t ledInBox) | |
| virtual | ~PlexPinDiodeToLed () |
| virtual Int_t | GetAggregateNo () const |
| PlexPinDiodeId | GetPlexPinDiodeId () const |
| PlexLedId | GetPlexLedId () const |
| virtual DbiTableRow * | CreateTableRow () 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 | |
| PlexPinDiodeToLed (const PlexPinDiodeToLed &from) | |
Private Attributes | |
| Int_t | fAggregate |
| PlexPinDiodeId | fPlexPinDiodeId |
| PlexLedId | fPlexLedId |
Static Private Attributes | |
| Bool_t | fgDefensiveUnpkg = kFALSE |
|
|
Definition at line 32 of file PlexPinDiodeToLed.h. 00032 { LEA_CTOR; }
|
|
||||||||||||||||||||||||||||||||||||||||||||
|
Definition at line 33 of file PlexPinDiodeToLed.h. References det, fPlexLedId, and fPlexPinDiodeId. 00038 : 00039 fPlexPinDiodeId(det,elec,eastwest,racklevel,rackbay,inrack,inbox,gain), 00040 fPlexLedId(det,pulserBox,ledInBox) { LEA_CTOR; }; virtual ~PlexPinDiodeToLed(){ LEA_DTOR; };
|
|
|
Definition at line 41 of file PlexPinDiodeToLed.h. 00041 { LEA_DTOR; };
|
|
|
Definition at line 66 of file PlexPinDiodeToLed.h. 00067 : DbiTableRow(from) { LEA_CTOR; *this = from; }
|
|
|
Implements DbiTableRow. Definition at line 49 of file PlexPinDiodeToLed.h. 00049 { return new PlexPinDiodeToLed; }
|
|
||||||||||||
|
Implements DbiTableRow. Definition at line 45 of file PlexPinDiodeToLed.cxx. References ElecType::CharToEnum(), det, and MSG. 00046 {
00047 //
00048 //
00049 // Purpose: Fill object from Result Set
00050 //
00051 // Arguments:
00052 // rs in Result Set used to fill object
00053 // vrec in Associated validity record (or 0 if filling
00054 // DbiValidityRec)
00055 //
00056 // Return:
00057 //
00058 // Contact: R. Hatcher
00059 //
00060 // Specification:-
00061 // =============
00062 //
00063 // o Fill object from current row of Result Set.
00064
00065 // Program Notes:-
00066 // =============
00067
00068 // None.
00069
00070 Detector::Detector_t det =
00071 (Detector::Detector_t)
00072 ((vrec) ? vrec->GetVldRange().GetDetectorMask() : 0);
00073
00074 char elecName = '?';
00075 char elecType = ElecType::kUnknown;
00076 char rackEastWest='?', rackLevel='?';
00077 int rackBay=0, muxboxInRack=0;
00078 int diodeinbox=0, gain=0;
00079 int pulserbox=0, ledinbox=0;
00080
00081 if (fgDefensiveUnpkg) {
00082
00083 // unpack allowing for various column names and ordering
00084
00085 Int_t numCol = rs.NumCols();
00086 // The first column (SeqNo) has already been processed.
00087 for (Int_t curCol = rs.HasRowCounter() ? 3 : 2; curCol <= numCol; ++curCol) {
00088 string colName = rs.CurColName();
00089 if ( colName == "AGGREGATENO" ) rs >> fAggregate;
00090 else if ( colName == "ELECNAME" ) rs >> elecName;
00091 else if ( colName == "RACKEASTWEST") rs >> rackEastWest;
00092 else if ( colName == "RACKLEVEL" ) rs >> rackLevel;
00093 else if ( colName == "RACKBAY" ) rs >> rackBay;
00094 else if ( colName == "MUXBOXINRACK") rs >> muxboxInRack;
00095 else if ( colName == "DIODEINBOX" ) rs >> diodeinbox;
00096 else if ( colName == "GAIN" ) rs >> gain;
00097 else if ( colName == "PULSERBOX" ) rs >> pulserbox;
00098 else if ( colName == "LEDINBOX" ) rs >> ledinbox;
00099 else {
00100 static int nmsg = 25;
00101 if (nmsg-- > 0) MSG("Plex",Msg::kWarning)
00102 << "Ignoring column " << rs.CurColNum()
00103 << " (of " << rs.NumCols() << ")"
00104 << " \""<< colName << "\"; not part of "
00105 << ClassName() << endl;
00106 rs.IncrementCurCol();
00107 }
00108 }
00109 } // end defensive unpacking
00110 else {
00111 // SeqNo int,
00112 // AggregateNo int,
00113 // ElecName tinytext,
00114 // RackEastWest char(1),
00115 // RackLevel char(1),
00116 // RackBay tinyint,
00117 // MuxBoxInRack tinyint,
00118 // DiodeInBox tinyint,
00119 // Gain tinyint,
00120 // PulserBox tinyint,
00121 // LedInBox tinyint
00122
00123 rs >> fAggregate
00124 >> elecName
00125 >> rackEastWest
00126 >> rackLevel
00127 >> rackBay
00128 >> muxboxInRack
00129 >> diodeinbox
00130 >> gain
00131 >> pulserbox
00132 >> ledinbox;
00133
00134 }
00135
00136 ElecType::Elec_t elec = ElecType::CharToEnum(elecName);
00137 if (ElecType::kUnknown == elec) elec = (ElecType::Elec_t) elecType;
00138
00139 fPlexPinDiodeId = PlexPinDiodeId(det,elec,rackEastWest,rackLevel,
00140 rackBay,muxboxInRack,diodeinbox,gain);
00141 fPlexLedId = PlexLedId(det,pulserbox,ledinbox);
00142
00143 }
|
|
|
Reimplemented from DbiTableRow. Definition at line 45 of file PlexPinDiodeToLed.h. 00045 { return fAggregate; }
|
|
|
Definition at line 60 of file PlexPinDiodeToLed.h. 00060 { return fgDefensiveUnpkg; }
|
|
|
Definition at line 47 of file PlexPinDiodeToLed.h. Referenced by Plexus::BuildLedMaps(), and LedIdList::Reset(). 00047 { return fPlexLedId; }
|
|
|
Definition at line 46 of file PlexPinDiodeToLed.h. Referenced by Plexus::BuildLedMaps(). 00046 { return fPlexPinDiodeId; }
|
|
|
Definition at line 58 of file PlexPinDiodeToLed.h. References fgDefensiveUnpkg. 00059 { fgDefensiveUnpkg = defensive; }
|
|
||||||||||||
|
Reimplemented from DbiTableRow. Definition at line 146 of file PlexPinDiodeToLed.cxx. References ElecType::AsString(), fAggregate, fPlexLedId, fPlexPinDiodeId, PlexMuxBoxId::GetEastWest(), PlexMuxBoxId::GetElecType(), PlexPinDiodeId::GetGain(), PlexPinDiodeId::GetInBox(), PlexMuxBoxId::GetInRack(), PlexLedId::GetLedInBox(), PlexLedId::GetPulserBox(), PlexMuxBoxId::GetRackBay(), and PlexMuxBoxId::GetRackLevel(). 00147 {
00148 //
00149 //
00150 // Purpose: Stream object to output row stream
00151 //
00152 // Arguments:
00153 // ors in Output row stream.
00154 // vrec in Associated validity record (or 0 if filling
00155 // DbiValidityRec)
00156 //
00157 // Return:
00158 //
00159 // Contact: R. Hatcher
00160 //
00161 // Specification:-
00162 // =============
00163 //
00164 // o Stream object to output row stream.
00165
00166 // Program Notes:-
00167 // =============
00168
00169 // None.
00170
00171 ElecType::Elec_t elec = fPlexPinDiodeId.GetElecType();
00172 // int numeric = fPlexPinDiodeId.GetNumericMuxBox();
00173 char rackEastWest = fPlexPinDiodeId.GetEastWest();
00174 char rackLevel = fPlexPinDiodeId.GetRackLevel();
00175 int rackBay = fPlexPinDiodeId.GetRackBay();
00176 int muxInRack = fPlexPinDiodeId.GetInRack();
00177
00178
00179 ors << fAggregate
00180 << ElecType::AsString(elec)
00181 << rackEastWest
00182 << rackLevel
00183 << rackBay
00184 << muxInRack
00185 << fPlexPinDiodeId.GetInBox()
00186 << fPlexPinDiodeId.GetGain()
00187 << fPlexLedId.GetPulserBox()
00188 << fPlexLedId.GetLedInBox();
00189 }
|
|
|
Definition at line 71 of file PlexPinDiodeToLed.h. Referenced by Store(). |
|
|
Definition at line 28 of file PlexPinDiodeToLed.cxx. Referenced by SetDefensiveUnpkg(). |
|
|
Definition at line 73 of file PlexPinDiodeToLed.h. Referenced by PlexPinDiodeToLed(), and Store(). |
|
|
Definition at line 72 of file PlexPinDiodeToLed.h. Referenced by PlexPinDiodeToLed(), and Store(). |
1.3.9.1