ATLAS Offline Software
Loading...
Searching...
No Matches
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
13class Placement;
14class Token;
16
20namespace pool {
21
22 class IFileCatalog;
23 class ISession;
24
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
TTypeAdapter RootType
Definition RootType.h:211
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
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...
IPersistencySvc()
No copy constructor, and no assignment operator.
virtual ISession & session()=0
Returns the underlying global session.
IPersistencySvc & operator=(const IPersistencySvc &)
static std::unique_ptr< IPersistencySvc > create(IFileCatalog &catalog)
Factory for PersistencySvc.
IPersistencySvc(const IPersistencySvc &)
virtual ~IPersistencySvc()
Empty destructor.
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...
ISession is the interface class for user (macroscopic) sessions Every transaction and connection to a...
Definition ISession.h:32
pool namespace
Definition libname.h:15