/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Generator/McEventSelector/McEventSelector-01-00-13/src/McEventCnv.cxx

Go to the documentation of this file.
00001 #include "McEventSelector/McEventCnv.h"
00002 #include "GaudiKernel/CnvFactory.h"
00003 #include "GaudiKernel/StatusCode.h"
00004 #include "McEventSelector/McAddress.h"
00005 #include "McEventSelector/McCnvSvc.h"
00006 #include "EventModel/EventHeader.h"
00007 
00008 // Instantiation of a static factory class used by clients to create
00009 // instances of this service
00010 //static CnvFactory<McEventCnv> s_factory;
00011 //const ICnvFactory& McEventCnvFactory = s_factory;
00012 
00013 McEventCnv::McEventCnv(ISvcLocator* svcloc) :
00014   Converter(McCnvSvc::storageType(), classID(), svcloc) { 
00015 }
00016 
00017 StatusCode
00018 McEventCnv::createObj(IOpaqueAddress* pAddr, DataObject*& pObj) {
00019   McAddress *pMcAddr;
00020   pMcAddr = dynamic_cast<McAddress*>(pAddr);
00021  
00022   Event::EventHeader *eventHeader = new Event::EventHeader;
00023   eventHeader->setEventNumber(pMcAddr->eventNumber());
00024   eventHeader->setRunNumber(pMcAddr->runNumber());
00025   pObj = eventHeader;
00026 
00027   return StatusCode::SUCCESS;    
00028 }
00029 
00030 
00031 unsigned char McEventCnv::storageType() {
00032   return McCnvSvc::storageType();
00033 }    
00034 
00035 long McEventCnv::repSvcType() const {
00036   return McCnvSvc::storageType();
00037 }

Generated on Tue Nov 29 23:12:41 2016 for BOSS_7.0.2 by  doxygen 1.4.7