ATLAS Offline Software
MuonHoughHisto2DContainer.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef MUONHOUGHPATTERNEVENT_MUONHOUGHHISTO2DCONTAINER_H
6 #define MUONHOUGHPATTERNEVENT_MUONHOUGHHISTO2DCONTAINER_H
7 
9 
11 public:
15  virtual ~MuonHoughHisto2DContainer() = default;
16 
18  MuonHoughHisto2D* getHisto(int id) const;
19 
22  std::pair<int, int> getMaximumBinnumber() const;
23 
25  void reset() const;
27  int size() const;
29  void reserve(int);
31  void push_back(std::unique_ptr<MuonHoughHisto2D>);
32 
33 private:
35  std::vector<std::unique_ptr<MuonHoughHisto2D>> m_histos{};
36 };
37 
38 inline int MuonHoughHisto2DContainer::size() const { return m_histos.size(); }
39 inline MuonHoughHisto2D* MuonHoughHisto2DContainer::getHisto(int id) const { return m_histos.at(id).get(); }
40 inline void MuonHoughHisto2DContainer::reserve(int size) { m_histos.reserve(size); }
41 inline void MuonHoughHisto2DContainer::push_back(std::unique_ptr<MuonHoughHisto2D> histo) { m_histos.push_back(std::move(histo)); }
42 
43 #endif // MUONHOUGHPATTERNEVENT_MUONHOUGHHISTO2DCONTAINER_H
MuonHoughHisto2DContainer::reserve
void reserve(int)
reserve a certain size (memory) for m_histos
Definition: MuonHoughHisto2DContainer.h:40
MuonHoughHisto2DContainer
Definition: MuonHoughHisto2DContainer.h:10
MuonHoughHisto2DContainer::getHisto
MuonHoughHisto2D * getHisto(int id) const
return histogram at place id
Definition: MuonHoughHisto2DContainer.h:39
MuonHoughHisto2DContainer::push_back
void push_back(std::unique_ptr< MuonHoughHisto2D >)
push_back a histogram
Definition: MuonHoughHisto2DContainer.h:41
MuonHoughHisto2DContainer::size
int size() const
returns size of container
Definition: MuonHoughHisto2DContainer.h:38
MuonHoughHisto2DContainer::m_histos
std::vector< std::unique_ptr< MuonHoughHisto2D > > m_histos
vector of MuonHoughHisto2D*
Definition: MuonHoughHisto2DContainer.h:35
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
MuonHoughHisto2DContainer::reset
void reset() const
resets histograms
Definition: MuonHoughHisto2DContainer.cxx:26
MuonHoughHisto2D.h
MuonHoughHisto2DContainer::~MuonHoughHisto2DContainer
virtual ~MuonHoughHisto2DContainer()=default
destructor
MuonHoughHisto2DContainer::getMaximumBinnumber
std::pair< int, int > getMaximumBinnumber() const
return maximum of container gives first id histogram (sector) and then maximumbin
Definition: MuonHoughHisto2DContainer.cxx:9
MuonHoughHisto2DContainer::MuonHoughHisto2DContainer
MuonHoughHisto2DContainer()
constructor
plotBeamSpotCompare.histo
histo
Definition: plotBeamSpotCompare.py:415
MuonHoughHisto2D
Histogram class, similar to Root's TH2D.
Definition: MuonHoughHisto2D.h:22