ATLAS Offline Software
LArCellTimeOffset.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 LARCELLTIMEOFFSET_H
6 #define LARCELLTIMEOFFSET_H
7 
8 #include "AthenaKernel/CLASS_DEF.h"
10 #include <map>
11 
13  public:
14  LArCellTimeOffset(); //Constructor
15  virtual ~LArCellTimeOffset() {}; //Destructor
16  inline void setTimeOffset(const HWIdentifier fId, const float offset) //Setter
17  {m_cellTimeMap[fId]=offset;}
18  inline float TimeOffset(const HWIdentifier fId) const; //Getter
19 
20  inline unsigned size() const
21  { return m_cellTimeMap.size();}
22 
23  inline void setDefaultReturnValue(const float value)
25 
26  inline std::map <HWIdentifier,float>::const_iterator begin() const
27  { return m_cellTimeMap.begin();}
28 
29  inline std::map <HWIdentifier,float>::const_iterator end() const
30  { return m_cellTimeMap.end();}
31 
32  private:
33  std::map <HWIdentifier,float> m_cellTimeMap;
35 };
36 
37 inline float LArCellTimeOffset::TimeOffset(const HWIdentifier fId) const {
38  const std::map <HWIdentifier,float>::const_iterator it=m_cellTimeMap.find(fId);
39  if (it==m_cellTimeMap.end())
40  return m_defaultReturnValue;
41  else
42  return it->second;
43 }
44 
45 CLASS_DEF( LArCellTimeOffset, 141392342, 1)
46 #endif
LArCellTimeOffset::LArCellTimeOffset
LArCellTimeOffset()
Definition: LArCellTimeOffset.cxx:7
skel.it
it
Definition: skel.GENtoEVGEN.py:396
athena.value
value
Definition: athena.py:124
HWIdentifier
Definition: HWIdentifier.h:13
LArCellTimeOffset
Definition: LArCellTimeOffset.h:12
LArCellTimeOffset::size
unsigned size() const
Definition: LArCellTimeOffset.h:20
LArCellTimeOffset::m_cellTimeMap
std::map< HWIdentifier, float > m_cellTimeMap
Definition: LArCellTimeOffset.h:33
LArCellTimeOffset::setDefaultReturnValue
void setDefaultReturnValue(const float value)
Definition: LArCellTimeOffset.h:23
LArCellTimeOffset::end
std::map< HWIdentifier, float >::const_iterator end() const
Definition: LArCellTimeOffset.h:29
LArCellTimeOffset::~LArCellTimeOffset
virtual ~LArCellTimeOffset()
Definition: LArCellTimeOffset.h:15
HWIdentifier.h
LArCellTimeOffset::begin
std::map< HWIdentifier, float >::const_iterator begin() const
Definition: LArCellTimeOffset.h:26
LArCellTimeOffset::setTimeOffset
void setTimeOffset(const HWIdentifier fId, const float offset)
Definition: LArCellTimeOffset.h:16
LArCellTimeOffset::TimeOffset
float TimeOffset(const HWIdentifier fId) const
Definition: LArCellTimeOffset.h:37
LArCellTimeOffset::m_defaultReturnValue
float m_defaultReturnValue
Definition: LArCellTimeOffset.h:34
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
CLASS_DEF.h
macros to associate a CLID to a type