Belle II Software  release-05-02-19
DQMCommonUtils Class Reference

The class collects utility functions for creating DQM histograms: prepared for PXD, SVD, VXD and Track DQM histograms. More...

#include <DQMCommonUtils.h>

Static Public Member Functions

static int SetFlag (int Type, int bin, const double *pars, double ratio, TH1F *hist, TH1F *refhist, TH1I *flaghist)
 Function return flag histogram filled based on condition from TH1F source. More...
 
static int SetFlag (int Type, int bin, const double *pars, double ratio, TH1I *hist, TH1I *refhist, TH1I *flaghist)
 Function return flag histogram filled based on condition from TH1I source. More...
 
static void CreateDBHisto (TH1F *HistoBD)
 Function for filling of TH1F histogram to database. More...
 
static void CreateDBHisto (TH1I *HistoBD)
 Function for filling of TH1I histogram to database. More...
 
static void CreateDBHistoGroup (TH1F **HistoBD, int number)
 Function for filling of group of TH1F histogram to database. More...
 
static void CreateDBHistoGroup (TH1I **HistoBD, int number)
 Function for filling of group of TH1I histogram to database. More...
 
static int LoadDBHisto (TH1F *HistoBD)
 Function for loading of TH1F histogram from database. More...
 
static int LoadDBHisto (TH1I *HistoBD)
 Function for loading of TH1I histogram from database. More...
 
static int LoadDBHistoGroup (TH1F **HistoBD, int number)
 Function for loading of group of TH1F histogram from database. More...
 
static int LoadDBHistoGroup (TH1I **HistoBD, int number)
 Function for loading of group of TH1I histogram from database. More...
 

Detailed Description

The class collects utility functions for creating DQM histograms: prepared for PXD, SVD, VXD and Track DQM histograms.

Definition at line 32 of file DQMCommonUtils.h.

Member Function Documentation

◆ CreateDBHisto() [1/2]

void CreateDBHisto ( TH1F *  HistoBD)
static

Function for filling of TH1F histogram to database.

Parameters
HistoBDHistogram for DB.

Definition at line 163 of file DQMCommonUtils.cc.

164 {
165  IntervalOfValidity iov(0, 0, -1, -1);
166  TString Name = Form("%s_Ref", HistoDB->GetName());
167  DBImportObjPtr<TVectorD> DBHisto(Name.Data());
168  DBHisto.construct(HistoDB->GetNbinsX() + 3);
169  double* Content = new double[HistoDB->GetNbinsX() + 3];
170  Content[0] = HistoDB->GetNbinsX();
171  Content[1] = HistoDB->GetXaxis()->GetXmin();
172  Content[2] = HistoDB->GetXaxis()->GetXmax();
173  for (int i = 0; i < HistoDB->GetNbinsX(); i++) {
174  Content[i + 3] = HistoDB->GetBinContent(i + 1);
175  }
176  DBHisto->SetElements(Content);
177  DBHisto.import(iov);
178  delete [] Content;
179 }

◆ CreateDBHisto() [2/2]

void CreateDBHisto ( TH1I *  HistoBD)
static

Function for filling of TH1I histogram to database.

Parameters
HistoBDHistogram for DB.

Definition at line 182 of file DQMCommonUtils.cc.

◆ CreateDBHistoGroup() [1/2]

void CreateDBHistoGroup ( TH1F **  HistoBD,
int  number 
)
static

Function for filling of group of TH1F histogram to database.

Parameters
HistoBDHistogram for DB.
NumberNumber of histograms to glue to one.

Definition at line 201 of file DQMCommonUtils.cc.

◆ CreateDBHistoGroup() [2/2]

void CreateDBHistoGroup ( TH1I **  HistoBD,
int  number 
)
static

Function for filling of group of TH1I histogram to database.

Parameters
HistoBDHistogram for DB.
NumberNumber of histograms to glue to one.

Definition at line 222 of file DQMCommonUtils.cc.

◆ LoadDBHisto() [1/2]

int LoadDBHisto ( TH1F *  HistoBD)
static

Function for loading of TH1F histogram from database.

Parameters
HistoBDHistogram for DB.
Returns
Indication of succes of realizing of condition, 1: OK.

Definition at line 243 of file DQMCommonUtils.cc.

◆ LoadDBHisto() [2/2]

int LoadDBHisto ( TH1I *  HistoBD)
static

Function for loading of TH1I histogram from database.

Parameters
HistoBDHistogram for DB.
Returns
Indication of succes of realizing of condition, 1: OK.

Definition at line 266 of file DQMCommonUtils.cc.

◆ LoadDBHistoGroup() [1/2]

int LoadDBHistoGroup ( TH1F **  HistoBD,
int  number 
)
static

Function for loading of group of TH1F histogram from database.

Parameters
HistoBDHistogram for DB.
NumberNumber of histograms to extract from DB.
Returns
Indication of succes of realizing of condition, 1: OK.

Definition at line 289 of file DQMCommonUtils.cc.

◆ LoadDBHistoGroup() [2/2]

int LoadDBHistoGroup ( TH1I **  HistoBD,
int  number 
)
static

Function for loading of group of TH1I histogram from database.

Parameters
HistoBDHistogram for DB.
NumberNumber of histograms to extract from DB.
Returns
Indication of succes of realizing of condition, 1: OK.

Definition at line 312 of file DQMCommonUtils.cc.

◆ SetFlag() [1/2]

int SetFlag ( int  Type,
int  bin,
const double *  pars,
double  ratio,
TH1F *  hist,
TH1F *  refhist,
TH1I *  flaghist 
)
static

Function return flag histogram filled based on condition from TH1F source.

Flag values: -3: nonexisting Type -2: histogram is missing or masked -1: less than 100 samles, skip comparition 0: good much with reference 1: warning level = diff > 6 * sigma and < error level 2: error level = diff > 10 * sigma

Parameters
TypeSet type of condition for flag calculation. 1: use counts, mean and RMS. 2: use counts only. 3: use mean only. 4: use RMS only. 5: use counts and mean. 9: use bin content only. 10: use Chi2 condition and pars[0] and pars[1]. 100: nothing do just fill flags as OK.
binbin which is fill in flag histogram.
parsarray of parameters need for condition.
ratioRatio of acquired events to reference events.
histHistogram of sources.
refhistReference histogram.
flagHistogram of flags.
Returns
Indication of succes of realizing of condition, 1: OK.

Definition at line 23 of file DQMCommonUtils.cc.

◆ SetFlag() [2/2]

int SetFlag ( int  Type,
int  bin,
const double *  pars,
double  ratio,
TH1I *  hist,
TH1I *  refhist,
TH1I *  flaghist 
)
static

Function return flag histogram filled based on condition from TH1I source.

Flag values: -3: nonexisting Type -2: histogram is missing or masked -1: less than 100 samles, skip comparition 0: good much with reference 1: warning level = diff > 6 * sigma and < error level 2: error level = diff > 10 * sigma

Parameters
TypeSet type of condition for flag calculation. 1: use counts, mean and RMS. 2: use counts only. 3: use mean only. 4: use RMS only. 5: use counts and mean. 9: use bin content only. 10: use Chi2 condition and pars[0] and pars[1]. 100: nothing do just fill flags as OK.
binbin which is fill in flag histogram.
parsarray of parameters need for condition.
ratioRatio of acquired events to reference events.
histHistogram of sources.
refhistReference histogram.
flagHistogram of flags.
Returns
Indication of succes of realizing of condition, 1: OK.

Definition at line 147 of file DQMCommonUtils.cc.


The documentation for this class was generated from the following files:
Belle2::IntervalOfValidity
A class that describes the interval of experiments/runs for which an object in the database is valid.
Definition: IntervalOfValidity.h:35
Belle2::DBImportObjPtr
Class for importing a single object to the database.
Definition: DBImportObjPtr.h:33