48 StatusCode sc = ConversionSvc::initialize();
50 MsgStream log(
msgSvc(),
"CalibXmlCnvSvc" );
52 if ( !sc.isSuccess() )
return sc;
58 IDataProviderSvc* pCDS = 0;
61 sc = serviceLocator()->getService(
"CalibDataSvc", IDataProviderSvc::interfaceID(),
63 if ( !sc.isSuccess() )
65 log << MSG::ERROR <<
"Could not locate CalibDataSvc" << endmsg;
70 sc = setDataProvider( pCDS );
71 if ( !sc.isSuccess() )
73 log << MSG::ERROR <<
"Could not set data provider" << endmsg;
81 sc = serviceLocator()->service(
"DetectorPersistencySvc", m_detPersSvc,
true );
82 if ( !sc.isSuccess() )
84 log << MSG::ERROR <<
"Cannot locate IConversionSvc interface of DetectorPersistencySvc"
90 log << MSG::DEBUG <<
"Retrieved IConversionSvc interface of DetectorPersistencySvc"
95 IAddressCreator* iAddrCreator;
98 sc = m_detPersSvc->queryInterface( IAddressCreator::interfaceID(), (
void**)&iAddrCreator );
99 if ( !sc.isSuccess() )
101 log << MSG::ERROR <<
"Cannot query IAddressCreator interface of DetectorPersistencySvc"
107 log << MSG::DEBUG <<
"Retrieved IAddressCreator interface of DetectorPersistencySvc"
110 log << MSG::DEBUG <<
"Set it as the address creator of the CalibXmlCnvSvc" << endmsg;
111 sc = setAddressCreator( iAddrCreator );
112 if ( !sc.isSuccess() )
114 log << MSG::ERROR <<
"Cannot set the address creator" << endmsg;
123 { log << MSG::FATAL <<
"Unable to create XML parser instance \n" << endmsg; }
137 const std::string* par,
const unsigned long* ip,
138 IOpaqueAddress*& refpAddress ) {
140 MsgStream log(
msgSvc(), name() );
142 if ( svc_type != XML_StorageType )
144 log << MSG::ERROR <<
"bad storage type" << (int)svc_type << endmsg;
145 return StatusCode::FAILURE;
148 std::string dataIdent( par[0] );
149 std::string fullpath( par[1] );
150 std::string fmtVersion( par[2] );
158 refpAddress =
new GenericAddress( XML_StorageType, clid, dataIdent, fullpath, serNo );
160 return StatusCode::SUCCESS;