| # Gaudi Framework, version v23r1 |

Home |  | Generated: Wed Feb 29 2012

# PoolClasses.h

Go to the documentation of this file.

    00001
    00002 // The following two classes are the interfaces to facilitate reading POOL formatted ROOT files:
    00003
    00004 /*
    00005  *   POOL namespace declaration
    00006  */
    00007 namespace pool  {
    00008
    00014   class Token {
    00015   public:
    00017     std::pair<int, int> m_oid;
    00018     bool operator==(const Token& t) const { return m_oid.first==t.m_oid.first && m_oid.second==t.m_oid.second;}
    00019   };
    00020 }
    00021
    00027 struct UCharDbArray {
    00028   public:
    00030   int    m_size;
    00032   unsigned char *m_buffer;//[m_size]
    00034   UCharDbArray() : m_size(0), m_buffer(0)  {}
    00036   virtual ~UCharDbArray() {
    00037     if ( m_buffer ) delete [] m_buffer;
    00038     m_buffer = 0;
    00039   }
    00040 };
    00041
    00049 struct PoolDbTokenWrap {
    00051   pool::Token token;
    00053   PoolDbTokenWrap() {}
    00055   PoolDbTokenWrap(const PoolDbTokenWrap& wrp)  {    token = wrp.token;  }
    00057   virtual ~PoolDbTokenWrap() {}
    00059   bool operator==(const PoolDbTokenWrap& c) const {    return token == c.token;  }
    00061   PoolDbTokenWrap& operator=(const PoolDbTokenWrap& wrp)  {    token = wrp.token;    return *this;  }
    00062 };
    00063
    00072 class GAUDI_API PoolDbLinkManager {
    00073 protected:
    00075   std::vector<pool::Token*> m_refs;
    00077   std::vector<std::string>  m_links;
    00078
    00079 public:
    00081   PoolDbLinkManager() {}
    00083   virtual ~PoolDbLinkManager() {
    00084     for(std::vector<pool::Token*>::iterator i=m_refs.begin(); i!=m_refs.end();++i)
    00085       delete (*i);
    00086   }
    00088   std::vector<pool::Token*>& references()  {    return m_refs;   }
    00090   std::vector<std::string>& links()        {    return m_links;  }
    00091 };

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines