00001
00002
00003
00004
00005
00006 #define EventCnv_CXX
00007
00008 #include "GaudiKernel/IDataProviderSvc.h"
00009 #include "GaudiKernel/SmartDataPtr.h"
00010 #include "GaudiKernel/MsgStream.h"
00011 #include "GaudiKernel/DataObject.h"
00012
00013 #include "EventModel/Event.h"
00014 #include "RootCnvSvc/EventCnv.h"
00015 #include "RootCnvSvc/RootCnvSvc.h"
00016 #include "RootCnvSvc/RootAddress.h"
00017
00018
00019
00020
00021
00022
00023
00024 EventCnv::EventCnv(ISvcLocator* svc)
00025 : RootEventBaseCnv(classID(), svc)
00026 {
00027
00028
00029
00030
00031 MsgStream log(msgSvc(), "EventCnv");
00032 log << MSG::DEBUG << "EventCnv::EventCnv()" << endreq;
00033 }
00034
00035 StatusCode EventCnv::createObj(IOpaqueAddress *addr, DataObject*& refpObject) {
00036
00037
00038
00039 m_common.clear();
00040 MsgStream log(msgSvc(), "EventCnv");
00041 log << MSG::DEBUG << "createObj" << endreq;
00042 Event::EventH * evh = new Event::EventH();
00043 refpObject=evh;
00044 return StatusCode::SUCCESS;
00045 }
00046
00047
00048
00049 StatusCode EventCnv::createRep(DataObject* obj, RootAddress* rootaddr) {
00050
00051 MsgStream log(msgSvc(), "EventCnv");
00052 log << MSG::DEBUG << "EventCnv::DataObjectToObject" << endreq;
00053
00054 Event::EventH * evh=dynamic_cast<Event::EventH *> (obj);
00055 if (!evh) {
00056 log << MSG::ERROR << "Could not downcast Event" << endreq;
00057 return StatusCode::FAILURE;
00058 }
00059
00060 return StatusCode::SUCCESS;
00061 }
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075