| # Gaudi Framework, version v22r4 |

Home |  | Generated: Fri Sep 2 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:
[legend]
Collaboration diagram for DataObject:
[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 CLID & | clID () const
| Retrieve reference to class definition structure.
const std::string & | name () 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 CLID & | classID ()
| Retrieve reference to class definition structure (static access)
## Private Attributes
unsigned long | m_refCount
| Reference count.
unsigned char | m_version
| Version number.
IRegistry * | m_pRegistry
| Pointer to the Registry Object.
LinkManager * | m_pLinkMgr
| Store of symbolic links.
## inline code of class DataObject
void | setRegistry (IRegistry *pRegistry)
| Set pointer to Registry.
IRegistry * | registry () const
| Get pointer to Registry.
LinkManager * | linkMgr () 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::ostream & | fillStream (std::ostream &s) const
| Fill the output stream (ASCII)
std::ostream & | operator<< (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.

     : m_refCount(0),
       m_version(0),
       m_pRegistry(0)
    {
      m_pLinkMgr = LinkManager::newInstance();
    }

DataObject::DataObject | ( | const DataObject & | ) |

Copy Constructor.

Standard Constructor.

Definition at line 24 of file DataObject.cpp.

     : m_refCount(0),
       m_version(0),
       m_pRegistry(0)
    {
      m_pLinkMgr = LinkManager::newInstance();
    }

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]`

Retrieve reference to class definition structure (static access)

Retrieve Pointer to class definition structure.

Reimplemented in AlgorithmHistory, AlgToolHistory, DataHistory, HistoryObj, JobHistory, KeyedContainer< DATATYPE, MAPPING >, NTuple::Directory, NTuple::File, NTuple::ColumnWiseTuple, NTuple::RowWiseTuple, ObjectList< TYPE >, ObjectVector< TYPE >, ServiceHistory, SharedObjectsContainer< TYPE >, AIDATuple, Gaudi::Histogram1D, Gaudi::Histogram2D, Gaudi::Histogram3D, Gaudi::Profile1D, and Gaudi::Profile2D.

Definition at line 63 of file DataObject.cpp.

                                       {
      return CLID_DataObject;
    }

const CLID & DataObject::clID | ( | ) | const`[virtual]`

Retrieve reference to class definition structure.

Retrieve Pointer to class definition structure.

Reimplemented in AlgorithmHistory, AlgToolHistory, DataHistory, HistoryObj, JobHistory, KeyedContainer< DATATYPE, MAPPING >, NTuple::Directory, NTuple::File, NTuple::ColumnWiseTuple, NTuple::RowWiseTuple, ObjectList< TYPE >, ObjectVector< TYPE >, RefTable1to1< FROM, TO >, RefTable1toN< FROM, TO >, ServiceHistory, SharedObjectsContainer< TYPE >, AIDATuple, Gaudi::Histogram1D, Gaudi::Histogram2D, Gaudi::Histogram3D, Gaudi::Profile1D, and Gaudi::Profile2D.

Definition at line 58 of file DataObject.cpp.

                                         {
      return CLID_DataObject;
    }

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 AlgorithmHistory, AlgToolHistory, JobHistory, 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.

Reimplemented in AlgorithmHistory, AlgToolHistory, JobHistory, and ServiceHistory.

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

LinkManager* DataObject::m_pLinkMgr`[private]`

Store of symbolic links.

Definition at line 40 of file DataObject.h.

IRegistry* DataObject::m_pRegistry`[private]`

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, and ServiceHistory.

Definition at line 36 of file DataObject.h.

The documentation for this class was generated from the following files:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v22r4/GaudiKernel/GaudiKernel/DataObject.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v22r4/GaudiKernel/src/Lib/DataObject.cpp

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