ATLAS Offline Software
AthenaRootConverterHandle.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 
8 
10  T_AthenaRootConverterBase *converter) :
11  m_oldClass(0),
12  m_oldObj(0),
13  m_converter(converter)
14 {
15 }
16 
17 
19 {
20  // not deleting the converter here - could be under user management
21 }
22 
23 
24 #include <iostream>
25 
26 void AthenaRootConverterHandle::ReadBuffer(TBuffer& b, void* obj, Version_t version, UInt_t R__s, UInt_t R__c)
27 {
28  if (m_oldObj == 0) {
30  m_oldClass = gROOT->GetClass( m_converter->TypeIDOld() );
31  }
32  if( !m_oldClass ) {
33  std::cerr << "-- AthenaRootConverterHandle::ReadBuffer - ERROR - Class name:"
34  << m_converter->ClassName() << ", typeid:" << m_converter->TypeIDOld().name()
35  << "; can NOT read the object - failed to get TClass (possibly unknown to dictionary)"
36  << std::endl;
37  return;
38  }
39 // std::cout << "-- AthenaRootConverterHandle::ReadBuffer - Class name:"
40 // << m_converter->ClassName() << ", m_oldClass=" << m_oldClass
41 // << ", typeid:" << m_converter->TypeIDOld().name() << std::endl;
42  m_oldClass->ReadBuffer(b, m_oldObj, version, R__s, R__c);
44 }
T_AthenaRootConverterBase
Definition: T_AthenaRootConverter.h:17
AthenaRootConverterHandle::ReadBuffer
virtual void ReadBuffer(TBuffer &b, void *obj, Version_t version, UInt_t R__s, UInt_t R__c)
Definition: AthenaRootConverterHandle.cxx:26
T_AthenaRootConverterBase::ClassName
const std::string & ClassName()
Definition: T_AthenaRootConverter.h:27
T_AthenaRootConverterBase::InstantiateOld
virtual void * InstantiateOld()=0
Create an instance of the old object.
AthenaRootConverterHandle::~AthenaRootConverterHandle
virtual ~AthenaRootConverterHandle()
Definition: AthenaRootConverterHandle.cxx:18
T_AthenaRootConverterBase::TypeIDOld
virtual const std::type_info & TypeIDOld()=0
Get typeinfo of the old object type.
AthenaRootConverterHandle.h
his file contains the class definition for AthenaRootConverter class.
AthenaRootConverterHandle::m_converter
T_AthenaRootConverterBase * m_converter
Definition: AthenaRootConverterHandle.h:35
AthenaRootConverterHandle::m_oldObj
void * m_oldObj
Definition: AthenaRootConverterHandle.h:34
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
AthenaRootConverterHandle::m_oldClass
TClass * m_oldClass
Definition: AthenaRootConverterHandle.h:33
AthenaRootConverterHandle::AthenaRootConverterHandle
AthenaRootConverterHandle(T_AthenaRootConverterBase *converter)
Definition: AthenaRootConverterHandle.cxx:9
get_generator_info.version
version
Definition: get_generator_info.py:33
T_AthenaRootConverterBase::Convert
virtual void Convert(const void *old_obj, void *new_obj)=0
General (typeless) invocation of the convertion function in the derived templated class it calls the ...
python.PyAthena.obj
obj
Definition: PyAthena.py:132