ATLAS Offline Software
RingerRings.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
8  : m_rings() {
9 }
10 
11 RingerRings::RingerRings(const std::vector<float> &rings)
12  : m_rings(rings) {
13 }
14 
15 RingerRings::RingerRings(const unsigned int nRings, const float *rings) {
16  if (!rings)
17  return;
18  for (unsigned int i = 0; i < nRings; ++i) {
19  m_rings.push_back(rings[i]);
20  }
21 }
22 
23 std::vector<float> &RingerRings::rings() {
24  return m_rings;
25 }
26 
27 const std::vector<float> &RingerRings::rings() const {
28  return m_rings;
29 }
30 
31 void RingerRings::rings(const std::vector<float> &r) {
32  m_rings = r;
33 }
34 
35 float &RingerRings::at(const unsigned int i) {
36  return m_rings[i];
37 }
38 
39 const float &RingerRings::at(const unsigned int i) const {
40  return m_rings[i];
41 }
42 
43 unsigned int RingerRings::size() const {
44  return m_rings.size();
45 }
46 
47 const float &RingerRings::operator [](const unsigned int i) const {
48  return m_rings[i];
49 }
50 
51 float &RingerRings::operator [](const unsigned int i) {
52  return m_rings[i];
53 }
54 
55 void RingerRings::print(MsgStream &log) const {
56  log << MSG::DEBUG << "Dumping RingerRings information for debugging. There are " << m_rings.size() << " rings." << endmsg;
57  log << MSG::DEBUG << "Ringer values: ";
58  for (std::vector<float>::const_iterator i = m_rings.begin(); i != m_rings.end(); ++i) {
59  log << (*i) << " ";
60  }
61  log << endmsg;
62 }
63 
beamspotman.r
def r
Definition: beamspotman.py:676
RingerRings::at
float & at(const unsigned int i)
Definition: RingerRings.cxx:35
RingerRings::print
void print(MsgStream &log) const
Prints some debug message.
Definition: RingerRings.cxx:55
RingerRings::m_rings
std::vector< float > m_rings
Definition: RingerRings.h:21
lumiFormat.i
int i
Definition: lumiFormat.py:85
RingerRings.h
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
RingerRings::RingerRings
RingerRings()
Class default constructor.
Definition: RingerRings.cxx:7
RingerRings::size
unsigned int size() const
Definition: RingerRings.cxx:43
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
RingerRings::operator[]
const float & operator[](const unsigned int i) const
Definition: RingerRings.cxx:47
RingerRings::rings
std::vector< float > & rings()
Acessor methods.
Definition: RingerRings.cxx:23