Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v36r16 (ea80daf8)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
DataObject.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef GAUDIKERNEL_DATAOBJECT_H
12 #define GAUDIKERNEL_DATAOBJECT_H
13 
14 // Framework include files
15 #include "GaudiKernel/ClassID.h"
16 #include "GaudiKernel/StatusCode.h"
17 
18 // STL includes
19 #include <memory>
20 #include <ostream>
21 #include <string>
22 
23 // Forward declarations
24 class IOpaqueAddress;
25 class StreamBuffer;
26 class LinkManager;
27 class IRegistry;
28 
29 // Definition of the CLID for this class
30 static const CLID CLID_DataObject = 1;
31 
41 private:
43  unsigned long m_refCount = 0;
45  unsigned char m_version = 0;
47  IRegistry* m_pRegistry = nullptr;
50 
51 public:
53  DataObject();
55  DataObject( const DataObject& rhs );
57  DataObject& operator=( const DataObject& rhs );
59  DataObject( DataObject&& rhs );
61  DataObject& operator=( DataObject&& rhs );
63  virtual ~DataObject();
65  virtual unsigned long addRef();
67  virtual unsigned long release();
69  virtual const CLID& clID() const;
71  static const CLID& classID();
73  const std::string& name() const;
74 
76  virtual StatusCode update();
77 
79  void setRegistry( IRegistry* pRegistry ) { m_pRegistry = pRegistry; }
82  IRegistry* registry() const { return m_pRegistry; }
84  LinkManager* linkMgr() { return m_pLinkMgr.get(); }
85  const LinkManager* linkMgr() const { return m_pLinkMgr.get(); }
87  unsigned char version() const { return m_version; }
89  void setVersion( unsigned char vsn ) { m_version = vsn; }
91  unsigned long refCount() const { return m_refCount; }
93  virtual std::ostream& fillStream( std::ostream& s ) const {
94  s << "DataObject at " << std::hex << this;
95  return s;
96  }
98  friend std::ostream& operator<<( std::ostream& s, const DataObject& obj ) { return obj.fillStream( s ); }
99 };
100 
101 // Additional functions to support the Serialization of objects in the transient store
102 
103 namespace Gaudi {
107 } // namespace Gaudi
108 
109 #endif // GAUDIKERNEL_DATAOBJECT_H
DataObject::fillStream
virtual std::ostream & fillStream(std::ostream &s) const
Fill the output stream (ASCII)
Definition: DataObject.h:93
GaudiPython.Bindings.DataObject
DataObject
Definition: Bindings.py:87
std::string
STL class.
DataObject::m_pLinkMgr
std::unique_ptr< LinkManager > m_pLinkMgr
Store of symbolic links.
Definition: DataObject.h:49
gaudirun.s
string s
Definition: gaudirun.py:348
IOpaqueAddress
Definition: IOpaqueAddress.h:33
ClassID.h
DataObject::setVersion
void setVersion(unsigned char vsn)
Set version number of this object representation.
Definition: DataObject.h:89
std::unique_ptr::get
T get(T... args)
Gaudi::popCurrentDataObject
GAUDI_API void popCurrentDataObject()
conf.release
string release
Definition: conf.py:27
IRegistry
Definition: IRegistry.h:32
StatusCode.h
Gaudi::getCurrentDataObject
GAUDI_API DataObject * getCurrentDataObject()
StreamBuffer
Definition: StreamBuffer.h:52
DataObject::linkMgr
const LinkManager * linkMgr() const
Definition: DataObject.h:85
std::hex
T hex(T... args)
TimingHistograms.name
name
Definition: TimingHistograms.py:25
StatusCode
Definition: StatusCode.h:65
DataObject::operator<<
friend std::ostream & operator<<(std::ostream &s, const DataObject &obj)
Output operator (ASCII)
Definition: DataObject.h:98
std::ostream
STL class.
CLID
unsigned int CLID
Class ID definition.
Definition: ClassID.h:18
Gaudi
Header file for std:chrono::duration-based Counters.
Definition: __init__.py:1
Gaudi::pushCurrentDataObject
GAUDI_API void pushCurrentDataObject(DataObject **pobjAddr)
DataObject::refCount
unsigned long refCount() const
Return the refcount.
Definition: DataObject.h:91
GaudiPython.Pythonizations.update
update
Definition: Pythonizations.py:148
DataObject::version
unsigned char version() const
Retrieve version number of this object representation.
Definition: DataObject.h:87
DataObject
Definition: DataObject.h:40
DataObject::linkMgr
LinkManager * linkMgr()
Retrieve Link manager.
Definition: DataObject.h:84
std::unique_ptr< LinkManager >
DataObject::registry
IRegistry * registry() const
Get pointer to Registry.
Definition: DataObject.h:82
GAUDI_API
#define GAUDI_API
Definition: Kernel.h:81