ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Panel Class Reference

#include <computils.h>

Collaboration diagram for Panel:

Public Member Functions

 Panel (const std::string &s, int nc)
 don't know how many rows or total hists yet, but do know number of columns
More...
 
 Panel (const std::string &s, int nr, int nc)
 know number of rows and columns More...
 
void push_back (const HistDetails &h)
 
std::string name () const
 
size_t size () const
 
const HistDetailsoperator[] (int i) const
 
HistDetailsoperator[] (int i)
 
const HistDetailsback () const
 
HistDetailsback ()
 
int nrows () const
 
int ncols () const
 

Private Attributes

std::string m_name
 
int m_nhist
 
int m_nrows
 
int m_ncols
 
std::vector< HistDetailsm_hist
 

Detailed Description

Definition at line 1317 of file computils.h.

Constructor & Destructor Documentation

◆ Panel() [1/2]

Panel::Panel ( const std::string &  s,
int  nc 
)
inline

don't know how many rows or total hists yet, but do know number of columns

Definition at line 1323 of file computils.h.

1323  :
1324  m_name(s), m_nhist(-1), m_nrows(-1), m_ncols(nc) {
1325  m_hist.reserve( nc );
1326  }

◆ Panel() [2/2]

Panel::Panel ( const std::string &  s,
int  nr,
int  nc 
)
inline

know number of rows and columns

Definition at line 1329 of file computils.h.

1329  :
1330  m_name(s), m_nhist(nr*nc), m_nrows(nr), m_ncols(nc) {
1331  m_hist.reserve( m_nhist );
1332  }

Member Function Documentation

◆ back() [1/2]

HistDetails& Panel::back ( )
inline

Definition at line 1348 of file computils.h.

1348 { return m_hist.back(); }

◆ back() [2/2]

const HistDetails& Panel::back ( ) const
inline

Definition at line 1347 of file computils.h.

1347 { return m_hist.back(); }

◆ name()

std::string Panel::name ( ) const
inline

Definition at line 1340 of file computils.h.

1340 { return m_name; }

◆ ncols()

int Panel::ncols ( ) const
inline

Definition at line 1351 of file computils.h.

1351 { return m_ncols; }

◆ nrows()

int Panel::nrows ( ) const
inline

Definition at line 1350 of file computils.h.

1350 { return m_nrows; }

◆ operator[]() [1/2]

HistDetails& Panel::operator[] ( int  i)
inline

Definition at line 1345 of file computils.h.

1345 { return m_hist.at(i); }

◆ operator[]() [2/2]

const HistDetails& Panel::operator[] ( int  i) const
inline

Definition at line 1344 of file computils.h.

1344 { return m_hist.at(i); }

◆ push_back()

void Panel::push_back ( const HistDetails h)
inline

Definition at line 1334 of file computils.h.

1334  {
1335  m_hist.push_back( h );
1336  m_nhist = m_hist.size();
1337  m_nrows = m_nhist/m_ncols + (m_nhist%m_ncols ? 1 : 0 );
1338  }

◆ size()

size_t Panel::size ( ) const
inline

Definition at line 1342 of file computils.h.

1342 { return m_hist.size(); }

Member Data Documentation

◆ m_hist

std::vector<HistDetails> Panel::m_hist
private

Definition at line 1362 of file computils.h.

◆ m_name

std::string Panel::m_name
private

Definition at line 1355 of file computils.h.

◆ m_ncols

int Panel::m_ncols
private

Definition at line 1360 of file computils.h.

◆ m_nhist

int Panel::m_nhist
private

Definition at line 1357 of file computils.h.

◆ m_nrows

int Panel::m_nrows
private

Definition at line 1359 of file computils.h.


The documentation for this class was generated from the following file:
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
Panel::m_nrows
int m_nrows
Definition: computils.h:1359
lumiFormat.i
int i
Definition: lumiFormat.py:85
Panel::m_name
std::string m_name
Definition: computils.h:1355
Panel::m_nhist
int m_nhist
Definition: computils.h:1357
Panel::m_hist
std::vector< HistDetails > m_hist
Definition: computils.h:1362
h
Panel::m_ncols
int m_ncols
Definition: computils.h:1360
plotBeamSpotMon.nc
int nc
Definition: plotBeamSpotMon.py:83