ATLAS Offline Software
Loading...
Searching...
No Matches
MdtTubeFitContainer.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
5
6namespace MuonCalib{
13
17
18const std::string& MdtTubeFitContainer::name() const {
19 return m_name;
20}
21
22const std::string& MdtTubeFitContainer::implementation() const {
23 return m_implementation;
24}
25
26bool MdtTubeFitContainer::setFit(SingleTubeFit&& val, const Identifier& tubeId, MsgStream& log) {
27 unsigned int idx = vectorIndex(tubeId);
28 if (idx >= m_info.size()) {
29 log<<MSG::WARNING<<__FILE__<<":"<<__LINE__<<" Index "<<idx
30 <<" exceeds range "<<m_info.size()<<endmsg;
31 return false;
32 }
33 m_info[idx] = std::move(val);
34 return true;
35}
36
37void MdtTubeFitContainer::setGroupBy(const std::string& group_by) {
38 for (SingleTubeFit& fit : m_info) {
39 fit.group_by = group_by;
40 }
41}
42std::string MdtTubeFitContainer::GroupBy() const {
43 if (!m_info.size()) return m_group_by;
44 return m_info.begin()->group_by;
45}
46
48 unsigned int idx = vectorIndex(tubeId);
49 if (idx >= m_info.size()) return nullptr;
50 return &m_info[idx];
51}
52
54 unsigned int idx = vectorIndex(tubeId);
55 if (idx >= m_info.size()) return nullptr;
56 return &m_info[idx];
57}
58
59}
#define endmsg
MdtTubeCalibContainer(const Muon::IMuonIdHelperSvc *idHelperSvc, const Identifier &moduleID)
nMl = number of multilayres, nLayers = number of layers in multilayer (3 or 4); nTubes = number of tu...
const Muon::IMuonIdHelperSvc * idHelperSvc() const
unsigned int vectorIndex(const Identifier &measID) const
calculate postion of tube in vector
MdtTubeFitContainer(const Muon::IMuonIdHelperSvc *idHelperSvc, const Identifier &moduleID)
nMl = number of multilayres, nLayers = number of layers in multilayer (3 or 4); nTubes = number of tu...
void setGroupBy(const std::string &group_by)
const std::string & name() const
return the name of this class
bool setFit(SingleTubeFit &&val, const Identifier &tubeId, MsgStream &log)
set the calibration constants of a single tube
void setImplementation(const std::string &impl)
set the name of the implementation used to fill this class
std::vector< SingleTubeFit > m_info
const SingleTubeFit * getFit(const Identifier &tubeId) const
return calibration constants of a single tube
const std::string & implementation() const
return the name of the implementation filling this class
Interface for Helper service that creates muon Identifiers and can be used to print Identifiers.
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
MdtTubeFitContainer::SingleTubeFit SingleTubeFit