Gaudi Framework, version v21r8

Home   Generated: 17 Mar 2010

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

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 DataObjectlast_link_object = 0
static int last_link_hint = -1


Function Documentation

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

Definition at line 196 of file PoolDbIOHandler.cpp.

00196                                                                   {
00197   unsigned long loid[2];
00198   UInt_t start, count, tmp;
00199   // read the class version from the buffer
00200   /* Version_t vsn = */ b.ReadVersion(&start, &count, 0);
00201   switch(count) {
00202   case 22:              // These tokens were written as pair<long,long>
00203     b >> tmp;           //
00204     b.ReadFastArray(loid,2); // There was a bug in POOL....
00205     oid.first = loid[0];
00206     oid.second = loid[1];
00207     break;              // see TBuffer::ReadFastArray(ulong*, int)
00208   case 14:              // Normal case: version:checksum+8 Bytes
00209     b >> tmp;           //
00210   case 10:              // Normal case: version:checksum+8 Bytes
00211   case 8:               // Without checksum and version
00212   default:              // No better idea
00213     b.ReadFastArray(&oid.first, 2);
00214     break;
00215   }
00216   // Check that the buffer position correesponds to the byte count
00217   b.CheckByteCount(start, count, cl);
00218 }

template<class T>
static bool makeStreamer ( MsgStream log  )  [inline, static]

Definition at line 275 of file PoolDbIOHandler.cpp.

00275                                                              {
00276   std::string cl_name = typeName(typeid(T));
00277   ROOT::Reflex::Type t = ROOT::Reflex::Type::ByName(cl_name);
00278   if ( t )  {
00279     TClass* c = gROOT->GetClass(cl_name.c_str());
00280     if ( c ) {
00281       TClassStreamer* s = new PoolDbIOHandler<T>(t,c);
00282       c->AdoptStreamer(s);
00283       log << MSG::DEBUG << "Installed IOHandler for class " << cl_name << endmsg;
00284       return true;
00285     }
00286     else if ( !c )  {
00287       log << MSG::ERROR << "[No ROOT TClass] Failed to install IOHandler for class " << cl_name << endmsg;
00288     }
00289   }
00290   else  {
00291     log << MSG::ERROR << "[No Reflection Type] Failed to install IOHandler for class " << cl_name << endmsg;
00292   }
00293   return false;
00294 }

void popCurrentDataObject (  ) 

Definition at line 60 of file PoolDbIOHandler.cpp.

00060                             {
00061   Gaudi::popCurrentDataObject();
00062   resetLastLink();
00063 }

void pushCurrentDataObject ( DataObject **  pobjAddr  ) 

Definition at line 55 of file PoolDbIOHandler.cpp.

00055                                                   {
00056   Gaudi::pushCurrentDataObject(pobjAddr);
00057   resetLastLink();
00058 }

void resetLastLink (  ) 

Definition at line 48 of file PoolDbIOHandler.cpp.

00048                      {
00049   last_link_object = 0;
00050   last_link_hint   = -1;
00051 }


Variable Documentation

int last_link_hint = -1 [static]

Definition at line 46 of file PoolDbIOHandler.cpp.

const DataObject* last_link_object = 0 [static]

Definition at line 45 of file PoolDbIOHandler.cpp.


Generated at Wed Mar 17 18:11:45 2010 for Gaudi Framework, version v21r8 by Doxygen version 1.5.6 written by Dimitri van Heesch, © 1997-2004