Project
Loading...
Searching...
No Matches
o2::framework::HistogramRegistry Class Reference

#include <HistogramRegistry.h>

Public Member Functions

 HistogramRegistry (char const *const name="histograms", std::vector< HistogramSpec > histSpecs={}, OutputObjHandlingPolicy policy=OutputObjHandlingPolicy::AnalysisObject, bool sortHistos=false, bool createRegistryDir=false)
 
HistPtr add (const HistogramSpec &histSpec)
 
HistPtr add (char const *const name, char const *const title, const HistogramConfigSpec &histConfigSpec, bool callSumw2=false)
 
HistPtr add (char const *const name, char const *const title, HistType histType, const std::vector< AxisSpec > &axes, bool callSumw2=false)
 
HistPtr add (const std::string &name, char const *const title, HistType histType, const std::vector< AxisSpec > &axes, bool callSumw2=false)
 
template<typename T >
std::shared_ptr< T > add (char const *const name, char const *const title, const HistogramConfigSpec &histConfigSpec, bool callSumw2=false)
 
template<typename T >
std::shared_ptr< T > add (char const *const name, char const *const title, HistType histType, const std::vector< AxisSpec > &axes, bool callSumw2=false)
 
template<typename T >
std::shared_ptr< T > add (const std::string &name, char const *const title, HistType histType, const std::vector< AxisSpec > &axes, bool callSumw2=false)
 
void addClone (const std::string &source, const std::string &target)
 
bool contains (const HistName &histName)
 
template<typename T >
std::shared_ptr< T > get (const HistName &histName)
 
template<typename T >
std::shared_ptr< T > operator() (const HistName &histName)
 
OutputSpec const spec ()
 
OutputRef ref (uint16_t idx, uint16_t pipelineSize)
 
void setHash (uint32_t hash)
 
TList * getListOfHistograms ()
 returns the list of histograms, properly sorted for writing.
 
void clean ()
 deletes all the histograms from the registry
 
template<typename... Ts>
requires (FillValue<Ts> && ...)
void fill (const HistName &histName, Ts... positionAndWeight)
 
template<typename... Cs, typename T >
void fill (const HistName &histName, const T &table, const o2::framework::expressions::Filter &filter)
 
double getSize (const HistName &histName, double fillFraction=1.)
 
double getSize (double fillFraction=1.)
 
void print (bool showAxisDetails=false)
 

Public Attributes

uint32_t lookup = 0
 

Detailed Description

HistogramRegistry for storing and filling histograms of any type.

Definition at line 131 of file HistogramRegistry.h.

Constructor & Destructor Documentation

◆ HistogramRegistry()

o2::framework::HistogramRegistry::HistogramRegistry ( char const *const  name = "histograms",
std::vector< HistogramSpec histSpecs = {},
OutputObjHandlingPolicy  policy = OutputObjHandlingPolicy::AnalysisObject,
bool  sortHistos = false,
bool  createRegistryDir = false 
)

Definition at line 31 of file HistogramRegistry.cxx.

Member Function Documentation

◆ add() [1/7]

template std::shared_ptr< StepTHn > o2::framework::HistogramRegistry::add< StepTHn > ( char const *const  name,
char const *const  title,
const HistogramConfigSpec histConfigSpec,
bool  callSumw2 = false 
)

Definition at line 112 of file HistogramRegistry.cxx.

◆ add() [2/7]

template<typename T >
std::shared_ptr< T > o2::framework::HistogramRegistry::add ( char const *const  name,
char const *const  title,
const HistogramConfigSpec histConfigSpec,
bool  callSumw2 = false 
)

Definition at line 447 of file HistogramRegistry.cxx.

◆ add() [3/7]

template std::shared_ptr< StepTHn > o2::framework::HistogramRegistry::add< StepTHn > ( char const *const  name,
char const *const  title,
HistType  histType,
const std::vector< AxisSpec > &  axes,
bool  callSumw2 = false 
)

Definition at line 117 of file HistogramRegistry.cxx.

◆ add() [4/7]

template<typename T >
std::shared_ptr< T > o2::framework::HistogramRegistry::add ( char const *const  name,
char const *const  title,
HistType  histType,
const std::vector< AxisSpec > &  axes,
bool  callSumw2 = false 
)

Definition at line 458 of file HistogramRegistry.cxx.

◆ add() [5/7]

HistPtr o2::framework::HistogramRegistry::add ( const HistogramSpec histSpec)

Definition at line 107 of file HistogramRegistry.cxx.

◆ add() [6/7]

HistPtr o2::framework::HistogramRegistry::add ( const std::string &  name,
char const *const  title,
HistType  histType,
const std::vector< AxisSpec > &  axes,
bool  callSumw2 = false 
)

Definition at line 122 of file HistogramRegistry.cxx.

◆ add() [7/7]

template<typename T >
std::shared_ptr< T > o2::framework::HistogramRegistry::add ( const std::string &  name,
char const *const  title,
HistType  histType,
const std::vector< AxisSpec > &  axes,
bool  callSumw2 = false 
)

Definition at line 412 of file HistogramRegistry.h.

◆ addClone()

void o2::framework::HistogramRegistry::addClone ( const std::string &  source,
const std::string &  target 
)

Definition at line 128 of file HistogramRegistry.cxx.

◆ clean()

void o2::framework::HistogramRegistry::clean ( )

deletes all the histograms from the registry

Definition at line 190 of file HistogramRegistry.cxx.

◆ contains()

bool o2::framework::HistogramRegistry::contains ( const HistName &  histName)

Definition at line 157 of file HistogramRegistry.cxx.

◆ fill() [1/2]

template<typename... Cs, typename T >
void o2::framework::HistogramRegistry::fill ( const HistName &  histName,
const T &  table,
const o2::framework::expressions::Filter filter 
)

Definition at line 488 of file HistogramRegistry.h.

◆ fill() [2/2]

template<typename... Ts>
requires (FillValue<Ts> && ...)
void o2::framework::HistogramRegistry::fill ( const HistName &  histName,
Ts...  positionAndWeight 
)

Definition at line 448 of file HistogramRegistry.h.

◆ get()

template<typename T >
std::shared_ptr< T > o2::framework::HistogramRegistry::get ( const HistName &  histName)

Definition at line 418 of file HistogramRegistry.h.

◆ getListOfHistograms()

TList * o2::framework::HistogramRegistry::getListOfHistograms ( )

returns the list of histograms, properly sorted for writing.

Definition at line 286 of file HistogramRegistry.cxx.

◆ getSize() [1/2]

double o2::framework::HistogramRegistry::getSize ( const HistName &  histName,
double  fillFraction = 1. 
)

Definition at line 173 of file HistogramRegistry.cxx.

◆ getSize() [2/2]

double o2::framework::HistogramRegistry::getSize ( double  fillFraction = 1.)

Definition at line 181 of file HistogramRegistry.cxx.

◆ operator()()

template<typename T >
std::shared_ptr< T > o2::framework::HistogramRegistry::operator() ( const HistName &  histName)

Definition at line 428 of file HistogramRegistry.h.

◆ print()

void o2::framework::HistogramRegistry::print ( bool  showAxisDetails = false)

Definition at line 198 of file HistogramRegistry.cxx.

◆ ref()

OutputRef o2::framework::HistogramRegistry::ref ( uint16_t  idx,
uint16_t  pipelineSize 
)

Definition at line 54 of file HistogramRegistry.cxx.

◆ setHash()

void o2::framework::HistogramRegistry::setHash ( uint32_t  hash)

Definition at line 59 of file HistogramRegistry.cxx.

◆ spec()

OutputSpec const o2::framework::HistogramRegistry::spec ( )

Definition at line 41 of file HistogramRegistry.cxx.

Member Data Documentation

◆ lookup

uint32_t o2::framework::HistogramRegistry::lookup = 0
mutable

Definition at line 208 of file HistogramRegistry.h.


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