Gaudi Framework, version v22r2

Home   Generated: Tue May 10 2011
Public Member Functions | Static Public Member Functions | Private Attributes

DataObject Class Reference

A DataObject is the base class of any identifiable object on any data store. More...

#include <GaudiKernel/DataObject.h>

Inheritance diagram for DataObject:
Inheritance graph
[legend]
Collaboration diagram for DataObject:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 DataObject ()
 Standard Constructor.
 DataObject (const DataObject &)
 Copy Constructor.
virtual ~DataObject ()
 Standard Destructor.
virtual unsigned long addRef ()
 Add reference to object.
virtual unsigned long release ()
 release reference to object
virtual const CLIDclID () const
 Retrieve reference to class definition structure.
const std::stringname () const
 Retreive DataObject name. It is the name when registered in the store.
virtual StatusCode update ()
 Provide empty placeholder for internal object reconfiguration callback.

Static Public Member Functions

static const CLIDclassID ()
 Retrieve reference to class definition structure (static access)

Private Attributes

unsigned long m_refCount
 Reference count.
unsigned char m_version
 Version number.
IRegistrym_pRegistry
 Pointer to the Registry Object.
LinkManagerm_pLinkMgr
 Store of symbolic links.

inline code of class DataObject

void setRegistry (IRegistry *pRegistry)
 Set pointer to Registry.
IRegistryregistry () const
 Get pointer to Registry.
LinkManagerlinkMgr () const
 Retrieve Link manager.
unsigned char version () const
 Retrieve version number of this object representation.
void setVersion (unsigned char vsn)
 Set version number of this object representation.
unsigned long refCount () const
 Return the refcount.
virtual std::ostreamfillStream (std::ostream &s) const
 Fill the output stream (ASCII)
std::ostreamoperator<< (std::ostream &s, const DataObject &obj)
 Output operator (ASCII)

Detailed Description

A DataObject is the base class of any identifiable object on any data store.

The base class supplies the implementation of data streaming.

Author:
M.Frank

Definition at line 31 of file DataObject.h.


Constructor & Destructor Documentation

DataObject::DataObject (  )

Standard Constructor.

Definition at line 15 of file DataObject.cpp.

DataObject::DataObject ( const DataObject  )

Copy Constructor.

Standard Constructor.

Definition at line 24 of file DataObject.cpp.

DataObject::~DataObject (  ) [virtual]

Standard Destructor.

Definition at line 33 of file DataObject.cpp.

                          {
  // Issue a warning if the object is being deleted and the reference
  // count is non-zero.
  if ( m_refCount > 0 ) {
    // Insert warning here
  }
  if ( m_pLinkMgr ) delete m_pLinkMgr;
  m_pLinkMgr = 0;
}

Member Function Documentation

unsigned long DataObject::addRef (  ) [virtual]

Add reference to object.

Definition at line 53 of file DataObject.cpp.

                                  {
  return ++m_refCount;
}
const CLID & DataObject::classID (  ) [static]
const CLID & DataObject::clID (  ) const [virtual]
virtual std::ostream& DataObject::fillStream ( std::ostream s ) const [inline, virtual]

Fill the output stream (ASCII)

Reimplemented in ObjectList< TYPE >, and ObjectVector< TYPE >.

Definition at line 89 of file DataObject.h.

                                                        {
    s << "DataObject at " << std::hex << this;
    return s;
  }
LinkManager* DataObject::linkMgr (  ) const [inline]

Retrieve Link manager.

Definition at line 73 of file DataObject.h.

                                    {
    return m_pLinkMgr;
  }
const std::string & DataObject::name (  ) const

Retreive DataObject name. It is the name when registered in the store.

Retrieve DataObject name. It is the name when included in the store.

Reimplemented in NTuple::File, and ServiceHistory.

Definition at line 68 of file DataObject.cpp.

                                        {
  if( m_pRegistry != 0) {
    return m_pRegistry->name();
  }
  else {
    return _sDataObjectCppNotRegistered;
  }
}
unsigned long DataObject::refCount (  ) const [inline]

Return the refcount.

Definition at line 85 of file DataObject.h.

                                 {
    return m_refCount;
  }
IRegistry* DataObject::registry (  ) const [inline]

Get pointer to Registry.

Definition at line 69 of file DataObject.h.

                                {
    return m_pRegistry;
  }
unsigned long DataObject::release (  ) [virtual]

release reference to object

Decrease reference count.

Definition at line 44 of file DataObject.cpp.

                                   {
  unsigned long cnt = --m_refCount;
  if ( 0 == m_refCount )   {
    delete this;
  }
  return cnt;
}
void DataObject::setRegistry ( IRegistry pRegistry ) [inline]

Set pointer to Registry.

Definition at line 65 of file DataObject.h.

                                            {
    m_pRegistry = pRegistry;
  }
void DataObject::setVersion ( unsigned char  vsn ) [inline]

Set version number of this object representation.

Definition at line 81 of file DataObject.h.

                                        {
    m_version = vsn;
  }
StatusCode DataObject::update (  ) [virtual]

Provide empty placeholder for internal object reconfiguration callback.

Reimplemented in KeyedContainer< DATATYPE, MAPPING >.

Definition at line 78 of file DataObject.cpp.

                              {
  return StatusCode::SUCCESS;
}
unsigned char DataObject::version (  ) const [inline]

Retrieve version number of this object representation.

Definition at line 77 of file DataObject.h.

                                    {
    return m_version;
  }

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream s,
const DataObject obj 
) [friend]

Output operator (ASCII)

Definition at line 94 of file DataObject.h.

                                                                         {
    return obj.fillStream(s);
  }

Member Data Documentation

Store of symbolic links.

Definition at line 40 of file DataObject.h.

Pointer to the Registry Object.

Definition at line 38 of file DataObject.h.

unsigned long DataObject::m_refCount [private]

Reference count.

Definition at line 34 of file DataObject.h.

unsigned char DataObject::m_version [private]

Version number.

Reimplemented in AlgToolHistory.

Definition at line 36 of file DataObject.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated at Tue May 10 2011 18:54:37 for Gaudi Framework, version v22r2 by Doxygen version 1.7.2 written by Dimitri van Heesch, © 1997-2004