ATLAS Offline Software
Loading...
Searching...
No Matches
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
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)
24 { m_defaultReturnValue=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
37inline 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())
41 else
42 return it->second;
43}
44
45CLASS_DEF( LArCellTimeOffset, 141392342, 1)
46#endif
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
std::map< HWIdentifier, float >::const_iterator end() const
void setDefaultReturnValue(const float value)
std::map< HWIdentifier, float > m_cellTimeMap
unsigned size() const
float TimeOffset(const HWIdentifier fId) const
void setTimeOffset(const HWIdentifier fId, const float offset)
std::map< HWIdentifier, float >::const_iterator begin() const