ATLAS Offline Software
IPersistencySvc.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 //$Id: IPersistencySvc.h 739662 2016-04-12 11:55:10Z krasznaa $
6 
7 #ifndef PERSISTENCYSVC_IPERSISTENCYSVC
8 #define PERSISTENCYSVC_IPERSISTENCYSVC
9 
10 #include <string>
11 #include <memory>
12 
13 class Placement;
14 class Token;
15 #include "DataModelRoot/RootType.h"
16 
20 namespace pool {
21 
22  class IFileCatalog;
23  class ISession;
24 
31  class IPersistencySvc {
32  public:
33 
35  static std::unique_ptr<IPersistencySvc> create( IFileCatalog& catalog );
36 
38  virtual ~IPersistencySvc() {}
39 
40 /* /// Returns the file catalog in use
41  virtual IFileCatalog& fileCatalog() = 0;
42 
44  virtual void setFileCatalog( IFileCatalog& catalog ) = 0;
45 */
58  virtual void* readObject( const Token& token, void* object = 0 ) = 0;
59 
70  virtual Token* registerForWrite( const Placement& place,
71  const void* object,
72  const RootType& type ) = 0;
73 
75  virtual ISession& session() = 0;
76 
77  protected:
82 
83  }; // class IPersistencySvc
84 
85 } // namespace pool
86 
87 #endif // PERSISTENCYSVC_IPERSISTENCYSVC
Placement
This class holds all the necessary information to guide the writing of an object in a physical place.
Definition: Placement.h:19
pool
pool namespace
Definition: libname.h:15
pool::ISession
Definition: ISession.h:31
Token
This class provides a token that identifies in a unique way objects on the persistent storage.
Definition: Token.h:21
pool::IPersistencySvc::~IPersistencySvc
virtual ~IPersistencySvc()
Empty destructor.
Definition: IPersistencySvc.h:38
pool::IFileCatalog
Definition: IFileCatalog.h:23
pool::IPersistencySvc::operator=
IPersistencySvc & operator=(const IPersistencySvc &)
pool::IPersistencySvc::IPersistencySvc
IPersistencySvc()
No copy constructor, and no assignment operator.
Definition: IPersistencySvc.h:79
pool::IPersistencySvc::readObject
virtual void * readObject(const Token &token, void *object=0)=0
Retrieves an object from persistent store and return with type information The handle to the reflecti...
pool::IPersistencySvc::IPersistencySvc
IPersistencySvc(const IPersistencySvc &)
pool::IPersistencySvc
Definition: IPersistencySvc.h:31
pool::IPersistencySvc::registerForWrite
virtual Token * registerForWrite(const Placement &place, const void *object, const RootType &type)=0
registerForWrite registers an object for writing to the persistent medium higher level interactions w...
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
pool::IPersistencySvc::session
virtual ISession & session()=0
Returns the underlying global session.
RootType.h
pool::IPersistencySvc::create
static std::unique_ptr< IPersistencySvc > create(IFileCatalog &catalog)
Factory for PersistencySvc.
TScopeAdapter
Definition: RootType.h:119