| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

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

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 virtual StatusCode createRep(DataObject* pObj,
38 IOpaqueAddress*& refpAddr);
40 static long storageType() { return ROOT_StorageType; }
41 long repSvcType() const { 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 virtual ~RConverter() { }
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