ATLAS Offline Software
Loading...
Searching...
No Matches
IRootSvc.h
Go to the documentation of this file.
1
2
3/*
4 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5*/
6
7#ifndef ATHENAROOTKERNEL_IROOTSVC_H
8#define ATHENAROOTKERNEL_IROOTSVC_H 1
9
14
15// fwk includes
16#include "GaudiKernel/IInterface.h"
17
19
20// stl includes
21#include <typeinfo>
22#include <string>
23
24// fwd declares
25class Token;
26class Placement;
27namespace Athena { class RootConnection; }
28
32class IRootSvc : virtual public IInterface {
33public:
34 virtual ~IRootSvc();
35
38
41 virtual RootType getType(const std::type_info& type) const = 0;
42
44 virtual void* readObject(const Token& token, void*& pObj) = 0;
45
47 virtual const Token* writeObject(const Placement& placement, const RootType& type, const void* pObj) = 0;
48
50 virtual void* createObject(const RootType& type) const = 0;
51
53 virtual void destructObject(const RootType& type, void* pObj) const = 0;
54
56
58 virtual StatusCode open(const std::string& fname, const std::string& mode) = 0;
59
61 virtual StatusCode connect(const std::string& fname) = 0;
62
64 virtual StatusCode commitOutput() = 0;
65
67 virtual StatusCode disconnect(const std::string& fname) = 0;
68
71 virtual Athena::RootConnection* connection(const std::string& fname) = 0;
72};
73
74#endif /* !ATHENAROOTKERNEL_IROOTSVC_H */
TTypeAdapter RootType
Definition RootType.h:211
This class provides the implementation of Athena::RootConnection class, similar to Gaudi IDataConnect...
This class provides the interface to the ROOT software.
Definition IRootSvc.h:32
virtual void * readObject(const Token &token, void *&pObj)=0
Read object from Root.
DeclareInterfaceID(IRootSvc, 1, 0)
Declare interface ID.
virtual StatusCode open(const std::string &fname, const std::string &mode)=0
Open the file fname with open mode mode
virtual RootType getType(const std::type_info &type) const =0
virtual void * createObject(const RootType &type) const =0
Create an object of a given RootType.
virtual StatusCode connect(const std::string &fname)=0
Connect the file fname to the service.
virtual StatusCode disconnect(const std::string &fname)=0
Disconnect the file fname from the service.
virtual Athena::RootConnection * connection(const std::string &fname)=0
Get the RootConnection associated with file fname
virtual StatusCode commitOutput()=0
Commit data and flush buffer.
virtual void destructObject(const RootType &type, void *pObj) const =0
Destruct a given object of type RootType.
virtual ~IRootSvc()
Definition IRootSvc.cxx:17
virtual const Token * writeObject(const Placement &placement, const RootType &type, const void *pObj)=0
Write object of a given class to Root.
This class holds all the necessary information to guide the writing of an object in a physical place.
Definition Placement.h:19
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition Token.h:21
Some weak symbol referencing magic... These are declared in AthenaKernel/getMessageSvc....