/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Calibration/CalibSvc/CalibTreeCnv/CalibTreeCnv-00-01-18/CalibTreeCnv/CalibTreeCnvSvc.h

Go to the documentation of this file.
00001 #ifndef CalibTreeCnvSvc_h
00002 #define CalibTreeCnvSvc_h
00003 
00004 #include <string>
00005 
00006 #include "CalibDataSvc/ICalibTreeSvc.h"
00007 #include "GaudiKernel/ConversionSvc.h"
00008 
00009 //The function of the CalibTreeCnvSvc is to read the trees' buffers from 
00010 //CalibMYSQLCnvSvc and use the defined converters to intepret the buffers
00011 //than register the calibdata to TCDS.
00012 //It's a different way from the CalibRootCnv
00013 
00015 template <class TYPE> class SvcFactory;
00016 
00017 class IDetDataSvc;
00018 class IOpaqueAddress;
00019 
00020 namespace CalibData {
00021   class CalibBase;
00022   class CalibBase1;
00023 }
00024 
00026 //--------------------------------------------------------------------------
00033 
00034 class CalibTreeCnvSvc : public ConversionSvc, virtual public ICalibTreeSvc
00035 {
00037   friend class SvcFactory<CalibTreeCnvSvc>;
00038 
00039  protected:
00040 
00041   CalibTreeCnvSvc(const std::string& name, ISvcLocator* svc );
00042   virtual ~CalibTreeCnvSvc() {}
00043 
00044  public:
00045   
00046   // Reimplemented from IInterface
00047 
00048   virtual StatusCode queryInterface( const InterfaceID& riid, 
00049                                      void** ppvInterface);  
00050 
00051   // Reimplemented from ICalibTreeSvc
00052   /*virtual StatusCode writeToRoot(const std::string& outputFile, 
00053                                  const std::string& tdsPath);
00054   virtual StatusCode writeToRoot(const std::string& outputFile, 
00055                                  CalibData::CalibBase1 *calib);
00056 */
00057 
00058   virtual StatusCode updateObj     ( IOpaqueAddress* pAddress, 
00059                                      DataObject* pObject );
00060 
00061  public:
00062 
00063   // Overloaded from ConversionSvc
00064 
00065   virtual StatusCode initialize();
00066   virtual StatusCode finalize();
00067 
00079   //  virtual StatusCode createAddress(unsigned char svc_type,
00080       virtual StatusCode createAddress(long svc_type,
00081                                        const CLID& clid,
00082                                        const std::string* par, 
00083                                        const unsigned long* ip,
00084                                        IOpaqueAddress*& refpAddress);
00085       std::string getrootfile()
00086         { return m_rootfile[0];}
00087 
00088   /*  
00089       There are a pile of functions implemented in the Gaudi
00090       base class ConversionSvc which we can just let be, such
00091       as createObj, fillObjRefs,...
00092 
00093       The base implementation looks up the appropriate converter
00094       and invokes it, usually just what we want to do.
00095   */
00096  private:
00097 
00098   // With current functionality, there really is no need to keep
00099   // this as a member.  It's only used during initialize()
00101   IConversionSvc*      m_detPersSvc;
00102 
00104   IDataProviderSvc*         m_detDataSvc;
00105    std::string              m_rootfile[4];
00106 };
00107 #endif   

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