Loading [MathJax]/jax/input/TeX/config.js
Go to the documentation of this file.
27 #include "TClassStreamer.h"
28 #include "TInterpreter.h"
38 static const DataObject* last_link_object =
nullptr;
39 static int last_link_hint = -1;
41 last_link_object =
nullptr;
80 string err =
"Class:" +
string( m_root->GetName() ) +
"> Exception in object I/O";
84 string err =
"Class:" +
string( m_root->GetName() ) +
"> Exception in object I/O";
89 virtual void get( TBuffer& b,
void* obj );
91 virtual void put( TBuffer& b,
void* obj );
100 switch (
r.Base->objectType() ) {
108 cout <<
"Hit uninitialized smartRef!!!!" <<
endl;
121 pDO =
r.ObjectRef->data();
122 hint =
r.ObjectRef->hintID();
123 link =
r.ObjectRef->linkID();
125 switch (
r.Base->objectType() ) {
127 p =
r.ContainedRef->data();
137 cout <<
"IOHandler<SmartRefBase>::onWrite> "
138 <<
"Found invalid smart reference with object "
139 <<
"having no parent." <<
endl;
141 "Found invalid smart reference with object "
142 "having no parent." );
150 if ( pDO == last_link_object ) {
151 r.Base->set( curr, last_link_hint, link );
152 m_root->WriteBuffer( b, obj );
159 last_link_hint = hint;
160 last_link_object = pDO;
166 r.Base->set( curr, hint, link );
167 m_root->WriteBuffer( b, obj );
181 m_root->WriteBuffer( b, obj );
189 b.ReadFastArray( &
t->m_oid.first, 2 );
195 throw runtime_error(
"Writing POOL files is not implemented!" );
201 TClass*
c = gROOT->GetClass( cl_name.
c_str() );
207 log <<
MSG::ERROR <<
"[No ROOT TClass] Failed to install IOHandler for class " << cl_name <<
endmsg;
212 static bool first =
true;
215 #if ROOT_VERSION_CODE < ROOT_VERSION( 5, 99, 0 )
216 gSystem->Load(
"libCintex" );
217 gROOT->ProcessLine(
"Cintex::Cintex::Enable()" );
218 gROOT->ProcessLine(
"#include <vector>" );
219 gInterpreter->EnableAutoLoading();
220 gInterpreter->AutoLoad(
"DataObject" );
221 gInterpreter->AutoLoad(
"PoolDbLinkManager" );
222 gSystem->Load(
"libGaudiKernelDict" );
223 gSystem->Load(
"libGaudiExamplesDict" );
225 # if ROOT_VERSION_CODE < ROOT_VERSION( 6, 19, 0 )
226 gInterpreter->EnableAutoLoading();
228 gInterpreter->LoadLibraryMap();
230 gInterpreter->AutoLoad(
"DataObject" );
231 gInterpreter->AutoLoad(
"PoolDbLinkManager" );
234 bool b1 = makeStreamer<SmartRefBase>(
s );
235 bool b2 = makeStreamer<ContainedObject>(
s );
236 bool b3 = makeStreamer<pool::Token>(
s );
237 return b1 &&
b2 && b3;
GAUDI_API void popCurrentDataObject()
virtual void put(TBuffer &b, void *obj)
Callback for writing the object.
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
GAUDI_API DataObject * getCurrentDataObject()
User example objects: SmartRefBase.
void popCurrentDataObject()
auto get(const Handle &handle, const Algo &, const EventContext &) -> decltype(details::deref(handle.get()))
SmartRef< DataObject > * ObjectRef
bool patchStreamers(MsgStream &log)
IOHandler(TClass *c)
Initializing constructor.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
virtual long index() const
Distance in the parent container.
void pushCurrentDataObject(DataObject **pobjAddr)
const ObjectContainerBase * parent() const
Access to parent object.
TClass * m_root
ROOT persistent class description.
GAUDI_API void pushCurrentDataObject(DataObject **pobjAddr)
void setParent(ObjectContainerBase *value)
Update parent member.
void operator()(TBuffer &b, void *obj) override
ROOT I/O callback.
virtual const id_type & identifier() const =0
Full identifier (or key)
virtual void get(TBuffer &b, void *obj)
Callback for reading the object.
LinkManager * linkMgr()
Retrieve Link manager.
SmartRef< ContainedObject > * ContainedRef
long addLink(const std::string &path, const DataObject *pObject)
Add link by object reference and path.
IRegistry * registry() const
Get pointer to Registry.
auto put(const DataObjectHandle< Out1 > &out_handle, Out2 &&out)