ATLAS Offline Software
Loading...
Searching...
No Matches
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
 Panel (const std::string &s, int nr, int nc)
 know number of rows and columns
void push_back (const HistDetails &h)
void push_back (const std::vector< std::string > &s)
template<typename Iterator>
void push_back (Iterator first, Iterator last)
const std::string & name () const
size_t size () const
const HistDetails & operator[] (int i) const
HistDetails & operator[] (int i)
const HistDetails & back () const
HistDetails & back ()
int nrows () const
int ncols () const

Private Attributes

std::string m_name
int m_nhist
int m_nrows
int m_ncols
std::vector< HistDetails > m_hist

Detailed Description

Definition at line 1627 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 1633 of file computils.h.

1633 :
1634 m_name(s), m_nhist(-1), m_nrows(-1), m_ncols(nc) {
1635 m_hist.reserve( nc );
1636 }
int m_nrows
Definition computils.h:1683
std::vector< HistDetails > m_hist
Definition computils.h:1686
std::string m_name
Definition computils.h:1679
int m_ncols
Definition computils.h:1684
int m_nhist
Definition computils.h:1681

◆ Panel() [2/2]

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

know number of rows and columns

Definition at line 1639 of file computils.h.

1639 :
1640 m_name(s), m_nhist(nr*nc), m_nrows(nr), m_ncols(nc) {
1641 m_hist.reserve( m_nhist );
1642 }

Member Function Documentation

◆ back() [1/2]

HistDetails & Panel::back ( )
inline

Definition at line 1672 of file computils.h.

1672{ return m_hist.back(); }

◆ back() [2/2]

const HistDetails & Panel::back ( ) const
inline

Definition at line 1671 of file computils.h.

1671{ return m_hist.back(); }

◆ name()

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

Definition at line 1664 of file computils.h.

1664{ return m_name; }

◆ ncols()

int Panel::ncols ( ) const
inline

Definition at line 1675 of file computils.h.

1675{ return m_ncols; }

◆ nrows()

int Panel::nrows ( ) const
inline

Definition at line 1674 of file computils.h.

1674{ return m_nrows; }

◆ operator[]() [1/2]

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

Definition at line 1669 of file computils.h.

1669{ return m_hist.at(i); }

◆ operator[]() [2/2]

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

Definition at line 1668 of file computils.h.

1668{ return m_hist.at(i); }

◆ push_back() [1/3]

void Panel::push_back ( const HistDetails & h)
inline

Definition at line 1644 of file computils.h.

1644 {
1645 m_hist.push_back( h );
1646 m_nhist = m_hist.size();
1647 m_nrows = m_nhist/m_ncols + (m_nhist%m_ncols ? 1 : 0 );
1648 }

◆ push_back() [2/3]

void Panel::push_back ( const std::vector< std::string > & s)
inline

Definition at line 1650 of file computils.h.

1650 {
1651 m_hist.emplace_back( s );
1652 m_nhist = m_hist.size();
1653 m_nrows = m_nhist/m_ncols + (m_nhist%m_ncols ? 1 : 0 );
1654 }

◆ push_back() [3/3]

template<typename Iterator>
void Panel::push_back ( Iterator first,
Iterator last )
inline

Definition at line 1657 of file computils.h.

1657 {
1658 m_hist.emplace_back( first, last );
1659 m_nhist = m_hist.size();
1660 m_nrows = m_nhist/m_ncols + (m_nhist%m_ncols ? 1 : 0 );
1661 }

◆ size()

size_t Panel::size ( ) const
inline

Definition at line 1666 of file computils.h.

1666{ return m_hist.size(); }

Member Data Documentation

◆ m_hist

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

Definition at line 1686 of file computils.h.

◆ m_name

std::string Panel::m_name
private

Definition at line 1679 of file computils.h.

◆ m_ncols

int Panel::m_ncols
private

Definition at line 1684 of file computils.h.

◆ m_nhist

int Panel::m_nhist
private

Definition at line 1681 of file computils.h.

◆ m_nrows

int Panel::m_nrows
private

Definition at line 1683 of file computils.h.


The documentation for this class was generated from the following file: