25 std::unique_lock l (ptr.m_mutex);
28 if (ptr.m_ptr ==
this)
34 const EventContext& ctx = Gaudi::Hive::currentContext();
35 if (ctx.slot() == EventContext::INVALID_CONTEXT_ID) {
36 EventContext ctx2 (0, 0);
37 return *ptrs.get(ctx2);
39 return *ptrs.get(ctx);
44 std::unique_lock l (ptr.m_mutex);
46 ptr.m_ptr =
new MYSQL;
56 return it->second.get();
66 return it->second.get();
73 ATH_MSG_VERBOSE(
" MYSQL::GetStationPosition for " << nameType <<
" fi/zi " << fi <<
" " << zi );
79 p = (*(st->FindPosition(zi, fi))).second;
80 ATH_MSG_VERBOSE(
" at p.fi,zi " << p.phiindex <<
" " << p.zindex <<
" shift/z " << p.shift <<
" " << p.z );
83 ATH_MSG_WARNING(
"::GetStationPosition nothing found for " << nameType <<
" at fi/zi " << fi <<
" " << zi );
89 ATH_MSG_VERBOSE(
"MYSQL::GetTgcRPars looking for a TgcRPars named <" << name <<
">" );
109 return it->second.get();
111 ATH_MSG_VERBOSE(
"MYSQL:: Technology " << name <<
"+++++++++ not found!" );
119 return it->second.get();
121 ATH_MSG_VERBOSE(
"MYSQL:: Technology " << name <<
"+++++++++ not found!" );
126 ATH_MSG_VERBOSE(
"MYSQL::StoreTechnology /// techn. named " << t->GetName() );
128 std::unique_ptr<Technology>& stored =
m_technologies[t->GetName()];
130 ATH_MSG_ERROR(
"MYSQL::StoreTechnology ERROR /// This place is already taken !!! for " << t->GetName() );
142 ATH_MSG_VERBOSE(
"MYSQL::StoreTgcRPars named " << s->GetName() <<
" located @ " << s <<
" jsta = " << s->chamberType() );
167 return it->second.get();
169 ATH_MSG_VERBOSE(
"MYSQL:: Technology " << name <<
"+++++++++ not found!" );
170 for (
unsigned int i = 1; i <= 20; i++) {
172 sprintf(chindex,
"%u", i);
177 ATH_MSG_VERBOSE(
" Selecting a technology called <" << newname <<
">" );
178 return it->second.get();
185 std::ostringstream mystream;
187 ATH_MSG_VERBOSE(__FILE__<<
":"<<__LINE__<<
" from " << statType <<
" fi " << fi <<
" zi " << zi <<
" we get as key " << mystream.str() );
188 return mystream.str();
222 throw std::runtime_error(
"AllocPosFIndName() -- Bad key");
243 int value = it->second;
244 int subtype =
static_cast<int>(value / 100);
249 int value = (*it).second;
250 int cutout =
static_cast<int>(value % 100);
278 <<
" resetting to <" << s <<
">" );
294 <<
" resetting to <" << s <<
">" );
311 ATH_MSG_ERROR(
"MYSQL::allocPosFindCutout for key " << key <<
" no element found" );
321 ATH_MSG_ERROR(
"MYSQL::allocPosFindSubtype for key " << key <<
" no element found" );
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
Maintain a set of objects, one per slot.
Define macros for attributes used to control the static checker.
std::atomic_flag m_initialized ATLAS_THREAD_SAFE
Messaging initialized (initMessaging)
AthMessaging(IMessageSvc *msgSvc, const std::string &name)
Constructor.
The TransientConstSharedPtr allows non-const access if the pointer itself is non-const but in the con...
AllocposIterator AllocposBegin() const
const std::string & getGeometryVersion() const
std::string m_geometry_version
const Station * GetStation(const std::string &name) const
void setLayoutName(const std::string &s)
const std::string & getLayoutName() const
void StoreTgcRPars(GeoModel::TransientConstSharedPtr< TgcReadoutParams > t)
void StoreStation(Station *s)
std::string AllocposFindName(int) const
int NTgcReadTypes() const
Position GetStationPosition(const std::string &nameType, int fi, int zi) const
void set_amdb_from_RDB(bool)
TgcReadParsMap m_tgcReadouts
Technology * GetTechnology(const std::string &name)
StationMap::const_iterator StationIterator
int getNovaVersion() const
static LockedMYSQL GetPointer()
std::map< std::string, GeoModel::TransientConstSharedPtr< TgcReadoutParams > > TgcReadParsMap
AllocposIterator AllocposFind(int) const
const Technology * GetATechnology(const std::string &name) const
allocPosIterator allocPosBegin() const
const TgcReadParsMap & tgcReadParsMap() const
void PrintAllStations() const
const StationMap & stationMap() const
std::string allocPosBuildKey(const std::string &statType, int fi, int zi) const
std::map< std::string, std::unique_ptr< Station > > StationMap
bool amdb_from_RDB() const
int getNovaReadVersion() const
std::array< GeoModel::TransientConstSharedPtr< TgcReadoutParams >, NTgcReadouts > m_tgcReadout
AllocposIterator AllocposEnd() const
std::map< std::string, int > m_allocPos
allocPosIterator allocPosEnd() const
void setNovaVersion(int i)
TechnologyMap m_technologies
TgcReadParsMap::const_iterator TgcReadParsIterator
static MYSQLPtr & GetMYSQLPtr()
std::string m_layout_name
void StoreTechnology(Technology *t)
CxxUtils::LockedPointer< MYSQL > LockedMYSQL
void addAllocpos(int i, const std::string &str)
void addallocPos(const std::string &key, int value)
int allocPosFindCutout(const std::string &statType, int fi, int zi) const
allocPosIterator allocPosFind(const std::string &key) const
GeoModel::TransientConstSharedPtr< TgcReadoutParams > GetTgcRPars(const std::string &name) const
std::map< int, std::string > m_allocatedpos
void setGeometryVersion(const std::string &s)
int allocPosBuildValue(int subtype, int cutout) const
TechnologyMap::const_iterator TechnologyIterator
void setNovaReadVersion(int i)
int allocPosFindSubtype(const std::string &statType, int fi, int zi) const
Maintain a set of objects, one per slot.
Ensure that the Athena extensions are properly loaded.
std::map< std::string, int >::const_iterator allocPosIterator
std::string buildString(int i, int ncha)
std::map< int, std::string >::const_iterator AllocposIterator