BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnCalorimeterDetQa.h
Go to the documentation of this file.
1#include "BmnQaHistoManager.h"
2
3#include <BmnOfflineQaSteering.h>
4#include <TH1F.h>
5#include <TNamed.h>
6
7#ifndef BMNCALORIMDETQA_H
8#define BMNCALORIMDETQA_H 1
9
10using namespace std;
11
12class BmnCalorimeterDetQa : public TNamed
13{
14 public:
15 /** Default constructor **/
18
19 /** Destructor **/
21
22 // Setters
23
24 // Getters
25
27
28 private:
31
32 void CommonInfo(TString detName)
33 {
34 vector<TString> names = {Form("%s_1d, Distribution of iX", detName.Data()),
35 Form("%s_1d, Distribution of iY", detName.Data()),
36 Form("%s_1d, Distribution of X", detName.Data()),
37 Form("%s_1d, Distribution of Y", detName.Data()),
38 Form("%s_1d, Distribution of channels", detName.Data()),
39 Form("%s_1d, Distribution of amplitudes", detName.Data())};
40
41 vector<TString> titles = {Form("%s, Distribution of iX", detName.Data()),
42 Form("%s, Distribution of iY", detName.Data()),
43 Form("%s, Distribution of X", detName.Data()),
44 Form("%s, Distribution of Y", detName.Data()),
45 Form("%s, Distribution of channels", detName.Data()),
46 Form("%s, Distribution of amplitudes", detName.Data())};
47
48 if (names.size() != titles.size())
49 Fatal("BmnCalorimeterDetQa::CommonInfo()", "Sizes do not coincide!!!");
50
51 for (size_t iHisto = 0; iHisto < names.size(); iHisto++) {
52 Int_t nBins = fSteering->GetAxisAttributes(names[iHisto])[0];
53 Double_t xLow = fSteering->GetAxisAttributes(names[iHisto])[1];
54 Double_t xUp = fSteering->GetAxisAttributes(names[iHisto])[2];
55 fHistoManager->Create1<TH1F>(names[iHisto], titles[iHisto], nBins, xLow, xUp);
56 }
57 }
58
60};
61
62#endif
int Int_t
double Double_t
#define ClassDef(name, id)
char * Form(const char *fmt,...)
BmnQaHistoManager * fHistoManager
BmnQaHistoManager * GetManager()
virtual ~BmnCalorimeterDetQa()
Destructor.
BmnCalorimeterDetQa()
Default constructor.
void CommonInfo(TString detName)
BmnCalorimeterDetQa(TString, UInt_t)
BmnOfflineQaSteering * fSteering
virtual void Fatal(const char *method, const char *msgfmt,...) const
const char * Data() const
Definition json.hpp:4446