|
ATLAS Offline Software
|
Go to the documentation of this file.
18 #include "Identifier/Identifier.h"
22 #include "GaudiKernel/StatusCode.h"
25 static const std::string coracool(
"CORACOOL");
26 static const std::string coolVectorPayload(
"COOLVECTOR");
27 static const std::string defaultSource(coracool);
28 static const std::string
file(
"SCT_Sept08Cabling_svc.dat");
38 return (
hash>>1) << 1;
54 m_usingDatabase=(cablingDataSource == coracool) or (cablingDataSource == coolVectorPayload) or (cablingDataSource ==
file);
57 return StatusCode::SUCCESS;
69 return data->getHashEntries();
74 const EventContext& ctx{Gaudi::Hive::currentContext()};
81 return (
size(ctx)==0);
86 const EventContext& ctx{Gaudi::Hive::currentContext()};
95 if (withWarnings)
ATH_MSG_WARNING(
"Invalid online id ("<<std::hex<<onlineId<<
") "<<std::dec);
100 const std::string alternative=
m_usingDatabase?
"text file cabling":
"cabling from database";
101 if (withWarnings)
ATH_MSG_WARNING(
"Invalid online id ("<<std::hex<<onlineId<<
") try using the "<<alternative<<std::dec);
111 return data->getHashFromOnlineId(onlineId);
116 const EventContext& ctx{Gaudi::Hive::currentContext()};
129 return data->getOnlineIdFromHash(
hash);
134 const EventContext& ctx{Gaudi::Hive::currentContext()};
141 if (not offlineId.
is_valid())
return invalidId;
148 const EventContext& ctx{Gaudi::Hive::currentContext()};
160 const EventContext& ctx{Gaudi::Hive::currentContext()};
172 const EventContext& ctx{Gaudi::Hive::currentContext()};
187 return data->getHashFromSerialNumber(sn);
192 const EventContext& ctx{Gaudi::Hive::currentContext()};
198 if (not
hash.is_valid())
return invalidSn;
208 return data->getSerialNumberFromHash(evenHash);
213 const EventContext& ctx{Gaudi::Hive::currentContext()};
225 data->getRods(usersVector);
230 const EventContext& ctx{Gaudi::Hive::currentContext()};
237 const bool withWarnings{
false};
240 if (thisHash != invalidHash) {
241 usersVector.push_back(thisHash);
248 const EventContext& ctx{Gaudi::Hive::currentContext()};
255 return condData.retrieve();
def retrieve(aClass, aKey=None)
char data[hepevt_bytes_allocation_ATLAS]
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
bool is_valid() const
Check if id is in a valid state.
bool is_valid(const bool usingDbCabling) const
Check whether the onlineId is valid, with flag to switch between validity from the database or text f...
::StatusCode StatusCode
StatusCode definition for legacy code.
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
StatusCode initialize(bool used=true)
bool isWellFormed() const
Cursory check on whether the serial number is well formed N.B.
#define ATH_MSG_WARNING(x)
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
std::uint32_t rod() const
Return the rod/rob Id.