ATLAS Offline Software
RDBAccessSvc.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
15 #include "RDBAccessSvc.h"
16 #include "RDBRecordset.h"
17 #include "RDBVersionAccessor.h"
18 #include "RDBQuery.h"
19 
20 #include "RelationalAccess/ISessionProxy.h"
21 #include "RelationalAccess/ITransaction.h"
22 #include "RelationalAccess/SchemaException.h"
23 #include "RelationalAccess/ConnectionService.h"
24 #include "RelationalAccess/ICursor.h"
25 #include "RelationalAccess/ITable.h"
26 #include "RelationalAccess/ISchema.h"
27 #include "RelationalAccess/IQuery.h"
28 
29 #include "DBLock/DBLock.h"
30 
32 
33 #include "CoralBase/Exception.h"
34 
35 #include <thread>
36 
37 RDBAccessSvc::RDBAccessSvc(const std::string& name, ISvcLocator* svc)
39 {
40 }
41 
42 bool RDBAccessSvc::connect(const std::string& connName)
43 {
44  std::scoped_lock<std::mutex> guard(m_sessionMutex);
45  // Check if it is the first attempt to open a connection connName
46  if(m_sessions.find(connName)==m_sessions.end()) {
47  ATH_MSG_DEBUG(" Trying to open the connection " << connName << " for the first time");
48  // Add initial entries for this connection to three maps
49  // 1. Sessions
50  // 2. open connections
51  // 3. Recordset by connection
52  m_sessions[connName] = nullptr;
53  m_openConnections[connName] = 0;
54  m_recordsetptrs.emplace(connName,RecordsetPtrMap());
55  }
56 
57  // Use existing Connection Proxy if available
58  if(m_openConnections[connName]++) {
59  ATH_MSG_DEBUG(" Connection " << connName << " already open, sessions = " << m_openConnections[connName]);
60  return true;
61  }
62 
63  // Request new connection proxy from the Connection Service
64  coral::ConnectionService conSvcH;
65  coral::ISessionProxy *proxy = nullptr;
66  try {
67  proxy = conSvcH.connect(connName,coral::ReadOnly);
68  proxy->transaction().start(true);
69  ATH_MSG_DEBUG("Proxy for connection " << connName << " obtained");
70  }
71  catch(std::exception& e) {
72  ATH_MSG_ERROR("Exception caught: " << e.what());
73  m_openConnections[connName]--;
74  return false;
75  }
76 
77  m_sessions[connName] = proxy;
78 
79  return true;
80 }
81 
82 bool RDBAccessSvc::disconnect(const std::string& connName)
83 {
84  auto connection = m_openConnections.find(connName);
85  if(connection==m_openConnections.end()) {
86  ATH_MSG_ERROR("Wrong name for the connection: " << connName);
87  return false;
88  }
89 
90  std::scoped_lock<std::mutex> guard(m_sessionMutex);
91  if(connection->second>0) {
92  connection->second--;
93 
94  ATH_MSG_DEBUG("Connection " << connName << " Sessions = " << connection->second);
95 
96  if(connection->second==0) {
97  auto session = m_sessions.find(connName);
98  if(session!=m_sessions.end()) {
99  session->second->transaction().commit();
100  delete session->second;
101  session->second = nullptr;
102  }
103 
104  ATH_MSG_DEBUG(connName << " Disconnected!");
105  }
106  }
107  return true;
108 }
109 
110 bool RDBAccessSvc::shutdown(const std::string& connName)
111 {
112  if(connName=="*Everything*") {
113  for(const auto& ii : m_openConnections) {
114  if(ii.second != 0) {
115  ATH_MSG_INFO("Close everything: Connection: " << ii.first << " with reference count = " << ii.second << " will be closed.");
116  if(!shutdown_connection(ii.first)) {
117  return false;
118  }
119  }
120  }
121  return true;
122  }
123 
124  return shutdown_connection(connName);
125 }
126 
127 bool RDBAccessSvc::shutdown_connection(const std::string& connName)
128 {
129  auto connection = m_openConnections.find(connName);
130  if(connection==m_openConnections.end()) {
131  ATH_MSG_ERROR("Wrong name for the connection: " << connName);
132  return false;
133  }
134  std::scoped_lock<std::mutex> guard(m_sessionMutex);
135  connection->second = 0;
136 
137  auto session = m_sessions.find(connName);
138  if(session!=m_sessions.end()
139  && session->second) {
140  session->second->transaction().commit();
141  delete session->second;
142  session->second = nullptr;
143  }
144 
145  ATH_MSG_DEBUG(connName << " Disconnected!");
146 
147  return true;
148 }
149 
151  , const std::string& tag
152  , const std::string& tag2node
153  , const std::string& connName)
154 {
155  std::string key = node + "::" + tag;
156  if(tag2node!="")
157  key += ("::" + tag2node);
158 
159  ATH_MSG_DEBUG("Getting RecordsetPtr with key " << key);
160 
161  Athena::DBLock dblock;
162  std::scoped_lock<std::mutex> guard(m_recordsetMutex);
163 
164  RecordsetPtrMap& recordsets = m_recordsetptrs[connName];
165  RecordsetPtrMap::const_iterator it = recordsets.find(key);
166  if(it != recordsets.end()) {
167  ATH_MSG_DEBUG("Reusing existing recordset");
168  return it->second;
169  }
170 
171  if(!connect(connName)) {
172  ATH_MSG_ERROR("Unable to open connection " << connName << ". Returning empty recordset");
173  return IRDBRecordset_ptr(new RDBRecordset(this));
174  }
175 
176  RDBRecordset* recConcrete = new RDBRecordset(this);
177  IRDBRecordset_ptr rec(recConcrete);
178  coral::ISessionProxy* session = m_sessions[connName];
179 
180  try {
181  // Check lookup table first
182  std::string lookupMapKey = tag + "::" + connName;
183  GlobalTagLookupMap::const_iterator lookupmap = m_globalTagLookup.find(lookupMapKey);
184  if(lookupmap!=m_globalTagLookup.end()) {
185  TagNameIdByNode::const_iterator childtagdet = lookupmap->second->find(node);
186  if(childtagdet!=lookupmap->second->end()) {
187  recConcrete->getData(session,node,childtagdet->second.first,childtagdet->second.second);
188  }
189  else {
190  recConcrete->setNodeName(node);
191  ATH_MSG_DEBUG("Unable to find tag for the node " << node << " in the cache of global tag " << tag << ". Returning empty recordset");
192  }
193  }
194  else {
195  RDBVersionAccessor versionAccessor(node,(tag2node.empty()?node:tag2node),tag,session,msg());
196  versionAccessor.getChildTagData();
197  recConcrete->getData(session,versionAccessor.getNodeName(),versionAccessor.getTagName(),versionAccessor.getTagID());
198  }
199  }
200  catch(coral::SchemaException& se) {
201  ATH_MSG_ERROR("Schema Exception : " << se.what());
202  }
203  catch(std::exception& e) {
204  ATH_MSG_ERROR(e.what());
205  }
206  catch(...) {
207  ATH_MSG_ERROR("Exception caught(...)");
208  }
209 
210  recordsets.emplace(key,rec);
211  disconnect(connName);
212  return rec;
213 }
214 
215 std::unique_ptr<IRDBQuery> RDBAccessSvc::getQuery(const std::string& node
216  , const std::string& tag
217  , const std::string& tag2node
218  , const std::string& connName)
219 {
220  ATH_MSG_DEBUG("getQuery (" << node << "," << tag << "," << tag2node << "," << connName << ")");
221  Athena::DBLock dblock;
222  std::scoped_lock<std::mutex> guard(m_recordsetMutex);
223 
224  std::unique_ptr<IRDBQuery> query;
225 
226  if(!connect(connName)) {
227  ATH_MSG_ERROR("Unable to open connection " << connName << ". Returning nullptr to IRDBQuery");
228  return query;
229  }
230 
231  coral::ISessionProxy* session = m_sessions[connName];
232 
233  try {
234  // Check lookup table first
235  std::string childTagId("");
236  std::string lookupMapKey = tag + "::" + connName;
237  GlobalTagLookupMap::const_iterator lookupmap = m_globalTagLookup.find(lookupMapKey);
238  if(lookupmap!=m_globalTagLookup.end()) {
239  TagNameIdByNode::const_iterator childtagdet = lookupmap->second->find(node);
240  if(childtagdet!=lookupmap->second->end()) {
241  childTagId = childtagdet->second.second;
242  }
243  }
244  else {
245  RDBVersionAccessor versionAccessor{node,(tag2node.empty()?node:tag2node),tag,session,msg()};
246  versionAccessor.getChildTagData();
247  childTagId = versionAccessor.getTagID();
248  }
249 
250  if(childTagId.empty()) {
251  ATH_MSG_WARNING("Could not get the tag for " << node << " node. Returning 0 pointer to IRDBQuery");
252  }
253  else {
254  query = std::unique_ptr<IRDBQuery>(new RDBQuery(dblock,this,node,childTagId,connName));
255  }
256  }
257  catch(coral::SchemaException& se) {
258  ATH_MSG_ERROR("Schema Exception : " << se.what());
259  }
260  catch(std::exception& e) {
261  ATH_MSG_ERROR(e.what());
262  }
263  catch(...) {
264  ATH_MSG_ERROR("Exception caught(...)");
265  }
266 
267  disconnect(connName);
268  return query;
269 }
270 
271 std::string RDBAccessSvc::getChildTag(const std::string& childNode
272  , const std::string& parentTag
273  , const std::string& parentNode
274  , const std::string& connName)
275 {
276  return getChildTag(childNode
277  , parentTag
278  , parentNode
279  , connName
280  , false);
281 }
282 
283 std::string RDBAccessSvc::getChildTag(const std::string& childNode
284  , const std::string& parentTag
285  , const std::string& parentNode
286  , const std::string& connName
287  , bool force)
288 {
289  ATH_MSG_DEBUG("getChildTag for " << childNode << " " << parentTag << " " << parentNode);
290  Athena::DBLock dblock;
291  std::scoped_lock<std::mutex> guard(m_recordsetMutex);
292 
293  // Check lookup table first
294  std::string lookupMapKey = parentTag + "::" + connName;
295  GlobalTagLookupMap::const_iterator lookupmap = m_globalTagLookup.find(lookupMapKey);
296  if(lookupmap!=m_globalTagLookup.end()) {
297  TagNameIdByNode::const_iterator childtagdet = lookupmap->second->find(childNode);
298  if(childtagdet!=lookupmap->second->end()) {
299  return childtagdet->second.first;
300  }
301  else {
302  if(!force) {
303  return std::string("");
304  }
305  }
306  }
307 
308  if(!connect(connName)) {
309  ATH_MSG_ERROR("Unable to open connection " << connName << ". Returning empty string");
310  return std::string("");
311  }
312 
313  std::string childTag("");
314  try {
315  // We don't have lookup table for given parent tag. Go into slow mode through Version Accessor
316  coral::ISessionProxy* session = m_sessions[connName];
317  RDBVersionAccessor versionAccessor(childNode,parentNode,parentTag,session,msg());
318  versionAccessor.getChildTagData();
319 
320  childTag = versionAccessor.getTagName();
321  }
322  catch(coral::SchemaException& se) {
323  ATH_MSG_ERROR("Schema Exception : " << se.what());
324  }
325  catch(std::exception& e) {
326  ATH_MSG_ERROR(e.what());
327  }
328  catch(...) {
329  ATH_MSG_ERROR("Exception caught(...)");
330  }
331 
332  disconnect(connName);
333 
334  return childTag;
335 }
336 
338  , const std::string& tag
339  , const std::string& connName)
340 {
341  ATH_MSG_DEBUG("getTagDetails for tag: " << tag);
342  Athena::DBLock dblock;
343  std::scoped_lock<std::mutex> guard(m_recordsetMutex);
344 
345  if(!connect(connName)) {
346  ATH_MSG_ERROR("Failed to open connection " << connName);
347  }
348 
349  coral::ISessionProxy* session = m_sessions[connName];
350  try {
351  coral::ITable& tableTag2Node = session->nominalSchema().tableHandle("HVS_TAG2NODE");
352  coral::IQuery *queryTag2Node = tableTag2Node.newQuery();
353  queryTag2Node->addToOutputList("LOCKED");
354  queryTag2Node->addToOutputList("SUPPORTED");
355  queryTag2Node->setMemoryCacheSize(1);
357  bindsTag2Node.extend<std::string>("tagN");
358  queryTag2Node->setCondition("TAG_NAME=:tagN", bindsTag2Node);
359  bindsTag2Node[0].data<std::string>() = tag;
360 
361  coral::ICursor& cursorTag2Node = queryTag2Node->execute();
362  if(cursorTag2Node.next()) {
363  tagDetails = cursorTag2Node.currentRow();
364  }
365 
366  delete queryTag2Node;
367 
368  // Build lookup table for the given global tag if has not been built yet
369  std::string lookupMapKey = tag + "::" + connName;
370  if(m_globalTagLookup.find(lookupMapKey)==m_globalTagLookup.end()) {
371  // Get tag contents from the database
373 
374  coral::ITable& tableRootTag2Child = session->nominalSchema().tableHandle("HVS_TAGCACHE");
375  coral::IQuery* queryRootTag2Child = tableRootTag2Child.newQuery();
376  queryRootTag2Child->addToOutputList("CHILDNODE");
377  queryRootTag2Child->addToOutputList("CHILDTAG");
378  queryRootTag2Child->addToOutputList("CHILDTAGID");
379  queryRootTag2Child->setMemoryCacheSize(1);
380  coral::AttributeList bindsRootTag2Child ATLAS_THREAD_SAFE;
381  bindsRootTag2Child.extend<std::string>("tagN");
382  queryRootTag2Child->setCondition("ROOTTAG=:tagN", bindsRootTag2Child);
383  bindsRootTag2Child[0].data<std::string>() = tag;
384  queryRootTag2Child->addToOrderList("CHILDNODE");
385 
386  coral::ICursor& cursorRootTag2Child = queryRootTag2Child->execute();
387  while(cursorRootTag2Child.next()) {
388  const coral::AttributeList& row = cursorRootTag2Child.currentRow();
389  (*lookup)[row["CHILDNODE"].data<std::string>()]=std::make_pair(row["CHILDTAG"].data<std::string>(),std::to_string(row["CHILDTAGID"].data<long long>()));
390  }
391 
392  delete queryRootTag2Child;
393 
394  if(lookup->size()>0) {
395  m_globalTagLookup[lookupMapKey]=lookup;
396  }
397  else {
398  delete lookup;
399  }
400  }
401  }
402  catch(coral::SchemaException& se) {
403  ATH_MSG_INFO("Schema Exception : " << se.what());
404  }
405  catch(std::exception& e) {
406  ATH_MSG_ERROR(e.what());
407  }
408  catch(...) {
409  ATH_MSG_ERROR("Exception caught(...)");
410  }
411 
412  disconnect(connName);
413 }
414 
415 void RDBAccessSvc::getAllLeafNodes(std::vector<std::string>& list
416  , const std::string& connName)
417 {
418  list.clear();
419  if(!connect(connName)) {
420  ATH_MSG_ERROR("Failed to open Connection " << connName);
421  return;
422  }
423 
424  coral::ISessionProxy* session = m_sessions[connName];
425  try {
426  coral::ITable& tableNode = session->nominalSchema().tableHandle("HVS_NODE");
427  coral::IQuery *queryNode = tableNode.newQuery();
428  queryNode->addToOutputList("NODE_NAME");
429  queryNode->setMemoryCacheSize(1);
431  queryNode->setCondition("BRANCH_FLAG=0", empty);
432  queryNode->addToOrderList("NODE_NAME");
433 
434  coral::ICursor& cursorNode = queryNode->execute();
435  while(cursorNode.next()) {
436  list.push_back(cursorNode.currentRow()["NODE_NAME"].data<std::string>());
437  }
438 
439  delete queryNode;
440  }
441  catch(coral::SchemaException& se) {
442  ATH_MSG_INFO("Schema Exception : " << se.what());
443  }
444  catch(std::exception& e) {
445  ATH_MSG_ERROR(e.what());
446  }
447  catch(...) {
448  ATH_MSG_ERROR("Exception caught(...)");
449  }
450 
451  disconnect(connName);
452 }
453 
454 std::vector<std::string> RDBAccessSvc::getLockedSupportedTags(const std::string& supportedFlag
455  , const std::string& connName)
456 {
457  std::vector<std::string> taglist;
458  if(!connect(connName)) {
459  ATH_MSG_ERROR("Failed to open connection " << connName);
460  }
461  else {
462  try{
463  coral::ISessionProxy* session = m_sessions[connName];
464 
465  coral::ITable& tableTag2Node = session->nominalSchema().tableHandle("HVS_TAG2NODE");
466  coral::IQuery* queryTag2Node = tableTag2Node.newQuery();
467  queryTag2Node->addToOutputList("TAG_NAME");
468  queryTag2Node->setMemoryCacheSize(1);
470  std::string condString = std::string("NODE_ID=0 AND LOCKED=1 AND SUPPORTED>=")+supportedFlag;
471  queryTag2Node->setCondition(condString,empty);
472  queryTag2Node->addToOrderList("TAG_NAME");
473 
474  coral::ICursor& cursorTagName = queryTag2Node->execute();
475  while(cursorTagName.next()) {
476  const coral::AttributeList& row = cursorTagName.currentRow();
477  taglist.push_back(row["TAG_NAME"].data<std::string>());
478  }
479  delete queryTag2Node;
480 
481  }
482  catch(coral::SchemaException& se) {
483  ATH_MSG_ERROR("Schema Exception : " << se.what());
484  }
485  catch(std::exception& e) {
486  ATH_MSG_ERROR(e.what());
487  }
488  catch(...) {
489  ATH_MSG_ERROR("Exception caught(...)");
490  }
491  }
492  disconnect(connName);
493  return taglist;
494 }
495 
496 coral::ISessionProxy* RDBAccessSvc::getSession(const std::string& connName)
497 {
498  auto sessionIt = m_sessions.find(connName);
499  return sessionIt == m_sessions.end() ? nullptr : sessionIt->second;
500 }
501 
503 {
504  return StatusCode::SUCCESS;
505 }
506 
508 {
509  m_recordsetptrs.clear();
510 
511  // Clear global tag lookup table
512  for(auto& [lookupName,lookup] : m_globalTagLookup) {
513  delete lookup;
514  }
515  m_globalTagLookup.clear();
516 
517  // Shut down all connections
518  for(auto& [sessionName,session] : m_sessions) {
519  shutdown(sessionName);
520  }
521 
522  return StatusCode::SUCCESS;
523 }
524 
525 StatusCode RDBAccessSvc::queryInterface(const InterfaceID& riid, void** ppvInterface)
526 {
527  if (IID_IRDBAccessSvc == riid) {
528  *ppvInterface = (IRDBAccessSvc*)this;
529  }
530  else {
531  return AthService::queryInterface(riid, ppvInterface);
532  }
533 
534  addRef();
535  return StatusCode::SUCCESS;
536 }
RDBAccessSvc::getQuery
std::unique_ptr< IRDBQuery > getQuery(const std::string &node, const std::string &tag, const std::string &tag2node, const std::string &connName) override
Definition: RDBAccessSvc.cxx:215
RDBAccessSvc::getChildTag
std::string getChildTag(const std::string &childNode, const std::string &parentTag, const std::string &parentNode, const std::string &connName) override
Gets the tag name for the node by giving its parent node tag.
Definition: RDBAccessSvc.cxx:271
query_example.row
row
Definition: query_example.py:24
RDBQuery
RDBQuery is an implementation of IRDBQuery interface.
Definition: RDBQuery.h:30
RDBAccessSvc::m_recordsetMutex
std::mutex m_recordsetMutex
Definition: RDBAccessSvc.h:140
RDBAccessSvc::getLockedSupportedTags
std::vector< std::string > getLockedSupportedTags(const std::string &supportedFlag, const std::string &connName="ATLASDD")
Definition: RDBAccessSvc.cxx:454
StateLessPT_NewConfig.proxy
proxy
Definition: StateLessPT_NewConfig.py:392
TileRawChannelBuilderOpt2::lookup
const unsigned short lookup[2401]
Definition: TileRawChannelBuilderOpt2FilterLookup.h:21
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
calibdata.force
bool force
Definition: calibdata.py:19
RDBAccessSvc.h
Definition of RDBAccessSvc class.
RecordsetPtrMap
std::map< std::string, IRDBRecordset_ptr > RecordsetPtrMap
Definition: RDBAccessSvc.h:34
RDBVersionAccessor::getTagName
std::string getTagName() const
Definition: RDBVersionAccessor.h:58
RDBAccessSvc::getSession
coral::ISessionProxy * getSession(const std::string &connName="ATLASDD")
Definition: RDBAccessSvc.cxx:496
RDBAccessSvc::initialize
StatusCode initialize() override
Definition: RDBAccessSvc.cxx:502
skel.it
it
Definition: skel.GENtoEVGEN.py:423
RDBAccessSvc::connect
bool connect(const std::string &connName) override
Connect to the relational DB.
Definition: RDBAccessSvc.cxx:42
CheckTagAssociation.taglist
taglist
Definition: CheckTagAssociation.py:103
RDBVersionAccessor::getNodeName
std::string getNodeName() const
Definition: RDBVersionAccessor.h:54
RDBAccessSvc::finalize
StatusCode finalize() override
Definition: RDBAccessSvc.cxx:507
python.PyKernel.AttributeList
AttributeList
Definition: PyKernel.py:36
keylayer_zslicemap.se
se
Definition: keylayer_zslicemap.py:194
TagNameIdByNode
std::map< std::string, TagNameId > TagNameIdByNode
Definition: RDBAccessSvc.h:48
empty
bool empty(TH1 *h)
Definition: computils.cxx:294
RDBAccessSvc::queryInterface
StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface) override
Definition: RDBAccessSvc.cxx:525
RDBVersionAccessor
RDBVersionAccessor is a helper class navigating HVS tree and getting child node tag by the tag of one...
Definition: RDBVersionAccessor.h:37
query
Definition: query.py:1
RDBVersionAccessor.h
Definition of RDBVersionAccessor class.
RDBVersionAccessor::getChildTagData
void getChildTagData()
Constructs SQL query and retrieves child tag ID and Name from DB.
Definition: RDBVersionAccessor.cxx:50
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
RDBAccessSvc::RDBAccessSvc
RDBAccessSvc(const std::string &name, ISvcLocator *svc)
Standard Service Constructor.
Definition: RDBAccessSvc.cxx:37
Athena::DBLock
Common database lock.
Definition: DBLock.h:46
IRDBAccessSvc
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
Definition: IRDBAccessSvc.h:45
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthService
Definition: AthService.h:32
RDBAccessSvc::m_globalTagLookup
GlobalTagLookupMap m_globalTagLookup
Definition: RDBAccessSvc.h:138
calibdata.exception
exception
Definition: calibdata.py:496
RDBAccessSvc::getRecordsetPtr
IRDBRecordset_ptr getRecordsetPtr(const std::string &node, const std::string &tag, const std::string &tag2node="", const std::string &connName="ATLASDD") override
Provides access to the Recordset object containing HVS-tagged data.
Definition: RDBAccessSvc.cxx:150
RDBAccessSvc::shutdown
bool shutdown(const std::string &connName) override
Closes the connection regardless of the counter value.
Definition: RDBAccessSvc.cxx:110
RDBAccessSvc::m_sessionMutex
std::mutex m_sessionMutex
Definition: RDBAccessSvc.h:141
RDBAccessSvc::m_sessions
SessionMap m_sessions
Definition: RDBAccessSvc.h:134
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
Handler::svc
AthROOTErrorHandlerSvc * svc
Definition: AthROOTErrorHandlerSvc.cxx:10
RDBAccessSvc::m_recordsetptrs
RecordsetPtrsByConn m_recordsetptrs
Definition: RDBAccessSvc.h:137
PyPoolBrowser.node
node
Definition: PyPoolBrowser.py:131
IRDBRecordset_ptr
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
Definition: IRDBAccessSvc.h:25
query_example.query
query
Definition: query_example.py:15
RDBVersionAccessor::getTagID
std::string getTagID() const
Definition: RDBVersionAccessor.h:61
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
RDBQuery.h
RDBTagDetails
coral::AttributeList RDBTagDetails
Definition: IRDBAccessSvc.h:29
RDBRecordset::getData
void getData(coral::ISessionProxy *session, const std::string &nodeName, const std::string &tagName, const std::string &tagId)
Constructs SQL query and retrieves the data from DB.
Definition: RDBRecordset.cxx:39
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
RDBRecordset.h
Definition of RDBRecordset class.
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
AthCommonMsg< Service >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
RDBRecordset::setNodeName
void setNodeName(const std::string &nodeName)
Definition: RDBRecordset.cxx:263
DBLock.h
Common database lock.
RDBAccessSvc::shutdown_connection
bool shutdown_connection(const std::string &connName)
Definition: RDBAccessSvc.cxx:127
ATLAS_THREAD_SAFE
#define ATLAS_THREAD_SAFE
Definition: checker_macros.h:211
CaloCondBlobAlgs_fillNoiseFromASCII.tag
string tag
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:24
RDBAccessSvc::m_openConnections
std::map< std::string, unsigned int > m_openConnections
Definition: RDBAccessSvc.h:135
checker_macros.h
Define macros for attributes used to control the static checker.
RDBAccessSvc::getTagDetails
void getTagDetails(RDBTagDetails &tagDetails, const std::string &tag, const std::string &connName="ATLASDD") override
Returns AttributeList with tag details Attributes in the list: Locked (bool), Supported (bool)
Definition: RDBAccessSvc.cxx:337
RDBAccessSvc::getAllLeafNodes
void getAllLeafNodes(std::vector< std::string > &list, const std::string &connName="ATLASDD")
Definition: RDBAccessSvc.cxx:415
node
Definition: memory_hooks-stdcmalloc.h:74
RDBAccessSvc::disconnect
bool disconnect(const std::string &connName) override
If the counnection counter==1 closes the connection.
Definition: RDBAccessSvc.cxx:82
RDBRecordset
RDBRecordset is an implementation of IRDBRecordset interface.
Definition: RDBRecordset.h:39
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37