CbmRoot
Loading...
Searching...
No Matches
cbm::algo::qa::HistogramMetadata Class Reference

Metadata of the histogram. More...

#include <Histogram.h>

Public Types

using Flags_t = std::underlying_type_t<EHistFlag>
 

Public Member Functions

 HistogramMetadata ()=default
 Default constructor.
 
 HistogramMetadata (const std::string &msg)
 Constructor from the metadata string representation.
 
 ~HistogramMetadata ()=default
 Destructor.
 
bool CheckFlags () const
 Checks if the histogram flags configuration is valid.
 
bool GetFlag (EHistFlag key) const
 Get flag.
 
void SetFlag (EHistFlag key, bool flag=true)
 Get flag.
 
std::string ToString () const
 Converts the metadata to a string.
 

Static Public Member Functions

static std::pair< std::string, std::string > SeparateNameAndMetadata (const std::string &msg)
 Separates a name and metadata of histogram.
 

Static Public Attributes

static constexpr std::string_view ksTsIdSuffix = "_ts_id"
 Suffix of additional histograms vs. TS index.
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int)
 Serialization rule.
 

Private Attributes

Flags_t fFlags {}
 Flags collection for the histogram.
 

Friends

class boost::serialization::access
 

Detailed Description

Metadata of the histogram.

Note
To be sent with a configuration to the histogram server

Definition at line 64 of file Histogram.h.

Member Typedef Documentation

◆ Flags_t

using cbm::algo::qa::HistogramMetadata::Flags_t = std::underlying_type_t<EHistFlag>

Definition at line 66 of file Histogram.h.

Constructor & Destructor Documentation

◆ HistogramMetadata() [1/2]

cbm::algo::qa::HistogramMetadata::HistogramMetadata ( )
default

Default constructor.

◆ HistogramMetadata() [2/2]

cbm::algo::qa::HistogramMetadata::HistogramMetadata ( const std::string & msg)
inlineexplicit

Constructor from the metadata string representation.

Parameters
msgMetadata string representation

Definition at line 75 of file Histogram.h.

References fFlags.

◆ ~HistogramMetadata()

cbm::algo::qa::HistogramMetadata::~HistogramMetadata ( )
default

Destructor.

Member Function Documentation

◆ CheckFlags()

bool cbm::algo::qa::HistogramMetadata::CheckFlags ( ) const
inline

Checks if the histogram flags configuration is valid.

Returns
Is valid

Definition at line 87 of file Histogram.h.

References GetFlag(), cbm::algo::qa::OmitIntegrated, and cbm::algo::qa::StoreVsTsId.

◆ GetFlag()

bool cbm::algo::qa::HistogramMetadata::GetFlag ( EHistFlag key) const
inline

Get flag.

Parameters
keyFlag key from the EHistFlag enumeration

Definition at line 95 of file Histogram.h.

References fFlags.

Referenced by CheckFlags(), and cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetFlag().

◆ SeparateNameAndMetadata()

static std::pair< std::string, std::string > cbm::algo::qa::HistogramMetadata::SeparateNameAndMetadata ( const std::string & msg)
inlinestatic

Separates a name and metadata of histogram.

Returns
std::pair<std::string, std::string>: (name, metadata)

Definition at line 113 of file Histogram.h.

References pos.

◆ serialize()

template<class Archive >
void cbm::algo::qa::HistogramMetadata::serialize ( Archive & ar,
const unsigned int  )
inlineprivate

Serialization rule.

Definition at line 128 of file Histogram.h.

References fFlags.

◆ SetFlag()

void cbm::algo::qa::HistogramMetadata::SetFlag ( EHistFlag key,
bool flag = true )
inline

Get flag.

Parameters
keyFlag key from the EHistFlag enumeration
flagFlag value

Definition at line 100 of file Histogram.h.

References fFlags.

Referenced by cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::SetFlag().

◆ ToString()

std::string cbm::algo::qa::HistogramMetadata::ToString ( ) const
inline

Converts the metadata to a string.

Current implementation of the metadata string: <flags> Future implementation with additional fields: <flags>;<...>;<...>;...;<...>

Definition at line 109 of file Histogram.h.

References fFlags.

Referenced by cbm::algo::qa::Histogram< Axes, Storage, TotalSums >::GetMetadataString().

Friends And Related Symbol Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Definition at line 125 of file Histogram.h.

Member Data Documentation

◆ fFlags

Flags_t cbm::algo::qa::HistogramMetadata::fFlags {}
private

Flags collection for the histogram.

Definition at line 133 of file Histogram.h.

Referenced by GetFlag(), HistogramMetadata(), serialize(), SetFlag(), and ToString().

◆ ksTsIdSuffix

std::string_view cbm::algo::qa::HistogramMetadata::ksTsIdSuffix = "_ts_id"
staticconstexpr

Suffix of additional histograms vs. TS index.

Definition at line 68 of file Histogram.h.

Referenced by cbm::algo::qa::PadConfig::RegisterHistogram().


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