| The Gaudi Framework v29r0 (ff2e7097)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

RConverter.h
Go to the documentation of this file.
1 #ifndef ROOTHISTCNV_RCONVERTER_H
2 #define ROOTHISTCNV_RCONVERTER_H 1
3
4 // Include files
5 #include "GaudiKernel/Converter.h"
6 #include "TDirectory.h"
7 #include <map>
8 #include <string>
9
10 // Forward declarations
11 class ISvcLocator;
12 class TObject;
13 class TTree;
14 class TFile;
15
16 class GlobalDirectoryRestore
17 {
18 TDirectory* m_current;
19
20 public:
21 GlobalDirectoryRestore() { m_current = gDirectory; }
22 virtual ~GlobalDirectoryRestore() { gDirectory = m_current; }
23 };
24
25 namespace RootHistCnv
26 {
27
33 class RConverter : public Converter
34 {
35 public:
37 StatusCode createRep( DataObject* pObj, IOpaqueAddress*& refpAddr ) override;
39 static long storageType() { return ROOT_StorageType; }
40 long repSvcType() const override { return i_repSvcType(); }
41
42 StatusCode error( const std::string& msg );
43 StatusCode regTFile( const std::string, const TFile* );
44 StatusCode findTFile( const std::string, TFile*& );
45
46 std::string diskDirectory( const std::string& loc );
47 std::string directory( const std::string& loc );
48 void setDirectory( const std::string& loc );
49 void setDiskDirectory( const std::string& loc );
50 StatusCode createDirectory( const std::string& loc );
51 StatusCode createDiskDirectory( const std::string& loc );
52 std::string getDirectory();
53
54 std::string convertId( const std::string& ) const;
55
56 protected:
58 RConverter( const CLID& clid, ISvcLocator* svc ) : Converter( storageType(), clid, svc ) {}
60 ~RConverter() override = default;
62 virtual StatusCode readObject( IOpaqueAddress* pAddr, DataObject*& refpObj );
64 virtual TObject* createPersistent( DataObject* pObj );
66 StatusCode createAddress( DataObject* pObject, TDirectory* pDir, TObject* pTObject, IOpaqueAddress*& refpAddr );
67
68 StatusCode createAddress( const std::string& rzdir, const CLID& clid, long id, TObject* pTobj,
69 IOpaqueAddress*& refpAddress );
70
71 StatusCode createAddress( const std::string& rzdir, const CLID& clid, const std::string& title, TObject* pTobj,
72 IOpaqueAddress*& refpAddress );
73
75 TDirectory* changeDirectory( DataObject* pObject );
76 };
77 } // namespace RootHistCnv
78
79 #endif // RootHistCnv_RConverter_H
RootHistCnv::RConverter
Root Converter.
Definition: RConverter.h:33
RootHistCnv::RConverter::RConverter
RConverter(const CLID &clid, ISvcLocator *svc)
Standard constructor.
Definition: RConverter.h:58
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
RootHistCnv::RConverter::storageType
static long storageType()
Inquire storage type.
Definition: RConverter.h:39
std::string
STL class.
RootHistCnv::RConverter::repSvcType
long repSvcType() const override
Definition: RConverter.h:40
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:28
GlobalDirectoryRestore::GlobalDirectoryRestore
GlobalDirectoryRestore()
Definition: RConverter.h:21
RootHistCnv
Definition: DirectoryCnv.h:17
ROOT_StorageType
const long ROOT_StorageType
Definition: ClassID.h:52
GlobalDirectoryRestore::m_current
TDirectory * m_current
Definition: RConverter.h:18
GlobalDirectoryRestore::~GlobalDirectoryRestore
virtual ~GlobalDirectoryRestore()
Definition: RConverter.h:22
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:8
Converter
Converter base class.
Definition: Converter.h:24
GlobalDirectoryRestore
Definition: RConverter.h:16
GaudiMP.FdsRegistry.msg
msg
Definition: FdsRegistry.py:8
Converter.h
IOpaqueAddress
Opaque address interface definition.
Definition: IOpaqueAddress.h:23
DataObject
A DataObject is the base class of any identifiable object on any data store.
Definition: DataObject.h:29