Plexus Class Reference

#include <Plexus.h>

Inheritance diagram for Plexus:

PlexusABC PlexusReroot List of all members.

Public Types

typedef enum Plexus::EMapSets MapSets_t
 kPixelMaps = 0x0001
 kReadoutMap = 0x0002
 kPinDiodeMap = 0x0004
 kLedMaps = 0x0008
 kAllVectors = 0x0010
enum  EMapSets {
  kPixelMaps = 0x0001, kReadoutMap = 0x0002, kPinDiodeMap = 0x0004, kLedMaps = 0x0008,
  kAllVectors = 0x0010
}

Public Member Functions

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< PlexPixelSpotIdGetPixelSpotIdVector (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< PlexStripEndIdGetStripEndIdVector (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 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 IncrementRef ()
void DecrementRef ()
Int_t CountRef () const
void Print (Option_t *option) const
Bool_t IsCompatible (const VldContext &vldc)
Bool_t IsCompatible (const VldContext *vldc)
virtual void ValidateConsistency () const
 Plexus ()

Static Public Member Functions

static void SetAltLHasBrokenFibers (Bool_t tf)
static Bool_t GetAltLHasBrokenFibers ()
static void SetAltLInitiallySortedBySEId (Bool_t tf)
static Bool_t GetAltLInitiallySortedBySEId ()

Protected Types

typedef enum Plexus::ETrimSpots TrimSpots_t
 kIncludeSpot
 kIncludePixel
 kIncludeTube
enum  ETrimSpots { kIncludeSpot, kIncludePixel, kIncludeTube }

Protected Member Functions

 Plexus (const VldContext &vldc)
virtual ~Plexus ()
virtual void BuildPixelMaps (const VldContext &vldc) const
virtual void BuildReadoutMap (const VldContext &vldc) const
virtual void BuildPinDiodeMap (const VldContext &vldc) const
virtual void BuildLedMaps (const VldContext &vldc) const
virtual void PurgeComponents (UInt_t purgeMask)
void TrimVldRange (const char *tblName="", const DbiValidityRec *dbivrec=0) const
virtual const std::vector<
PlexPixelSpotId > & 
GetAllPixelSpotIds (ETrimSpots trim) const

Protected Attributes

Int_t fRef
VldRange fVldRange
 outstanding handles
UInt_t fBuiltMaps
std::multimap< RawChannelId,
PlexPixelSpotId
fChannelToPixel
std::multimap< PlexPixelSpotId,
PlexStripEndId
fPixelToStripEnd
std::map< PlexStripEndId,
PlexPixelSpotId
fStripEndToSpot
std::map< PlexPixelSpotId,
RawChannelId
fPixelToChannel
std::map< RawChannelId, UShort_t > fChannelToReadout
std::map< RawChannelId, std::string > fSpecialDescript
std::map< RawChannelId, PlexPinDiodeIdfChannelToPinDiode
std::map< PlexStripEndId,
PlexLedId
fStripEndToLed
std::map< PlexPinDiodeId,
PlexLedId
fPinDiodeToLed
std::vector< PlexStripEndIdfAllStripEnds
std::vector< PlexStripEndIdfAllEastEnds
std::vector< PlexStripEndIdfAllWestEnds
std::vector< PlexStripEndIdfAllStrips
std::vector< PlexPixelSpotIdfAllTubes
std::vector< PlexPixelSpotIdfAllPixels
std::vector< PlexPixelSpotIdfAllSpots
std::vector< RawChannelIdfAllChannels
std::vector< PlexPinDiodeIdfAllPinDiodes
std::vector< PlexLedIdfAllLeds

Static Protected Attributes

static Bool_t fgAltLHasBrokenFibers = false
static Bool_t fgAltLInitiallySortedBySEId = true

Friends

class PlexLoanPool

Detailed Description

Definition at line 21 of file Plexus.h.


Member Typedef Documentation

typedef enum Plexus::EMapSets Plexus::MapSets_t

typedef enum Plexus::ETrimSpots Plexus::TrimSpots_t [protected]


Member Enumeration Documentation

enum Plexus::EMapSets

Enumerator:
kPixelMaps 
kReadoutMap 
kPinDiodeMap 
kLedMaps 
kAllVectors 

Definition at line 101 of file Plexus.h.

00101                          {
00102      kPixelMaps      = 0x0001,
00103      kReadoutMap     = 0x0002,
00104      kPinDiodeMap    = 0x0004,
00105      kLedMaps        = 0x0008,
00106      kAllVectors     = 0x0010
00107    } MapSets_t;

enum Plexus::ETrimSpots [protected]

Enumerator:
kIncludeSpot 
kIncludePixel 
kIncludeTube 

Definition at line 124 of file Plexus.h.

00124                            {
00125      kIncludeSpot, 
00126      kIncludePixel, 
00127      kIncludeTube 
00128    } TrimSpots_t;


Constructor & Destructor Documentation

Plexus::Plexus (  ) 

Definition at line 59 of file Plexus.cxx.

References Msg::kVerbose, and MSG.

Referenced by PlexLoanPool::BuildPlexus().

00060    : fRef(0), fVldRange(), fBuiltMaps(0)
00061 {
00062    // Default constructor
00063    MSG("Plex",Msg::kVerbose) << "default ctor " << endl;
00064 }

Plexus::Plexus ( const VldContext vldc  )  [protected]

Definition at line 67 of file Plexus.cxx.

References BuildLedMaps(), BuildPinDiodeMap(), BuildPixelMaps(), BuildReadoutMap(), fVldRange, Registry::Get(), CfgConfigurable::GetConfig(), VldContext::GetDetector(), PlexLoanPool::Instance(), Msg::kDebug, Detector::kFar, Msg::kInfo, Msg::kVerbose, MSG, and paranoia.

00068    : fRef(0), fBuiltMaps(0)
00069 {
00070    // normal constructor
00071    MSG("Plex",Msg::kVerbose) << "Plexus(vldc) ctor " << endl;
00072 
00073    const Int_t mostbits = 0x7fffffff;
00074    const VldTimeStamp longago     = VldTimeStamp((time_t)0,0);
00075    const VldTimeStamp forevermore = VldTimeStamp((time_t)mostbits,999999999);
00076    
00077    fVldRange = VldRange(mostbits,mostbits,longago,forevermore,"");
00078 
00079    const Registry& config = PlexLoanPool::Instance()->GetConfig();
00080    config.Get("Paranoia",paranoia);
00081    if (paranoia) {
00082      MSG("Plex",Msg::kInfo)
00083        << "Plexus(vldc) paranoia level " << paranoia << endl;
00084    }
00085 
00086    // prime veto shield converter table so that
00087    // DBI accounting for PlexPixelSpotToStripEnd is correctly attributed.
00088    if (vldc.GetDetector() == Detector::kFar) {
00089      MSG("Plex",Msg::kDebug) 
00090        << "Plexus(vldc) ctor - mux2mdl " << vldc << endl;
00091      DbiResultPtr<PlexVetoShieldMuxToMdl> mux2mdl(vldc);
00092    }
00093 
00094    BuildPixelMaps(vldc);
00095    BuildPinDiodeMap(vldc);
00096    // do Readout Map *after* we know ScintStrips and PinDiodes
00097    BuildReadoutMap(vldc);
00098    BuildLedMaps(vldc);
00099 }

Plexus::~Plexus (  )  [protected, virtual]

Definition at line 102 of file Plexus.cxx.

00103 {
00104    // delete all the owned sub-objects
00105 
00106 }


Member Function Documentation

void Plexus::BuildLedMaps ( const VldContext vldc  )  const [protected, virtual]

Definition at line 1059 of file Plexus.cxx.

References PlexStripEndId::AsString(), PlexLedId::AsString(), PlexPinDiodeId::AsString(), fBuiltMaps, fPinDiodeToLed, fStripEndToLed, DbiTableProxy::GetCache(), DbiResultPtr< T >::GetNumRows(), PlexPlaneId::GetPlane(), PlexPinDiodeToLed::GetPlexPinDiodeId(), PlexStripEndToLed::GetPlexStripEndId(), DbiResultPtr< T >::GetRow(), DbiResultPtr< T >::GetValidityRec(), PlexLoanPool::Instance(), Msg::kInfo, kLedMaps, MSG, paranoia, DbiCache::Purge(), DbiResultPtr< T >::TableProxy(), and TrimVldRange().

Referenced by Plexus().

01060 { 
01061    // build the basic map:  StripEndIds <--> LED <--> PinDiodes
01062 
01063    if (kLedMaps & fBuiltMaps) return;
01064    fBuiltMaps |= kLedMaps;
01065 
01066    DbiCache* pd2ledTblCache = 0;
01067    DbiCache* se2ledTblCache = 0;
01068 
01069    {
01070       // start of inner scope to that DbiResultPtr's will die, die, die
01071       // and thus Purge will see no remaining clients
01072 
01073       DbiResultPtr<PlexPinDiodeToLed> pd2ledResPtr(vldc);
01074       DbiResultPtr<PlexStripEndToLed> se2ledResPtr(vldc);
01075 
01076       // update the fVldRange
01077       TrimVldRange("PlexPinDiodeToLed",pd2ledResPtr.GetValidityRec());
01078       TrimVldRange("PlexStripEndToLed",se2ledResPtr.GetValidityRec());
01079 
01080       // get a handle for the cache
01081       pd2ledTblCache = pd2ledResPtr.TableProxy().GetCache();
01082       se2ledTblCache = se2ledResPtr.TableProxy().GetCache();
01083 
01084       // build the map:  PinDiode --> Led
01085       for (UInt_t irow = 0; irow < pd2ledResPtr.GetNumRows(); ++irow) {
01086          const PlexPinDiodeToLed* pd2led = pd2ledResPtr.GetRow(irow);
01087          PlexPinDiodeId pinid = pd2led->GetPlexPinDiodeId();
01088          PlexLedId      ledid = pd2led->GetPlexLedId();
01089          if ( ! paranoia ) { fPinDiodeToLed[pinid] = ledid; }
01090          else {
01091            if ( fPinDiodeToLed.find(pinid) == fPinDiodeToLed.end() ) {
01092              fPinDiodeToLed[pinid] = ledid;
01093            }
01094            else {
01095              MSG("Plex",Msg::kInfo) 
01096                << "BuildLedMaps PinDiode "
01097                << pinid.AsString("c") << " to Led "
01098                << fPinDiodeToLed[pinid].AsString("c")
01099                << ", new Led " << ledid.AsString("c")
01100                << endl;
01101            }
01102          }
01103       }
01104 
01105       // build the map:  StripEnd --> Led
01106       for (UInt_t irow = 0; irow < se2ledResPtr.GetNumRows(); ++irow) {
01107          const PlexStripEndToLed* se2led = se2ledResPtr.GetRow(irow);
01108          PlexStripEndId  seid = se2led->GetPlexStripEndId();
01109          PlexLedId      ledid = se2led->GetPlexLedId();
01110          if ( ! paranoia ) { fStripEndToLed[seid] = ledid; }
01111          else {
01112            if ( fStripEndToLed.find(seid) == fStripEndToLed.end() ) {
01113              fStripEndToLed[seid] = ledid;
01114            }
01115            else {
01116              if ( paranoia > 1 || seid.GetPlane() != 1023 ) {
01117                MSG("Plex",Msg::kInfo) 
01118                  << "BuildLedMaps StripEnd "
01119                  << seid.AsString("c") << " to Led "
01120                  << fStripEndToLed[seid].AsString("c")
01121                  << ", new Led " << ledid.AsString("c")
01122                  << endl;
01123              }
01124            }
01125          }
01126       }
01127 
01128    }
01129 
01130    if ( PlexLoanPool::Instance()->PurgeDbiTableCache() ) {
01131      // now there should be no active clients so it should be
01132      // possible to purge to our heart's content
01133      if (pd2ledTblCache) pd2ledTblCache->Purge();
01134      if (se2ledTblCache) se2ledTblCache->Purge();
01135    }
01136 
01137    return;
01138 }

void Plexus::BuildPinDiodeMap ( const VldContext vldc  )  const [protected, virtual]

Reimplemented in PlexusReroot.

Definition at line 977 of file Plexus.cxx.

References PlexPinDiodeId::AsString(), RawChannelId::AsString(), RawChannelId::ClearModeBits(), fBuiltMaps, fChannelToPinDiode, DbiTableProxy::GetCache(), DbiResultPtr< T >::GetNumRows(), GetRawChannelId(), PlexRawChannelToPinDiode::GetRawChannelId(), DbiResultPtr< T >::GetRow(), DbiResultPtr< T >::GetValidityRec(), PlexLoanPool::Instance(), Msg::kInfo, kPinDiodeMap, MSG, paranoia, DbiCache::Purge(), DbiResultPtr< T >::TableProxy(), and TrimVldRange().

Referenced by BuildReadoutMap(), and Plexus().

00978 { 
00979    // build the basic map:  RawChannel --> PinDiode
00980 
00981    if (kPinDiodeMap & fBuiltMaps) return;
00982    fBuiltMaps |= kPinDiodeMap;
00983 
00984    DbiCache* rc2pdTblCache = 0;
00985 
00986    {
00987       // start of inner scope to that DbiResultPtr's will die, die, die
00988       // and thus Purge will see no remaining clients
00989 
00990       DbiResultPtr<PlexRawChannelToPinDiode> rc2pdResPtr(vldc);
00991 
00992       // update the fVldRange
00993       TrimVldRange("PlexRawChannelToPinDiode",rc2pdResPtr.GetValidityRec());
00994 
00995       // get a handle for the cache
00996       rc2pdTblCache = rc2pdResPtr.TableProxy().GetCache();
00997 
00998       std::set<PlexPinDiodeId> pins_seen;  // local temp for paranoia checking
00999 
01000       // build the map:  RawChannel --> PinDiode
01001       for (UInt_t irow = 0; irow < rc2pdResPtr.GetNumRows(); ++irow) {
01002          const PlexRawChannelToPinDiode* rc2pd = rc2pdResPtr.GetRow(irow);
01003          RawChannelId    rcid = rc2pd->GetRawChannelId();
01004          PlexPinDiodeId pinid = rc2pd->GetPlexPinDiodeId();
01005 
01006          // the map has the {pedestal,spars,common} mode bits off
01007          rcid.ClearModeBits();
01008 
01009          // 
01010          if ( ! paranoia ) { fChannelToPinDiode[rcid] = pinid; }
01011          else {
01012            if ( fChannelToPinDiode.find(rcid) == fChannelToPinDiode.end() ) {
01013              if ( pins_seen.find(pinid) == pins_seen.end() ) {
01014                fChannelToPinDiode[rcid] = pinid;             
01015                pins_seen.insert(pinid);
01016              }
01017              else {
01018                RawChannelId rcid_already = GetRawChannelId(pinid);
01019                MSG("Plex",Msg::kInfo) 
01020                  << "BuildPinDiodeMap PinDiode "
01021                  << pinid.AsString("c") 
01022                  << endl
01023                  << "   attached to RawChannel "
01024                  << rcid_already.AsString("ec")
01025                  << endl
01026                  << "   new RawChannel entry   "
01027                  << rcid.AsString("ec")
01028                  << endl;
01029              }
01030            }
01031            else {
01032              MSG("Plex",Msg::kInfo) 
01033                << "BuildPinDiodeMap RawChannelId "
01034                << rcid.AsString("ec") 
01035                << endl
01036                << "    attached to PinDiode " 
01037                << fChannelToPinDiode[rcid].AsString("c")
01038                << endl
01039                << "    new PinDiode entry   "
01040                << pinid.AsString("c")
01041                << endl;
01042            }
01043          }
01044 
01045       }
01046 
01047    }
01048 
01049    if ( PlexLoanPool::Instance()->PurgeDbiTableCache() ) {
01050      // now there should be no active clients so it should be
01051      // possible to purge to our heart's content
01052      if (rc2pdTblCache) rc2pdTblCache->Purge();
01053    }
01054 
01055    return;
01056 }

void Plexus::BuildPixelMaps ( const VldContext vldc  )  const [protected, virtual]

Reimplemented in PlexusReroot.

Definition at line 781 of file Plexus.cxx.

References RawChannelId::AsString(), PlexPixelSpotId::AsString(), RawChannelId::ClearModeBits(), fBuiltMaps, fChannelToPixel, fPixelToChannel, fPixelToStripEnd, fStripEndToSpot, DbiTableProxy::GetCache(), DbiResultPtr< T >::GetNumRows(), PlexPixelToRawChannel::GetPlexPixelSpotId(), PlexPixelSpotToStripEnd::GetPlexPixelSpotId(), DbiResultPtr< T >::GetRow(), DbiResultPtr< T >::GetValidityRec(), PlexLoanPool::Instance(), Msg::kFatal, Msg::kInfo, kPixelMaps, MSG, paranoia, DbiCache::Purge(), PlexPixelSpotId::SetSpot(), DbiResultPtr< T >::TableProxy(), and TrimVldRange().

Referenced by BuildReadoutMap(), and Plexus().

00782 { 
00783    // build the basic maps   RawChannel <--> PixelSpot <--> StripEnd
00784 
00785    if (kPixelMaps & fBuiltMaps) return;
00786    fBuiltMaps |= kPixelMaps;
00787 
00788    DbiCache* pstoseTblCache = 0;
00789    DbiCache* ptorcTblCache = 0;
00790 
00791    {
00792       // start of inner scope to that DbiResultPtr's will die, die, die
00793       // and thus Purge will see no remaining clients
00794       
00795       DbiResultPtr<PlexPixelSpotToStripEnd> pstoseResPtr(vldc);
00796       DbiResultPtr<PlexPixelToRawChannel>   ptorcResPtr(vldc);
00797 
00798       // update the fVldRange
00799       TrimVldRange("PlexPixelSpotToStripEnd",pstoseResPtr.GetValidityRec());
00800       TrimVldRange("PlexPixelToRawChannel",ptorcResPtr.GetValidityRec());
00801 
00802       // get a handle for the caches
00803       pstoseTblCache = pstoseResPtr.TableProxy().GetCache();
00804       ptorcTblCache = ptorcResPtr.TableProxy().GetCache();
00805 
00806       // how many rows did we get?
00807       UInt_t npstose = pstoseResPtr.GetNumRows();
00808       UInt_t nptorc  = ptorcResPtr.GetNumRows();
00809 
00810       // complain bitterly if either is zero
00811       // this is indicative of a serious database problem
00812       if (npstose == 0) {
00813         MSG("Plex",Msg::kFatal)
00814           << "No entries retrieved from PlexPixelSpotToStripEnd table." 
00815           << endl;
00816       }
00817       if (nptorc == 0) {
00818         MSG("Plex",Msg::kFatal)
00819           << "No entries retrieved from PlexPixelToRawChannel table." 
00820           << endl;
00821       }
00822       // build the maps:  PixelSpot <--> StripEnd 
00823       for (UInt_t irow = 0; irow < npstose; ++irow) {
00824          const PlexPixelSpotToStripEnd* pstose = pstoseResPtr.GetRow(irow);
00825          PlexPixelSpotId spotid = pstose->GetPlexPixelSpotId();
00826          PlexStripEndId    seid = pstose->GetPlexStripEndId();
00827 
00828          bool isokay_pstose = true;
00829          if ( paranoia ) { 
00830            if ( fStripEndToSpot.find(seid) != fStripEndToSpot.end() ) {
00831              isokay_pstose = false;
00832              if ( paranoia > 1 || seid.GetPlane() != 1023 ) {
00833                MSG("Plex",Msg::kInfo) 
00834                  << "BuildPixelMaps StripEnd "
00835                  << seid.AsString("c") 
00836                  << endl
00837                  << "   attached to PixelSpot "
00838                  << fStripEndToSpot[seid].AsString("c")
00839                  << endl
00840                  << "   new PixelSpot entry   "
00841                  << spotid.AsString("c")
00842                  << endl;
00843              }
00844            }
00845          }
00846          
00847          if (isokay_pstose) {
00848            fStripEndToSpot[seid]   = spotid;
00849            // for multimap sake throw away the "spot" info in this direction
00850            PlexPixelSpotId pixelid = spotid;
00851            pixelid.SetSpot(0);
00852            fPixelToStripEnd.insert(make_pair(pixelid,seid));
00853          }
00854       }
00855 
00856       // build the maps:  PixelSpot <--> RawChannel
00857       for (UInt_t irow = 0; irow < nptorc; ++irow) {
00858          const PlexPixelToRawChannel* ptorc = ptorcResPtr.GetRow(irow);
00859          PlexPixelSpotId pixelid = ptorc->GetPlexPixelSpotId();
00860          RawChannelId       rcid = ptorc->GetRawChannelId();
00861          // the map has the {pedestal,spars,common} mode bits off
00862          rcid.ClearModeBits();
00863          
00864          // ensure that pixelid doesn't have "spot" field filled
00865          // in either direction
00866          pixelid.SetSpot(0);
00867          
00868          bool isokay_ptorc = true;
00869          if ( paranoia ) {
00870            if ( fPixelToChannel.find(pixelid) != fPixelToChannel.end() ) {
00871              isokay_ptorc = false;
00872              MSG("Plex",Msg::kInfo) 
00873                << "BuildPixelMaps Pixel "
00874                << pixelid.AsString("p") 
00875                << endl
00876                << "   attached to RawChannel "
00877                << fPixelToChannel[pixelid].AsString("ec")
00878                << endl
00879                << "   new RawChannel entry   "
00880                << rcid.AsString("ec")
00881                << endl;
00882            }
00883          }
00884 
00885          if (isokay_ptorc) {
00886            fPixelToChannel[pixelid] = rcid;
00887            fChannelToPixel.insert(make_pair(rcid,pixelid));
00888          }
00889       }
00890 
00891    }
00892 
00893    if ( PlexLoanPool::Instance()->PurgeDbiTableCache() ) {
00894      // now there should be no active clients so it should be
00895      // possible to purge to our heart's content
00896      if (pstoseTblCache) pstoseTblCache->Purge();
00897      if (ptorcTblCache) ptorcTblCache->Purge();
00898    }
00899 
00900    return;
00901 }

void Plexus::BuildReadoutMap ( const VldContext vldc  )  const [protected, virtual]

Reimplemented in PlexusReroot.

Definition at line 904 of file Plexus.cxx.

References BuildPinDiodeMap(), BuildPixelMaps(), RawChannelId::ClearModeBits(), fBuiltMaps, fChannelToPinDiode, fChannelToPixel, fChannelToReadout, fSpecialDescript, DbiTableProxy::GetCache(), DbiResultPtr< T >::GetNumRows(), PlexRawChannelReadoutType::GetRawChannelId(), DbiResultPtr< T >::GetRow(), DbiResultPtr< T >::GetValidityRec(), PlexLoanPool::Instance(), ReadoutType::kPinDiode, kReadoutMap, ReadoutType::kScintStrip, DbiCache::Purge(), DbiResultPtr< T >::TableProxy(), and TrimVldRange().

Referenced by Plexus().

00905 { 
00906    // build the basic map:  RawChannel --> ReadoutType
00907 
00908    if (kReadoutMap & fBuiltMaps) return;
00909    fBuiltMaps |= kReadoutMap;
00910 
00911    DbiCache* rcrtTblCache = 0;
00912 
00913    {
00914       // start of inner scope to that DbiResultPtr's will die, die, die
00915       // and thus Purge will see no remaining clients
00916 
00917       DbiResultPtr<PlexRawChannelReadoutType> rcrtResPtr(vldc);
00918 
00919       // update the fVldRange
00920       TrimVldRange("PlexRawChannelReadoutType",rcrtResPtr.GetValidityRec());
00921 
00922       // get a handle for the cache
00923       rcrtTblCache = rcrtResPtr.TableProxy().GetCache();
00924 
00925       // build the map:  RawChannel --> ReadoutType
00926       for (UInt_t irow = 0; irow < rcrtResPtr.GetNumRows(); ++irow) {
00927          const PlexRawChannelReadoutType* rcrt = rcrtResPtr.GetRow(irow);
00928          RawChannelId            rcid = rcrt->GetRawChannelId();
00929          ReadoutType::Readout_t rtype = rcrt->GetReadoutType();
00930          // the map has the {pedestal,spars,common} mode bits off
00931          rcid.ClearModeBits();
00932 
00933          fChannelToReadout[rcid] = rtype;
00934          fSpecialDescript[rcid] = rcrt->GetDescript();
00935       }
00936 
00937       // use RawChannel->Pixel to make additions
00938       BuildPixelMaps(vldc);
00939       typedef multimap<RawChannelId,PlexPixelSpotId>::const_iterator rc2ps_itr;
00940       for (rc2ps_itr irc2ps  = fChannelToPixel.begin();
00941            irc2ps != fChannelToPixel.end(); ++irc2ps) {
00942          RawChannelId rcid = irc2ps->first;
00943          // the map has the {pedestal,spars,common} mode bits off
00944          rcid.ClearModeBits();
00945          
00946          // Change NJT 29/8/03: Only set kScintStrip if there
00947          // is no previous type set. This ensures the DB always wins.
00948          // Useful for the 'UnconnectedPixel' type.
00949          if(fChannelToReadout.find(rcid)==fChannelToReadout.end()) 
00950            fChannelToReadout[rcid] = ReadoutType::kScintStrip;       
00951       }
00952 
00953    }
00954 
00955    if ( PlexLoanPool::Instance()->PurgeDbiTableCache() ) {
00956      // now there should be no active clients so it should be
00957      // possible to purge to our heart's content
00958      if (rcrtTblCache) rcrtTblCache->Purge();
00959    }
00960 
00961    // use RawChannel->PinDiode to make additions
00962    BuildPinDiodeMap(vldc);
00963    typedef map<RawChannelId,PlexPinDiodeId>::const_iterator rc2pd_itr;
00964    for (rc2pd_itr irc2pd  = fChannelToPinDiode.begin();
00965                   irc2pd != fChannelToPinDiode.end(); ++irc2pd) {
00966       RawChannelId rcid = irc2pd->first;
00967       // the map has the {pedestal,spars,common} mode bits off
00968       rcid.ClearModeBits();
00969 
00970       fChannelToReadout[rcid] = ReadoutType::kPinDiode;
00971    }
00972 
00973    return;
00974 }

Int_t Plexus::CountRef (  )  const [inline]

Definition at line 77 of file Plexus.h.

References fRef.

Referenced by PlexLoanPool::GetPlexus(), and Print().

00077 { return fRef; }

void Plexus::DecrementRef (  )  [inline]

Definition at line 76 of file Plexus.h.

References fRef.

Referenced by PlexHandle::operator=(), and PlexHandle::~PlexHandle().

00076 { fRef--; }

const std::vector< PlexLedId > & Plexus::GetAllLeds (  )  const [virtual]

Definition at line 743 of file Plexus.cxx.

References fAllLeds, fPinDiodeToLed, and fStripEndToLed.

Referenced by PlexHandle::GetAllLeds().

00744 {
00745   // Return (build if necessary) a list of legal PlexLedIds
00746 
00747   if ( fAllLeds.empty() ) {
00748 
00749     // we need to fill the vector
00750     // but use an intermediate set to force uniqueness and ordering
00751     // base on normal PlexLedId order
00752 
00753     std::set<PlexLedId> ledSet;
00754     
00755     // fill from mapping of stripends to leds
00756     typedef std::map<PlexStripEndId,PlexLedId>::const_iterator seid2led_itr;
00757     seid2led_itr seledItr    = fStripEndToLed.begin();
00758     seid2led_itr seledItrEnd = fStripEndToLed.end();
00759     for ( ; seledItr != seledItrEnd; ++seledItr) ledSet.insert(seledItr->second);
00760 
00761     // fill from mapping of pindiodes to leds
00762     typedef std::map<PlexPinDiodeId,PlexLedId>::const_iterator pind2led_itr;
00763     pind2led_itr pinledItr    = fPinDiodeToLed.begin();
00764     pind2led_itr pinledItrEnd = fPinDiodeToLed.end();
00765     for ( ; pinledItr != pinledItrEnd; ++pinledItr) ledSet.insert(pinledItr->second);
00766 
00767     // copy set values into vector
00768     typedef std::set<PlexLedId>::iterator ledset_itr;
00769     ledset_itr ledItr    = ledSet.begin();
00770     ledset_itr ledItrEnd = ledSet.end();
00771     for ( ; ledItr != ledItrEnd; ++ledItr)
00772       fAllLeds.push_back(*ledItr);
00773 
00774   }
00775   return fAllLeds;
00776 }

const std::vector< PlexPinDiodeId > & Plexus::GetAllPinDiodes (  )  const [virtual]

Definition at line 705 of file Plexus.cxx.

References fAllPinDiodes, fChannelToPinDiode, and fPinDiodeToLed.

Referenced by PlexHandle::GetAllPinDiodes(), and ValidateConsistency().

00706 {
00707   // Return (build if necessary) a list of legal PlexPindDiodeIds
00708 
00709   if ( fAllPinDiodes.empty() ) {
00710 
00711     // we need to fill the vector
00712     // but use an intermediate set to force uniqueness and ordering
00713     // base on normal PlexPinDiodeId order
00714 
00715     std::set<PlexPinDiodeId> pindSet;
00716     
00717     // fill from list of raw channel list mapped to pin diodes
00718     typedef std::map<RawChannelId,PlexPinDiodeId>::const_iterator rc2pin_itr;
00719     rc2pin_itr rcpinItr    = fChannelToPinDiode.begin();
00720     rc2pin_itr rcpinItrEnd = fChannelToPinDiode.end();
00721     for ( ; rcpinItr != rcpinItrEnd; ++rcpinItr) pindSet.insert(rcpinItr->second);
00722 
00723     // fill fromlist of pin diodes mapped to leds
00724     typedef std::map<PlexPinDiodeId,PlexLedId>::const_iterator pin2led_itr;
00725     pin2led_itr pinledItr    = fPinDiodeToLed.begin();
00726     pin2led_itr pinledItrEnd = fPinDiodeToLed.end();
00727     for ( ; pinledItr != pinledItrEnd; ++pinledItr) pindSet.insert(pinledItr->first);
00728 
00729     // copy set values into vector
00730     typedef std::set<PlexPinDiodeId>::iterator pindset_itr;
00731     pindset_itr pindItr    = pindSet.begin();
00732     pindset_itr pindItrEnd = pindSet.end();
00733     for ( ; pindItr != pindItrEnd; ++pindItr)
00734       fAllPinDiodes.push_back(*pindItr);
00735 
00736   }
00737   return fAllPinDiodes;
00738 }

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

Implements PlexusABC.

Definition at line 202 of file Plexus.h.

References GetAllPixelSpotIds(), and kIncludePixel.

Referenced by PlexHandle::GetAllPixels().

00203 { return this->GetAllPixelSpotIds(Plexus::kIncludePixel); }

const std::vector< PlexPixelSpotId > & Plexus::GetAllPixelSpotIds ( ETrimSpots  trim  )  const [protected, virtual]

Definition at line 603 of file Plexus.cxx.

References fAllPixels, fAllSpots, fAllTubes, fStripEndToSpot, kIncludePixel, and kIncludeTube.

Referenced by GetAllPixels(), GetAllPixelSpots(), and GetAllTubes().

00604 {
00605   // Return (build if necessary) a list of legal spots, pixels, tubes
00606   // If restrictEnd is kEast or kWest limit list to that end
00607   // If restrictEnd is kWhole force ids to be only for whole strip
00608   //     (and eliminate duplicates)
00609 
00610   std::vector<PlexPixelSpotId>* thevector = 0;
00611   switch (trim) {
00612   case kIncludeTube:  thevector = &fAllTubes;   break;
00613   case kIncludePixel: thevector = &fAllPixels;  break;
00614   default:            thevector = &fAllSpots;   break;
00615   }
00616 
00617   if ( thevector->empty() ) {
00618 
00619     // we need to fill the vector
00620     // but use an intermediate set to force uniqueness and ordering
00621     // based on normal PlexPixelSpotId order
00622    
00623     typedef std::map<PlexStripEndId,PlexPixelSpotId>::const_iterator se2spot_itr;
00624     se2spot_itr seItr    = fStripEndToSpot.begin();
00625     se2spot_itr seItrEnd = fStripEndToSpot.end();
00626     
00627     std::set<PlexPixelSpotId> spotSet;
00628     
00629     for ( ; seItr != seItrEnd; ++seItr) {
00630       PlexPixelSpotId spot = seItr->second;
00631       switch (trim) {
00632         // rely on fall through
00633       case kIncludeTube:  spot.SetPixel(0);
00634       case kIncludePixel: spot.SetSpot(0);
00635       default:            break;
00636       }
00637       // add to the set, let it take care of uniqueness
00638       spotSet.insert(spot);
00639     }
00640 
00641     // copy set values into vector
00642     typedef std::set<PlexPixelSpotId>::iterator spotset_itr;
00643     spotset_itr spotItr    = spotSet.begin();
00644     spotset_itr spotItrEnd = spotSet.end();
00645     for ( ; spotItr != spotItrEnd; ++spotItr)
00646       thevector->push_back(*spotItr);
00647   }
00648 
00649   return *thevector;
00650 }

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

Implements PlexusABC.

Definition at line 198 of file Plexus.h.

References GetAllPixelSpotIds(), and kIncludeSpot.

Referenced by PlexHandle::GetAllPixelSpots().

00199 { return this->GetAllPixelSpotIds(Plexus::kIncludeSpot); }

const std::vector< RawChannelId > & Plexus::GetAllRawChannelIds (  )  const [virtual]

Implements PlexusABC.

Definition at line 655 of file Plexus.cxx.

References fAllChannels, fChannelToPinDiode, fChannelToPixel, fChannelToReadout, and fSpecialDescript.

Referenced by PlexHandle::GetAllRawChannelIds(), and Print().

00656 {
00657   // Return (build if necessary) a list of legal RawChannelIds
00658 
00659   if ( fAllChannels.empty() ) {
00660 
00661     // we need to fill the vector
00662     // but use an intermediate set to force uniqueness and ordering
00663     // base on normal RawChannelId order
00664 
00665     std::set<RawChannelId> rcidSet;
00666     
00667     // fill from mapping of channels to pixels
00668     typedef std::map<RawChannelId,PlexPixelSpotId>::const_iterator rc2pixel_itr;
00669     rc2pixel_itr rcpxItr    = fChannelToPixel.begin();
00670     rc2pixel_itr rcpxItrEnd = fChannelToPixel.end();
00671     for ( ; rcpxItr != rcpxItrEnd; ++rcpxItr) rcidSet.insert(rcpxItr->first);
00672 
00673     //
00674     typedef std::map<RawChannelId,PlexPinDiodeId>::const_iterator rc2pin_itr;
00675     rc2pin_itr rcpinItr    = fChannelToPinDiode.begin();
00676     rc2pin_itr rcpinItrEnd = fChannelToPinDiode.end();
00677     for ( ; rcpinItr != rcpinItrEnd; ++rcpinItr) rcidSet.insert(rcpinItr->first);
00678     // 
00679     typedef std::map<RawChannelId,UShort_t>::const_iterator rc2type_itr;
00680     rc2type_itr rctypeItr    = fChannelToReadout.begin();
00681     rc2type_itr rctypeItrEnd = fChannelToReadout.end();
00682     for ( ; rctypeItr != rctypeItrEnd; ++rctypeItr) rcidSet.insert(rctypeItr->first);
00683 
00684     //
00685     typedef std::map<RawChannelId,std::string>::const_iterator rc2desc_itr;
00686     rc2desc_itr rcdescItr    = fSpecialDescript.begin();
00687     rc2desc_itr rcdescItrEnd = fSpecialDescript.end();
00688     for ( ; rcdescItr != rcdescItrEnd; ++rcdescItr) rcidSet.insert(rcdescItr->first);
00689     
00690 
00691     // copy set values into vector
00692     typedef std::set<RawChannelId>::iterator rcidset_itr;
00693     rcidset_itr rcidItr    = rcidSet.begin();
00694     rcidset_itr rcidItrEnd = rcidSet.end();
00695     for ( ; rcidItr != rcidItrEnd; ++rcidItr)
00696       fAllChannels.push_back(*rcidItr);
00697 
00698   }
00699   return fAllChannels;
00700 }

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

Implements PlexusABC.

Definition at line 546 of file Plexus.cxx.

References fAllEastEnds, fAllStripEnds, fAllStrips, fAllWestEnds, fStripEndToSpot, StripEnd::kEast, StripEnd::kWest, and StripEnd::kWhole.

Referenced by PlexHandle::GetAllStripEnds(), and PlexHandle::GetAllStrips().

00547 { 
00548   // Return (build if necessary) a list of legal PlexStripEndIds
00549   // If restrictEnd is kEast or kWest limit list to that end
00550   // If restrictEnd is kWhole force ids to be only for whole strip
00551   //     (and eliminate duplicates)
00552 
00553   std::vector<PlexStripEndId>* thevector = 0;
00554   switch (restrictEnd) {
00555   case StripEnd::kEast:  thevector = &fAllEastEnds;  break;
00556   case StripEnd::kWest:  thevector = &fAllWestEnds;  break;
00557   case StripEnd::kWhole: thevector = &fAllStrips;    break;
00558   default:               thevector = &fAllStripEnds; break;
00559   }
00560 
00561   if ( thevector->empty() ) {
00562 
00563     // we need to fill the vector
00564 
00565     typedef map<PlexStripEndId,PlexPixelSpotId>::const_iterator se2spot_itr;
00566     se2spot_itr seItr    = fStripEndToSpot.begin();
00567     se2spot_itr seItrEnd = fStripEndToSpot.end();
00568     
00569     PlexStripEndId seidLast;
00570     
00571     for ( ; seItr != seItrEnd; ++seItr) {
00572       PlexStripEndId seid = seItr->first;
00573       switch (restrictEnd) {
00574         // if a particular side is chosen only add those
00575       case StripEnd::kEast:
00576       case StripEnd::kWest:
00577         if ( seid.GetEnd() != restrictEnd ) continue;
00578         break;
00579       case StripEnd::kWhole:
00580         seid.SetEnd(StripEnd::kWhole);  // for whole-ness
00581         // this next test is under the assumption that the PlexStripEndId
00582         // sorts ends of the same strips to consecutive places in the map
00583         // otherwise we'd have to be constructing a std::set to guarentee
00584         // uniqueness of the strips (or do ever lengthening searches)
00585         if ( seid == seidLast ) continue;
00586         seidLast = seid;
00587         break;
00588       default:
00589         // just add it with no restrictions
00590         break;
00591       }
00592       // add to the list
00593       thevector->push_back(seid);
00594     }
00595     
00596   }
00597 
00598   return *thevector;
00599 }

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

Implements PlexusABC.

Definition at line 206 of file Plexus.h.

References GetAllPixelSpotIds(), and kIncludeTube.

Referenced by PlexHandle::GetAllTubes().

00207 { return this->GetAllPixelSpotIds(Plexus::kIncludeTube); }

static Bool_t Plexus::GetAltLHasBrokenFibers (  )  [inline, static]

Definition at line 180 of file Plexus.h.

References fgAltLHasBrokenFibers.

00181      { return fgAltLHasBrokenFibers; }

static Bool_t Plexus::GetAltLInitiallySortedBySEId (  )  [inline, static]

Definition at line 184 of file Plexus.h.

References fgAltLInitiallySortedBySEId.

00185      { return fgAltLInitiallySortedBySEId; }

PlexLedId Plexus::GetLedId ( const PlexPinDiodeId diodeid  )  const [virtual]

Implements PlexusABC.

Definition at line 537 of file Plexus.cxx.

References fPinDiodeToLed.

00538 {
00539    // Convert PlexPinDiodeId into a PlexLedId (N:1)
00540 
00541    return fPinDiodeToLed[diodeid];
00542 }

PlexLedId Plexus::GetLedId ( const PlexStripEndId seid  )  const [virtual]

Implements PlexusABC.

Definition at line 529 of file Plexus.cxx.

References fStripEndToLed.

Referenced by PlexHandle::GetLedId().

00530 {
00531    // Convert PlexStripEndId into a PlexLedId (N:1)
00532 
00533    return fStripEndToLed[seid];
00534 }

PlexPinDiodeId Plexus::GetPinDiodeId ( const RawChannelId rcid  )  const [virtual]

Implements PlexusABC.

Reimplemented in PlexusReroot.

Definition at line 388 of file Plexus.cxx.

References RawChannelId::ClearModeBits(), and fChannelToPinDiode.

Referenced by PlexHandle::GetPinDiodeId().

00389 {
00390    // Convert RawChannelId into PlexPinDiodeId (if possible)
00391 
00392    // the map has the {pedestal,spars,common} mode bits off
00393    RawChannelId rcid0 = rcid;
00394    rcid0.ClearModeBits();
00395 
00396    return fChannelToPinDiode[rcid0];
00397 }

std::pair< PlexPinDiodeId, PlexPinDiodeId > Plexus::GetPinDiodeIds ( const PlexLedId ledid  )  const [virtual]

Implements PlexusABC.

Definition at line 480 of file Plexus.cxx.

References PlexPinDiodeId::AsString(), fPinDiodeToLed, PlexPinDiodeId::IsHighGain(), PlexPinDiodeId::IsValid(), Msg::kError, and MSG.

Referenced by PlexHandle::GetPinDiodeIds().

00481 {
00482    // Convert PlexLedId into a pair of PlexPinDiodeId's (1:[1,2])
00483 
00484    pair<PlexPinDiodeId,PlexPinDiodeId> diodepair;
00485    PlexPinDiodeId high_gain;
00486    PlexPinDiodeId low_gain;
00487 
00488    typedef map<PlexPinDiodeId,PlexLedId>::const_iterator pd2led_itr;
00489 
00490    for (pd2led_itr ipd2led  = fPinDiodeToLed.begin();
00491                    ipd2led != fPinDiodeToLed.end(); ++ipd2led) {
00492       if (ipd2led->second == ledid) {
00493          PlexPinDiodeId pinid = ipd2led->first;
00494 
00495          // Gain:  1=LO, 0=HIGH     !Arghhh!
00496          if (pinid.IsHighGain()) {
00497             // high gain pin diode
00498             if (!high_gain.IsValid()) high_gain = pinid;
00499             else {
00500                // this shouldn't happen
00501                MSG("Plex",Msg::kError) 
00502                   << "GetPinDiodeIds already found high gain "
00503                   << high_gain.AsString()
00504                   << " before " << pinid.AsString() 
00505                   << ", ignore new " << endl;
00506             }
00507          }
00508          else {
00509             // low gain pin diode
00510             if (!low_gain.IsValid()) low_gain = pinid;
00511             else {
00512                // this shouldn't happen
00513                MSG("Plex",Msg::kError) 
00514                   << "GetPinDiodeIds already found low gain "
00515                   << low_gain.AsString()
00516                   << " before " << pinid.AsString() 
00517                   << ", ignore new " << endl;
00518             }
00519          }
00520       }
00521    }
00522 
00523    diodepair.first  = low_gain;
00524    diodepair.second = high_gain;
00525    return diodepair;
00526 }

PlexPixelSpotId Plexus::GetPixelSpotId ( const PlexStripEndId seid  )  const [virtual]

Implements PlexusABC.

Definition at line 374 of file Plexus.cxx.

References fStripEndToSpot.

Referenced by PlexHandle::GetPixelSpotId().

00375 { 
00376    // Convert PlexStripEndId into a PlexPixelSpotId (1:1)
00377 
00378   //was: return fStripEndToSpot[seid];
00379   //use find() to avoid adding null entries
00380   std::map<PlexStripEndId,PlexPixelSpotId>::const_iterator sepsItr = 
00381       fStripEndToSpot.find(seid);
00382   if (sepsItr == fStripEndToSpot.end()) return PlexPixelSpotId(); // not there!
00383 
00384   return sepsItr->second;
00385 }

vector< PlexPixelSpotId > Plexus::GetPixelSpotIdVector ( const RawChannelId rcid,
bool  uniquePixels = false 
) const [virtual]

Implements PlexusABC.

Definition at line 334 of file Plexus.cxx.

References RawChannelId::ClearModeBits(), fChannelToPixel, and GetSEIdAltL().

Referenced by PlexHandle::GetPixelSpotIdVector().

00336 { 
00337    // Convert RawChannelId into a vector of PlexPixelSpotId's 
00338    // if uniquePixels=true then set spot=0 (1:m) and return
00339    // a list of *pixels* not pixel-spots.
00340    //
00341    // RawChannelId may not map to single Pixel in the case of
00342    // near detector.  
00343 
00344    vector<PlexPixelSpotId> pixelspots;
00345  
00346   if (uniquePixels) {
00347 
00348      // the map has the {pedestal,spars,common} mode bits off
00349      RawChannelId rcid0 = rcid;
00350      rcid0.ClearModeBits();
00351      
00352      typedef multimap<RawChannelId,PlexPixelSpotId>::const_iterator   rc2p_itr;
00353      
00354      pair<rc2p_itr,rc2p_itr> rc2p_limits = fChannelToPixel.equal_range(rcid0);
00355      for (rc2p_itr irc2p  = rc2p_limits.first; 
00356           irc2p != rc2p_limits.second; ++irc2p) {
00357        PlexPixelSpotId aspot = irc2p->second;
00358        pixelspots.push_back(aspot);
00359      }
00360 
00361    }
00362    else {
00363      // return all spots, even if the pixel part isn't unique
00364      // take the easy road out and use existing mechanism
00365      PlexSEIdAltL altl = this->GetSEIdAltL(rcid);
00366      for (size_t i=0; i < altl.size(); ++i) 
00367        pixelspots.push_back(altl[i].GetPixelSpotId());
00368    }
00369 
00370   return pixelspots;
00371 }

RawChannelId Plexus::GetRawChannelId ( const PlexPinDiodeId diodeid  )  const [virtual]

Implements PlexusABC.

Reimplemented in PlexusReroot.

Definition at line 222 of file Plexus.cxx.

References fChannelToPinDiode.

00223 {
00224    // Convert PinDiodeId into a RawChannelId
00225 
00226    // walk through the map looking for a match
00227    // this is slower than the reverse operation but
00228    // means that we don't need a second copy of the information
00229 
00230    typedef map<RawChannelId,PlexPinDiodeId>::const_iterator rc2pd_itr;
00231 
00232    for (rc2pd_itr irc2pd  = fChannelToPinDiode.begin();
00233                   irc2pd != fChannelToPinDiode.end(); ++irc2pd) {
00234       if (irc2pd->second == diodeid) return irc2pd->first;
00235    }
00236 
00237    // nothing appropriate found
00238    return RawChannelId();
00239 }

RawChannelId Plexus::GetRawChannelId ( const PlexPixelSpotId psid  )  const [virtual]

Implements PlexusABC.

Reimplemented in PlexusReroot.

Definition at line 204 of file Plexus.cxx.

References fPixelToChannel, and PlexPixelSpotId::SetSpot().

00205 {
00206    // Convert PlexPixelSpotId into RawChannelId (m:1 mapping)
00207    
00208    // clear the spot value as that isn't used in pixel->channel
00209    PlexPixelSpotId psid_nospot = psid;
00210    psid_nospot.SetSpot(0);
00211 
00212    // was: return fPixelToChannel[psid_nospot];
00213    // use find() to avoid adding null entries
00214    std::map<PlexPixelSpotId,RawChannelId>::const_iterator psrcItr = 
00215        fPixelToChannel.find(psid_nospot);
00216    if (psrcItr == fPixelToChannel.end()) return RawChannelId(); // not there!
00217 
00218    return psrcItr->second;
00219 }

RawChannelId Plexus::GetRawChannelId ( const PlexStripEndId seid  )  const [virtual]

Implements PlexusABC.

Reimplemented in PlexusReroot.

Definition at line 171 of file Plexus.cxx.

References det, fStripEndToSpot, PlexPlaneId::GetDetector(), PlexStripEndId::GetEnd(), StripEnd::kEast, Msg::kInfo, Detector::kNear, StripEnd::kUnknown, StripEnd::kWhole, and MAXMSG.

Referenced by BuildPinDiodeMap(), and PlexHandle::GetRawChannelId().

00172 {
00173    // Convert PlexStripEndId into RawChannelId (m:1 mapping)
00174    
00175   StripEnd::StripEnd_t end = seid.GetEnd();;
00176   if ( StripEnd::kWhole == end || StripEnd::kUnknown == end ) {
00177     MAXMSG("Plex",Msg::kInfo,10)
00178       << "GetRawChannelId called for SEId=" 
00179       << seid << " which has StripEnd either 'Unknown' or 'Whole';"
00180       << " this is unlikely to succeed."
00181       << endl;
00182   }
00183   else {
00184     Detector::Detector_t det = seid.GetDetector();
00185     if ( Detector::kNear == det && StripEnd::kEast == end ) {
00186       MAXMSG("Plex",Msg::kInfo,10)
00187         << "GetRawChannelId called for SEId=" 
00188         << seid << " which has StripEnd of 'East';"
00189         << " this is unlikely to succeed."
00190       << endl;
00191     }    
00192   }
00193 
00194   // was: PlexPixelSpotId psid = fStripEndToSpot[seid];
00195   // use find() to avoid adding null entries
00196   std::map<PlexStripEndId,PlexPixelSpotId>::const_iterator sepsItr = 
00197       fStripEndToSpot.find(seid);
00198   if (sepsItr == fStripEndToSpot.end()) return RawChannelId(); // not there!
00199 
00200    return GetRawChannelId(sepsItr->second);
00201 }

ReadoutType::Readout_t Plexus::GetReadoutType ( const RawChannelId rcid  )  const [virtual]

Implements PlexusABC.

Reimplemented in PlexusReroot.

Definition at line 400 of file Plexus.cxx.

References RawChannelId::ClearModeBits(), fChannelToReadout, RawChannelId::GetVaChannel(), ReadoutType::kUnknown, ReadoutType::kVACommonMode, and rcidNull.

Referenced by PlexHandle::GetReadoutType(), and Print().

00401 { 
00402    // Determine what (eg. scint strip, pin diode, cerenkov, tof) 
00403    // is attached to raw channel
00404 
00405    if ( rcid == rcidNull ) return ReadoutType::kUnknown;
00406 
00407    // deal with special case of VA common mode rejection channels
00408    // no need to explicitly test for electronics type as unpacker does
00409    // (returns -1 if not a VA channel)
00410    switch (rcid.GetVaChannel()) {
00411    case  0:
00412    case  1:
00413    case 19:
00414    case 20:
00415    case 21:
00416       return ReadoutType::kVACommonMode;
00417       break;
00418    }
00419 
00420    // the map has the {pedestal,spars,common} mode bits off
00421    RawChannelId rcid0 = rcid;
00422    rcid0.ClearModeBits();
00423 
00424    // ideally this mapping would be to ReadoutType::Readout_t
00425    // but cint can't correctly handle enum as as second type of map
00426    // so use UShort_t (must be > 8 bits to correctly hold all Readout_t values)
00427 
00428    return (ReadoutType::Readout_t)fChannelToReadout[rcid0];
00429 
00430 }

PlexSEIdAltL Plexus::GetSEIdAltL ( const RawChannelId rcid,
const PlexCalib calib = 0,
Int_t  adc = 0,
Double_t  time = 0 
) const [virtual]

Implements PlexusABC.

Reimplemented in PlexusReroot.

Definition at line 242 of file Plexus.cxx.

References PlexSEIdAltL::AddStripEndId(), RawChannelId::ClearModeBits(), fChannelToPixel, fgAltLHasBrokenFibers, fgAltLInitiallySortedBySEId, fPixelToStripEnd, fStripEndToSpot, PlexStripEndId::GetEncoded(), PlexStripEndId::IsValid(), Msg::kVerbose, and MSG.

Referenced by GetPixelSpotIdVector(), PlexHandle::GetSEIdAltL(), and ValidateConsistency().

00245 { 
00246    // Convert RawChannelId into PlexStripEndId Alternative List (1:m mapping)
00247 
00248    //MSG("Plex",Msg::kVerbose)
00249    //   << " GetSEIdAltL RCID=" << rcid << ":" << endl;
00250 
00251    PlexSEIdAltL altlist;  // start with empty altlist
00252 
00253    // the map has the {pedestal,spars,common} mode bits off
00254    RawChannelId rcid0 = rcid;
00255    rcid0.ClearModeBits();
00256 
00257    // the near detector spectrometer can map RawChannel to >1 Pixel
00258    // far detector maps each Pixel to more than one StripEnd
00259    // do this as a nested loop over two multimaps
00260 
00261    typedef multimap<RawChannelId,PlexPixelSpotId>::const_iterator   rc2p_itr;
00262    typedef multimap<PlexPixelSpotId,PlexStripEndId>::const_iterator p2se_itr;
00263 
00264    pair<rc2p_itr,rc2p_itr> rc2p_limits = fChannelToPixel.equal_range(rcid0);
00265    for (rc2p_itr irc2p  = rc2p_limits.first; 
00266                  irc2p != rc2p_limits.second; ++irc2p) {
00267       pair<p2se_itr,p2se_itr> p2se_limits = 
00268          fPixelToStripEnd.equal_range(irc2p->second);
00269       for (p2se_itr ip2se  = p2se_limits.first;
00270                     ip2se != p2se_limits.second; ++ip2se) {
00271          PlexStripEndId seid = ip2se->second;
00272          if (seid.IsValid()) {
00273             // look to see if the spot is 0 signalling broken fiber
00274             PlexPixelSpotId spotid = fStripEndToSpot[seid];
00275             if (fgAltLHasBrokenFibers || spotid.GetSpot() != 0) {
00276                altlist.AddStripEndId(seid,spotid,0,calib,adc,time);
00277                //MSG("Plex",Msg::kVerbose)
00278                //    << "    add SEID=" << seid 
00279                //    << " " << seid.GetEncoded()
00280                //    << endl;
00281             }
00282             else {
00283                MSG("Plex",Msg::kVerbose)
00284                    << "    suppress broken fiber SEID=" << seid 
00285                    << " " << seid.GetEncoded()
00286                    << endl;
00287             }
00288          } // seid.IsValid()
00289       } // loop over Pixel->StripEnd
00290    } // loop over RawChannel->Pixel
00291 
00292 
00293    if ( fgAltLInitiallySortedBySEId )
00294      std::sort(altlist.begin(),altlist.end(),less_altl_seid());
00295 
00296    return altlist;
00297 }

RawChannelId Plexus::GetSpecialChannelContains ( const std::string &  key  )  const [virtual]

Definition at line 443 of file Plexus.cxx.

References fSpecialDescript.

Referenced by PlexHandle::GetSpecialChannelContains().

00444 {
00445    // look for a special channel description string that contains
00446    // the passed key.  Allowing one to distinguish between different
00447    // special channels of the same readout type by extending what
00448    // is put in the PLEXRAWCHANNELREADOUTTYPE table
00449 
00450   typedef map<RawChannelId,std::string>::const_iterator rc2string_itr;
00451   for (rc2string_itr irc2s  = fSpecialDescript.begin();
00452                      irc2s != fSpecialDescript.end(); ++ irc2s) {
00453     // lazy approach ... use TString's Contains() to do work
00454     TString description(irc2s->second.c_str());
00455     if (description.Contains(key.c_str())) return irc2s->first;
00456   }
00457   return RawChannelId();
00458 
00459 }

std::string Plexus::GetSpecialDescript ( const RawChannelId rcid  )  const [virtual]

Definition at line 433 of file Plexus.cxx.

References RawChannelId::ClearModeBits(), and fSpecialDescript.

Referenced by PlexHandle::GetSpecialDescript().

00434 {
00435    // if a special channel (Cerenkov, TOF, etc) from the 
00436    // PLEXRAWCHANNELREADOUTTYPE table return the associated string
00437    RawChannelId rcid0 = rcid;
00438    rcid0.ClearModeBits();
00439 
00440    return fSpecialDescript[rcid0];
00441 }

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

Definition at line 49 of file Plexus.h.

References fSpecialDescript.

Referenced by PlexHandle::GetSpecialDescriptMap().

00050                                { return fSpecialDescript; }

PlexStripEndId Plexus::GetStripEndId ( const PlexPixelSpotId psid  )  const [virtual]

Implements PlexusABC.

Definition at line 300 of file Plexus.cxx.

References fPixelToStripEnd, fStripEndToSpot, and PlexPixelSpotId::SetSpot().

Referenced by PlexHandle::GetStripEndId().

00301 { 
00302    // Convert PlexPixelSpotId into a PlexStripEndId (1:1)
00303 
00304    // this is a bit tricky because we've tossed the spot info
00305    // from the multimap fPixelToStripEnd for ease of building
00306    // AltL's, so we need to loop and test the round trip
00307 
00308    typedef multimap<PlexPixelSpotId,PlexStripEndId>::const_iterator p2se_itr;
00309 
00310    PlexPixelSpotId pixelid = psid;
00311    pixelid.SetSpot(0);  // zero out spot info for multimap pixel->seid(s)
00312 
00313    pair<p2se_itr,p2se_itr> p2se_limits = 
00314       fPixelToStripEnd.equal_range(pixelid);
00315    for (p2se_itr ip2se  = p2se_limits.first;
00316                  ip2se != p2se_limits.second; ++ip2se) {
00317       PlexStripEndId seid = ip2se->second;
00318       // check that this leads back to the *spot* we were given
00319 
00320       //was: PlexPixelSpotId testspot = fStripEndToSpot[seid];
00321       //     if (testspot == psid) return seid;
00322       //use find() to avoid adding null entries
00323       std::map<PlexStripEndId,PlexPixelSpotId>::const_iterator sepsItr = 
00324           fStripEndToSpot.find(seid);
00325       if (sepsItr->second == psid) return seid;
00326 
00327    }
00328 
00329    return PlexStripEndId();  // no match
00330 
00331 }

std::vector< PlexStripEndId > Plexus::GetStripEndIdVector ( const PlexLedId ledid  )  const [virtual]

Implements PlexusABC.

Definition at line 462 of file Plexus.cxx.

References fStripEndToLed.

Referenced by PlexHandle::GetStripEndIdVector().

00463 {
00464    // Convert PlexLedId into a vector of PlexStripEndId's (1:m)
00465 
00466    vector<PlexStripEndId> stripends;
00467 
00468    typedef map<PlexStripEndId,PlexLedId>::const_iterator se2led_itr;
00469 
00470    for (se2led_itr ise2led  = fStripEndToLed.begin();
00471                    ise2led != fStripEndToLed.end(); ++ise2led) {
00472       if (ise2led->second == ledid) stripends.push_back(ise2led->first);
00473    }
00474 
00475    return stripends;
00476 }

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

Implements PlexusABC.

Definition at line 73 of file Plexus.h.

References fVldRange.

Referenced by PlexHandle::GetVldRange().

00073 { return fVldRange; }

void Plexus::IncrementRef (  )  [inline]

Definition at line 75 of file Plexus.h.

References fRef.

Referenced by PlexHandle::operator=(), and PlexHandle::PlexHandle().

00075 { fRef++; }

Bool_t Plexus::IsCompatible ( const VldContext vldc  ) 

Definition at line 118 of file Plexus.cxx.

References fVldRange, and VldRange::IsCompatible().

00119 {
00120    // check compatibility of this plex with a context
00121 
00122    return fVldRange.IsCompatible(vldc);
00123 
00124 }

Bool_t Plexus::IsCompatible ( const VldContext vldc  ) 

Definition at line 109 of file Plexus.cxx.

References fVldRange, and VldRange::IsCompatible().

Referenced by PlexLoanPool::GetExistingPlexus().

00110 {
00111    // check compatibility of this plex with a context
00112 
00113    return fVldRange.IsCompatible(vldc);
00114 
00115 }

void Plexus::Print ( Option_t *  option  )  const

Definition at line 127 of file Plexus.cxx.

References ReadoutType::AsString(), VldRange::AsString(), CountRef(), fChannelToPinDiode, fChannelToPixel, fChannelToReadout, fPinDiodeToLed, fPixelToChannel, fPixelToStripEnd, fStripEndToLed, fStripEndToSpot, fVldRange, GetAllRawChannelIds(), Nav::GetName(), and GetReadoutType().

Referenced by PlexLoanPool::Print(), and PlexHandle::Print().

00128 {
00129    // Print info about this object
00130    cout << " " << TObject::GetName()
00131         << " has " << CountRef() << " references " << endl
00132         << "    " << fVldRange.AsString("a") << endl;
00133 
00134    TString opt(option);
00135    if (opt.Contains("s")) {
00136 
00137      printf("   ChannelToPixel:    %6u   PixelToChannel:     %6u\n",
00138             (UInt_t)fChannelToPixel.size(),(UInt_t)fPixelToChannel.size());
00139      printf("   PixelToStripEnd:   %6u   StripEndToSpot:     %6u\n",
00140             (UInt_t)fPixelToStripEnd.size(),(UInt_t)fStripEndToSpot.size());
00141      printf("   ChannelToReadout:  %6u\n",(UInt_t)fChannelToReadout.size());
00142      printf("   ChannelToPinDiode: %6u\n",(UInt_t)fChannelToPinDiode.size());
00143      printf("   StripEndToLed:     %6u   PinDiodeToLed:      %6u\n",
00144             (UInt_t)fStripEndToLed.size(),(UInt_t)fPinDiodeToLed.size());
00145 
00146      // classify readout types
00147      if (opt.Contains("r")) {
00148        const vector<RawChannelId>& all_rcid = GetAllRawChannelIds();
00149        printf("   There are %u unique RawChannelIds\n",(UInt_t)all_rcid.size());
00150 
00151        std::map<ReadoutType::Readout_t,UInt_t> readoutTypeCount;
00152        for (size_t i=0; i<all_rcid.size(); ++i) {
00153          RawChannelId rcid = all_rcid[i];
00154          ReadoutType::Readout_t rtype = GetReadoutType(rcid);
00155          readoutTypeCount[rtype]++;
00156        }
00157        
00158        std::map<ReadoutType::Readout_t,UInt_t>::const_iterator rtcItr = 
00159          readoutTypeCount.begin();
00160        while ( rtcItr != readoutTypeCount.end() ) {
00161          printf("     %-15s had %5d channels\n",
00162                 ReadoutType::AsString(rtcItr->first),
00163                 rtcItr->second);
00164          rtcItr++;
00165        }
00166      }
00167    }
00168 }

void Plexus::PurgeComponents ( UInt_t  purgeMask  )  [protected, virtual]

Definition at line 1141 of file Plexus.cxx.

References fAllChannels, fAllEastEnds, fAllLeds, fAllPinDiodes, fAllPixels, fAllSpots, fAllStripEnds, fAllStrips, fAllTubes, fAllWestEnds, fBuiltMaps, fChannelToPinDiode, fChannelToPixel, fChannelToReadout, fPinDiodeToLed, fPixelToChannel, fPixelToStripEnd, fSpecialDescript, fStripEndToLed, fStripEndToSpot, kAllVectors, kLedMaps, kPinDiodeMap, kPixelMaps, and kReadoutMap.

Referenced by PlexLoanPool::PurgeComponents().

01142 { 
01143   // clear out components of the plex 
01144   // generally done before writing it out to save space
01145 
01146   // clear both the map themselves and the flag bit indicating
01147   // whether the map is filled (used by lazy building)
01148 
01149 
01150   if (purgeMask & kPixelMaps) {
01151     fBuiltMaps &= ~kPixelMaps;
01152     fStripEndToSpot.clear();
01153     fPixelToStripEnd.clear();
01154     fPixelToChannel.clear();
01155     fChannelToPixel.clear();
01156   }
01157 
01158   if (purgeMask & kReadoutMap) {
01159     fBuiltMaps &= ~kReadoutMap;
01160     fChannelToReadout.clear();
01161     fSpecialDescript.clear();
01162   }
01163 
01164   if (purgeMask & kPinDiodeMap) {
01165     fBuiltMaps &= ~kPinDiodeMap;
01166     fChannelToPinDiode.clear();
01167   }
01168 
01169   if (purgeMask & kLedMaps) {
01170     fBuiltMaps &= ~kLedMaps;
01171     fPinDiodeToLed.clear();
01172     fStripEndToLed.clear();
01173   }
01174 
01175   if (purgeMask & kAllVectors) {
01176     fAllStripEnds.clear();
01177     fAllEastEnds.clear();
01178     fAllWestEnds.clear();
01179     fAllStrips.clear();
01180     fAllTubes.clear();
01181     fAllPixels.clear();
01182     fAllSpots.clear();
01183     fAllChannels.clear();
01184     fAllPinDiodes.clear();
01185     fAllLeds.clear();
01186   }
01187 
01188 }

static void Plexus::SetAltLHasBrokenFibers ( Bool_t  tf  )  [inline, static]

Definition at line 178 of file Plexus.h.

References fgAltLHasBrokenFibers.

00179      { fgAltLHasBrokenFibers = tf; }

static void Plexus::SetAltLInitiallySortedBySEId ( Bool_t  tf  )  [inline, static]

Definition at line 182 of file Plexus.h.

References fgAltLInitiallySortedBySEId.

void Plexus::TrimVldRange ( const char *  tblName = "",
const DbiValidityRec dbivrec = 0 
) const [protected]

Definition at line 1191 of file Plexus.cxx.

References fVldRange, DbiValidityRec::GetVldRange(), Msg::kWarning, MSG, and VldRange::TrimTo().

Referenced by BuildLedMaps(), BuildPinDiodeMap(), BuildPixelMaps(), and BuildReadoutMap().

01193 { 
01194    // Trim VldRange based on DbiValidityRec range info
01195 
01196    if (dbivrec) {
01197       fVldRange.TrimTo(dbivrec->GetVldRange());
01198    } else {
01199       MSG("Plex",Msg::kWarning) 
01200          << "No DbiValidityRec for table " << tblName << endl;
01201    }
01202 }

void Plexus::ValidateConsistency (  )  const [virtual]

Definition at line 1205 of file Plexus.cxx.

References RawChannelId::AsString(), BeamData::error(), fChannelToPixel, fPinDiodeToLed, GetAllPinDiodes(), PlexSEIdAltL::GetBestSEId(), RawChannelId::GetDetector(), PlexSEIdAltL::GetError(), GetSEIdAltL(), PlexPlaneId::IsVetoShield(), PlexSEIdAltL::kBadDetector, PlexSEIdAltL::kBadEnd, PlexSEIdAltL::kBadPlane, PlexSEIdAltL::kBadPlaneView, Detector::kFar, Msg::kInfo, PlexSEIdAltL::kUnchecked, MSG, and PlexSEIdAltL::Print().

Referenced by PlexHandle::ValidateConsistency().

01206 { 
01207    // Test tables for internal consistency
01208 
01209    typedef multimap<RawChannelId,PlexPixelSpotId>::const_iterator  rc2p_itr;
01210 
01211    RawChannelId rcid_last;
01212    rc2p_itr rcitr = fChannelToPixel.begin();
01213    rc2p_itr rcend = fChannelToPixel.end();
01214    while (rcitr != rcend) {
01215      RawChannelId rcid = rcitr->first;
01216      if (rcid != rcid_last) { // RawChannelId->PixelSpot is multimap
01217        PlexSEIdAltL altl = GetSEIdAltL(rcid,0,0,0);
01218        Bool_t printit = false;
01219 
01220        // make sure that far detector altl has 8 entries
01221        if (rcid.GetDetector() == Detector::kFar) {
01222          if ( altl.size() == 0 ) printit = true;
01223          else {
01224            PlexPlaneId plnid = altl.GetBestSEId();
01225            if ( altl.size() != 8 && !plnid.IsVetoShield() ) {
01226              MSG("Plex",Msg::kInfo) 
01227                << endl
01228                << " far detector PlexSEIdAltL.size() " << altl.size() 
01229                << " != 8" << endl;
01230              printit = true;
01231            }
01232          }
01233        }
01234 
01235        // test the alternative list for consistency
01236        Int_t error = altl.GetError(false);
01237        if (error) {
01238 
01239          printit = true;
01240          if (altl.empty()) {
01241            MSG("Plex",Msg::kInfo) 
01242              << " PlexSEIdAltL empty" 
01243              << endl;
01244            printit = false;
01245          }
01246          else {
01247            string etxt = " bad: ";
01248            if (error & PlexSEIdAltL::kBadDetector)  etxt += "detector ";
01249            if (error & PlexSEIdAltL::kBadEnd)       etxt += "end ";
01250            if (error & PlexSEIdAltL::kBadPlane)     etxt += "plane ";
01251            if (error & PlexSEIdAltL::kBadPlaneView) etxt += "view ";
01252            if (error & PlexSEIdAltL::kUnchecked)    etxt = " unchecked? ";
01253            MSG("Plex",Msg::kInfo) 
01254              << endl
01255              << " PlexSEIdAltL consistency error 0x"
01256              << hex << error << dec << etxt << endl;
01257          }
01258 
01259          pair<rc2p_itr,rc2p_itr> rc2p_limits =
01260            fChannelToPixel.equal_range(rcid);
01261          rc2p_itr next = rc2p_limits.first;  // range means 2nd is 1 too far
01262          if (++next == rc2p_limits.second) {
01263            // RawChannel only maps to one pixel
01264            MSG("Plex",Msg::kInfo)
01265              << " rcid " << rcid.AsString("ec") 
01266              << " single pixel: "
01267              << rc2p_limits.first->second.AsString("p") << endl;
01268          }
01269          else {
01270            // RawChannel maps to multiple pixels
01271            MSG("Plex",Msg::kInfo) 
01272              << " rcid " << rcid.AsString("ec") 
01273              << " pixel list: " << endl;
01274            for (rc2p_itr irc2p  = rc2p_limits.first;
01275                          irc2p != rc2p_limits.second; ++irc2p) {
01276              MSG("Plex",Msg::kInfo) 
01277                << "   " << irc2p->second.AsString("p") << endl;
01278            }
01279          }
01280 
01281        }
01282 
01283        if (printit) {
01284          // MSG("Plex",Msg::kInfo) << endl;
01285          altl.Print();
01286        }
01287 
01288      } // if new rcid
01289      // move along
01290      ++rcitr;
01291      rcid_last = rcid;
01292    } // while
01293 
01294    // test PinDiodes
01295    const std::vector<PlexPinDiodeId>& allpindiodes = GetAllPinDiodes();
01296    //if ( allpindiodes.size() != fChannelToPinDiode.size() )
01297    //  MSG("Plex",Msg::kInfo) 
01298    //    << "AllPinDiodes.size() = " << allpindiodes.size()
01299    //    << " vs. fChannelToPinDiode.size() = " << fChannelToPinDiode.size()
01300    //    << endl;
01301    if ( allpindiodes.size() != fPinDiodeToLed.size() ) {
01302      MSG("Plex",Msg::kInfo) 
01303        << "AllPinDiodes.size() = " << allpindiodes.size()
01304        << " vs. fPinDiodeToLed.size() = " << fPinDiodeToLed.size()
01305        << endl;
01306    }
01307    // test Leds
01308    //const std::vector<PlexLedId>& allleds = GetAllLeds();
01309    //if ( allleds.size() != fStripEndToLed.size() )
01310    //  MSG("Plex",Msg::kInfo) 
01311    //    << "AllLeds.size() = " << allleds.size()
01312    //    << " vs. fStripEndToLed.size() = " << fStripEndToLed.size()
01313    //    << endl;
01314    //if ( allled.size() != fPinDiodeToLed.size() )
01315    //  MSG("Plex",Msg::kInfo) 
01316    //    << "AllLeds.size() = " << allleds.size()
01317    //    << " vs. fPinDiodeToLed.size() = " << fPinDiodeToLed.size()
01318    //    << endl;
01319 
01320 
01321 }


Friends And Related Function Documentation

friend class PlexLoanPool [friend]

Reimplemented from PlexusABC.

Reimplemented in PlexusReroot.

Definition at line 23 of file Plexus.h.


Member Data Documentation

std::vector<RawChannelId> Plexus::fAllChannels [mutable, protected]

Definition at line 171 of file Plexus.h.

Referenced by GetAllRawChannelIds(), and PurgeComponents().

std::vector<PlexStripEndId> Plexus::fAllEastEnds [mutable, protected]

Definition at line 163 of file Plexus.h.

Referenced by GetAllStripEnds(), and PurgeComponents().

std::vector<PlexLedId> Plexus::fAllLeds [mutable, protected]

Definition at line 174 of file Plexus.h.

Referenced by GetAllLeds(), and PurgeComponents().

std::vector<PlexPinDiodeId> Plexus::fAllPinDiodes [mutable, protected]

Definition at line 173 of file Plexus.h.

Referenced by GetAllPinDiodes(), and PurgeComponents().

std::vector<PlexPixelSpotId> Plexus::fAllPixels [mutable, protected]

Definition at line 168 of file Plexus.h.

Referenced by GetAllPixelSpotIds(), and PurgeComponents().

std::vector<PlexPixelSpotId> Plexus::fAllSpots [mutable, protected]

Definition at line 169 of file Plexus.h.

Referenced by GetAllPixelSpotIds(), and PurgeComponents().

std::vector<PlexStripEndId> Plexus::fAllStripEnds [mutable, protected]

Definition at line 162 of file Plexus.h.

Referenced by GetAllStripEnds(), and PurgeComponents().

std::vector<PlexStripEndId> Plexus::fAllStrips [mutable, protected]

Definition at line 165 of file Plexus.h.

Referenced by GetAllStripEnds(), and PurgeComponents().

std::vector<PlexPixelSpotId> Plexus::fAllTubes [mutable, protected]

Definition at line 167 of file Plexus.h.

Referenced by GetAllPixelSpotIds(), and PurgeComponents().

std::vector<PlexStripEndId> Plexus::fAllWestEnds [mutable, protected]

Definition at line 164 of file Plexus.h.

Referenced by GetAllStripEnds(), and PurgeComponents().

UInt_t Plexus::fBuiltMaps [mutable, protected]

Definition at line 137 of file Plexus.h.

Referenced by BuildLedMaps(), BuildPinDiodeMap(), BuildPixelMaps(), BuildReadoutMap(), and PurgeComponents().

std::map<RawChannelId,PlexPinDiodeId> Plexus::fChannelToPinDiode [mutable, protected]

Definition at line 155 of file Plexus.h.

Referenced by BuildPinDiodeMap(), BuildReadoutMap(), GetAllPinDiodes(), GetAllRawChannelIds(), GetPinDiodeId(), GetRawChannelId(), Print(), and PurgeComponents().

std::multimap<RawChannelId,PlexPixelSpotId> Plexus::fChannelToPixel [mutable, protected]

Definition at line 142 of file Plexus.h.

Referenced by BuildPixelMaps(), BuildReadoutMap(), GetAllRawChannelIds(), GetPixelSpotIdVector(), GetSEIdAltL(), Print(), PurgeComponents(), and ValidateConsistency().

std::map<RawChannelId,UShort_t> Plexus::fChannelToReadout [mutable, protected]

Definition at line 151 of file Plexus.h.

Referenced by BuildReadoutMap(), GetAllRawChannelIds(), GetReadoutType(), Print(), and PurgeComponents().

Bool_t Plexus::fgAltLHasBrokenFibers = false [static, protected]

Definition at line 189 of file Plexus.h.

Referenced by GetAltLHasBrokenFibers(), GetSEIdAltL(), and SetAltLHasBrokenFibers().

Bool_t Plexus::fgAltLInitiallySortedBySEId = true [static, protected]

Definition at line 190 of file Plexus.h.

Referenced by GetAltLInitiallySortedBySEId(), GetSEIdAltL(), and SetAltLInitiallySortedBySEId().

std::map<PlexPinDiodeId,PlexLedId> Plexus::fPinDiodeToLed [mutable, protected]

Definition at line 158 of file Plexus.h.

Referenced by BuildLedMaps(), GetAllLeds(), GetAllPinDiodes(), GetLedId(), GetPinDiodeIds(), Print(), PurgeComponents(), and ValidateConsistency().

std::map<PlexPixelSpotId,RawChannelId> Plexus::fPixelToChannel [mutable, protected]

Definition at line 146 of file Plexus.h.

Referenced by BuildPixelMaps(), GetRawChannelId(), Print(), and PurgeComponents().

std::multimap<PlexPixelSpotId,PlexStripEndId> Plexus::fPixelToStripEnd [mutable, protected]

Definition at line 143 of file Plexus.h.

Referenced by BuildPixelMaps(), GetSEIdAltL(), GetStripEndId(), Print(), and PurgeComponents().

Int_t Plexus::fRef [mutable, protected]

Definition at line 135 of file Plexus.h.

Referenced by CountRef(), DecrementRef(), and IncrementRef().

std::map<RawChannelId,std::string> Plexus::fSpecialDescript [mutable, protected]

Definition at line 153 of file Plexus.h.

Referenced by BuildReadoutMap(), GetAllRawChannelIds(), GetSpecialChannelContains(), GetSpecialDescript(), GetSpecialDescriptMap(), and PurgeComponents().

std::map<PlexStripEndId,PlexLedId> Plexus::fStripEndToLed [mutable, protected]

Definition at line 157 of file Plexus.h.

Referenced by BuildLedMaps(), GetAllLeds(), GetLedId(), GetStripEndIdVector(), Print(), and PurgeComponents().

std::map<PlexStripEndId,PlexPixelSpotId> Plexus::fStripEndToSpot [mutable, protected]

Definition at line 145 of file Plexus.h.

Referenced by BuildPixelMaps(), GetAllPixelSpotIds(), GetAllStripEnds(), GetPixelSpotId(), GetRawChannelId(), GetSEIdAltL(), GetStripEndId(), Print(), and PurgeComponents().

VldRange Plexus::fVldRange [mutable, protected]

outstanding handles

Definition at line 136 of file Plexus.h.

Referenced by PlexusReroot::BuildPinDiodeMap(), PlexusReroot::BuildPixelMaps(), PlexusReroot::BuildReadoutMap(), GetVldRange(), IsCompatible(), Plexus(), PlexusReroot::PlexusReroot(), Print(), and TrimVldRange().


The documentation for this class was generated from the following files:
Generated on Wed Dec 10 22:50:20 2014 for loon by  doxygen 1.4.7