ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
Monitored::HistogramFiller::VariablesPack Struct Reference

helper class to pass variables to fillers More...

#include <HistogramFiller.h>

Collaboration diagram for Monitored::HistogramFiller::VariablesPack:

Public Member Functions

 VariablesPack ()
 
 VariablesPack (const std::initializer_list< const Monitored::IMonitoredVariable * > &v)
 
size_t size () const
 number of variables in the pack ( not counting the weight and mask ) More...
 
void reset ()
 removes all monitored variables More...
 
void set (unsigned index, const IMonitoredVariable *ptr)
 sets monitored variable at the index (may need to reszie vector of variables) More...
 
std::vector< std::string > names () const
 names of all varaibles stored More...
 

Public Attributes

std::vector< const Monitored::IMonitoredVariable * > var = { nullptr, nullptr, nullptr, nullptr }
 storage for variables, default size of 4, serves all histograming uses More...
 
const Monitored::IMonitoredVariableweight = nullptr
 pointer to weight variable, typically absent More...
 
const Monitored::IMonitoredVariablecut = nullptr
 pointer to cut mask variable, typically absent More...
 

Detailed Description

helper class to pass variables to fillers

Definition at line 71 of file HistogramFiller.h.

Constructor & Destructor Documentation

◆ VariablesPack() [1/2]

Monitored::HistogramFiller::VariablesPack::VariablesPack ( )
inline

Definition at line 72 of file HistogramFiller.h.

72 {}

◆ VariablesPack() [2/2]

Monitored::HistogramFiller::VariablesPack::VariablesPack ( const std::initializer_list< const Monitored::IMonitoredVariable * > &  v)
inline

Definition at line 73 of file HistogramFiller.h.

74  :var( v ) {}

Member Function Documentation

◆ names()

std::vector<std::string> Monitored::HistogramFiller::VariablesPack::names ( ) const
inline

names of all varaibles stored

Definition at line 105 of file HistogramFiller.h.

105  {
106  std::vector<std::string> r;
107  for ( const auto* v: var )
108  if ( v != nullptr )
109  r.push_back( v->name() );
110  return r;
111  }

◆ reset()

void Monitored::HistogramFiller::VariablesPack::reset ( )
inline

removes all monitored variables

Definition at line 86 of file HistogramFiller.h.

86  {
87  std::fill( var.begin(), var.end(), nullptr );
88  cut = nullptr;
89  weight = nullptr;
90  }

◆ set()

void Monitored::HistogramFiller::VariablesPack::set ( unsigned  index,
const IMonitoredVariable ptr 
)
inline

sets monitored variable at the index (may need to reszie vector of variables)

Definition at line 95 of file HistogramFiller.h.

95  {
96  if ( ATH_UNLIKELY( var.size() <= index ) ) {
97  var.resize(index+1);
98  }
99  var[index] = ptr;
100  }

◆ size()

size_t Monitored::HistogramFiller::VariablesPack::size ( ) const
inline

number of variables in the pack ( not counting the weight and mask )

Definition at line 79 of file HistogramFiller.h.

79  {
80  return var.size() - std::count( var.begin(), var.end(), nullptr );
81  }

Member Data Documentation

◆ cut

const Monitored::IMonitoredVariable* Monitored::HistogramFiller::VariablesPack::cut = nullptr

pointer to cut mask variable, typically absent

Definition at line 115 of file HistogramFiller.h.

◆ var

std::vector<const Monitored::IMonitoredVariable*> Monitored::HistogramFiller::VariablesPack::var = { nullptr, nullptr, nullptr, nullptr }

storage for variables, default size of 4, serves all histograming uses

Definition at line 113 of file HistogramFiller.h.

◆ weight

const Monitored::IMonitoredVariable* Monitored::HistogramFiller::VariablesPack::weight = nullptr

pointer to weight variable, typically absent

Definition at line 114 of file HistogramFiller.h.


The documentation for this struct was generated from the following file:
beamspotman.r
def r
Definition: beamspotman.py:676
index
Definition: index.py:1
Monitored::HistogramFiller::VariablesPack::cut
const Monitored::IMonitoredVariable * cut
pointer to cut mask variable, typically absent
Definition: HistogramFiller.h:115
ATH_UNLIKELY
#define ATH_UNLIKELY(x)
Definition: AthUnlikelyMacros.h:17
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
Monitored::HistogramFiller::VariablesPack::weight
const Monitored::IMonitoredVariable * weight
pointer to weight variable, typically absent
Definition: HistogramFiller.h:114
fill
void fill(H5::Group &out_file, size_t iterations)
Definition: test-hdf5-writer.cxx:95
python.PyAthena.v
v
Definition: PyAthena.py:154
Monitored::HistogramFiller::VariablesPack::var
std::vector< const Monitored::IMonitoredVariable * > var
storage for variables, default size of 4, serves all histograming uses
Definition: HistogramFiller.h:113
DeMoScan.index
string index
Definition: DeMoScan.py:364