The Gaudi Framework  master (37c0b60a)
INTupleSvc.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2024 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_INTUPLESVC_H
12 #define GAUDIKERNEL_INTUPLESVC_H
13 
14 // Framework include files
15 #include <GaudiKernel/ClassID.h>
17 
18 // Forward declarations
19 namespace NTuple {
20  class Tuple;
21  struct Directory;
22 } // namespace NTuple
23 
46 class GAUDI_API INTupleSvc : virtual public IDataProviderSvc {
47 public:
51  virtual StatusCode create( const CLID& typ, const std::string& title, NTuple::Tuple*& refpTuple ) = 0;
61  virtual NTuple::Tuple* book( const std::string& fullPath, const CLID& type, const std::string& title ) = 0;
73  virtual NTuple::Tuple* book( const std::string& dirPath, const std::string& relPath, const CLID& type,
74  const std::string& title ) = 0;
85  virtual NTuple::Tuple* book( const std::string& dirPath, long id, const CLID& type, const std::string& title ) = 0;
97  virtual NTuple::Tuple* book( DataObject* pParent, const std::string& relPath, const CLID& type,
98  const std::string& title ) = 0;
108  virtual NTuple::Tuple* book( DataObject* pParent, long id, const CLID& type, const std::string& title ) = 0;
116  virtual NTuple::Directory* createDirectory( DataObject* pParent, const std::string& title ) = 0;
124  virtual NTuple::Directory* createDirectory( DataObject* pParent, long id ) = 0;
132  virtual NTuple::Directory* createDirectory( const std::string& dirPath, long id ) = 0;
140  virtual NTuple::Directory* createDirectory( const std::string& dirPath, const std::string& title ) = 0;
145  virtual NTuple::Directory* createDirectory( const std::string& fullPath ) = 0;
151  virtual NTuple::Tuple* access( const std::string& fullPath, const std::string& filename ) = 0;
152 
157  virtual StatusCode save( const std::string& fullPath ) = 0;
158 
163  virtual StatusCode save( NTuple::Tuple* tuple ) = 0;
164 
171  virtual StatusCode save( DataObject* pParent, const std::string& relPath ) = 0;
172 
177  virtual StatusCode writeRecord( NTuple::Tuple* tuple ) = 0;
178 
183  virtual StatusCode writeRecord( const std::string& fullPath ) = 0;
184 
191  virtual StatusCode writeRecord( DataObject* pParent, const std::string& relPath ) = 0;
192 
197  virtual StatusCode readRecord( NTuple::Tuple* tuple ) = 0;
198 
203  virtual StatusCode readRecord( const std::string& fullPath ) = 0;
204 
211  virtual StatusCode readRecord( DataObject* pParent, const std::string& relPath ) = 0;
212 };
213 
214 #endif // INTERFACES_INTUPLESVC_H
INTupleSvc::book
virtual NTuple::Tuple * book(const std::string &dirPath, long id, const CLID &type, const std::string &title)=0
Book Ntuple and register it with the data store.
INTupleSvc::readRecord
virtual StatusCode readRecord(NTuple::Tuple *tuple)=0
Read single record from N tuple.
std::string
STL class.
INTupleSvc::book
virtual NTuple::Tuple * book(const std::string &dirPath, const std::string &relPath, const CLID &type, const std::string &title)=0
Book Ntuple and register it with the data store.
NTuple::Directory
Small class representing an N tuple directory in the transient store.
Definition: NTuple.h:914
INTupleSvc::save
virtual StatusCode save(DataObject *pParent, const std::string &relPath)=0
Save N tuple to disk.
ClassID.h
INTupleSvc::createDirectory
virtual NTuple::Directory * createDirectory(const std::string &dirPath, const std::string &title)=0
Create Ntuple directory and register it with the data store.
INTupleSvc::create
virtual StatusCode create(const CLID &typ, const std::string &title, NTuple::Tuple *&refpTuple)=0
Create requested N tuple (Hide constructor)
INTupleSvc::save
virtual StatusCode save(const std::string &fullPath)=0
Save N tuple to disk.
IDataProviderSvc.h
INTupleSvc::save
virtual StatusCode save(NTuple::Tuple *tuple)=0
Save N tuple to disk.
INTupleSvc::writeRecord
virtual StatusCode writeRecord(NTuple::Tuple *tuple)=0
Write single record to N tuple.
INTupleSvc::writeRecord
virtual StatusCode writeRecord(const std::string &fullPath)=0
Write single record to N tuple.
StatusCode
Definition: StatusCode.h:65
INTupleSvc::book
virtual NTuple::Tuple * book(DataObject *pParent, const std::string &relPath, const CLID &type, const std::string &title)=0
Book Ntuple and register it with the data store.
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:18
INTupleSvc::writeRecord
virtual StatusCode writeRecord(DataObject *pParent, const std::string &relPath)=0
Write single record to N tuple.
gaudirun.type
type
Definition: gaudirun.py:160
INTupleSvc::access
virtual NTuple::Tuple * access(const std::string &fullPath, const std::string &filename)=0
Access N tuple on disk.
NTuple::Tuple
Abstract base class which allows the user to interact with the actual N tuple implementation.
Definition: NTuple.h:388
INTupleSvc::book
virtual NTuple::Tuple * book(DataObject *pParent, long id, const CLID &type, const std::string &title)=0
Book Ntuple and register it with the data store.
INTupleSvc::book
virtual NTuple::Tuple * book(const std::string &fullPath, const CLID &type, const std::string &title)=0
Book Ntuple and register it with the data store.
INTupleSvc::DeclareInterfaceID
DeclareInterfaceID(INTupleSvc, 2, 0)
InterfaceID.
DataObject
Definition: DataObject.h:36
NTuple
NTuple name space.
Definition: INTupleSvc.h:19
INTupleSvc::createDirectory
virtual NTuple::Directory * createDirectory(DataObject *pParent, long id)=0
Create Ntuple directory and register it with the data store.
INTupleSvc::readRecord
virtual StatusCode readRecord(DataObject *pParent, const std::string &relPath)=0
Read single record from N tuple.
IDataProviderSvc
Definition: IDataProviderSvc.h:53
INTupleSvc
Definition: INTupleSvc.h:46
INTupleSvc::createDirectory
virtual NTuple::Directory * createDirectory(const std::string &fullPath)=0
Create Ntuple directory and register it with the data store.
INTupleSvc::createDirectory
virtual NTuple::Directory * createDirectory(DataObject *pParent, const std::string &title)=0
Create Ntuple directory and register it with the data store.
INTupleSvc::readRecord
virtual StatusCode readRecord(const std::string &fullPath)=0
Read single record from N tuple.
graphanalysis.filename
filename
Definition: graphanalysis.py:130
INTupleSvc::createDirectory
virtual NTuple::Directory * createDirectory(const std::string &dirPath, long id)=0
Create Ntuple directory and register it with the data store.
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:81