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

Public Member Functions | |
| PlexPinDiodeId () | |
| PlexPinDiodeId (Detector::Detector_t detector, ElecType::Elec_t electronics, Char_t eastwest, Char_t racklevel, UInt_t rackbay, UInt_t inrack, UInt_t inbox, UInt_t gain) | |
| PlexPinDiodeId (PlexMuxBoxId muxbox, UInt_t inbox, UInt_t gain) | |
| virtual | ~PlexPinDiodeId () |
| PlexPinDiodeId (const UInt_t encoded) | |
| UInt_t | GetEncoded () const |
| const char * | AsString (Option_t *option="") const |
| UShort_t | GetInBox () const |
| UShort_t | GetGain () const |
| Bool_t | IsHighGain () const |
| Bool_t | IsLowGain () const |
| Bool_t | IsValid () const |
| void | Print (Option_t *option="") const |
| void | SetInBox (UInt_t inbox) |
| void | SetGain (UInt_t gain) |
Friends | |
| Bool_t | operator< (const PlexPinDiodeId &lhs, const PlexPinDiodeId &rhs) |
| Bool_t | operator<= (const PlexPinDiodeId &lhs, const PlexPinDiodeId &rhs) |
| Bool_t | operator== (const PlexPinDiodeId &lhs, const PlexPinDiodeId &rhs) |
| Bool_t | operator!= (const PlexPinDiodeId &lhs, const PlexPinDiodeId &rhs) |
| Bool_t | operator> (const PlexPinDiodeId &lhs, const PlexPinDiodeId &rhs) |
| Bool_t | operator>= (const PlexPinDiodeId &lhs, const PlexPinDiodeId &rhs) |
|
|
Definition at line 36 of file PlexPinDiodeId.cxx. 00037 : PlexMuxBoxId() 00038 { 00039 // Default ctor constructs meaningless value 00040 }
|
|
||||||||||||||||||||||||||||||||||||
|
Definition at line 43 of file PlexPinDiodeId.cxx. References SetGain(), and SetInBox(). 00048 : PlexMuxBoxId(detector,elec,eastwest,racklevel,rackbay,inrack) 00049 { 00050 // Normal ctor 00051 00052 SetInBox(inbox); 00053 SetGain(gain); 00054 }
|
|
||||||||||||||||
|
Definition at line 57 of file PlexPinDiodeId.cxx. References SetGain(), and SetInBox(). 00059 : PlexMuxBoxId(muxbox) 00060 { 00061 // Normal ctor 00062 00063 SetInBox(inbox); 00064 SetGain(gain); 00065 }
|
|
|
Definition at line 75 of file PlexPinDiodeId.cxx. 00076 {
00077 // delete all the owned sub-objects
00078 }
|
|
|
Definition at line 68 of file PlexPinDiodeId.cxx. 00069 : PlexMuxBoxId(encoded) 00070 { 00071 // constructor from pre-encoded value 00072 }
|
|
|
Reimplemented from PlexMuxBoxId. Definition at line 81 of file PlexPinDiodeId.cxx. References PlexMuxBoxId::AsString(), GetInBox(), IsLowGain(), and option. Referenced by Plexus::BuildLedMaps(), Plexus::BuildPinDiodeMap(), FitNdNonlinQuad(), LISummarySorter::GetMuxBoxInfo(), Plexus::GetPinDiodeIds(), Print(), and LISummarySorter::ReconstructPin(). 00082 {
00083 // Return unpacked PlexPinDiodeId as a string
00084 // User should copy result because it points to a
00085 // statically allocated string.
00086 // Internally uses a circular list of buffers to avoid problems
00087 // using AsString multiple times in a cout-like situation.
00088
00089 const int nbuffers = 8; // use a circular list of strings
00090 static char newstring[nbuffers][64];
00091 static int ibuffer = nbuffers;
00092 ibuffer = (ibuffer+1)%nbuffers; // each time move to next buffer
00093
00094 string opt = option;
00095 bool extended = (opt.find("e") != string::npos);
00096
00097 const char* efmt = "%s-PIN-%3.3d%c";
00098 if (extended) efmt = "%s-PIN-diode %3.3d gain %c";
00099
00100 const char* muxAsString = PlexMuxBoxId::AsString(option);
00101 sprintf(newstring[ibuffer],efmt,muxAsString,GetInBox(),(IsLowGain()?'L':'H'));
00102
00103 return newstring[ibuffer];
00104 }
|
|
|
Reimplemented from PlexMuxBoxId. Definition at line 132 of file PlexPinDiodeId.h. References PlexMuxBoxId::ConvertToVersion2(). Referenced by PulserLinearityCalScheme::DecalLinNear(), FitNdNonlinQuad(), PulserRefDriftPin::GetIndex(), PulserRawGainPin::GetIndex(), PulserRawDriftPin::GetIndex(), PulserGainPin::GetIndex(), PulserDriftPin::GetIndex(), PulserLinearityCalScheme::GetLinNear(), HardwareComponent::HardwareComponent(), PEGainModule::MakeDebugTree(), and Plotter::Plot(). 00133 { ConvertToVersion2(); return fEncoded; }
|
|
|
Definition at line 141 of file PlexPinDiodeId.h. References PlexMuxBoxId::ConvertToVersion2(). Referenced by CheckGC::checklin(), PulserLinearityCalScheme::DecalLinNear(), FitNdNonlinQuad(), PulserLinearityCalScheme::GetLinNear(), PulserGainFit::GetPinData(), IsHighGain(), IsLowGain(), LIPlexMaps::PrintDbPinDiodeInfo(), LISummarySorter::ReconstructPin(), PulserRefDriftPin::Store(), PulserRawGainPin::Store(), PulserRawDriftPin::Store(), PulserGainPin::Store(), PulserDriftPin::Store(), PlexRawChannelToPinDiode::Store(), and PlexPinDiodeToLed::Store(). 00142 {
00143 ConvertToVersion2();
00144 return (fEncoded & maskPlexPinGain ) >> shftPlexPinGain;
00145 }
|
|
|
Definition at line 135 of file PlexPinDiodeId.h. References PlexMuxBoxId::ConvertToVersion2(). Referenced by AsString(), FitNdNonlinQuad(), LIPlexMaps::PrintDbPinDiodeInfo(), LISummarySorter::ReconstructPin(), PulserRefDriftPin::Store(), PulserRawGainPin::Store(), PulserRawDriftPin::Store(), PulserGainPin::Store(), PulserDriftPin::Store(), PlexRawChannelToPinDiode::Store(), and PlexPinDiodeToLed::Store(). 00136 {
00137 ConvertToVersion2();
00138 return (fEncoded & maskPlexPinInBox ) >> shftPlexPinInBox;
00139 }
|
|
|
Definition at line 49 of file PlexPinDiodeId.h. References GetGain(). Referenced by Plexus::GetPinDiodeIds(). 00049 { return GetGain()==0; }
|
|
|
Definition at line 50 of file PlexPinDiodeId.h. References GetGain(). Referenced by AsString(), and FitNdNonlinQuad(). 00050 { return GetGain()==1; }
|
|
|
Reimplemented from PlexMuxBoxId. Definition at line 161 of file PlexPinDiodeId.h. Referenced by Plexus::GetPinDiodeIds(), and LISummarySorter::ReconstructPin(). 00162 {
00163 // test whether this is the nonsensical default value
00164 return ( fEncoded & zeroPlexMuxVersion ) != defaultMuxBoxId;
00165 // (fEncoded&~(maskPlexMuxVersion|maskPlexPinInBox|maskPlexPinGain)) != defaultMuxBoxId;
00166 }
|
|
|
Reimplemented from PlexMuxBoxId. Definition at line 107 of file PlexPinDiodeId.cxx. References AsString(), and option. Referenced by LIPlexMaps::GetRawPinLedMap(), LIPlexMaps::GetRawPinMap(), and LIPlexMaps::GetRefAdcPinRatio(). 00108 {
00109 // Print the (decoded) value
00110
00111 printf("%s\n",AsString(option));
00112 }
|
|
|
Definition at line 154 of file PlexPinDiodeId.h. References PlexMuxBoxId::ConvertToVersion2(). Referenced by PlexPinDiodeId(). 00155 {
00156 ConvertToVersion2();
00157 fEncoded = (fEncoded & ~maskPlexPinGain) |
00158 ( ( gain << shftPlexPinGain ) & maskPlexPinGain );
00159 }
|
|
|
Definition at line 147 of file PlexPinDiodeId.h. References PlexMuxBoxId::ConvertToVersion2(). Referenced by PlexPinDiodeId(). 00148 {
00149 ConvertToVersion2();
00150 fEncoded = (fEncoded & ~maskPlexPinInBox) |
00151 ( ( inbox << shftPlexPinInBox ) & maskPlexPinInBox );
00152 }
|
|
||||||||||||
|
Definition at line 120 of file PlexPinDiodeId.h. 00121 { lhs.ConvertToVersion2(); rhs.ConvertToVersion2();
00122 return lhs.fEncoded != rhs.fEncoded; }
|
|
||||||||||||
|
Definition at line 108 of file PlexPinDiodeId.h. 00109 { lhs.ConvertToVersion2(); rhs.ConvertToVersion2();
00110 return lhs.fEncoded < rhs.fEncoded; }
|
|
||||||||||||
|
Definition at line 112 of file PlexPinDiodeId.h. 00113 { lhs.ConvertToVersion2(); rhs.ConvertToVersion2();
00114 return lhs.fEncoded <= rhs.fEncoded; }
|
|
||||||||||||
|
Definition at line 116 of file PlexPinDiodeId.h. 00117 { lhs.ConvertToVersion2(); rhs.ConvertToVersion2();
00118 return lhs.fEncoded == rhs.fEncoded; }
|
|
||||||||||||
|
Definition at line 124 of file PlexPinDiodeId.h. 00125 { lhs.ConvertToVersion2(); rhs.ConvertToVersion2();
00126 return lhs.fEncoded > rhs.fEncoded; }
|
|
||||||||||||
|
Definition at line 128 of file PlexPinDiodeId.h. 00129 { lhs.ConvertToVersion2(); rhs.ConvertToVersion2();
00130 return lhs.fEncoded >= rhs.fEncoded; }
|
1.3.9.1