ATLAS Offline Software
Public Member Functions | Friends | List of all members
DetDescrCnvSvc Class Reference

#include <DetDescrCnvSvc.h>

Inheritance diagram for DetDescrCnvSvc:
Collaboration diagram for DetDescrCnvSvc:

Public Member Functions

virtual StatusCode initialize ()
 Initialize the service. More...
 
virtual StatusCode queryInterface (const InterfaceID &riid, void **ppvInterface)
 Identify interfaces to which this service is responsive. More...
 
virtual StatusCode addToDetStore (const CLID &clid, const std::string &name) const
 Add new address to the Detector Store. More...
 
virtual StatusCode createAddress (long svc_type, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress)
 Basic create address. More...
 
virtual StatusCode createAddress (long svc_type, const CLID &clid, const std::string &refAddress, IOpaqueAddress *&refpAddress)
 Create address from string form. More...
 
virtual StatusCode convertAddress (const IOpaqueAddress *pAddress, std::string &refAddress)
 Convert address to string form. More...
 

Friends

class SvcFactory< DetDescrCnvSvc >
 Allow the factory class access to the constructor. More...
 

: Object implementation


StoreGateSvcm_detStore {nullptr}
 
StringArrayProperty m_detMgrs {this, "DetectorManagers", {}}
 
StringArrayProperty m_detNodes {this, "DetectorNodes", {}}
 
BooleanProperty m_decodeIdDict {this, "DecodeIdDict", true}
 
BooleanProperty m_idDictFromRDB {this, "IdDictFromRDB", false}
 
StringProperty m_idDictName {this, "IdDictName", ""}
 
StringProperty m_idDictGlobalTag {this, "IdDictGlobalTag", ""}
 
StringProperty m_idDictATLASName {this, "AtlasIDFileName", ""}
 
StringProperty m_idDictInDetName {this, "InDetIDFileName", ""}
 
StringProperty m_idDictLArName {this, "LArIDFileName", ""}
 
StringProperty m_idDictTileName {this, "TileIDFileName", ""}
 
StringProperty m_idDictLVL1Name {this, "CaloIDFileName", ""}
 
StringProperty m_idDictMuonName {this, "MuonIDFileName", ""}
 
StringProperty m_idDictLArHighVoltageName
 
StringProperty m_idDictLArElectrodeName {this, "LArElectrodeIDFileName", ""}
 
StringProperty m_idDictForwardName {this, "ForwardIDFileName", ""}
 
StringProperty m_fcal2dNeighborsName {this, "FCAL2DNeighborsFileName", ""}
 
StringProperty m_fcal3dNeighborsNextName
 
StringProperty m_fcal3dNeighborsPrevName
 
StringProperty m_tileNeighborsName {this, "TileNeighborsFileName", ""}
 
StringProperty m_fullAtlasNeighborsName
 
BooleanProperty m_fromRoot {this, "ReadFromROOT", false}
 
BooleanProperty m_fromNova {this, "ReadFromNova", false}
 
BooleanProperty m_detElemsfromDetNodes
 
BooleanProperty m_compact_ids_only {this, "CompactIDsOnly", false}
 
BooleanProperty m_do_checks {this, "DoIdChecks", false}
 
BooleanProperty m_do_neighbours {this, "DoInitNeighbours", true}
 
BooleanProperty m_hasCSC {this, "HasCSC", false}
 Switch on/off the muon detectors. More...
 
BooleanProperty m_hasSTGC {this, "HasSTgc", false}
 
BooleanProperty m_hasMM {this, "HasMM", false}
 
BooleanProperty m_hasMDT {this, "HasMDT", true}
 
BooleanProperty m_hasRPC {this, "HasRPC", true}
 
BooleanProperty m_hasTGC {this, "HasTGC", true}
 
BooleanProperty m_useGeomDB_InDet {this, "useGeomDB_InDet", false}
 
 DetDescrCnvSvc (const std::string &name, ISvcLocator *svc)
 Standard Constructor. More...
 
virtual ~DetDescrCnvSvc ()
 Standard Destructor. More...
 
StatusCode fillTDSRefs ()
 
void initTDSItems ()
 
MsgStream & msg (MSG::Level lvl) const
 

Detailed Description

Definition at line 17 of file DetDescrCnvSvc.h.

Constructor & Destructor Documentation

◆ DetDescrCnvSvc()

DetDescrCnvSvc::DetDescrCnvSvc ( const std::string &  name,
ISvcLocator *  svc 
)

Standard Constructor.

Standard constructor.

Definition at line 25 of file DetDescrCnvSvc.cxx.

26  : ConversionSvc(name, svc, DetDescr_StorageType) {}

◆ ~DetDescrCnvSvc()

DetDescrCnvSvc::~DetDescrCnvSvc ( )
virtualdefault

Standard Destructor.

Member Function Documentation

◆ addToDetStore()

StatusCode DetDescrCnvSvc::addToDetStore ( const CLID clid,
const std::string &  name 
) const
virtual

Add new address to the Detector Store.

Definition at line 174 of file DetDescrCnvSvc.cxx.

175  {
176  // Based on input parameters, create StoreGate proxies with
177  // DetDescrAddresses in the detector store for the different
178  // detectors.
179 
180  // fill in the Addresses for Transient Detector Store objects
181 
182  DetDescrAddress *addr = new DetDescrAddress(clid, name, name);
184  ATH_MSG_INFO(" filling address for " << (*addr->par()) << " with CLID "
185  << addr->clID() << " and storage type "
186  << addr->svcType()
187  << " to detector store ");
188  return StatusCode::SUCCESS;
189 }

◆ convertAddress()

StatusCode DetDescrCnvSvc::convertAddress ( const IOpaqueAddress *  pAddress,
std::string &  refAddress 
)
virtual

Convert address to string form.

Definition at line 163 of file DetDescrCnvSvc.cxx.

164  {
165  const DetDescrAddress *addr =
166  dynamic_cast<const DetDescrAddress *>(pAddress);
167  if (!addr)
168  return StatusCode::FAILURE;
169  return addr->toString(refAddress);
170 }

◆ createAddress() [1/2]

StatusCode DetDescrCnvSvc::createAddress ( long  svc_type,
const CLID clid,
const std::string &  refAddress,
IOpaqueAddress *&  refpAddress 
)
virtual

Create address from string form.

Definition at line 137 of file DetDescrCnvSvc.cxx.

139  {
140  try {
141  refpAddress = new DetDescrAddress(clid);
142  DetDescrAddress *ddAddr;
143  ddAddr = dynamic_cast<DetDescrAddress *>(refpAddress);
144  if (!ddAddr) {
145  MsgStream log(msgSvc(), name());
146  log << MSG::FATAL << "Could not cast to DetDescrAddress." << endmsg;
147  return StatusCode::FAILURE;
148  }
149  if (ddAddr->fromString(refAddress).isFailure()) {
150  MsgStream log(msgSvc(), name());
151  log << MSG::FATAL << "Could not assign address " << refAddress
152  << endmsg;
153  return StatusCode::FAILURE;
154  }
155  } catch (...) {
156  refpAddress = 0;
157  }
158  return (refpAddress != 0) ? StatusCode::SUCCESS : StatusCode::FAILURE;
159 }

◆ createAddress() [2/2]

StatusCode DetDescrCnvSvc::createAddress ( long  svc_type,
const CLID clid,
const std::string *  par,
const unsigned long *  ip,
IOpaqueAddress *&  refpAddress 
)
virtual

Basic create address.

Create a Generic address using explicit arguments to identify a single object.

Definition at line 126 of file DetDescrCnvSvc.cxx.

130  {
131  refpAddress = nullptr;
132  return StatusCode::FAILURE;
133 }

◆ fillTDSRefs()

StatusCode DetDescrCnvSvc::fillTDSRefs ( )
private

◆ initialize()

StatusCode DetDescrCnvSvc::initialize ( )
virtual

Initialize the service.

Definition at line 52 of file DetDescrCnvSvc.cxx.

52  {
54  ATH_MSG_INFO(" initializing ");
55 
56  // get DetectorStore service
57  ATH_CHECK(service("DetectorStore", m_detStore));
58  ATH_MSG_INFO("Found DetectorStore service");
59 
60  // fill in the Addresses for Transient Detector Store objects
61  ATH_MSG_INFO(" filling proxies for detector managers ");
62 
63  ATH_CHECK(addToDetStore(117659265, "CaloTTMgr"));
64  ATH_CHECK(addToDetStore(4548337, "CaloMgr"));
65  ATH_CHECK(addToDetStore(241807251, "CaloSuperCellMgr"));
66  ATH_CHECK(addToDetStore(125856940, "CaloIdManager"));
67  // IdDict:
68  ATH_CHECK(addToDetStore(2411, "IdDict"));
69 
70  // IdHelpers
71  ATH_CHECK(addToDetStore(164875623, "AtlasID"));
72  ATH_CHECK(addToDetStore(2516, "PixelID"));
73  ATH_CHECK(addToDetStore(2517, "SCT_ID"));
74  ATH_CHECK(addToDetStore(2518, "TRT_ID"));
75  ATH_CHECK(addToDetStore(131939624, "PLR_ID"));
76  ATH_CHECK(addToDetStore(79264207, "HGTD_ID"));
77  ATH_CHECK(addToDetStore(129452393, "SiliconID"));
78  ATH_CHECK(addToDetStore(163583365, "LArEM_ID"));
79  ATH_CHECK(addToDetStore(99488227, "LArEM_SuperCell_ID"));
80  ATH_CHECK(addToDetStore(3870484, "LArHEC_ID"));
81  ATH_CHECK(addToDetStore(254277678, "LArHEC_SuperCell_ID"));
82  ATH_CHECK(addToDetStore(45738051, "LArFCAL_ID"));
83  ATH_CHECK(addToDetStore(12829437, "LArFCAL_SuperCell_ID"));
84  ATH_CHECK(addToDetStore(79264204, "LArMiniFCAL_ID"));
85  ATH_CHECK(addToDetStore(158698068, "LArOnlineID"));
86  ATH_CHECK(addToDetStore(38321944, "TTOnlineID"));
87  ATH_CHECK(addToDetStore(115600394, "LArOnline_SuperCellID"));
88  ATH_CHECK(addToDetStore(27863673, "LArHVLineID"));
89  ATH_CHECK(addToDetStore(80757351, "LArElectrodeID"));
90  ATH_CHECK(addToDetStore(2901, "TileID"));
91  ATH_CHECK(addToDetStore(49557789, "Tile_SuperCell_ID"));
92  ATH_CHECK(addToDetStore(2902, "TileHWID"));
93  ATH_CHECK(addToDetStore(2903, "TileTBID"));
94 
95  if (m_hasMDT)
96  ATH_CHECK(addToDetStore(4170, "MDTIDHELPER"));
97  if (m_hasCSC)
98  ATH_CHECK(addToDetStore(4171, "CSCIDHELPER"));
99 
100  if (m_hasRPC)
101  ATH_CHECK(addToDetStore(4172, "RPCIDHELPER"));
102  if (m_hasTGC)
103  ATH_CHECK(addToDetStore(4173, "TGCIDHELPER"));
104  if (m_hasSTGC)
105  ATH_CHECK(addToDetStore(4174, "STGCIDHELPER"));
106  if (m_hasMM)
107  ATH_CHECK(addToDetStore(4175, "MMIDHELPER"));
108 
109  ATH_CHECK(addToDetStore(108133391, "CaloLVL1_ID"));
110  ATH_CHECK(addToDetStore(123500438, "CaloCell_ID"));
111  ATH_CHECK(addToDetStore(128365736, "CaloCell_SuperCell_ID"));
112  ATH_CHECK(addToDetStore(167756483, "CaloDM_ID"));
113  ATH_CHECK(addToDetStore(190591643, "ZdcID"));
114 
115  // for J/GTower
116  ATH_CHECK(addToDetStore(218674799, "JTower_ID"));
117  ATH_CHECK(addToDetStore(49678914, "GTower_ID"));
118 
119  return StatusCode::SUCCESS;
120 }

◆ initTDSItems()

void DetDescrCnvSvc::initTDSItems ( )
private

◆ msg()

MsgStream& DetDescrCnvSvc::msg ( MSG::Level  lvl) const
inlineprivate

Definition at line 104 of file DetDescrCnvSvc.h.

104 { return msgStream(lvl); }

◆ queryInterface()

StatusCode DetDescrCnvSvc::queryInterface ( const InterfaceID &  riid,
void **  ppvInterface 
)
virtual

Identify interfaces to which this service is responsive.

Definition at line 36 of file DetDescrCnvSvc.cxx.

37  {
38  if (riid == IConversionSvc::interfaceID()) {
39  *ppvInterface = dynamic_cast<IConversionSvc *>(this);
40  } else if (riid == IDetDescrCnvSvc::interfaceID()) {
41  *ppvInterface = dynamic_cast<IDetDescrCnvSvc *>(this);
42  } else {
43  return ConversionSvc::queryInterface(riid, ppvInterface);
44  }
45  addRef();
46  return StatusCode::SUCCESS;
47 }

Friends And Related Function Documentation

◆ SvcFactory< DetDescrCnvSvc >

friend class SvcFactory< DetDescrCnvSvc >
friend

Allow the factory class access to the constructor.

Definition at line 1 of file DetDescrCnvSvc.h.

Member Data Documentation

◆ m_compact_ids_only

BooleanProperty DetDescrCnvSvc::m_compact_ids_only {this, "CompactIDsOnly", false}
private

Definition at line 89 of file DetDescrCnvSvc.h.

◆ m_decodeIdDict

BooleanProperty DetDescrCnvSvc::m_decodeIdDict {this, "DecodeIdDict", true}
private

Definition at line 62 of file DetDescrCnvSvc.h.

◆ m_detElemsfromDetNodes

BooleanProperty DetDescrCnvSvc::m_detElemsfromDetNodes
private
Initial value:
{this, "InitDetElemsFromGeoModel",
false}

Definition at line 87 of file DetDescrCnvSvc.h.

◆ m_detMgrs

StringArrayProperty DetDescrCnvSvc::m_detMgrs {this, "DetectorManagers", {}}
private

Definition at line 60 of file DetDescrCnvSvc.h.

◆ m_detNodes

StringArrayProperty DetDescrCnvSvc::m_detNodes {this, "DetectorNodes", {}}
private

Definition at line 61 of file DetDescrCnvSvc.h.

◆ m_detStore

StoreGateSvc* DetDescrCnvSvc::m_detStore {nullptr}
private

Definition at line 59 of file DetDescrCnvSvc.h.

◆ m_do_checks

BooleanProperty DetDescrCnvSvc::m_do_checks {this, "DoIdChecks", false}
private

Definition at line 90 of file DetDescrCnvSvc.h.

◆ m_do_neighbours

BooleanProperty DetDescrCnvSvc::m_do_neighbours {this, "DoInitNeighbours", true}
private

Definition at line 91 of file DetDescrCnvSvc.h.

◆ m_fcal2dNeighborsName

StringProperty DetDescrCnvSvc::m_fcal2dNeighborsName {this, "FCAL2DNeighborsFileName", ""}
private

Definition at line 76 of file DetDescrCnvSvc.h.

◆ m_fcal3dNeighborsNextName

StringProperty DetDescrCnvSvc::m_fcal3dNeighborsNextName
private
Initial value:
{this,
"FCAL3DNeighborsNextFileName", ""}

Definition at line 77 of file DetDescrCnvSvc.h.

◆ m_fcal3dNeighborsPrevName

StringProperty DetDescrCnvSvc::m_fcal3dNeighborsPrevName
private
Initial value:
{this,
"FCAL3DNeighborsPrevFileName", ""}

Definition at line 79 of file DetDescrCnvSvc.h.

◆ m_fromNova

BooleanProperty DetDescrCnvSvc::m_fromNova {this, "ReadFromNova", false}
private

Definition at line 86 of file DetDescrCnvSvc.h.

◆ m_fromRoot

BooleanProperty DetDescrCnvSvc::m_fromRoot {this, "ReadFromROOT", false}
private

Definition at line 85 of file DetDescrCnvSvc.h.

◆ m_fullAtlasNeighborsName

StringProperty DetDescrCnvSvc::m_fullAtlasNeighborsName
private
Initial value:
{this, "FullAtlasNeighborsFileName",
""}

Definition at line 82 of file DetDescrCnvSvc.h.

◆ m_hasCSC

BooleanProperty DetDescrCnvSvc::m_hasCSC {this, "HasCSC", false}
private

Switch on/off the muon detectors.

Definition at line 95 of file DetDescrCnvSvc.h.

◆ m_hasMDT

BooleanProperty DetDescrCnvSvc::m_hasMDT {this, "HasMDT", true}
private

Definition at line 98 of file DetDescrCnvSvc.h.

◆ m_hasMM

BooleanProperty DetDescrCnvSvc::m_hasMM {this, "HasMM", false}
private

Definition at line 97 of file DetDescrCnvSvc.h.

◆ m_hasRPC

BooleanProperty DetDescrCnvSvc::m_hasRPC {this, "HasRPC", true}
private

Definition at line 99 of file DetDescrCnvSvc.h.

◆ m_hasSTGC

BooleanProperty DetDescrCnvSvc::m_hasSTGC {this, "HasSTgc", false}
private

Definition at line 96 of file DetDescrCnvSvc.h.

◆ m_hasTGC

BooleanProperty DetDescrCnvSvc::m_hasTGC {this, "HasTGC", true}
private

Definition at line 100 of file DetDescrCnvSvc.h.

◆ m_idDictATLASName

StringProperty DetDescrCnvSvc::m_idDictATLASName {this, "AtlasIDFileName", ""}
private

Definition at line 66 of file DetDescrCnvSvc.h.

◆ m_idDictForwardName

StringProperty DetDescrCnvSvc::m_idDictForwardName {this, "ForwardIDFileName", ""}
private

Definition at line 75 of file DetDescrCnvSvc.h.

◆ m_idDictFromRDB

BooleanProperty DetDescrCnvSvc::m_idDictFromRDB {this, "IdDictFromRDB", false}
private

Definition at line 63 of file DetDescrCnvSvc.h.

◆ m_idDictGlobalTag

StringProperty DetDescrCnvSvc::m_idDictGlobalTag {this, "IdDictGlobalTag", ""}
private

Definition at line 65 of file DetDescrCnvSvc.h.

◆ m_idDictInDetName

StringProperty DetDescrCnvSvc::m_idDictInDetName {this, "InDetIDFileName", ""}
private

Definition at line 67 of file DetDescrCnvSvc.h.

◆ m_idDictLArElectrodeName

StringProperty DetDescrCnvSvc::m_idDictLArElectrodeName {this, "LArElectrodeIDFileName", ""}
private

Definition at line 74 of file DetDescrCnvSvc.h.

◆ m_idDictLArHighVoltageName

StringProperty DetDescrCnvSvc::m_idDictLArHighVoltageName
private
Initial value:
{this, "HighVoltageIDFileName",
""}

Definition at line 72 of file DetDescrCnvSvc.h.

◆ m_idDictLArName

StringProperty DetDescrCnvSvc::m_idDictLArName {this, "LArIDFileName", ""}
private

Definition at line 68 of file DetDescrCnvSvc.h.

◆ m_idDictLVL1Name

StringProperty DetDescrCnvSvc::m_idDictLVL1Name {this, "CaloIDFileName", ""}
private

Definition at line 70 of file DetDescrCnvSvc.h.

◆ m_idDictMuonName

StringProperty DetDescrCnvSvc::m_idDictMuonName {this, "MuonIDFileName", ""}
private

Definition at line 71 of file DetDescrCnvSvc.h.

◆ m_idDictName

StringProperty DetDescrCnvSvc::m_idDictName {this, "IdDictName", ""}
private

Definition at line 64 of file DetDescrCnvSvc.h.

◆ m_idDictTileName

StringProperty DetDescrCnvSvc::m_idDictTileName {this, "TileIDFileName", ""}
private

Definition at line 69 of file DetDescrCnvSvc.h.

◆ m_tileNeighborsName

StringProperty DetDescrCnvSvc::m_tileNeighborsName {this, "TileNeighborsFileName", ""}
private

Definition at line 81 of file DetDescrCnvSvc.h.

◆ m_useGeomDB_InDet

BooleanProperty DetDescrCnvSvc::m_useGeomDB_InDet {this, "useGeomDB_InDet", false}
private

Definition at line 102 of file DetDescrCnvSvc.h.


The documentation for this class was generated from the following files:
DetDescrAddress::toString
StatusCode toString(std::string &refString) const
write technology-specific part of address to string
Definition: DetDescrAddress.cxx:46
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
initialize
void initialize()
Definition: run_EoverP.cxx:894
DetDescrCnvSvc::m_hasMDT
BooleanProperty m_hasMDT
Definition: DetDescrCnvSvc.h:98
DetDescrCnvSvc::m_hasSTGC
BooleanProperty m_hasSTGC
Definition: DetDescrCnvSvc.h:96
DetDescrCnvSvc::m_hasCSC
BooleanProperty m_hasCSC
Switch on/off the muon detectors.
Definition: DetDescrCnvSvc.h:95
DetDescrCnvSvc::m_hasMM
BooleanProperty m_hasMM
Definition: DetDescrCnvSvc.h:97
DetDescrCnvSvc::m_detStore
StoreGateSvc * m_detStore
Definition: DetDescrCnvSvc.h:59
DetDescrAddress
Definition: DetDescrAddress.h:32
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
StoreGateSvc::recordAddress
StatusCode recordAddress(const std::string &skey, IOpaqueAddress *pAddress, bool clearAddressFlag=true)
Create a proxy object using an IOpaqueAddress and a transient key.
IDetDescrCnvSvc
Definition: IDetDescrCnvSvc.h:34
DetDescr_StorageType
constexpr long DetDescr_StorageType
Definition: DetDescrCnvSvc.cxx:20
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
DetDescrCnvSvc::addToDetStore
virtual StatusCode addToDetStore(const CLID &clid, const std::string &name) const
Add new address to the Detector Store.
Definition: DetDescrCnvSvc.cxx:174
DetDescrCnvSvc::m_hasRPC
BooleanProperty m_hasRPC
Definition: DetDescrCnvSvc.h:99
DetDescrAddress::fromString
StatusCode fromString(const std::string &stringifiedIOA)
initialize technology-specific part of IOA from stringifiedIOA
Definition: DetDescrAddress.cxx:55
DetDescrCnvSvc::m_hasTGC
BooleanProperty m_hasTGC
Definition: DetDescrCnvSvc.h:100