| The Gaudi Framework v28r2-patches (bc4ad17a)

- 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 <string>
8 #include <map>
9
10 // Forward declarations
11 class ISvcLocator;
12 class TObject;
13 class TTree;
14 class TFile;
15
16 class GlobalDirectoryRestore {
17 TDirectory* m_current;
18 public:
19 GlobalDirectoryRestore() {
20 m_current = gDirectory;
21 }
22 virtual ~GlobalDirectoryRestore() {
23 gDirectory = m_current;
24 }
25 };
26
27 namespace RootHistCnv {
28
34 class RConverter : public Converter {
35 public:
37 StatusCode createRep(DataObject* pObj,
38 IOpaqueAddress*& refpAddr) override;
40 static long storageType() { return ROOT_StorageType; }
41 long repSvcType() const override { return i_repSvcType(); }
42
43 StatusCode error(const std::string& msg);
44 StatusCode regTFile(const std::string, const TFile*);
45 StatusCode findTFile(const std::string, TFile*&);
46
47 std::string diskDirectory(const std::string& loc);
48 std::string directory(const std::string& loc);
49 void setDirectory(const std::string& loc);
50 void setDiskDirectory(const std::string& loc);
51 StatusCode createDirectory(const std::string& loc);
52 StatusCode createDiskDirectory(const std::string& loc);
53 std::string getDirectory();
54
55 std::string convertId(const std::string& ) const ;
56
57 protected:
59 RConverter( const CLID& clid, ISvcLocator* svc )
60 : Converter(storageType(), clid, svc) { }
62 ~RConverter() override = default;
64 virtual StatusCode readObject( IOpaqueAddress* pAddr,
65 DataObject*& refpObj);
67 virtual TObject* createPersistent(DataObject* pObj);
69 StatusCode createAddress( DataObject* pObject,
70 TDirectory* pDir,
71 TObject* pTObject,
72 IOpaqueAddress*& refpAddr);
73
74 StatusCode createAddress(const std::string& rzdir,
75 const CLID& clid,
76 long id,
77 TObject* pTobj,
78 IOpaqueAddress*& refpAddress);
79
80 StatusCode createAddress(const std::string& rzdir,
81 const CLID& clid,
82 const std::string& title,
83 TObject* pTobj,
84 IOpaqueAddress*& refpAddress);
85
87 TDirectory* changeDirectory(DataObject* pObject);
88 };
89 } // namespace RootHistCnv
90
91 #endif // RootHistCnv_RConverter_H
RootHistCnv::RConverter
Root Converter.
Definition: RConverter.h:34
RootHistCnv::RConverter::RConverter
RConverter(const CLID &clid, ISvcLocator *svc)
Standard constructor.
Definition: RConverter.h:59
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:40
std::string
STL class.
RootHistCnv::RConverter::repSvcType
long repSvcType() const override
Definition: RConverter.h:41
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
GlobalDirectoryRestore::GlobalDirectoryRestore
GlobalDirectoryRestore()
Definition: RConverter.h:19
RootHistCnv
Definition: DirectoryCnv.h:17
ROOT_StorageType
const long ROOT_StorageType
Definition: ClassID.h:52
GlobalDirectoryRestore::m_current
TDirectory * m_current
Definition: RConverter.h:17
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:30