ATLAS Offline Software
Control
AthenaExamples
AthExStoreGateExample
Tutorial
Tutorial/MyDataObj.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 ATHEXSTOREGATEEXAMPLE_TUTORIAL_MYDATAOBJ_H
6
#define ATHEXSTOREGATEEXAMPLE_TUTORIAL_MYDATAOBJ_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
namespace
SGTutorial
{
12
13
class
MyDataObj
{
14
15
public
:
16
17
MyDataObj
():
m_val
(0) {}
18
MyDataObj
(
int
i
):
m_val
(
i
) {}
19
20
void
val
(
int
i
) {
m_val
=
i
; }
21
int
val
()
const
{
return
m_val
; }
22
23
private
:
24
int
m_val
;
25
};
26
#include <iostream>
27
inline
std::ostream&
operator<<
(std::ostream&
ost
,
const
MyDataObj
& rhs) {
28
ost
<<
"Val: "
<< rhs.
val
();
29
return
ost
;
30
}
31
32
}
//end ns SGTutorial
33
//using the macros below we can assign an identifier (and a version)
34
//to the type MyDataObj
35
//This is required and checked at compile time when you try to record/retrieve
36
#include "
AthenaKernel/CLASS_DEF.h
"
37
CLASS_DEF
(
SGTutorial::MyDataObj
, 9901, 1)
38
39
40
#endif
41
42
SGTutorial::MyDataObj::val
int val() const
Definition:
Tutorial/MyDataObj.h:21
python.trigbs_prescaleL1.ost
ost
Definition:
trigbs_prescaleL1.py:104
SGTutorial::operator<<
OST & operator<<(OST &ost, LinkObj &rhs)
Definition:
LinkObj.h:54
lumiFormat.i
int i
Definition:
lumiFormat.py:92
SGTutorial::MyDataObj
Definition:
Tutorial/MyDataObj.h:13
SGTutorial::MyDataObj::val
void val(int i)
Definition:
Tutorial/MyDataObj.h:20
SGTutorial::MyDataObj::m_val
int m_val
Definition:
Tutorial/MyDataObj.h:24
SGTutorial::MyDataObj::MyDataObj
MyDataObj(int i)
Definition:
Tutorial/MyDataObj.h:18
SGTutorial
Definition:
LinkObj.h:18
SGTutorial::MyDataObj::MyDataObj
MyDataObj()
Definition:
Tutorial/MyDataObj.h:17
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:64
CLASS_DEF.h
macros to associate a CLID to a type
Generated on Tue Jul 2 2024 21:23:20 for ATLAS Offline Software by
1.8.18