JAPAn
Just Another Parity Analyzer
Loading...
Searching...
No Matches
MQwHistograms Class Reference

Mix-in class providing histogram management functionality. More...

#include <MQwHistograms.h>

+ Inheritance diagram for MQwHistograms:
+ Collaboration diagram for MQwHistograms:

Public Member Functions

void ShareHistograms (const MQwHistograms *source)
 Share histogram pointers between objects.
 

Protected Member Functions

 MQwHistograms ()
 Default constructor.
 
 MQwHistograms (const MQwHistograms &source)
 Copy constructor.
 
virtual ~MQwHistograms ()
 Virtual destructor.
 
MQwHistogramsoperator= (const MQwHistograms &value)
 
void Fill_Pointer (TH1_ptr hist_ptr, Double_t value)
 
void AddHistogram (TH1 *h)
 Register a histogram.
 

Protected Attributes

std::vector< TH1_ptrfHistograms
 Histograms associated with this data element.
 

Private Types

typedef TH1 * TH1_ptr
 Regular pointers for the histograms.
 

Detailed Description

Mix-in class providing histogram management functionality.

Provides a common interface for data elements that need to create and fill ROOT histograms. Manages histogram pointers and provides utilities for histogram registration and sharing between objects.

Definition at line 26 of file MQwHistograms.h.

Member Typedef Documentation

◆ TH1_ptr

typedef TH1* MQwHistograms::TH1_ptr
private

Regular pointers for the histograms.

Definition at line 29 of file MQwHistograms.h.

Constructor & Destructor Documentation

◆ MQwHistograms() [1/2]

MQwHistograms::MQwHistograms ( )
inlineprotected

Default constructor.

Definition at line 38 of file MQwHistograms.h.

38{ }

Referenced by MQwHistograms(), operator=(), ShareHistograms(), VQwDataElement::VQwDataElement(), VQwDataElement::VQwDataElement(), VQwSubsystem::VQwSubsystem(), and VQwSubsystem::VQwSubsystem().

+ Here is the caller graph for this function:

◆ MQwHistograms() [2/2]

MQwHistograms::MQwHistograms ( const MQwHistograms & source)
inlineprotected

Copy constructor.

Definition at line 40 of file MQwHistograms.h.

41 : fHistograms(source.fHistograms) { }
std::vector< TH1_ptr > fHistograms
Histograms associated with this data element.

References fHistograms, and MQwHistograms().

+ Here is the call graph for this function:

◆ ~MQwHistograms()

virtual MQwHistograms::~MQwHistograms ( )
inlineprotectedvirtual

Virtual destructor.

Definition at line 43 of file MQwHistograms.h.

43{ }

Member Function Documentation

◆ AddHistogram()

void MQwHistograms::AddHistogram ( TH1 * h)
inlineprotected

Register a histogram.

Definition at line 66 of file MQwHistograms.h.

66 {
67 fHistograms.push_back(TH1_ptr(h));
68 fHistograms.back()->SetBuffer(1000);
69 }
TH1 * TH1_ptr
Regular pointers for the histograms.

References fHistograms.

◆ Fill_Pointer()

void MQwHistograms::Fill_Pointer ( TH1_ptr hist_ptr,
Double_t value )
inlineprotected

Definition at line 54 of file MQwHistograms.h.

54 {
55 if (hist_ptr != nullptr){
56 hist_ptr->Fill(value);
57 }
58 }

◆ operator=()

MQwHistograms & MQwHistograms::operator= ( const MQwHistograms & value)
inlineprotected

Arithmetic assignment operator: Should only copy event-based data. In this particular class, there is no event-based data.

Definition at line 47 of file MQwHistograms.h.

47 {
48 if (this != &value) {
49 // No event-based data to copy in this class
50 }
51 return *this;
52 }

References MQwHistograms().

Referenced by VQwDataElement::operator=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ShareHistograms()

void MQwHistograms::ShareHistograms ( const MQwHistograms * source)
inline

Share histogram pointers between objects.

Definition at line 73 of file MQwHistograms.h.

73 {
74 if (source) fHistograms = source->fHistograms;
75 }

References fHistograms, and MQwHistograms().

+ Here is the call graph for this function:

Field Documentation

◆ fHistograms


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