/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Calibration/CalibSvc/CalibROOTCnv/CalibROOTCnv-00-01-13/CalibROOTCnv/CalibRootCnvSvc.h

Go to the documentation of this file.
00001 //$Header: /bes/bes/BossCvs/Calibration/CalibSvc/CalibROOTCnv/CalibROOTCnv/CalibRootCnvSvc.h,v 1.11 2010/03/10 06:28:21 huangb Exp $
00002 #ifndef CalibRootCnvSvc_h
00003 //#define CalibRootCnvSvc_h  1
00004 #define CalibRootCnvSvc_h
00005 
00006 #include <string>
00007 
00008 #include "CalibDataSvc/ICalibRootSvc.h"
00009 #include "GaudiKernel/ConversionSvc.h"
00010 
00011 
00012 //  Hi Heather.  For the XML conversion service I defined an
00013 //  extra interface to do generic XML things that converters
00014 //  might need.  For now there really is just one thing there:
00015 //  a function which reads in the XML file, so that the converters
00016 //  deal with the DOM representation (in-memory, but otherwise 
00017 //  isomorphic to the XML description) rather than with the physical
00018 //  file.  Putting that kind of functionality in the conversion service
00019 //  is probably a good idea, but it doesn't have to be defined in
00020 //  an abstract interface.
00021 
00023 template <class TYPE> class SvcFactory;
00024 
00025 class IDetDataSvc;
00026 class IOpaqueAddress;
00027 
00028 namespace CalibData {
00029   class CalibBase;
00030   class CalibBase1;
00031 }
00032 
00034 //--------------------------------------------------------------------------
00041 
00042 class CalibRootCnvSvc : public ConversionSvc, virtual public ICalibRootSvc
00043 {
00045   friend class SvcFactory<CalibRootCnvSvc>;
00046 
00047  protected:
00048 
00049   CalibRootCnvSvc(const std::string& name, ISvcLocator* svc );
00050   virtual ~CalibRootCnvSvc() {}
00051 
00052  public:
00053   
00054   // Reimplemented from IInterface
00055 
00056   virtual StatusCode queryInterface( const InterfaceID& riid, 
00057                                      void** ppvInterface);  
00058 
00059   // Reimplemented from ICalibRootSvc
00060   virtual StatusCode writeToRoot(const std::string& outputFile, 
00061                                  const std::string& tdsPath);
00062   virtual StatusCode writeToRoot(const std::string& outputFile, 
00063                                  CalibData::CalibBase1 *calib);
00064 virtual StatusCode updateObj     ( IOpaqueAddress* pAddress, 
00065                                      DataObject* pObject );
00066 
00067  public:
00068 
00069   // Overloaded from ConversionSvc
00070 
00071   virtual StatusCode initialize();
00072   virtual StatusCode finalize();
00073 
00085   //  virtual StatusCode createAddress(unsigned char svc_type,
00086       virtual StatusCode createAddress(long svc_type,
00087                                        const CLID& clid,
00088                                        const std::string* par, 
00089                                        const unsigned long* ip,
00090                                        IOpaqueAddress*& refpAddress);
00091       std::string getrootfile()
00092         { return m_rootfile[0];}
00093      StatusCode  decodeDescription(const std::string& oldpath,
00094                                      std::string& realpath );
00095 
00096 
00097   /*  
00098       There are a pile of functions implemented in the Gaudi
00099       base class ConversionSvc which we can just let be, such
00100       as createObj, fillObjRefs,...
00101 
00102       The base implementation looks up the appropriate converter
00103       and invokes it, usually just what we want to do.
00104   */
00105  private:
00106 
00107   // With current functionality, there really is no need to keep
00108   // this as a member.  It's only used during initialize()
00110   IConversionSvc*      m_detPersSvc;
00111 
00113   IDataProviderSvc*         m_detDataSvc;
00114    std::string              m_rootfile[10];
00115 };
00116 #endif   

Generated on Tue Nov 29 22:57:50 2016 for BOSS_7.0.2 by  doxygen 1.4.7