ATLAS Offline Software
Control
AthenaExamples
AthExStoreGateExample
Tutorial
MyElement.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef _MyElement_
6
#define _MyElement_
7
8
//sample data class for the Read/Write example
9
//Notice that is does not inherit from Gaudi ContainedObject
10
11
namespace
SGTutorial
{
12
13
class
MyElement
{
14
15
public
:
16
MyElement
() {
set
(0,0);}
17
MyElement
(
float
t
,
int
i
){
set
(
t
,
i
);}
18
19
void
set
(
float
t
,
int
i
) {
m_time
=
t
;
m_channelID
=
i
; }
20
21
float
time
()
const
{
return
m_time
; }
22
int
id
()
const
{
return
m_channelID
; }
23
24
bool
operator==
(
const
MyElement
& rhs)
const
{
25
return
m_time
== rhs.
m_time
&&
m_channelID
== rhs.
m_channelID
;
26
}
27
28
private
:
29
float
m_time
;
30
int
m_channelID
;
31
32
};
33
34
#include <iostream>
35
template
<
class
OST>
36
inline
OST&
operator<<
(OST&
ost
,
const
MyElement
& rhs) {
37
ost
<<
"Time: "
<< rhs.
time
() <<
" ID: "
<< rhs.
id
();
38
return
ost
;
39
}
40
41
}
42
43
#endif
44
45
46
47
48
49
python.trigbs_prescaleL1.ost
ost
Definition:
trigbs_prescaleL1.py:104
SGTutorial::operator<<
OST & operator<<(OST &ost, LinkObj &rhs)
Definition:
LinkObj.h:54
SGTutorial::MyElement::set
void set(float t, int i)
Definition:
MyElement.h:19
read_hist_ntuple.t
t
Definition:
read_hist_ntuple.py:5
SGTutorial::MyElement::m_channelID
int m_channelID
Definition:
MyElement.h:30
SGTutorial::MyElement
Definition:
MyElement.h:13
SGTutorial::MyElement::MyElement
MyElement(float t, int i)
Definition:
MyElement.h:17
SGTutorial::MyElement::id
int id() const
Definition:
MyElement.h:22
lumiFormat.i
int i
Definition:
lumiFormat.py:85
SGTutorial
Definition:
LinkObj.h:18
SGTutorial::MyElement::m_time
float m_time
Definition:
MyElement.h:29
SGTutorial::MyElement::operator==
bool operator==(const MyElement &rhs) const
Definition:
MyElement.h:24
SGTutorial::MyElement::time
float time() const
Definition:
MyElement.h:21
SGTutorial::MyElement::MyElement
MyElement()
Definition:
MyElement.h:16
Generated on Tue Dec 24 2024 21:15:40 for ATLAS Offline Software by
1.8.18