ATLAS Offline Software
Loading...
Searching...
No Matches
IRDBAccessSvc.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
13
14#ifndef RDBACCESSSVC_IRDBACCESSSVC_H
15#define RDBACCESSSVC_IRDBACCESSSVC_H
16
17#include "GaudiKernel/IInterface.h"
18#include <string>
19#include <memory>
20
21#include "CoralBase/AttributeList.h"
22#include "CoralBase/Attribute.h"
23
24class IRDBRecordset;
25class IRDBQuery;
26
27typedef std::shared_ptr<IRDBRecordset> IRDBRecordset_ptr;
28
29typedef coral::AttributeList RDBTagDetails;
30
40
41class IRDBAccessSvc : virtual public IInterface
42{
43 // Special friends who need to call connect()/disconnect() methods
44 friend class GeoModelSvc;
45 friend class SourceCompAlg;
46 friend class TrigRDBManager;
47
48 public:
49
52
59 virtual IRDBRecordset_ptr getRecordsetPtr(const std::string& node,
60 const std::string& tag,
61 const std::string& tag2node="",
62 const std::string& connName = "ATLASDD") = 0;
63
70 virtual std::string getChildTag(const std::string& childNode,
71 const std::string& parentTag,
72 const std::string& parentNode,
73 const std::string& connName = "ATLASDD") = 0;
74
75
76 //
77 // ------------------------ WARNING! ----------------------------
78 // --- Following method should be used for special cases only ---
79 // --------------------------------------------------------------
80 //
81 // 1. After calling this function call IRDBQuery::execute() in order
82 // to fetch data from database
83 // 2. Navigate the cursor, get the data and store it into custom
84 // structures.
85 // * The Cursor is NOT BIDIRECTIONAL
86 //
87
88 virtual std::unique_ptr<IRDBQuery> getQuery(const std::string& node,
89 const std::string& tag,
90 const std::string& tag2node="",
91 const std::string& connName = "ATLASDD") = 0;
92
97 virtual void getTagDetails(RDBTagDetails& tagDetails,
98 const std::string& tag,
99 const std::string& connName = "ATLASDD") = 0;
100
101 protected:
106 virtual bool connect(const std::string& connName = "ATLASDD") = 0;
107
111 virtual bool disconnect(const std::string& connName = "ATLASDD") = 0;
112
115 virtual bool shutdown(const std::string& connName = "ATLASDD") = 0;
116
117};
118
119#endif
120
121
122
coral::AttributeList RDBTagDetails
std::shared_ptr< IRDBRecordset > IRDBRecordset_ptr
IRDBAccessSvc is an abstract interface to the athena service that provides the following functionalit...
friend class GeoModelSvc
virtual bool shutdown(const std::string &connName="ATLASDD")=0
Closes the connection regardless of the counter value.
virtual std::string getChildTag(const std::string &childNode, const std::string &parentTag, const std::string &parentNode, const std::string &connName="ATLASDD")=0
Gets the tag name for the node by giving its parent node tag.
virtual bool connect(const std::string &connName="ATLASDD")=0
Connect to the relational DB.
virtual IRDBRecordset_ptr getRecordsetPtr(const std::string &node, const std::string &tag, const std::string &tag2node="", const std::string &connName="ATLASDD")=0
Provides access to the Recordset object containing HVS-tagged data.
virtual void getTagDetails(RDBTagDetails &tagDetails, const std::string &tag, const std::string &connName="ATLASDD")=0
Returns AttributeList with tag details Attributes in the list: Locked (bool), Supported (bool)
virtual bool disconnect(const std::string &connName="ATLASDD")=0
If the counnection counter==1 closes the connection.
friend class SourceCompAlg
DeclareInterfaceID(IRDBAccessSvc, 1, 0)
Declare interface ID.
virtual std::unique_ptr< IRDBQuery > getQuery(const std::string &node, const std::string &tag, const std::string &tag2node="", const std::string &connName="ATLASDD")=0
friend class TrigRDBManager
IRDBRecordset is an abstract interface to the RDB Recordsets, which represent a snapshot of HVS-tagge...
Definition node.h:24