ATLAS Offline Software
LArCalorimeter
LArRawConditions
LArRawConditions
LArFEBTimeOffset.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef LARFEBTIMEOFFSET_H
6
#define LARFEBTIMEOFFSET_H
7
8
#include "
LArElecCalib/ILArFEBTimeOffset.h
"
9
#include "
AthenaKernel/CLASS_DEF.h
"
10
#include "
Identifier/HWIdentifier.h
"
11
#include <map>
12
13
class
LArFEBTimeOffset
:
public
ILArFEBTimeOffset
{
14
public
:
15
LArFEBTimeOffset
();
//Constructor
16
virtual
~LArFEBTimeOffset
() {};
//Destructor
17
inline
void
setTimeOffset
(
const
HWIdentifier
fId,
const
float
offset
)
//Setter
18
{
m_febTimeMap
[fId]=
offset
;}
19
inline
float
TimeOffset
(
const
HWIdentifier
fId)
const
;
//Getter
20
inline
float
TimeOffset
(
const
HWIdentifier
fId,
float
defVal
)
const
;
21
22
inline
unsigned
size
()
const
23
{
return
m_febTimeMap
.size();}
24
25
inline
void
setDefaultReturnValue
(
const
float
value
)
26
{
m_defaultReturnValue
=
value
; }
27
28
private
:
29
std::map <HWIdentifier,float>
m_febTimeMap
;
30
float
m_defaultReturnValue
= 0;
31
};
32
33
inline
float
LArFEBTimeOffset::TimeOffset
(
const
HWIdentifier
fId)
const
34
{
35
const
std::map <HWIdentifier,float>::const_iterator
it
=
m_febTimeMap
.find(fId);
36
if
(
it
==
m_febTimeMap
.end())
37
return
m_defaultReturnValue
;
38
else
39
return
it
->second;
40
}
41
42
inline
float
LArFEBTimeOffset::TimeOffset
(
const
HWIdentifier
fId,
43
float
defVal
)
const
44
{
45
const
std::map <HWIdentifier,float>::const_iterator
it
=
m_febTimeMap
.find(fId);
46
if
(
it
==
m_febTimeMap
.end())
47
return
defVal
;
48
else
49
return
it
->second;
50
}
51
52
CLASS_DEF
(
LArFEBTimeOffset
, 83217154, 1)
53
#endif
54
LArFEBTimeOffset
Definition:
LArFEBTimeOffset.h:13
WriteCalibToCool.defVal
defVal
Definition:
WriteCalibToCool.py:442
ILArFEBTimeOffset.h
skel.it
it
Definition:
skel.GENtoEVGEN.py:396
athena.value
value
Definition:
athena.py:124
HWIdentifier
Definition:
HWIdentifier.h:13
LArFEBTimeOffset::size
unsigned size() const
Definition:
LArFEBTimeOffset.h:22
ILArFEBTimeOffset
Definition:
ILArFEBTimeOffset.h:11
LArFEBTimeOffset::LArFEBTimeOffset
LArFEBTimeOffset()
Definition:
LArFEBTimeOffset.cxx:7
LArFEBTimeOffset::m_febTimeMap
std::map< HWIdentifier, float > m_febTimeMap
Definition:
LArFEBTimeOffset.h:29
LArFEBTimeOffset::~LArFEBTimeOffset
virtual ~LArFEBTimeOffset()
Definition:
LArFEBTimeOffset.h:16
LArFEBTimeOffset::TimeOffset
float TimeOffset(const HWIdentifier fId) const
Definition:
LArFEBTimeOffset.h:33
HWIdentifier.h
LArFEBTimeOffset::m_defaultReturnValue
float m_defaultReturnValue
Definition:
LArFEBTimeOffset.h:30
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
convertTimingResiduals.offset
offset
Definition:
convertTimingResiduals.py:71
LArFEBTimeOffset::setTimeOffset
void setTimeOffset(const HWIdentifier fId, const float offset)
Definition:
LArFEBTimeOffset.h:17
LArFEBTimeOffset::setDefaultReturnValue
void setDefaultReturnValue(const float value)
Definition:
LArFEBTimeOffset.h:25
CLASS_DEF.h
macros to associate a CLID to a type
Generated on Sun Dec 22 2024 21:13:28 for ATLAS Offline Software by
1.8.18