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

PlexLedId Class Reference

#include <PlexLedId.h>

List of all members.

Public Member Functions

 PlexLedId ()
 PlexLedId (const Detector::Detector_t detector, const UInt_t pulserBox, const UInt_t ledInBox)
virtual ~PlexLedId ()
 PlexLedId (const UInt_t encoded)
UInt_t GetEncoded () const
const char * AsString (Option_t *option="") const
Detector::Detector_t GetDetector () const
UShort_t GetPulserBox () const
UShort_t GetLedInBox () const
Bool_t IsValid () const
void Print (Option_t *option="") const
void SetDetector (Detector::Detector_t detector)
void SetPulserBox (UInt_t pulserBox)
void SetLedInBox (UInt_t ledInBox)

Protected Attributes

UInt_t fEncoded

Friends

Bool_t operator< (const PlexLedId &lhs, const PlexLedId &rhs)
Bool_t operator<= (const PlexLedId &lhs, const PlexLedId &rhs)
Bool_t operator== (const PlexLedId &lhs, const PlexLedId &rhs)
Bool_t operator!= (const PlexLedId &lhs, const PlexLedId &rhs)
Bool_t operator> (const PlexLedId &lhs, const PlexLedId &rhs)
Bool_t operator>= (const PlexLedId &lhs, const PlexLedId &rhs)


Constructor & Destructor Documentation

PlexLedId::PlexLedId  ) 
 

Definition at line 32 of file PlexLedId.cxx.

References defaultPlexLedId.

00033    : fEncoded(defaultPlexLedId)
00034 {
00035    // Default ctor constructs meaningless value
00036 }

PlexLedId::PlexLedId const Detector::Detector_t  detector,
const UInt_t  pulserBox,
const UInt_t  ledInBox
 

Definition at line 39 of file PlexLedId.cxx.

References defaultPlexLedId, SetDetector(), SetLedInBox(), and SetPulserBox().

00041    : fEncoded(defaultPlexLedId)
00042 {
00043    // Normal ctor
00044 
00045    SetDetector(detector);
00046    SetPulserBox(pulserBox);
00047    SetLedInBox(ledInBox);
00048 }

PlexLedId::~PlexLedId  )  [virtual]
 

Definition at line 58 of file PlexLedId.cxx.

00059 {
00060    // delete all the owned sub-objects
00061 }

PlexLedId::PlexLedId const UInt_t  encoded  ) 
 

Definition at line 51 of file PlexLedId.cxx.

00052    : fEncoded(encoded)
00053 {
00054    // constructor from pre-encoded value
00055 }


Member Function Documentation

const char * PlexLedId::AsString Option_t *  option = ""  )  const
 

Definition at line 74 of file PlexLedId.cxx.

References GetDetector(), GetLedInBox(), GetPulserBox(), and option.

Referenced by Plexus::BuildLedMaps(), FitNdNonlinQuad(), Print(), and LISummarySorter::ReconstructPin().

00075 {
00076    // Return unpacked PlexLedId as a string
00077    // User should copy result because it points to a 
00078    // statically allocated string.
00079    // Internally uses a circular list of buffers to avoid problems
00080    // using AsString multiple times in a cout-like situation.
00081 
00082    const int nbuffers = 8;  // use a circular list of strings
00083    static char newstring[nbuffers][64];  // "LED-DPP-II";
00084    static int ibuffer = nbuffers;
00085    ibuffer = (ibuffer+1)%nbuffers;  // each time move to next buffer
00086 
00087    switch (option[0]) {
00088    default:
00089       sprintf(newstring[ibuffer],"LED-%1.1s%2.2d-%2.2d",
00090               Detector::AsString(GetDetector()),
00091               GetPulserBox(),GetLedInBox());
00092       break;
00093    }
00094    
00095    return newstring[ibuffer];
00096 }

Detector::Detector_t PlexLedId::GetDetector  )  const [inline]
 

Definition at line 121 of file PlexLedId.h.

References fEncoded.

Referenced by AsString().

00122 { 
00123    Int_t bitField = 
00124      ( fEncoded & maskPlexLedIdDetector ) >> shftPlexLedIdDetector;
00125    return (Detector::Detector_t) bitField;   
00126 }

UInt_t PlexLedId::GetEncoded  )  const [inline]
 

Definition at line 39 of file PlexLedId.h.

Referenced by PulserSummaryList::GetAggregateNo(), PulserFromRawSummaryList::GetAggregateNo(), PulserSigLinCalScheme::GetDriftFar(), PulserSigLinCalScheme::GetDriftPoint(), LIPlexMaps::MakePinPlexTables(), and LIPlexMaps::MakePlexStripEndToLed().

00039 {return fEncoded;}

UShort_t PlexLedId::GetLedInBox  )  const [inline]
 

Definition at line 133 of file PlexLedId.h.

References fEncoded.

Referenced by LIRawNt::Ana(), AsString(), CheckGC::checklin(), FitNdNonlinQuad(), PulserSigLinCalScheme::GetDriftFar(), PulserDriftCalScheme::GetDriftFar(), PulserSigLinCalScheme::GetDriftPoint(), PulserDriftCalScheme::GetDriftPoint(), LIPlexMaps::GetRawPinLedMap(), LIPatternFinderFancy::IsLightInjectionTrash(), LIPlexMaps::MakePinPlexTables(), Plotter::myGetPinDiodeIds(), Plotter::Plot(), LIPlexMaps::PlotPlexStripMap(), LISummarySorter::ReconstructPin(), LISummarySorter::ReconstructStripEnd(), PulserGainFit::RunNearFarFits(), PlexStripEndToLed::Store(), PlexPinDiodeToLed::Store(), and LIAnalysis::WriteGainsTextFile().

00134 {
00135    return (fEncoded & maskPlexLedIdLedInBox ) >> shftPlexLedIdLedInBox;
00136 }

UShort_t PlexLedId::GetPulserBox  )  const [inline]
 

Definition at line 128 of file PlexLedId.h.

References fEncoded.

Referenced by LIRawNt::Ana(), AsString(), CheckGC::checklin(), FitNdNonlinQuad(), PulserSigLinCalScheme::GetDriftFar(), PulserDriftCalScheme::GetDriftFar(), PulserSigLinCalScheme::GetDriftPoint(), PulserDriftCalScheme::GetDriftPoint(), LIPlexMaps::GetRawPinLedMap(), LIPatternFinderFancy::IsLightInjectionTrash(), LIPlexMaps::MakePinPlexTables(), LIPlexMaps::PlotPlexStripMap(), LISummarySorter::ReconstructPin(), LISummarySorter::ReconstructStripEnd(), PulserGainFit::RunNearFarFits(), PlexStripEndToLed::Store(), PlexPinDiodeToLed::Store(), and LIAnalysis::WriteGainsTextFile().

00129 {
00130    return (fEncoded & maskPlexLedIdPulserBox ) >> shftPlexLedIdPulserBox;
00131 }

Bool_t PlexLedId::IsValid  )  const [inline]
 

Definition at line 138 of file PlexLedId.h.

References fEncoded.

Referenced by LIPlexMaps::PlotPlexStripMap(), LISummarySorter::ReconstructPin(), and LISummarySorter::ReconstructStripEnd().

00139 { 
00140    // test whether this is the nonsensical default value
00141    return fEncoded != defaultPlexLedId;
00142 }

void PlexLedId::Print Option_t *  option = ""  )  const
 

Definition at line 99 of file PlexLedId.cxx.

References AsString(), and option.

00100 {
00101    // Print the (decoded) value
00102 
00103    printf("%s\n",AsString(option));
00104 }

void PlexLedId::SetDetector Detector::Detector_t  detector  )  [inline]
 

Definition at line 144 of file PlexLedId.h.

References fEncoded.

Referenced by PlexLedId().

00145 {
00146    fEncoded = ( fEncoded & ~maskPlexLedIdDetector ) | 
00147       ( ( detector << shftPlexLedIdDetector ) & maskPlexLedIdDetector );
00148 }

void PlexLedId::SetLedInBox UInt_t  ledInBox  )  [inline]
 

Definition at line 156 of file PlexLedId.h.

References fEncoded.

Referenced by PlexLedId().

00157 {
00158    fEncoded = ( fEncoded & ~maskPlexLedIdLedInBox ) |
00159       ( ( ledInBox << shftPlexLedIdLedInBox ) & maskPlexLedIdLedInBox );
00160 }

void PlexLedId::SetPulserBox UInt_t  pulserBox  )  [inline]
 

Definition at line 150 of file PlexLedId.h.

References fEncoded.

Referenced by PlexLedId().

00151 {
00152    fEncoded = ( fEncoded & ~maskPlexLedIdPulserBox ) |
00153       ( ( pulserBox << shftPlexLedIdPulserBox ) & maskPlexLedIdPulserBox );
00154 }


Friends And Related Function Documentation

Bool_t operator!= const PlexLedId lhs,
const PlexLedId rhs
[friend]
 

Definition at line 112 of file PlexLedId.h.

00113 { return lhs.fEncoded != rhs.fEncoded; }

Bool_t operator< const PlexLedId lhs,
const PlexLedId rhs
[friend]
 

Definition at line 103 of file PlexLedId.h.

00104 { return lhs.fEncoded <  rhs.fEncoded; }

Bool_t operator<= const PlexLedId lhs,
const PlexLedId rhs
[friend]
 

Definition at line 106 of file PlexLedId.h.

00107 { return lhs.fEncoded <= rhs.fEncoded; }

Bool_t operator== const PlexLedId lhs,
const PlexLedId rhs
[friend]
 

Definition at line 109 of file PlexLedId.h.

00110 { return lhs.fEncoded == rhs.fEncoded; }

Bool_t operator> const PlexLedId lhs,
const PlexLedId rhs
[friend]
 

Definition at line 115 of file PlexLedId.h.

00116 { return lhs.fEncoded >  rhs.fEncoded; }

Bool_t operator>= const PlexLedId lhs,
const PlexLedId rhs
[friend]
 

Definition at line 118 of file PlexLedId.h.

00119 { return lhs.fEncoded >= rhs.fEncoded; }


Member Data Documentation

UInt_t PlexLedId::fEncoded [protected]
 

Definition at line 67 of file PlexLedId.h.

Referenced by GetDetector(), GetLedInBox(), GetPulserBox(), IsValid(), operator!=(), operator<(), operator<=(), operator==(), operator>(), operator>=(), SetDetector(), SetLedInBox(), and SetPulserBox().


The documentation for this class was generated from the following files:
Generated on Sat Nov 21 22:51:43 2009 for loon by  doxygen 1.3.9.1