PlexHandle Class Reference

#include <PlexHandle.h>

Inheritance diagram for PlexHandle:
PlexusABC

List of all members.

Public Member Functions

 PlexHandle (const VldContext &vldc, Bool_t shared=kTRUE)
 PlexHandle (const PlexHandle &ph)
virtual ~PlexHandle ()
PlexHandleoperator= (const PlexHandle &ph)
virtual RawChannelId GetRawChannelId (const PlexStripEndId &seid) const
virtual RawChannelId GetRawChannelId (const PlexPixelSpotId &psid) const
virtual RawChannelId GetRawChannelId (const PlexPinDiodeId &diodeid) const
virtual PlexSEIdAltL GetSEIdAltL (const RawChannelId &rcid, const PlexCalib *calib=0, Int_t adc=0, Double_t time=0) const
virtual PlexStripEndId GetStripEndId (const PlexPixelSpotId &psid) const
virtual std::vector
< PlexPixelSpotId
GetPixelSpotIdVector (const RawChannelId &rcid, bool uniquePixels=false) const
virtual PlexPixelSpotId GetPixelSpotId (const PlexStripEndId &seid) const
virtual PlexPinDiodeId GetPinDiodeId (const RawChannelId &rcid) const
virtual ReadoutType::Readout_t GetReadoutType (const RawChannelId &rcid) const
virtual std::string GetSpecialDescript (const RawChannelId &rcid) const
virtual RawChannelId GetSpecialChannelContains (const std::string &key) const
virtual const std::map
< RawChannelId, std::string > & 
GetSpecialDescriptMap () const
virtual std::vector
< PlexStripEndId
GetStripEndIdVector (const PlexLedId &ledid) const
virtual std::pair
< PlexPinDiodeId,
PlexPinDiodeId
GetPinDiodeIds (const PlexLedId &ledid) const
virtual PlexLedId GetLedId (const PlexStripEndId &seid) const
virtual PlexLedId GetLedId (const PlexPinDiodeId &diodeid) const
virtual RawChannelId GetTpmtFromLedPulserBox (Int_t ipb) const
virtual Int_t GetLedPulserBoxFromTpmt (const RawChannelId &rcid) const
virtual const std::vector
< PlexStripEndId > & 
GetAllStrips () const
virtual const std::vector
< PlexStripEndId > & 
GetAllStripEnds (StripEnd::StripEnd_t restrictEnd=StripEnd::kUnknown) const
virtual const std::vector
< PlexPixelSpotId > & 
GetAllPixelSpots () const
virtual const std::vector
< PlexPixelSpotId > & 
GetAllPixels () const
virtual const std::vector
< PlexPixelSpotId > & 
GetAllTubes () const
virtual const std::vector
< RawChannelId > & 
GetAllRawChannelIds () const
virtual const std::vector
< PlexPinDiodeId > & 
GetAllPinDiodes () const
virtual const std::vector
< PlexLedId > & 
GetAllLeds () const
virtual const VldRangeGetVldRange () const
void Print (Option_t *option="s") const
virtual void ValidateConsistency () const

Private Member Functions

 PlexHandle ()
void Copy (PlexHandle &ph) const
void Copy (TObject &object) const

Private Attributes

PlexusfPlexus

Detailed Description

Definition at line 22 of file PlexHandle.h.


Constructor & Destructor Documentation

PlexHandle::PlexHandle ( const VldContext vldc,
Bool_t  shared = kTRUE 
)

Definition at line 41 of file PlexHandle.cxx.

References fPlexus, VldContext::GetDetector(), PlexLoanPool::GetPlexus(), Plexus::IncrementRef(), PlexLoanPool::Instance(), Detector::kFar, and PlexVetoShieldHack::SetDefaultContext().

00042 {
00043    // Build a handle to a plexus
00044    // Get plexus from the loan pool (which will build it if necessary)
00045 
00046    // complete hack to keep a "global" context so that decisions about 
00047    // veto shield configuration can be made in a pseudo-vacuum.
00048    // set this *before* going to the loan pool
00049    if (vldc.GetDetector() == Detector::kFar) 
00050      PlexVetoShieldHack::SetDefaultContext(vldc);
00051 
00052    fPlexus = PlexLoanPool::Instance()->GetPlexus(vldc,shared);
00053    fPlexus->IncrementRef();
00054 }

PlexHandle::PlexHandle ( const PlexHandle ph  ) 

Definition at line 57 of file PlexHandle.cxx.

References fPlexus, and Plexus::IncrementRef().

00057                                            : PlexusABC()
00058 {
00059    // Copy constructor keeps reference count up-to-date
00060 
00061    // patterned after other ROOT objects
00062 
00063    ((PlexHandle&)ph).Copy(*this);
00064    fPlexus->IncrementRef();
00065 }

PlexHandle::~PlexHandle (  )  [virtual]

Definition at line 68 of file PlexHandle.cxx.

References Plexus::DecrementRef(), and fPlexus.

00069 {
00070    // handle deletion updates reference count
00071    fPlexus->DecrementRef();
00072 
00073 }

PlexHandle::PlexHandle (  )  [private]

Definition at line 30 of file PlexHandle.cxx.

References Msg::kFatal, and MSG.

00031    : fPlexus(0)
00032 {
00033    // Default constructor
00034 
00035    MSG("Plex",Msg::kFatal) <<
00036       "PlexHandle created by default ctor" << endl;
00037    assert(0);
00038 }


Member Function Documentation

void PlexHandle::Copy ( TObject &  object  )  const [private]

Definition at line 98 of file PlexHandle.cxx.

References Copy(), fPlexus, Msg::kFatal, and MSG.

00099 {
00100    // Copy method 
00101 
00102    // patterned after other ROOT objects
00103 
00104    MSG("Plex",Msg::kFatal) <<
00105       "PlexHandle copied from generic TObject" << endl;
00106 
00107    TObject::Copy(obj);
00108    ((PlexHandle&)obj).fPlexus = fPlexus;
00109 }

void PlexHandle::Copy ( PlexHandle ph  )  const [private]

Definition at line 88 of file PlexHandle.cxx.

References fPlexus.

Referenced by Copy().

00089 {
00090    // Copy method 
00091 
00092    // patterned after other ROOT objects
00093 
00094    TObject::Copy(obj);
00095    ((PlexHandle&)obj).fPlexus = fPlexus;
00096 }

const std::vector< PlexLedId > & PlexHandle::GetAllLeds (  )  const [inline, virtual]

Definition at line 244 of file PlexHandle.h.

References fPlexus, and Plexus::GetAllLeds().

00245 { return fPlexus->GetAllLeds(); }

const std::vector< PlexPinDiodeId > & PlexHandle::GetAllPinDiodes (  )  const [inline, virtual]

Definition at line 239 of file PlexHandle.h.

References fPlexus, and Plexus::GetAllPinDiodes().

00240 { return fPlexus->GetAllPinDiodes(); }

const std::vector< PlexPixelSpotId > & PlexHandle::GetAllPixels (  )  const [inline, virtual]

Implements PlexusABC.

Definition at line 224 of file PlexHandle.h.

References fPlexus, and Plexus::GetAllPixels().

00225 { return fPlexus->GetAllPixels(); }

const std::vector< PlexPixelSpotId > & PlexHandle::GetAllPixelSpots (  )  const [inline, virtual]

Implements PlexusABC.

Definition at line 219 of file PlexHandle.h.

References fPlexus, and Plexus::GetAllPixelSpots().

00220 { return fPlexus->GetAllPixelSpots(); }

const std::vector< RawChannelId > & PlexHandle::GetAllRawChannelIds (  )  const [inline, virtual]

Implements PlexusABC.

Definition at line 234 of file PlexHandle.h.

References fPlexus, and Plexus::GetAllRawChannelIds().

00235 { return fPlexus->GetAllRawChannelIds(); }

const std::vector< PlexStripEndId > & PlexHandle::GetAllStripEnds ( StripEnd::StripEnd_t  restrictEnd = StripEnd::kUnknown  )  const [inline, virtual]

Implements PlexusABC.

Definition at line 214 of file PlexHandle.h.

References fPlexus, and Plexus::GetAllStripEnds().

Referenced by FitNdNonlinQuad(), and PulserTimingPoint::PulserTimingPoint().

00215 { return fPlexus->GetAllStripEnds(restrictEnd); }

const std::vector< PlexStripEndId > & PlexHandle::GetAllStrips (  )  const [inline, virtual]

Definition at line 209 of file PlexHandle.h.

References fPlexus, Plexus::GetAllStripEnds(), and StripEnd::kWhole.

const std::vector< PlexPixelSpotId > & PlexHandle::GetAllTubes (  )  const [inline, virtual]

Implements PlexusABC.

Definition at line 229 of file PlexHandle.h.

References fPlexus, and Plexus::GetAllTubes().

Referenced by pmt_plot().

00230 { return fPlexus->GetAllTubes(); }

PlexLedId PlexHandle::GetLedId ( const PlexPinDiodeId diodeid  )  const [inline, virtual]

Implements PlexusABC.

Definition at line 204 of file PlexHandle.h.

References fPlexus, and Plexus::GetLedId().

00205 { return fPlexus->GetLedId(diodeid); }

PlexLedId PlexHandle::GetLedId ( const PlexStripEndId seid  )  const [inline, virtual]
Int_t PlexHandle::GetLedPulserBoxFromTpmt ( const RawChannelId rcid  )  const [virtual]

Definition at line 118 of file PlexHandle.cxx.

References GetReadoutType(), GetSpecialDescript(), and ReadoutType::kFlashTrigPMT.

00119 {
00120   if ( GetReadoutType(rcid) != ReadoutType::kFlashTrigPMT ) return -1;
00121   // hopefully the DB has the PB info in it.
00122   std::string descript = GetSpecialDescript(rcid);
00123   Int_t ipb = 999;  //
00124   sscanf(descript.c_str(),"FlashTrigPMT-PulserBox%02d",&ipb);
00125   return ipb;
00126 }

PlexPinDiodeId PlexHandle::GetPinDiodeId ( const RawChannelId rcid  )  const [inline, virtual]

Implements PlexusABC.

Definition at line 164 of file PlexHandle.h.

References fPlexus, and Plexus::GetPinDiodeId().

Referenced by LILookup::GetPinDiodeIds(), and Plotter::myGetPinDiodeIds().

00165 { return fPlexus->GetPinDiodeId(rcid); }

std::pair< PlexPinDiodeId, PlexPinDiodeId > PlexHandle::GetPinDiodeIds ( const PlexLedId ledid  )  const [inline, virtual]
PlexPixelSpotId PlexHandle::GetPixelSpotId ( const PlexStripEndId seid  )  const [inline, virtual]
std::vector< PlexPixelSpotId > PlexHandle::GetPixelSpotIdVector ( const RawChannelId rcid,
bool  uniquePixels = false 
) const [inline, virtual]

Implements PlexusABC.

Definition at line 154 of file PlexHandle.h.

References fPlexus, and Plexus::GetPixelSpotIdVector().

00155 { return fPlexus->GetPixelSpotIdVector(rcid,uniquePixels); }

RawChannelId PlexHandle::GetRawChannelId ( const PlexPinDiodeId diodeid  )  const [inline, virtual]

Implements PlexusABC.

Definition at line 137 of file PlexHandle.h.

References fPlexus, and Plexus::GetRawChannelId().

00138 { return fPlexus->GetRawChannelId(diodeid); }

RawChannelId PlexHandle::GetRawChannelId ( const PlexPixelSpotId psid  )  const [inline, virtual]

Implements PlexusABC.

Definition at line 132 of file PlexHandle.h.

References fPlexus, and Plexus::GetRawChannelId().

00133 { return fPlexus->GetRawChannelId(psid); }

RawChannelId PlexHandle::GetRawChannelId ( const PlexStripEndId seid  )  const [inline, virtual]
ReadoutType::Readout_t PlexHandle::GetReadoutType ( const RawChannelId rcid  )  const [inline, virtual]
PlexSEIdAltL PlexHandle::GetSEIdAltL ( const RawChannelId rcid,
const PlexCalib calib = 0,
Int_t  adc = 0,
Double_t  time = 0 
) const [inline, virtual]
RawChannelId PlexHandle::GetSpecialChannelContains ( const std::string &  key  )  const [inline, virtual]

Definition at line 179 of file PlexHandle.h.

References fPlexus, and Plexus::GetSpecialChannelContains().

Referenced by GetTpmtFromLedPulserBox(), and AlgCalDetSI::RunAlg().

00180 { return fPlexus->GetSpecialChannelContains(key); }

std::string PlexHandle::GetSpecialDescript ( const RawChannelId rcid  )  const [inline, virtual]

Definition at line 174 of file PlexHandle.h.

References fPlexus, and Plexus::GetSpecialDescript().

Referenced by GetLedPulserBoxFromTpmt().

00175 { return fPlexus->GetSpecialDescript(rcid); }

const std::map< RawChannelId, std::string > & PlexHandle::GetSpecialDescriptMap (  )  const [inline, virtual]

Definition at line 184 of file PlexHandle.h.

References fPlexus, and Plexus::GetSpecialDescriptMap().

Referenced by AlgCalDetSI::RunAlg().

00185 { return fPlexus->GetSpecialDescriptMap(); } 

PlexStripEndId PlexHandle::GetStripEndId ( const PlexPixelSpotId psid  )  const [inline, virtual]
std::vector< PlexStripEndId > PlexHandle::GetStripEndIdVector ( const PlexLedId ledid  )  const [inline, virtual]

Implements PlexusABC.

Definition at line 189 of file PlexHandle.h.

References fPlexus, and Plexus::GetStripEndIdVector().

Referenced by PEGainModule::FinishPoint(), and PhotonInjector::SimulateEvent().

00190 { return fPlexus->GetStripEndIdVector(ledid); }

RawChannelId PlexHandle::GetTpmtFromLedPulserBox ( Int_t  ipb  )  const [virtual]

Definition at line 113 of file PlexHandle.cxx.

References Form(), and GetSpecialChannelContains().

00114 {
00115   return GetSpecialChannelContains(Form("PulserBox%02d",ipb));
00116 }

const VldRange & PlexHandle::GetVldRange (  )  const [inline, virtual]

Implements PlexusABC.

Definition at line 249 of file PlexHandle.h.

References fPlexus, and Plexus::GetVldRange().

Referenced by LISummarySorter::SetPlexHandle(), and ShieldGeom::SetupShieldGeom().

00250 { return fPlexus->GetVldRange(); }

PlexHandle & PlexHandle::operator= ( const PlexHandle ph  ) 

Definition at line 76 of file PlexHandle.cxx.

References Plexus::DecrementRef(), fPlexus, and Plexus::IncrementRef().

00077 {
00078    // assignment keeps reference counts up-to-date
00079 
00080    fPlexus->DecrementRef();
00081    ((PlexHandle&)ph).Copy(*this);
00082    fPlexus->IncrementRef();
00083 
00084    return *this;
00085 }

void PlexHandle::Print ( Option_t *  option = "s"  )  const [inline]

Definition at line 254 of file PlexHandle.h.

References fPlexus, and Plexus::Print().

00255 { fPlexus->Print(option); }

void PlexHandle::ValidateConsistency (  )  const [inline, virtual]

Definition at line 259 of file PlexHandle.h.

References fPlexus, and Plexus::ValidateConsistency().


Member Data Documentation


The documentation for this class was generated from the following files:

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1