/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Calibration/CalibSvc/CalibMySQLCnv/CalibMySQLCnv-00-01-09/CalibMySQLCnv/TreeAddress.h

Go to the documentation of this file.
00001 // $Id: TreeAddress.h,v 1.5 2012/01/05 03:51:51 zhangy Exp $
00002 #ifndef TREEADDRESS_H
00003 #define TREEADDRESS_H
00004 
00005 // Framework include files
00006 #include "GaudiKernel/Kernel.h"
00007 #include "GaudiKernel/IOpaqueAddress.h"
00008 #include "TTree.h"
00009 #include <mysql.h>
00010 #include "DatabaseSvc/IDatabaseSvc.h"
00011 #include "TTree.h"
00012 #include "TBuffer.h"
00013 
00014 // Forward declarations
00015 class IRegistry;
00016 
00026 class TreeAddress : public IOpaqueAddress{  
00027 protected:
00029   unsigned long   m_refCount;
00031   long            m_svcType;
00033   CLID            m_clID;
00035 //  std::string     m_par[3];
00037   unsigned long  m_ipar[2];
00038   unsigned long  m_treesize[9];
00039 //  MYSQL_ROW m_row;
00041   IRegistry*      m_pRegistry;
00042 //  char m_pp[8][1024000];
00043   //Trees
00044   DatabaseRecord* m_records;
00045   int m_runFrom;
00046   int m_runTo;
00047 public:
00049   TreeAddress() 
00050     : m_refCount(0), 
00051       m_svcType(0),
00052       m_clID(0),
00053       m_pRegistry(0)
00054   {
00055  //   m_ipar[0]=m_ipar[1]=m_ipar[2]=m_ipar[3]=0xFFFFFFFF;
00056   }
00058   TreeAddress(const TreeAddress& copy)  
00059     : IOpaqueAddress(copy),
00060       m_refCount(0),
00061       m_svcType(copy.m_svcType),
00062       m_clID(copy.m_clID),
00063       m_pRegistry(copy.m_pRegistry)
00064   {
00065 
00066   }
00068 
00069  TreeAddress( long svc,
00070                   const CLID& clid,
00071                   DatabaseRecord& records,
00072                   const unsigned long *ipar
00073                   )  
00074     : m_refCount(0),
00075       m_svcType(svc),
00076       m_clID(clid),
00077       m_pRegistry(0)
00078   { 
00079     m_records=&records;
00080     m_ipar[0] = ipar[0];
00081     m_ipar[1] = ipar[1];
00082   }
00083 
00084 
00086   virtual ~TreeAddress()   {
00087   }
00088 
00090   virtual unsigned long addRef   ()   {
00091     return ++m_refCount;
00092   }
00094   virtual unsigned long release  ()   {
00095     int cnt = --m_refCount;
00096     if ( 0 == cnt )   {
00097       delete this;
00098     }
00099     return cnt;
00100   }
00102   virtual IRegistry* registry()   const     {
00103     return m_pRegistry;
00104   }
00106   virtual void setRegistry(IRegistry* pRegistry)   {
00107     m_pRegistry = pRegistry;
00108   }
00110   const CLID& clID()  const   {
00111     return m_clID;
00112   }
00114   void setClID(const CLID& clid)   {
00115     m_clID = clid;
00116   }
00118   long svcType()  const    {
00119     return m_svcType;
00120   }
00122   void setSvcType(long typ)    {
00123     m_svcType = typ;
00124   }
00126   virtual const std::string* par() const   {
00127     //return m_par;
00128   }
00129 
00130 virtual DatabaseRecord* pp() {
00131     return m_records;
00132 }
00133 
00135   virtual const unsigned long* ipar()  const  {
00136     return m_ipar;
00137   }
00138 
00140   void setRunFrom(int runFrom){
00141     m_runFrom= runFrom;
00142   }
00144   void setRunTo(int runTo){
00145     m_runTo= runTo;
00146   }
00148   int getRunFrom(){
00149     return m_runFrom;
00150   }
00152   int getRunTo(){
00153     return m_runTo;
00154   }
00155 };
00156 #endif // GAUDIKERNEL_GENERICADDRESS_H
00157 

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