ATLAS Offline Software
Loading...
Searching...
No Matches
DetDescrCnvSvc Class Reference

#include <DetDescrCnvSvc.h>

Inheritance diagram for DetDescrCnvSvc:
Collaboration diagram for DetDescrCnvSvc:

Public Member Functions

virtual StatusCode initialize ()
 Initialize the service.
virtual StatusCode addToDetStore (const CLID &clid, const std::string &name, const std::vector< CLID > &bases={}) const
 Add new address to the Detector Store.
virtual StatusCode createAddress (long svc_type, const CLID &clid, const std::string *par, const unsigned long *ip, IOpaqueAddress *&refpAddress)
 Basic create address.
virtual StatusCode createAddress (long svc_type, const CLID &clid, const std::string &refAddress, IOpaqueAddress *&refpAddress)
 Create address from string form.
virtual StatusCode convertAddress (const IOpaqueAddress *pAddress, std::string &refAddress)
 Convert address to string form.

: Object implementation

ServiceHandle< StoreGateSvc > m_detStore
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_hasTRT {this, "HasTRT", false}
 Switch on/off the TRT.
BooleanProperty m_hasCSC {this, "HasCSC", false}
 Switch on/off the muon detectors.
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.
virtual ~DetDescrCnvSvc ()
 Standard Destructor.
StatusCode fillTDSRefs ()
void initTDSItems ()
MsgStream & msg (MSG::Level lvl) const

Detailed Description

Definition at line 14 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),
27 m_detStore("DetectorStore", name)
28 {}
const long DetDescr_StorageType
ServiceHandle< StoreGateSvc > m_detStore

◆ ~DetDescrCnvSvc()

DetDescrCnvSvc::~DetDescrCnvSvc ( )
virtualdefault

Standard Destructor.

Member Function Documentation

◆ addToDetStore()

StatusCode DetDescrCnvSvc::addToDetStore ( const CLID & clid,
const std::string & name,
const std::vector< CLID > & bases = {} ) const
virtual

Add new address to the Detector Store.

Definition at line 173 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 CxxUtils::RefCountedPtr<DetDescrAddress> addr
183 (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 ATH_CHECK(m_detStore->recordAddress(std::move(addr), true, bases));
189 return StatusCode::SUCCESS;
190}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_INFO(x,...)

◆ convertAddress()

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

Convert address to string form.

Definition at line 162 of file DetDescrCnvSvc.cxx.

163 {
164 const DetDescrAddress *addr =
165 dynamic_cast<const DetDescrAddress *>(pAddress);
166 if (!addr)
167 return StatusCode::FAILURE;
168 return addr->toString(refAddress);
169}
StatusCode toString(std::string &refString) const
write technology-specific part of address to string

◆ 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 136 of file DetDescrCnvSvc.cxx.

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

◆ 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 125 of file DetDescrCnvSvc.cxx.

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

◆ fillTDSRefs()

StatusCode DetDescrCnvSvc::fillTDSRefs ( )
private

◆ initialize()

StatusCode DetDescrCnvSvc::initialize ( )
virtual

Initialize the service.

Definition at line 38 of file DetDescrCnvSvc.cxx.

38 {
39 ATH_CHECK(ConversionSvc::initialize());
40 ATH_MSG_INFO(" initializing ");
41
42 // get DetectorStore service
43 ATH_CHECK( m_detStore.retrieve() );
44 ATH_MSG_INFO("Found DetectorStore service");
45
46 // fill in the Addresses for Transient Detector Store objects
47 ATH_MSG_INFO(" filling proxies for detector managers ");
48
49 // Additional CLIDS used as base classes.
50 constexpr CLID PixelID_CLID = 2516;
51 constexpr CLID LArEM_Base_ID_CLID = 166227018;
52 constexpr CLID LArHEC_Base_ID_CLID = 181654777;
53 constexpr CLID LArFCAL_Base_ID_CLID = 225948692;
54 constexpr CLID LArOnlineID_Base_CLID = 28598761;
55 constexpr CLID Tile_Base_ID_CLID = 241188216;
56 constexpr CLID CaloCell_Base_ID_CLID = 257140327;
57 constexpr CLID JGTowerBase_ID_CLID = 131336095;
58
59 ATH_CHECK(addToDetStore(117659265, "CaloTTMgr"));
60 ATH_CHECK(addToDetStore(4548337, "CaloMgr"));
61 ATH_CHECK(addToDetStore(241807251, "CaloSuperCellMgr"));
62 ATH_CHECK(addToDetStore(125856940, "CaloIdManager"));
63 // IdDict:
64 ATH_CHECK(addToDetStore(2411, "IdDict"));
65
66 // IdHelpers
67 ATH_CHECK(addToDetStore(164875623, "AtlasID"));
68 ATH_CHECK(addToDetStore(2516, "PixelID"));
69 ATH_CHECK(addToDetStore(2517, "SCT_ID"));
70
71 if (m_hasTRT)
72 ATH_CHECK(addToDetStore(2518, "TRT_ID"));
73
74 ATH_CHECK(addToDetStore(131939624, "PLR_ID", {PixelID_CLID}));
75 ATH_CHECK(addToDetStore(79264207, "HGTD_ID"));
76 ATH_CHECK(addToDetStore(129452393, "SiliconID"));
77 ATH_CHECK(addToDetStore(163583365, "LArEM_ID", {LArEM_Base_ID_CLID}));
78 ATH_CHECK(addToDetStore(99488227, "LArEM_SuperCell_ID", {LArEM_Base_ID_CLID}));
79 ATH_CHECK(addToDetStore(3870484, "LArHEC_ID", {LArHEC_Base_ID_CLID}));
80 ATH_CHECK(addToDetStore(254277678, "LArHEC_SuperCell_ID", {LArHEC_Base_ID_CLID}));
81 ATH_CHECK(addToDetStore(45738051, "LArFCAL_ID", {LArFCAL_Base_ID_CLID}));
82 ATH_CHECK(addToDetStore(12829437, "LArFCAL_SuperCell_ID", {LArFCAL_Base_ID_CLID}));
83 ATH_CHECK(addToDetStore(79264204, "LArMiniFCAL_ID"));
84 ATH_CHECK(addToDetStore(158698068, "LArOnlineID", {LArOnlineID_Base_CLID}));
85 ATH_CHECK(addToDetStore(38321944, "TTOnlineID"));
86 ATH_CHECK(addToDetStore(115600394, "LArOnline_SuperCellID", {LArOnlineID_Base_CLID}));
87 ATH_CHECK(addToDetStore(27863673, "LArHVLineID"));
88 ATH_CHECK(addToDetStore(80757351, "LArElectrodeID"));
89 ATH_CHECK(addToDetStore(2901, "TileID", {Tile_Base_ID_CLID}));
90 ATH_CHECK(addToDetStore(49557789, "Tile_SuperCell_ID", {Tile_Base_ID_CLID}));
91 ATH_CHECK(addToDetStore(2902, "TileHWID"));
92 ATH_CHECK(addToDetStore(2903, "TileTBID"));
93
94 if (m_hasMDT)
95 ATH_CHECK(addToDetStore(4170, "MDTIDHELPER"));
96 if (m_hasCSC)
97 ATH_CHECK(addToDetStore(4171, "CSCIDHELPER"));
98
99 if (m_hasRPC)
100 ATH_CHECK(addToDetStore(4172, "RPCIDHELPER"));
101 if (m_hasTGC)
102 ATH_CHECK(addToDetStore(4173, "TGCIDHELPER"));
103 if (m_hasSTGC)
104 ATH_CHECK(addToDetStore(4174, "STGCIDHELPER"));
105 if (m_hasMM)
106 ATH_CHECK(addToDetStore(4175, "MMIDHELPER"));
107
108 ATH_CHECK(addToDetStore(108133391, "CaloLVL1_ID"));
109 ATH_CHECK(addToDetStore(123500438, "CaloCell_ID", {CaloCell_Base_ID_CLID}));
110 ATH_CHECK(addToDetStore(128365736, "CaloCell_SuperCell_ID", {CaloCell_Base_ID_CLID}));
111 ATH_CHECK(addToDetStore(167756483, "CaloDM_ID"));
112 ATH_CHECK(addToDetStore(190591643, "ZdcID"));
113
114 // for J/GTower
115 ATH_CHECK(addToDetStore(218674799, "JTower_ID", {JGTowerBase_ID_CLID}));
116 ATH_CHECK(addToDetStore(49678914, "GTower_ID", {JGTowerBase_ID_CLID}));
117
118 return StatusCode::SUCCESS;
119}
uint32_t CLID
The Class ID type.
BooleanProperty m_hasTGC
BooleanProperty m_hasMM
BooleanProperty m_hasRPC
BooleanProperty m_hasMDT
BooleanProperty m_hasCSC
Switch on/off the muon detectors.
BooleanProperty m_hasSTGC
virtual StatusCode addToDetStore(const CLID &clid, const std::string &name, const std::vector< CLID > &bases={}) const
Add new address to the Detector Store.
BooleanProperty m_hasTRT
Switch on/off the TRT.

◆ initTDSItems()

void DetDescrCnvSvc::initTDSItems ( )
private

◆ msg()

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

Definition at line 101 of file DetDescrCnvSvc.h.

101{ return msgStream(lvl); }

Member Data Documentation

◆ m_compact_ids_only

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

Definition at line 83 of file DetDescrCnvSvc.h.

83{this, "CompactIDsOnly", false};

◆ m_decodeIdDict

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

Definition at line 56 of file DetDescrCnvSvc.h.

56{this, "DecodeIdDict", true};

◆ m_detElemsfromDetNodes

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

Definition at line 81 of file DetDescrCnvSvc.h.

81 {this, "InitDetElemsFromGeoModel",
82 false};

◆ m_detMgrs

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

Definition at line 54 of file DetDescrCnvSvc.h.

54{this, "DetectorManagers", {}};

◆ m_detNodes

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

Definition at line 55 of file DetDescrCnvSvc.h.

55{this, "DetectorNodes", {}};

◆ m_detStore

ServiceHandle<StoreGateSvc> DetDescrCnvSvc::m_detStore
private

Definition at line 53 of file DetDescrCnvSvc.h.

◆ m_do_checks

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

Definition at line 84 of file DetDescrCnvSvc.h.

84{this, "DoIdChecks", false};

◆ m_do_neighbours

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

Definition at line 85 of file DetDescrCnvSvc.h.

85{this, "DoInitNeighbours", true};

◆ m_fcal2dNeighborsName

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

Definition at line 70 of file DetDescrCnvSvc.h.

70{this, "FCAL2DNeighborsFileName", ""};

◆ m_fcal3dNeighborsNextName

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

Definition at line 71 of file DetDescrCnvSvc.h.

71 {this,
72 "FCAL3DNeighborsNextFileName", ""};

◆ m_fcal3dNeighborsPrevName

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

Definition at line 73 of file DetDescrCnvSvc.h.

73 {this,
74 "FCAL3DNeighborsPrevFileName", ""};

◆ m_fromNova

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

Definition at line 80 of file DetDescrCnvSvc.h.

80{this, "ReadFromNova", false};

◆ m_fromRoot

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

Definition at line 79 of file DetDescrCnvSvc.h.

79{this, "ReadFromROOT", false};

◆ m_fullAtlasNeighborsName

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

Definition at line 76 of file DetDescrCnvSvc.h.

76 {this, "FullAtlasNeighborsFileName",
77 ""};

◆ m_hasCSC

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

Switch on/off the muon detectors.

Definition at line 92 of file DetDescrCnvSvc.h.

92{this, "HasCSC", false};

◆ m_hasMDT

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

Definition at line 95 of file DetDescrCnvSvc.h.

95{this, "HasMDT", true};

◆ m_hasMM

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

Definition at line 94 of file DetDescrCnvSvc.h.

94{this, "HasMM", false};

◆ m_hasRPC

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

Definition at line 96 of file DetDescrCnvSvc.h.

96{this, "HasRPC", true};

◆ m_hasSTGC

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

Definition at line 93 of file DetDescrCnvSvc.h.

93{this, "HasSTgc", false};

◆ m_hasTGC

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

Definition at line 97 of file DetDescrCnvSvc.h.

97{this, "HasTGC", true};

◆ m_hasTRT

BooleanProperty DetDescrCnvSvc::m_hasTRT {this, "HasTRT", false}
private

Switch on/off the TRT.

Definition at line 88 of file DetDescrCnvSvc.h.

88{this, "HasTRT", false};

◆ m_idDictATLASName

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

Definition at line 60 of file DetDescrCnvSvc.h.

60{this, "AtlasIDFileName", ""};

◆ m_idDictForwardName

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

Definition at line 69 of file DetDescrCnvSvc.h.

69{this, "ForwardIDFileName", ""};

◆ m_idDictFromRDB

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

Definition at line 57 of file DetDescrCnvSvc.h.

57{this, "IdDictFromRDB", false};

◆ m_idDictGlobalTag

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

Definition at line 59 of file DetDescrCnvSvc.h.

59{this, "IdDictGlobalTag", ""};

◆ m_idDictInDetName

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

Definition at line 61 of file DetDescrCnvSvc.h.

61{this, "InDetIDFileName", ""};

◆ m_idDictLArElectrodeName

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

Definition at line 68 of file DetDescrCnvSvc.h.

68{this, "LArElectrodeIDFileName", ""};

◆ m_idDictLArHighVoltageName

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

Definition at line 66 of file DetDescrCnvSvc.h.

66 {this, "HighVoltageIDFileName",
67 ""};

◆ m_idDictLArName

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

Definition at line 62 of file DetDescrCnvSvc.h.

62{this, "LArIDFileName", ""};

◆ m_idDictLVL1Name

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

Definition at line 64 of file DetDescrCnvSvc.h.

64{this, "CaloIDFileName", ""};

◆ m_idDictMuonName

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

Definition at line 65 of file DetDescrCnvSvc.h.

65{this, "MuonIDFileName", ""};

◆ m_idDictName

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

Definition at line 58 of file DetDescrCnvSvc.h.

58{this, "IdDictName", ""};

◆ m_idDictTileName

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

Definition at line 63 of file DetDescrCnvSvc.h.

63{this, "TileIDFileName", ""};

◆ m_tileNeighborsName

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

Definition at line 75 of file DetDescrCnvSvc.h.

75{this, "TileNeighborsFileName", ""};

◆ m_useGeomDB_InDet

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

Definition at line 99 of file DetDescrCnvSvc.h.

99{this, "useGeomDB_InDet", false};

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