Belle II Software development
|
Utility to store received histograms (hierarchical tree structures) from clients (as an event message), with a function to add multiple histogram trees together. More...
#include <HistogramMapping.h>
Public Member Functions | |
HistogramMapping & | operator= (const HistogramMapping &rhs)=delete |
As this is a heavy object, make sure to not copy. | |
HistogramMapping & | operator= (HistogramMapping &&rhs)=default |
Moving is allowed. | |
HistogramMapping (const HistogramMapping &rhs)=delete | |
As this is a heavy object, make sure to not copy. | |
HistogramMapping (HistogramMapping &&rhs)=default | |
Moving is allowed. | |
HistogramMapping ()=default | |
Default constructor needed during summation. | |
HistogramMapping (std::unique_ptr< Belle2::EvtMessage > msg) | |
Constructor via a received event message by deserializing the histograms. | |
void | operator+= (const HistogramMapping &rhs) |
Add another histogramm tree instance by merging all histograms with the same name. | |
void | write () const |
Write out all stored histograms in the currently selected ROOT gDirectory. | |
void | clear () |
Clear all histograms in the internal map also deleting the pointers. | |
void | printMe () const |
Debug function to print out the content as into messages. | |
std::unique_ptr< Belle2::EvtMessage > | toMessage () const |
Construct an EvtMessage by serializing the content of the internal histogram storage. Will not invalidate the histograms. | |
bool | empty () const |
Check if there are no stored histograms. | |
Private Attributes | |
std::map< std::string, std::unique_ptr< TH1 > > | m_histograms |
Internal storage of the histograms in the form name -> unique TH1 pointer. | |
Utility to store received histograms (hierarchical tree structures) from clients (as an event message), with a function to add multiple histogram trees together.
Can be converted back into a single event message and is used in the histogram server for merging the received histogram messages. Internally, the tree structure is stored as a mapping name -> TH1 (unique) pointer, where folder structure is mapped via "/" in the name.
Definition at line 30 of file HistogramMapping.h.
|
explicit |
Constructor via a received event message by deserializing the histograms.
Definition at line 19 of file HistogramMapping.cc.
void clear | ( | ) |
Clear all histograms in the internal map also deleting the pointers.
Definition at line 71 of file HistogramMapping.cc.
bool empty | ( | ) | const |
Check if there are no stored histograms.
Definition at line 76 of file HistogramMapping.cc.
void operator+= | ( | const HistogramMapping & | rhs | ) |
Add another histogramm tree instance by merging all histograms with the same name.
Definition at line 46 of file HistogramMapping.cc.
void printMe | ( | ) | const |
Debug function to print out the content as into messages.
Definition at line 81 of file HistogramMapping.cc.
std::unique_ptr< Belle2::EvtMessage > toMessage | ( | ) | const |
Construct an EvtMessage by serializing the content of the internal histogram storage. Will not invalidate the histograms.
Definition at line 88 of file HistogramMapping.cc.
void write | ( | ) | const |
Write out all stored histograms in the currently selected ROOT gDirectory.
Definition at line 63 of file HistogramMapping.cc.
|
private |
Internal storage of the histograms in the form name -> unique TH1 pointer.
Definition at line 61 of file HistogramMapping.h.