ra4_draw  4bd0201e3d922d42bd545d4b045ed44db33454a4
Classes | Public Member Functions | Public Attributes | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
Table Class Referencefinal

#include <table.hpp>

Inheritance diagram for Table:
Figure

Classes

class  TableColumn
 

Public Member Functions

 Table (const std::string &name, const std::vector< TableRow > &rows, const std::vector< std::shared_ptr< Process > > &processes, bool do_zbi=true, bool print_table=true, bool print_pie=false)
 
 Table (Table &&)=default
 
Tableoperator= (Table &&)=default
 
 ~Table ()=default
 
void Print (double luminosity, const std::string &subdir) final
 
std::vector< GammaParamsYield (const Process *process, double luminosity) const
 
std::vector< GammaParamsBackgroundYield (double luminosity) const
 
std::vector< GammaParamsDataYield () const
 
std::set< const Process * > GetProcesses () const final
 
FigureComponentGetComponent (const Process *process) final
 
- Public Member Functions inherited from Figure
 Figure ()=default
 
 Figure (const Figure &)=default
 
Figureoperator= (const Figure &)=default
 
 Figure (Figure &&)=default
 
Figureoperator= (Figure &&)=default
 
virtual ~Figure ()=default
 

Public Attributes

std::string name_
 
std::vector< TableRowrows_
 
bool do_zbi_
 
bool print_table_
 
bool print_pie_
 
std::vector< PlotOptplot_options_
 Styles with which to draw pie chart. More...
 

Private Member Functions

 Table (const Table &)=delete
 
Tableoperator= (const Table &)=delete
 
 Table ()=delete
 
const std::vector< std::unique_ptr< TableColumn > > & GetComponentList (const Process *process) const
 
void PrintHeader (std::ofstream &file) const
 
void PrintRow (std::ofstream &file, std::size_t irow, double luminosity) const
 
void PrintPie (std::size_t irow, double luminosity) const
 
void PrintFooter (std::ofstream &file) const
 
std::size_t NumColumns () const
 

Static Private Member Functions

static double GetYield (const std::vector< std::unique_ptr< TableColumn > > &columns, std::size_t irow)
 
static double GetError (const std::vector< std::unique_ptr< TableColumn > > &columns, std::size_t irow)
 

Private Attributes

std::vector< std::unique_ptr< TableColumn > > backgrounds_
 Background components of the figure. More...
 
std::vector< std::unique_ptr< TableColumn > > signals_
 Signal components of the figure. More...
 
std::vector< std::unique_ptr< TableColumn > > datas_
 Data components of the figure. More...
 

Detailed Description

Definition at line 15 of file table.hpp.

Constructor & Destructor Documentation

Table::Table ( const std::string &  name,
const std::vector< TableRow > &  rows,
const std::vector< std::shared_ptr< Process > > &  processes,
bool  do_zbi = true,
bool  print_table = true,
bool  print_pie = false 
)
Table::Table ( Table &&  )
default
Table::~Table ( )
default
Table::Table ( const Table )
privatedelete
Table::Table ( )
privatedelete

Member Function Documentation

vector< GammaParams > Table::BackgroundYield ( double  luminosity) const

Definition at line 175 of file table.cpp.

References Process::background.

Referenced by main().

vector< GammaParams > Table::DataYield ( ) const

Definition at line 188 of file table.cpp.

References Process::data.

Referenced by main().

Figure::FigureComponent * Table::GetComponent ( const Process process)
finalvirtual

Implements Figure.

Definition at line 215 of file table.cpp.

References DBG, and Process::name_.

const vector< unique_ptr< Table::TableColumn > > & Table::GetComponentList ( const Process process) const
private

Definition at line 226 of file table.cpp.

References Process::background, Process::data, ERROR, Process::signal, and Process::type_.

double Table::GetError ( const std::vector< std::unique_ptr< TableColumn > > &  columns,
std::size_t  irow 
)
staticprivate

Definition at line 467 of file table.cpp.

set< const Process * > Table::GetProcesses ( ) const
finalvirtual

Implements Figure.

Definition at line 201 of file table.cpp.

double Table::GetYield ( const std::vector< std::unique_ptr< TableColumn > > &  columns,
std::size_t  irow 
)
staticprivate

Definition at line 458 of file table.cpp.

size_t Table::NumColumns ( ) const
private

Definition at line 451 of file table.cpp.

Table& Table::operator= ( Table &&  )
default
Table& Table::operator= ( const Table )
privatedelete
void Table::Print ( double  luminosity,
const std::string &  subdir 
)
finalvirtual

Implements Figure.

Definition at line 139 of file table.cpp.

References ToString().

void Table::PrintFooter ( std::ofstream &  file) const
private

Definition at line 415 of file table.cpp.

References anonymous_namespace{table.cpp}::ToLatex().

void Table::PrintHeader ( std::ofstream &  file) const
private

Definition at line 239 of file table.cpp.

References anonymous_namespace{table.cpp}::ToLatex().

void Table::PrintPie ( std::size_t  irow,
double  luminosity 
) const
private

Definition at line 361 of file table.cpp.

References CodeToPlainText(), CodeToRootTex(), Contains(), and RoundNumber().

void Table::PrintRow ( std::ofstream &  file,
std::size_t  irow,
double  luminosity 
) const
private
vector< GammaParams > Table::Yield ( const Process process,
double  luminosity 
) const

Definition at line 158 of file table.cpp.

References Process::data, Table::TableColumn::sumw2_, Table::TableColumn::sumw_, and Process::type_.

Referenced by main().

Member Data Documentation

std::vector<std::unique_ptr<TableColumn> > Table::backgrounds_
private

Background components of the figure.

Definition at line 67 of file table.hpp.

std::vector<std::unique_ptr<TableColumn> > Table::datas_
private

Data components of the figure.

Definition at line 69 of file table.hpp.

bool Table::do_zbi_

Definition at line 61 of file table.hpp.

std::string Table::name_

Definition at line 59 of file table.hpp.

std::vector<PlotOpt> Table::plot_options_

Styles with which to draw pie chart.

Definition at line 64 of file table.hpp.

bool Table::print_pie_

Definition at line 63 of file table.hpp.

bool Table::print_table_

Definition at line 62 of file table.hpp.

std::vector<TableRow> Table::rows_
std::vector<std::unique_ptr<TableColumn> > Table::signals_
private

Signal components of the figure.

Definition at line 68 of file table.hpp.


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