ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaExamples
AthExHive
AthExHive
HiveDataObj.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ATHEXHIVE_HIVEDATAOBJ_H
6
#define ATHEXHIVE_HIVEDATAOBJ_H
7
8
//sample data class for the Read/Write example
9
//it just wraps an int. Notice that is does not inherit from Gaudi DataObject
10
11
//a dummy base class to test the symlinks
12
class
BaseClass
{ };
13
14
class
HiveDataObj
{
15
16
public
:
17
18
HiveDataObj
():
m_val
(0) {};
19
HiveDataObj
(
int
i):
m_val
(i) {};
20
virtual
~HiveDataObj
() =
default
;
21
22
void
val
(
int
i) {
m_val
= i; }
23
int
val
()
const
{
return
m_val
; }
24
25
typedef
std::true_type
thread_safe
;
26
27
private
:
28
int
m_val
;
29
};
30
31
#include <iostream>
32
inline
std::ostream&
operator<<
(std::ostream& ost,
const
HiveDataObj
& rhs) {
33
ost <<
"HDO: "
<< rhs.
val
();
34
return
ost;
35
}
36
37
38
//using the macros below we can assign an identifier (and a version)
39
//to the type HiveDataObj
40
//This is required and checked at compile time when you try to record/retrieve
41
#include "
AthenaKernel/CLASS_DEF.h
"
42
CLASS_DEF
(
HiveDataObj
, 37539154 , 1 )
43
44
#endif
CLASS_DEF.h
macros to associate a CLID to a type
CLASS_DEF
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
Definition
Control/AthenaKernel/AthenaKernel/CLASS_DEF.h:67
operator<<
std::ostream & operator<<(std::ostream &ost, const HiveDataObj &rhs)
Definition
HiveDataObj.h:32
BaseClass
Definition
HiveDataObj.h:12
HiveDataObj
Definition
HiveDataObj.h:14
HiveDataObj::HiveDataObj
HiveDataObj()
Definition
HiveDataObj.h:18
HiveDataObj::thread_safe
std::true_type thread_safe
Definition
HiveDataObj.h:25
HiveDataObj::~HiveDataObj
virtual ~HiveDataObj()=default
HiveDataObj::val
int val() const
Definition
HiveDataObj.h:23
HiveDataObj::m_val
int m_val
Definition
HiveDataObj.h:28
HiveDataObj::val
void val(int i)
Definition
HiveDataObj.h:22
HiveDataObj::HiveDataObj
HiveDataObj(int i)
Definition
HiveDataObj.h:19
Generated on
for ATLAS Offline Software by
1.17.0