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

Go to the documentation of this file.
00001 //====================================================================
00002 //      McCnvSvc.cxx
00003 //--------------------------------------------------------------------
00004 //
00005 //      Package    : McEventSelector
00006 //
00007 
00008 // Include files
00009 #include <iostream>
00010 #include "GaudiKernel/SvcFactory.h"
00011 #include "GaudiKernel/SmartIF.h"
00012 #include "GaudiKernel/CnvFactory.h"
00013 #include "GaudiKernel/GenericAddress.h"
00014 #include "GaudiKernel/MsgStream.h"
00015 #include "GaudiKernel/ISvcLocator.h"
00016 #include "GaudiKernel/IDataProviderSvc.h"
00017 #include "GaudiKernel/IDataManagerSvc.h"
00018 #include "GaudiKernel/RegistryEntry.h"
00019 #include "GaudiKernel/IConversionSvc.h"
00020 
00021 #include "McEventSelector/McCnvSvc.h"
00022 #include "McEventSelector/McEventCnv.h"
00023 #include "McEventSelector/McAddress.h"
00024 #include "McEventSelector/McEventSelector.h"
00025 
00026 //External definitions
00027 
00028 // Instantiation of a static factory class used by clients to create
00029 // instances of this service
00030 //static SvcFactory<McCnvSvc> s_factory;
00031 //const ISvcFactory& McCnvSvcFactory = s_factory;
00032 
00034 McCnvSvc::McCnvSvc(const std::string& name, ISvcLocator* svc)
00035 : ConversionSvc( name, svc, storageType())
00036 {
00037 }
00038 
00040 McCnvSvc::~McCnvSvc()   {
00041 }
00042 
00044 StatusCode McCnvSvc::initialize()     {
00045    MsgStream log(msgSvc(), name());
00046   StatusCode status = ConversionSvc::initialize();
00047   return status;
00048 }
00049 
00050 StatusCode McCnvSvc::finalize()     {
00051   MsgStream log(msgSvc(), name());
00052   log << MSG::DEBUG << "RootCnvSvc::finalize" << endreq;
00053 
00054   ConversionSvc::finalize();
00055  
00056   return StatusCode::SUCCESS;
00057 }
00058 
00059 StatusCode McCnvSvc::queryInterface(const InterfaceID& riid, void** ppvInterface)  {
00060 
00061   if ( IID_IMcCnvSvc == riid )  {
00062     *ppvInterface = (McCnvSvc*)this;
00063   }
00064   else  {
00065     // Interface is not directly availible: try out a base class
00066     return ConversionSvc::queryInterface(riid, ppvInterface);
00067             }
00068   addRef();
00069   return StatusCode::SUCCESS;
00070 }
00071 
00073 StatusCode McCnvSvc::updateServiceState(IOpaqueAddress* pAddress)    {
00074   MsgStream log(messageService(), name());
00075   static bool first = true;
00076   //  static int fid   = 0;
00077   //  static int recid = 0;
00078   if ( 0 != pAddress )    {
00079     GenericAddress* pAddr = dynamic_cast<GenericAddress*>(pAddress);
00080     if ( 0 != pAddr )    {
00081       if ( first )    {
00082         first = false;
00083       }
00084       return StatusCode::SUCCESS;
00085     }
00086   }
00087   return StatusCode::FAILURE;
00088 }
00089 
00090 unsigned char  McCnvSvc::storageType() {
00091   static unsigned char type=0x10;
00092   return type;
00093 }

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