/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Event/RawDataCnvBase/RawDataCnvBase-01-00-03/src/RawDataBaseCnv.cxx

Go to the documentation of this file.
00001 #include "GaudiKernel/IService.h"
00002 #include "GaudiKernel/ISvcLocator.h"
00003 #include "GaudiKernel/MsgStream.h"
00004 #include "RawDataCnvBase/RawDataBaseCnv.h"
00005 #include "RawDataCnvBase/IRawDataCnvSvc.h"
00006 #include <iostream>
00007 
00008 static const InterfaceID IID_IRawDataBaseCnv("IRawDataBaseCnv", 1 , 0);
00009 
00010 RawDataBaseCnv::RawDataBaseCnv(unsigned char storageType, const CLID& clid, ISvcLocator* svc)
00011   : Converter((long)storageType, clid, svc), m_CnvSvc(0)  
00012 {}
00013 
00014   
00015 RawDataBaseCnv::RawDataBaseCnv(ISvcLocator* svc)
00016 : Converter(Test_StorageType, classID(), svc)
00017                               , m_CnvSvc(0)  
00018 {}
00019   
00020 
00021 StatusCode RawDataBaseCnv::createRep(DataObject* , 
00022                               IOpaqueAddress*& )   {
00023     // Purpose and Method: Convert the transient object to the requested 
00024     //     representation.  It is expected that derived classes will override
00025     //     this method.
00026     return StatusCode::SUCCESS;
00027 }
00028 
00029 StatusCode RawDataBaseCnv::fillRepRefs(IOpaqueAddress* ,
00030                                 DataObject* )    {
00031     // Purpose and Method:  Resolve the references of the converted object.
00032     //     It is expected that derived classes will override this method.
00033     return StatusCode::SUCCESS;
00034 }
00035 
00036 StatusCode RawDataBaseCnv::updateRep(IOpaqueAddress* , 
00037                               DataObject* )   {
00038     // Purpose and Method:  Update the converted representation of a transient 
00039     //     object.  It is expected that derived classes will override this.
00040     return StatusCode::SUCCESS;
00041 }
00042 
00043 StatusCode RawDataBaseCnv::updateRepRefs(IOpaqueAddress* , 
00044                                   DataObject* ) {
00045     // Purpose and Method:  Update the references of an already converted object.
00046     //   It is expected that derived classes will override this method.
00047     return StatusCode::SUCCESS;
00048 }
00049 
00050 StatusCode RawDataBaseCnv::initialize()   {
00051     // Purpose and Method:  Perform standard converter initialization.
00052     //   Access the EventCnvSvc to create an association between converters 
00053     //   and paths within the TDS, using the vector of leaves and the
00054     //   declareObject methods available in each specific converter.
00055     StatusCode status = Converter::initialize();
00056     /*
00057     if ( status.isSuccess() )   {
00058         IService* isvc = 0;
00059         status = serviceLocator()->service(cnvSvcName, isvc, true);        
00060         if ( status.isSuccess() )   {
00061             status = isvc->queryInterface(IID_IRawDataBaseCnv, (void**)&m_CnvSvc);
00062             if ( status.isSuccess() )   {
00063                 for ( std::vector<IRawDataCnvSvc::Leaf>::iterator i = m_leaves.begin(); i != m_leaves.end(); i++ )    {
00064                     m_CnvSvc->declareObject(*i);
00065                 }
00066             }
00067         }
00068     }
00069     */
00070     return status;
00071 }
00072 
00073 StatusCode RawDataBaseCnv::finalize()   {
00074     if ( m_CnvSvc )     {
00075         m_CnvSvc->release();
00076         m_CnvSvc = 0;
00077     }
00078     return Converter::finalize();
00079 }
00080 
00081 void RawDataBaseCnv::declareObject(const std::string& /*path*/, const CLID& /*cl*/, 
00082                             const std::string& /*bank*/, long /*par*/)  {
00083     // Purpose and Method:  Save the path on the TDS, in the m_leaves vector, 
00084     //   corresponding to the DataObject that the converter handles.
00085     // m_leaves.push_back(IRawDataCnvSvc::Leaf(path, cl, bank, par));
00086 }
00087 
00088 
00089 

Generated on Tue Nov 29 22:58:34 2016 for BOSS_7.0.2 by  doxygen 1.4.7