ATLAS Offline Software
Loading...
Searching...
No Matches
VP1DetInfo::Imp Class Reference

Static Public Member Functions

template<class T>
static const T * cachedRetrieve (const T *&cachedPtr, const char *key, const bool &configallows)

Static Public Attributes

static bool m_initialised = false
static const char m_badInitFlag = ' '
static const InDetDD::PixelDetectorManagerm_pixelDetMgr = 0
static const InDetDD::SCT_DetectorManagerm_sctDetMgr = 0
static const InDetDD::TRT_DetectorManagerm_trtDetMgr = 0
static const MuonGM::MuonDetectorManagerm_muonDetMgr = 0
static const TileDetDescrManagerm_tileDetMgr = 0
static const EMBDetectorManagerm_embDetMgr = 0
static const HECDetectorManagerm_hecDetMgr = 0
static const EMECDetectorManagerm_emecDetMgr = 0
static const LArDetectorManagerm_larDetMgr = 0
static const FCALDetectorManagerm_fcalDetMgr = 0
static const CaloIdManagerm_caloIdMgr = 0
static const AtlasDetectorIDm_atlasIDHelper = 0
static const CscIdHelperm_cscIDHelper = 0
static const RpcIdHelperm_rpcIDHelper = 0
static const TgcIdHelperm_tgcIDHelper = 0
static const sTgcIdHelperm_stgcIDHelper = 0
static const MdtIdHelperm_mdtIDHelper = 0
static const MmIdHelperm_mmIDHelper = 0
static const PixelIDm_pixelIDHelper = 0
static const SCT_IDm_sctIDHelper = 0
static const TRT_IDm_trtIDHelper = 0

Detailed Description

Definition at line 49 of file VP1DetInfo.cxx.

Member Function Documentation

◆ cachedRetrieve()

template<class T>
const T * VP1DetInfo::Imp::cachedRetrieve ( const T *& cachedPtr,
const char * key,
const bool & configallows )
static

Definition at line 109 of file VP1DetInfo.cxx.

109 {
110 const T * bad = static_cast<const T*>(static_cast<const void*>(&m_badInitFlag));
111 if (cachedPtr)
112 return ( cachedPtr==bad? 0 : cachedPtr );
113 QString key(preferredKey);
114 if (!configallows) {
115 VP1Msg::messageDebug("VP1DetInfo WARNING: Will not attempt to get (type="+QString(typeid(T).name())+", key="+key+") due to missing/disabled features in job!");
116 cachedPtr = bad;
117 return 0;
118 }
119 if (!VP1SGContentsHelper(VP1AthenaPtrs::detectorStore()).contains<T>(key)) {
120 //Try to gracefully guess at a different key:
121 QStringList keys = VP1SGContentsHelper(VP1AthenaPtrs::detectorStore()).getKeys<T>();
122 if (keys.empty()) {
123 VP1Msg::messageDebug("VP1DetInfo WARNING: Could not find (type="+QString(typeid(T).name())+") in detector store (expected key="+key+")");
124 cachedPtr = bad;
125 return 0;
126 }
127 if (keys.count()>1) {
128 VP1Msg::messageDebug("VP1DetInfo WARNING: Could not find (type="+QString(typeid(T).name())+", key="+key+") in detector store, and could not uniquely guess at alternate key.");
129 cachedPtr = bad;
130 return 0;
131 }
132 VP1Msg::messageDebug("VP1DetInfo WARNING: Could not find (type="+QString(typeid(T).name())+", key="+key+") in detector store. Trying with key="+keys.first()+")");
133 key = keys.first();
134 }
135 if (!VP1SGAccessHelper(VP1AthenaPtrs::detectorStore()).retrieve(cachedPtr,key)||!cachedPtr) {
136 VP1Msg::messageDebug("VP1DetInfo WARNING: Could not retrieve (type="+QString(typeid(T).name())+", key="+key+") from detector store!");
137 cachedPtr = bad;
138 return 0;
139 }
140 VP1Msg::messageVerbose("VP1DetInfo Succesfully retrieved (type="+QString(typeid(T).name())+", key="+key+") from detector store!");
141 return cachedPtr;
142
143}
static StoreGateSvc * detectorStore()
static const char m_badInitFlag
static void messageVerbose(const QString &)
Definition VP1Msg.cxx:84
static void messageDebug(const QString &)
Definition VP1Msg.cxx:39
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:114
unsigned long long T
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

Member Data Documentation

◆ m_atlasIDHelper

const AtlasDetectorID * VP1DetInfo::Imp::m_atlasIDHelper = 0
static

Definition at line 69 of file VP1DetInfo.cxx.

◆ m_badInitFlag

const char VP1DetInfo::Imp::m_badInitFlag = ' '
static

Definition at line 55 of file VP1DetInfo.cxx.

◆ m_caloIdMgr

const CaloIdManager * VP1DetInfo::Imp::m_caloIdMgr = 0
static

Definition at line 67 of file VP1DetInfo.cxx.

◆ m_cscIDHelper

const CscIdHelper * VP1DetInfo::Imp::m_cscIDHelper = 0
static

Definition at line 70 of file VP1DetInfo.cxx.

◆ m_embDetMgr

const EMBDetectorManager * VP1DetInfo::Imp::m_embDetMgr = 0
static

Definition at line 62 of file VP1DetInfo.cxx.

◆ m_emecDetMgr

const EMECDetectorManager * VP1DetInfo::Imp::m_emecDetMgr = 0
static

Definition at line 64 of file VP1DetInfo.cxx.

◆ m_fcalDetMgr

const FCALDetectorManager * VP1DetInfo::Imp::m_fcalDetMgr = 0
static

Definition at line 66 of file VP1DetInfo.cxx.

◆ m_hecDetMgr

const HECDetectorManager * VP1DetInfo::Imp::m_hecDetMgr = 0
static

Definition at line 63 of file VP1DetInfo.cxx.

◆ m_initialised

bool VP1DetInfo::Imp::m_initialised = false
static

Definition at line 54 of file VP1DetInfo.cxx.

◆ m_larDetMgr

const LArDetectorManager * VP1DetInfo::Imp::m_larDetMgr = 0
static

Definition at line 65 of file VP1DetInfo.cxx.

◆ m_mdtIDHelper

const MdtIdHelper * VP1DetInfo::Imp::m_mdtIDHelper = 0
static

Definition at line 74 of file VP1DetInfo.cxx.

◆ m_mmIDHelper

const MmIdHelper * VP1DetInfo::Imp::m_mmIDHelper = 0
static

Definition at line 75 of file VP1DetInfo.cxx.

◆ m_muonDetMgr

const MuonGM::MuonDetectorManager * VP1DetInfo::Imp::m_muonDetMgr = 0
static

Definition at line 60 of file VP1DetInfo.cxx.

◆ m_pixelDetMgr

const InDetDD::PixelDetectorManager * VP1DetInfo::Imp::m_pixelDetMgr = 0
static

Definition at line 57 of file VP1DetInfo.cxx.

◆ m_pixelIDHelper

const PixelID * VP1DetInfo::Imp::m_pixelIDHelper = 0
static

Definition at line 76 of file VP1DetInfo.cxx.

◆ m_rpcIDHelper

const RpcIdHelper * VP1DetInfo::Imp::m_rpcIDHelper = 0
static

Definition at line 71 of file VP1DetInfo.cxx.

◆ m_sctDetMgr

const InDetDD::SCT_DetectorManager * VP1DetInfo::Imp::m_sctDetMgr = 0
static

Definition at line 58 of file VP1DetInfo.cxx.

◆ m_sctIDHelper

const SCT_ID * VP1DetInfo::Imp::m_sctIDHelper = 0
static

Definition at line 77 of file VP1DetInfo.cxx.

◆ m_stgcIDHelper

const sTgcIdHelper * VP1DetInfo::Imp::m_stgcIDHelper = 0
static

Definition at line 73 of file VP1DetInfo.cxx.

◆ m_tgcIDHelper

const TgcIdHelper * VP1DetInfo::Imp::m_tgcIDHelper = 0
static

Definition at line 72 of file VP1DetInfo.cxx.

◆ m_tileDetMgr

const TileDetDescrManager * VP1DetInfo::Imp::m_tileDetMgr = 0
static

Definition at line 61 of file VP1DetInfo.cxx.

◆ m_trtDetMgr

const InDetDD::TRT_DetectorManager * VP1DetInfo::Imp::m_trtDetMgr = 0
static

Definition at line 59 of file VP1DetInfo.cxx.

◆ m_trtIDHelper

const TRT_ID * VP1DetInfo::Imp::m_trtIDHelper = 0
static

Definition at line 78 of file VP1DetInfo.cxx.


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