The Gaudi Framework  v33r2 (a6f0ec87)
IAIDATupleSvc.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDIKERNEL_IAIDATUPLESVC_H
12 #define GAUDIKERNEL_IAIDATUPLESVC_H 1
13 
14 // Include files:
16 
17 // Forward declarations:
18 class DataObject;
19 
20 // Added to allow use of AIDA in applications
21 // without prefix AIDA:: (as before):
22 namespace AIDA {
23  class ITuple;
24  class IAnnotation;
25 } // namespace AIDA
26 
27 using AIDA::IAnnotation;
28 using AIDA::ITuple;
29 
38 class GAUDI_API IAIDATupleSvc : virtual public IDataProviderSvc {
39 
40 public:
43 
44  // ===================================
45  // Book a tuple in the transient store
46  // ===================================
47  virtual AIDA::ITuple* book( const std::string& fullPath, const std::string& title, const std::string& columns ) = 0;
48 
49  // =======================================
50  // Register a tuple in the transient store
51  // =======================================
53 
54  virtual StatusCode registerObject( const std::string& dirPath, const std::string& objPath, AIDA::ITuple* tObj ) = 0;
55 
56  virtual StatusCode registerObject( DataObject* pParent, const std::string& objPath, AIDA::ITuple* tObj ) = 0;
57 
58  // =========================================
59  // Unregister a tuple in the transient store
60  // =========================================
62 
63  virtual StatusCode unregisterObject( AIDA::ITuple* tObj ) = 0;
64 
65  virtual StatusCode unregisterObject( AIDA::ITuple* tObj, const std::string& objectPath ) = 0;
66 
67  // ====================================
68  // Retrieve a tuple from the data store
69  // ====================================
71 
72  virtual StatusCode retrieveObject( const std::string& fullPath, AIDA::ITuple*& tObj ) = 0;
73 
74  virtual StatusCode retrieveObject( const std::string& parentPath, const std::string& objPath,
75  AIDA::ITuple*& tObj ) = 0;
76 
77  virtual StatusCode retrieveObject( DataObject* parentObj, const std::string& objPath, AIDA::ITuple*& tObj ) = 0;
78 
79  // ==============================
80  // Find a tuple in the data store
81  // ==============================
83 
84  virtual StatusCode findObject( const std::string& fullPath, AIDA::ITuple*& tObj ) = 0;
85 
86  virtual StatusCode findObject( IRegistry* pDirectory, const std::string& path, AIDA::ITuple*& tObj ) = 0;
87 
88  virtual StatusCode findObject( const std::string& parentPath, const std::string& objPath, AIDA::ITuple*& tObj ) = 0;
89 
90  virtual StatusCode findObject( DataObject* parentObj, const std::string& objPath, AIDA::ITuple*& tObj ) = 0;
91 
93  virtual void setCriteria( AIDA::ITuple*& tObj, const std::string& criteria ) = 0;
94 
95  // ==============
96  // Helper methods
97  // ==============
98 
99  // Create all directories in a given full path
100  virtual DataObject* createPath( const std::string& newPath ) = 0;
101 
102  // Create a sub-directory in a directory.
103  virtual DataObject* createDirectory( const std::string& parentDir, const std::string& subDir ) = 0;
104 
105  virtual StatusCode myTest() = 0;
106 };
107 
108 #endif // GAUDIKERNEL_IAIDATUPLESVC_H
GAUDI_API AIDA::IHistogram1D * book(IHistogramSvc *svc, const std::string &path, const Gaudi::Histo1DDef &hist)
helper function to book 1D-histogram
Definition: HistoDef.cpp:97
Data provider interface definition.
GaudiKernel.
Definition: Fill.h:20
virtual StatusCode findObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Find object identified by its directory entry.
STL class.
virtual StatusCode unregisterObject(std::string_view fullPath)=0
Unregister object from the data store.
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:61
The IRegistry represents the entry door to the environment any data object residing in a transient da...
Definition: IRegistry.h:32
DeclareInterfaceID(IDataProviderSvc, 4, 0)
InterfaceID.
virtual StatusCode retrieveObject(IRegistry *pDirectory, std::string_view path, DataObject *&pObject)=0
Retrieve object identified by its directory entry.
StatusCode registerObject(std::string_view fullPath, DataObject *pObject)
Register object with the data store.
Definition of the IAIDATupleSvc interface class.
Definition: IAIDATupleSvc.h:38
#define GAUDI_API
Definition: Kernel.h:81
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:40