Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

EvtDataSvc.cpp

Go to the documentation of this file.
00001 //====================================================================
00002 //      EvtDataSvc.cpp
00003 //--------------------------------------------------------------------
00004 //
00005 //      Package    : System ( The LHCb Offline System)
00006 //
00007 //  Description: implementation of the Transient event data service.
00008 //
00009 //      Author     : M.Frank
00010 //  History    :
00011 // +---------+----------------------------------------------+---------
00012 // |    Date |                 Comment                      | Who     
00013 // +---------+----------------------------------------------+---------
00014 // | 29/10/98| Initial version                              | MF
00015 // +---------+----------------------------------------------+---------
00016 //
00017 //====================================================================
00018 #define  DATASVC_EVTDATASVC_CPP
00019 
00020 #include "GaudiKernel/SvcFactory.h"
00021 #include "GaudiKernel/ISvcLocator.h"
00022 #include "GaudiKernel/IConversionSvc.h"
00023 
00024 #include "EvtDataSvc.h"
00025 
00026 // Instantiation of a static factory class used by clients to create
00027 // instances of this service
00028 static SvcFactory<EvtDataSvc> s_factory;
00029 const ISvcFactory& EvtDataSvcFactory = s_factory;
00030 
00032 StatusCode EvtDataSvc::initialize()    {
00033   // Nothing to do: just call base class initialisation
00034   StatusCode      status  = DataSvc::initialize();
00035   ISvcLocator*    svc_loc = serviceLocator();
00036   IConversionSvc* cnv_svc = 0;
00037 
00038   // Attach data loader facility
00039   status = svc_loc->getService("EventPersistencySvc", IID_IConversionSvc,(IInterface*&)cnv_svc);
00040   status = setDataLoader( cnv_svc );
00041   return status;
00042 }
00043 
00045 EvtDataSvc::EvtDataSvc(const std::string& name,ISvcLocator* svc) : DataSvc(name,svc)   {
00046 }
00047 
00049 EvtDataSvc::~EvtDataSvc()  {
00050   setDataLoader(0);
00051   clearStore();
00052 }

Generated at Wed Nov 21 12:22:29 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000