9static const char* rcsid =
"$Id: PackedRawDataCnvSvc.cxx,v 1.25 2022/01/21 05:04:19 maqm Exp $";
12#include "GaudiKernel/MsgStream.h"
13#include "GaudiKernel/ConversionSvc.h"
14#include "GaudiKernel/ISvcLocator.h"
15#include "GaudiKernel/SmartDataPtr.h"
46static const InterfaceID IID_IRawDataBaseCnv(
"IRawDataBaseCnv", 1 , 0);
52 declareProperty(
"RawDataOutputSvc", m_ioSvcName);
53 declareProperty(
"Status", m_status=0xFFFFFFFF);
62 MsgStream log(messageService(), name());
63 log << MSG::INFO << name() <<
" PackedRawDataCnvSvc::initialize RawDataOutputSvc:" << m_ioSvcName<< endreq;
66 if( sc.isFailure() ) {
67 log << MSG::ERROR <<
"Unable to initialize service " << endreq;
72 sc = service(m_ioSvcName, svc);
73 if (sc != StatusCode::SUCCESS ) {
74 log << MSG::WARNING <<
"Cant get RawDataOutputSvc " << endreq;
80 log << MSG::WARNING <<
"Cant cast to RawDataOutputSvc " << endreq;
84 return StatusCode::SUCCESS;
89 MsgStream log(messageService(), name());
113 return StatusCode::SUCCESS;
118 MsgStream log(messageService(), name());
125 if ( IID_IRawDataBaseCnv == riid ) {
129 return ConversionSvc::queryInterface(riid, ppvInterface);
132 return StatusCode::SUCCESS;
138 MsgStream log(messageService(), name() );
140 log << MSG::DEBUG <<
" In connectOutput "<< endreq;
143 SmartDataPtr<Event::EventHeader> evt(dataProvider(), EventModel::EventHeader);
145 log << MSG::ERROR <<
"Did not retrieve event" << endreq;
146 return StatusCode::FAILURE;
148 unsigned int eventNo = evt->eventNumber();
149 unsigned int runNo = evt->runNumber();
160 if(m_status!=0xFFFFFFFF) m_rawEvent->
status(1, &m_status);
163 return StatusCode::SUCCESS;
168 MsgStream log(messageService(), name() );
170 log << MSG::DEBUG <<
"In flushOutput" << endreq;
173 log << MSG::ERROR <<
"RawDataCnvSvc not configure for output" << endreq;
174 return StatusCode::FAILURE;
183 log << MSG::DEBUG <<
"commitOutput: Size of Event (words) ="
186 if (!m_ioSvc->
putEvent(m_rawEvent) ) {
187 log << MSG::ERROR <<
"commitOutput failed to send output" << endreq;
188 return StatusCode::FAILURE;
212 return StatusCode::SUCCESS;
unsigned const long PACKEDRAWEVENT_StorageType
eformat::write::FullEventFragment WriteRawEvent
The event conversion service needs an additional interface used by the converters to declare their ob...
virtual bool putEvent(WriteRawEvent *re)=0
PackedRawDataCnvSvc(const std::string &name, ISvcLocator *svc)
Standard Constructor.
virtual StatusCode commitOutput(const std::string &t, bool b)
virtual StatusCode queryInterface(const InterfaceID &riid, void **ppvInterface)
Override inherited queryInterface.
virtual StatusCode initialize()
Initialize the service.
virtual StatusCode connectOutput(const std::string &t)
virtual StatusCode addConverters()
Add converters to the service.
virtual ~PackedRawDataCnvSvc()
Standard Destructor.
virtual StatusCode updateServiceState(IOpaqueAddress *pAddress)
Update state of the service.
StatusCode updateServiceState(IOpaqueAddress *pAddress)
Update state of the service.
virtual StatusCode initialize()
virtual StatusCode declareObject(const IRawDataCnvSvc::Leaf &leaf)
Associates a path on TDS with a particular converter.
static const CLID & classID()
static const CLID & classID()
static const CLID & classID()
static const CLID & classID()
static const CLID & classID()
static const CLID & classID()
static const CLID & classID()
static const CLID & classID()
static const CLID & classID()
static const CLID & classID()
static const CLID & classID()
static const CLID & classID()
static const CLID & classID()
static const CLID & classID()
static const CLID & classID()
static const CLID & classID()
static const CLID & classID()
static const CLID & classID()
_EXTERN_ std::string Event
_EXTERN_ std::string MdcDigiCol
_EXTERN_ std::string MucDigiCol
_EXTERN_ std::string LumiDigiCol
_EXTERN_ std::string EmcDigiCol
_EXTERN_ std::string TofDigiCol
_EXTERN_ std::string Event
_EXTERN_ std::string HltRawCol
_EXTERN_ std::string EmcMcHitCol
_EXTERN_ std::string MucMcHitCol
_EXTERN_ std::string MdcMcHitCol
_EXTERN_ std::string TofMcHitCol
_EXTERN_ std::string McParticleCol
_EXTERN_ std::string Event
_EXTERN_ std::string Event
_EXTERN_ std::string TrigGTDCol
_EXTERN_ std::string ZddEvent