ATLAS Offline Software
RootDataPtr.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 //====================================================================
6 // Root Database implementation
7 //====================================================================
8 //
9 // Package : RootStorageSvc (The POOL project)
10 //
11 // Author : M.Frank
12 //====================================================================
13 #ifndef POOL_ROOTSTORAGESVC_ROOTDATAPTR_H
14 #define POOL_ROOTSTORAGESVC_ROOTDATAPTR_H 1
15 
17 #include "StorageSvc/DbBlob.h"
18 #include "StorageSvc/DbArray.h"
19 #include <string>
20 
21 class TObject;
22 
23 /*
24  * POOL namespace declaration
25  */
26 namespace pool {
27  // Forward declarations
28  class Blob;
29  class DbPointer;
30 
33  union RootDataPtr {
34  void* ptr;
35  void** pptr;
36  const void* cptr;
37  char* c_str;
38  std::string* str;
39  TObject* tobj;
42  std::vector<Token::OID_t>* links;
44  DbPointer* pointer;
45  RootDataPtr(const void* p) { cptr = p; }
46  void* deref() { return *pptr; }
47  std::string* string() { return str; }
48  int* ibuffer() { return tlinks->m_buffer; }
49  int isize() { return tlinks->m_size; }
50  int blobSize() { return blob->buffPointer(); }
51  char* blobData() { return blob->data(); }
52  int linkSize() { return int(links->size()); }
53  long long* linkData() { return links->size()>0 ? &(links->begin()->first) : 0; }
54  };
55 } // end namespace pool
56 #endif /* POOL_ROOTSTORAGESVC_ROOTDB_PTR_H */
pool::DbBlob::buffPointer
int buffPointer() const
Retrieve current buffer pointer.
Definition: DbBlob.h:103
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
pool::RootDataPtr::tlinks
DbArray< int > * tlinks
Definition: RootDataPtr.h:40
pool::RootDataPtr::pointer
DbPointer * pointer
Definition: RootDataPtr.h:44
pool
pool namespace
Definition: libname.h:15
pool::RootDataPtr::blob
DbBlob * blob
Definition: RootDataPtr.h:43
pool::RootDataPtr::links
std::vector< Token::OID_t > * links
Definition: RootDataPtr.h:42
python.subdetectors.tile.Blob
Blob
Definition: tile.py:17
pool::RootDataPtr::ibuffer
int * ibuffer()
Definition: RootDataPtr.h:48
pool::RootDataPtr::str
std::string * str
Definition: RootDataPtr.h:38
pool::RootDataPtr
Definition: RootDataPtr.h:33
pool::DbArray::m_size
int m_size
Size of buffer.
Definition: DbArray.h:32
pool::RootDataPtr::linkSize
int linkSize()
Definition: RootDataPtr.h:52
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
pool::RootDataPtr::string
std::string * string()
Definition: RootDataPtr.h:47
pool::RootDataPtr::blobSize
int blobSize()
Definition: RootDataPtr.h:50
DbArray.h
pool::RootDataPtr::deref
void * deref()
Definition: RootDataPtr.h:46
pool::RootDataPtr::pptr
void ** pptr
Definition: RootDataPtr.h:35
pool::RootDataPtr::isize
int isize()
Definition: RootDataPtr.h:49
pool::DbArray< int >
pool::RootDataPtr::array
DbArray< char > * array
Definition: RootDataPtr.h:41
pool::DbBlob::data
const char * data() const
Read access to data buffer.
Definition: DbBlob.h:90
pool::RootDataPtr::cptr
const void * cptr
Definition: RootDataPtr.h:36
pool::RootDataPtr::c_str
char * c_str
Definition: RootDataPtr.h:37
DbBlob.h
pool::RootDataPtr::tobj
TObject * tobj
Definition: RootDataPtr.h:39
pool::DbArray::m_buffer
T * m_buffer
Buffer with object content.
Definition: DbArray.h:34
pool::RootDataPtr::blobData
char * blobData()
Definition: RootDataPtr.h:51
pool::RootDataPtr::RootDataPtr
RootDataPtr(const void *p)
Definition: RootDataPtr.h:45
pool::RootDataPtr::linkData
long long * linkData()
Definition: RootDataPtr.h:53
Token.h
This file contains the class definition for the Token class (migrated from POOL).
pool::DbBlob
Definition: DbBlob.h:47
pool::RootDataPtr::ptr
void * ptr
Definition: RootDataPtr.h:34