This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag and node to pass to RDBAccessServer.
More...
#include <DecodeVersionKey.h>
|
| template<class T> |
| void | defineTag (const T *svc, const std::string &node) |
| bool | getCustomTag (const std::string &inputTag, std::string &outputTag) |
This is a helper class to query the version tags from GeoModelSvc and determine the appropriate tag and node to pass to RDBAccessServer.
If a subsystem has an override tag then that tag is used otherwise the ATLAS tag is used.
Definition at line 17 of file DecodeVersionKey.h.
◆ DecodeVersionKey() [1/3]
| DecodeVersionKey::DecodeVersionKey |
( |
const IGeoModelSvc * | geoModel, |
|
|
const std::string & | node ) |
Constructor is passed a pointer to GeoModelSvc plus the node for which you want the tag.
Possible nodes are ATLAS, InnerDetector, Pixel, SCT, TRT, LAr, TileCal, or MuonSpectrometer.
Definition at line 13 of file DecodeVersionKey.cxx.
14{
16}
void defineTag(const T *svc, const std::string &node)
const std::string & node() const
Return the version node.
◆ DecodeVersionKey() [2/3]
| DecodeVersionKey::DecodeVersionKey |
( |
const IGeoDbTagSvc * | geoDbTag, |
|
|
const std::string & | node ) |
◆ DecodeVersionKey() [3/3]
| DecodeVersionKey::DecodeVersionKey |
( |
const std::string & | node | ) |
|
Definition at line 23 of file DecodeVersionKey.cxx.
24{
25 SmartIF<IGeoDbTagSvc> geoDbTag{Gaudi::svcLocator()->service("GeoDbTagSvc")};
26 if(!geoDbTag.isValid()) throw std::runtime_error("DecodeVersionKey constructor: cannot access GeoDbTagSvc");
28}
◆ custom()
| bool DecodeVersionKey::custom |
( |
| ) |
const |
◆ defineTag()
template<class T>
| void DecodeVersionKey::defineTag |
( |
const T * | svc, |
|
|
const std::string & | node ) |
|
private |
Definition at line 31 of file DecodeVersionKey.cxx.
32{
33 std::string nodeOverrideTag;
34 std::string indetOverrideTag;
35 if (
node ==
"ATLAS") {
36 nodeOverrideTag = "";
37 }
else if (
node ==
"InnerDetector") {
38 nodeOverrideTag =
svc->inDetVersionOverride();
39 }
else if (
node ==
"Pixel") {
40 indetOverrideTag =
svc->inDetVersionOverride();
41 nodeOverrideTag =
svc->pixelVersionOverride();
42 }
else if (
node ==
"SCT") {
43 indetOverrideTag =
svc->inDetVersionOverride();
44 nodeOverrideTag =
svc->SCT_VersionOverride();
45 }
else if (
node ==
"TRT") {
46 indetOverrideTag =
svc->inDetVersionOverride();
47 nodeOverrideTag =
svc->TRT_VersionOverride();
48 }
else if (
node ==
"LAr") {
49 nodeOverrideTag =
svc->LAr_VersionOverride();
50 }
else if (
node ==
"TileCal") {
51 nodeOverrideTag =
svc->tileVersionOverride();
52 }
else if (
node ==
"MuonSpectrometer") {
53 nodeOverrideTag =
svc->muonVersionOverride();
54 }
else if (
node ==
"Calorimeter") {
55 nodeOverrideTag =
svc->caloVersionOverride();
56 }
else if (
node ==
"ForwardDetectors") {
57 nodeOverrideTag =
svc->forwardDetectorsVersionOverride();
58 } else {
59 std::cout <<
"DecodeVersionKey passed an unknown node:" <<
node << std::endl;
60 nodeOverrideTag = "";
61 }
62
63
66
67
68 std::string indetTag;
69 if (!indetOverrideTag.empty()) {
70
71
72
74 }
75 if (!indetTag.empty()) {
76 m_tag = std::move(indetTag);
78 }
79
80
81 std::string outputTag;
83
84 if (!outputTag.empty()) {
85 m_tag = std::move(outputTag);
87 }
88}
bool getCustomTag(const std::string &inputTag, std::string &outputTag)
AthROOTErrorHandlerSvc * svc
◆ getCustomTag()
| bool DecodeVersionKey::getCustomTag |
( |
const std::string & | inputTag, |
|
|
std::string & | outputTag ) |
|
private |
Definition at line 111 of file DecodeVersionKey.cxx.
112{
113
114
115
116
117
118
120 outputTag = inputTag;
121 if (!inputTag.empty()) {
122 if (inputTag.compare(0,6,"CUSTOM") == 0) {
124
125 outputTag = inputTag.substr(6);
126 if (!outputTag.empty()) outputTag = outputTag.substr(1);
127 }
128 }
130}
bool custom() const
Return true if CUSTOM is selected.
◆ node()
| const std::string & DecodeVersionKey::node |
( |
| ) |
const |
◆ tag()
| const std::string & DecodeVersionKey::tag |
( |
| ) |
const |
◆ m_custom
| bool DecodeVersionKey::m_custom |
|
private |
◆ m_node
| std::string DecodeVersionKey::m_node |
|
private |
◆ m_tag
| std::string DecodeVersionKey::m_tag |
|
private |
The documentation for this class was generated from the following files: