| The Gaudi Framework v30r0 (c919700c)

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

- File List
- File Members

PoolClasses.h
Go to the documentation of this file.
1
2 // The following two classes are the interfaces to facilitate reading POOL formatted ROOT files:
3 #include "GaudiKernel/Kernel.h" // GAUDI_API
4 #include <string>
5 #include <utility>
6 #include <vector>
7
8 /*
9 * POOL namespace declaration
10 */
11 namespace pool
12 {
13 class Guid
14 { // size is 16
15 public:
16 unsigned int Data1;
17 unsigned short Data2;
18 unsigned short Data3;
19 unsigned char Data4[8];
20 };
26 class Token
27 {
28 public:
29 int m_refCount;
30 int m_technology;
31 std::string m_dbID;
32 std::string m_cntID;
33 Guid m_classID;
34 std::pair<int, int> m_oid;
35 int m_type;
36 public:
37 Token() = default;
38 virtual ~Token() = default;
39 bool operator==( const Token& t ) const { return m_oid.first == t.m_oid.first && m_oid.second == t.m_oid.second; }
40 };
41 }
42
48 struct UCharDbArray {
49 public:
51 int m_size = 0;
53 unsigned char* m_buffer = nullptr; //[m_size]
55 UCharDbArray() = default;
57 virtual ~UCharDbArray()
58 {
59 if ( m_buffer ) delete[] m_buffer;
60 m_buffer = nullptr;
61 }
62 };
63
71 class PoolDbTokenWrap
72 {
73 public:
75 pool::Token token;
77 PoolDbTokenWrap() = default;
79 PoolDbTokenWrap( const PoolDbTokenWrap& wrp ) { token = wrp.token; }
81 virtual ~PoolDbTokenWrap() = default;
83 bool operator==( const PoolDbTokenWrap& c ) const { return token == c.token; }
85 PoolDbTokenWrap& operator=( const PoolDbTokenWrap& wrp )
86 {
87 if ( this != &wrp ) token = wrp.token;
88 return *this;
89 }
90 };
91
100 class GAUDI_API PoolDbLinkManager
101 {
102 protected:
104 std::vector<pool::Token*> m_refs;
106 std::vector<std::string> m_links;
107
108 public:
110 PoolDbLinkManager() = default;
112 virtual ~PoolDbLinkManager()
113 {
114 for ( auto& i : m_refs ) delete i;
115 }
117 std::vector<pool::Token*>& references() { return m_refs; }
119 std::vector<std::string>& links() { return m_links; }
120 };
pool::Guid::Data1
unsigned int Data1
Definition: PoolClasses.h:16
pool::Token::m_type
int m_type
POOL OID data member: transient (a streamer is used to read it)
Definition: PoolClasses.h:35
Kernel.h
PoolDbTokenWrap::PoolDbTokenWrap
PoolDbTokenWrap(const PoolDbTokenWrap &wrp)
Copy constructor.
Definition: PoolClasses.h:79
PoolDbLinkManager::m_refs
std::vector< pool::Token * > m_refs
Directory links.
Definition: PoolClasses.h:104
gaudirun.c
c
Definition: gaudirun.py:407
pool::Token::m_classID
Guid m_classID
transient (a streamer is used to read it)
Definition: PoolClasses.h:33
pool::Guid::Data2
unsigned short Data2
Definition: PoolClasses.h:17
UCharDbArray::~UCharDbArray
virtual ~UCharDbArray()
Standard destructor.
Definition: PoolClasses.h:57
pool::Token::m_technology
int m_technology
transient (a streamer is used to read it)
Definition: PoolClasses.h:30
PoolDbLinkManager::references
std::vector< pool::Token * > & references()
Access to token array.
Definition: PoolClasses.h:117
PoolDbLinkManager::m_links
std::vector< std::string > m_links
Logical links.
Definition: PoolClasses.h:106
pool::Guid
Definition: PoolClasses.h:13
pool::Guid::Data3
unsigned short Data3
Definition: PoolClasses.h:18
pool::Token::operator==
bool operator==(const Token &t) const
Definition: PoolClasses.h:39
PoolDbTokenWrap::operator=
PoolDbTokenWrap & operator=(const PoolDbTokenWrap &wrp)
Assignment operator.
Definition: PoolClasses.h:85
UCharDbArray
Shadow class to mimik POOL blobs.
Definition: PoolClasses.h:48
std::string
STL class.
pool::Token::m_oid
std::pair< int, int > m_oid
Object global identifier.
Definition: PoolClasses.h:34
PoolDbLinkManager::links
std::vector< std::string > & links()
Access to link array.
Definition: PoolClasses.h:119
pool::Token
Shadow class to mimik POOL tokens.
Definition: PoolClasses.h:26
pool
Definition: PoolClasses.h:11
PoolDbTokenWrap::token
pool::Token token
Aggregated token object.
Definition: PoolClasses.h:75
PoolDbLinkManager
Description: PoolDbLinkManager class implementation definition.
Definition: PoolClasses.h:100
PoolDbTokenWrap
Description:
Definition: PoolClasses.h:71
PoolDbLinkManager::~PoolDbLinkManager
virtual ~PoolDbLinkManager()
Standard destructor.
Definition: PoolClasses.h:112
std::pair< int, int >
pool::Token::m_cntID
std::string m_cntID
transient (a streamer is used to read it)
Definition: PoolClasses.h:32
PoolDbTokenWrap::operator==
bool operator==(const PoolDbTokenWrap &c) const
Equality operator.
Definition: PoolClasses.h:83
std::vector< pool::Token * >
pool::Guid::Data4
unsigned char Data4[8]
Definition: PoolClasses.h:19
pool::Token::m_dbID
std::string m_dbID
transient (a streamer is used to read it)
Definition: PoolClasses.h:31
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:110
pool::Token::m_refCount
int m_refCount
Definition: PoolClasses.h:29