| # Gaudi Framework, version v22r2 |

Home |  | Generated: Tue May 10 2011

Namespaces | Defines | Functions | Variables

# PoolDbIOHandler.cpp File Reference

`#include "GaudiPoolDb/PoolDbIOHandler.h"`
`#include "GaudiKernel/ObjectContainerBase.h"`
`#include "GaudiKernel/ContainedObject.h"`
`#include "GaudiKernel/LinkManager.h"`
`#include "GaudiKernel/IRegistry.h"`
`#include "GaudiKernel/MsgStream.h"`
`#include "GaudiKernel/SmartRef.h"`
`#include <stdexcept>`
`#include <iostream>`
`#include "TROOT.h"`
`#include "TFile.h"`
`#include "TClass.h"`
`#include "TStreamerInfo.h"`
`#include "Cintex/Cintex.h"`
`#include "POOLCore/Token.h"`
`#include "POOLCore/Reference.h"`
`#include "StorageSvc/DbReflex.h"`
`#include "StorageSvc/DataCallBack.h"`
`#include "StorageSvc/DbDataHandlerGuard.h"`
`#include <memory>`
Include dependency graph for PoolDbIOHandler.cpp:

Go to the source code of this file.

## Namespaces
namespace | ROOT
namespace | ROOT::Cintex
namespace | pool
namespace | GaudiPoolDb
## Defines
#define | ROOT_FULL_VERSION(a, b, c, p) (((a)<<24)+((b)<<16)+((c)<<8)+(p))
#define | ROOT_FULL_VERSION_CODE (ROOT_VERSION_CODE << 8)
## Functions
bool | ROOT::Cintex::IsTypeOf (Type &typ, const std::string &base_name)
const std::string | pool::typeName (const std::type_info &typ)
void | resetLastLink ()
void | pushCurrentDataObject (DataObject **pobjAddr)
void | popCurrentDataObject ()
static void | getOID_40000 (TBuffer &b, TClass *cl, Token::OID_t &oid)
template<class T >
static bool | makeStreamer (MsgStream &log)
bool | GaudiPoolDb::patchStreamers (MsgStream &log)
## Variables
static const DataObject * | last_link_object = 0
static int | last_link_hint = -1

## Define Documentation

#define ROOT_FULL_VERSION | ( |  | a,
|  |  | b,
|  |  | c,
|  |  | p
| ) |  | (((a)<<24)+((b)<<16)+((c)<<8)+(p))

Definition at line 207 of file PoolDbIOHandler.cpp.

#define ROOT_FULL_VERSION_CODE (ROOT_VERSION_CODE << 8)

Definition at line 208 of file PoolDbIOHandler.cpp.

## Function Documentation

static void getOID_40000 | ( | TBuffer & | b,
|  | TClass * | cl,
|  | Token::OID_t & | oid
| ) |  | `[static]`

Definition at line 211 of file PoolDbIOHandler.cpp.

                                                                      {
      unsigned long loid[2];
      UInt_t start, count;
    #if (ROOT_FULL_VERSION_CODE < ROOT_FULL_VERSION(5,28,0,'a'))
      UInt_t tmp;
    #endif
      // read the class version from the buffer
      /* Version_t vsn = */ b.ReadVersion(&start, &count, 0);
      switch(count) {
      case 22:              // These tokens were written as pair<long,long>
    #if (ROOT_FULL_VERSION_CODE < ROOT_FULL_VERSION(5,28,0,'a'))
        b >> tmp;           //
    #endif
        b.ReadFastArray(loid,2); // There was a bug in POOL....
        oid.first = loid[0];
        oid.second = loid[1];
        break;              // see TBuffer::ReadFastArray(ulong*, int)
    #if (ROOT_FULL_VERSION_CODE < ROOT_FULL_VERSION(5,28,0,'a'))
      case 14:              // Normal case: version:checksum+8 Bytes
        b >> tmp;           //
      case 10:              // Normal case: version:checksum+8 Bytes
      case 8:               // Without checksum and version
    #endif
      default:              // No better idea
        b.ReadFastArray(&oid.first, 2);
        break;
      }
      // Check that the buffer position correesponds to the byte count
      b.CheckByteCount(start, count, cl);
    }

template<class T >

static bool makeStreamer | ( | MsgStream & | log ) | `[static]`

Definition at line 297 of file PoolDbIOHandler.cpp.

                                                                 {
      std::string cl_name = typeName(typeid(T));
      ROOT::Reflex::Type t = ROOT::Reflex::Type::ByName(cl_name);
      if ( t )  {
        TClass* c = gROOT->GetClass(cl_name.c_str());
        if ( c ) {
          TClassStreamer* s = new PoolDbIOHandler<T>(t,c);
          c->AdoptStreamer(s);
          log << MSG::DEBUG << "Installed IOHandler for class " << cl_name << endmsg;
          return true;
        }
        else if ( !c )  {
          log << MSG::ERROR << "[No ROOT TClass] Failed to install IOHandler for class " << cl_name << endmsg;
        }
      }
      else  {
        log << MSG::ERROR << "[No Reflection Type] Failed to install IOHandler for class " << cl_name << endmsg;
      }
      return false;
    }

void popCurrentDataObject | ( | ) |

Definition at line 72 of file PoolDbIOHandler.cpp.

                                {
      Gaudi::popCurrentDataObject();
      resetLastLink();
    }

void pushCurrentDataObject | ( | DataObject ** | pobjAddr ) |

Definition at line 67 of file PoolDbIOHandler.cpp.

                                                      {
      Gaudi::pushCurrentDataObject(pobjAddr);
      resetLastLink();
    }

void resetLastLink | ( | ) |

Definition at line 60 of file PoolDbIOHandler.cpp.

                         {
      last_link_object = 0;
      last_link_hint   = -1;
    }

## Variable Documentation

int last_link_hint = -1`[static]`

Definition at line 58 of file PoolDbIOHandler.cpp.

const DataObject* last_link_object = 0`[static]`

Definition at line 57 of file PoolDbIOHandler.cpp.

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines