BmnRoot
Loading...
Searching...
No Matches
BmnCalorimeterDetQa.h
Go to the documentation of this file.
1#include <TNamed.h>
2#include <TH1F.h>
3#include "BmnQaHistoManager.h"
4
6
7#ifndef BMNCALORIMDETQA_H
8#define BMNCALORIMDETQA_H 1
9
10using namespace std;
11
12class BmnCalorimeterDetQa : public TNamed {
13public:
14
18 BmnCalorimeterDetQa(TString, UInt_t);
19
22 };
23
24 // Setters
25
26 // Getters
27
29 return fHistoManager;
30 }
31
32
33private:
34 BmnOfflineQaSteering* fSteering;
35 BmnQaHistoManager* fHistoManager;
36
37 void CommonInfo(TString detName) {
38 vector <TString> names = {
39 Form("%s_1d, Distribution of iX", detName.Data()),
40 Form("%s_1d, Distribution of iY", detName.Data()),
41 Form("%s_1d, Distribution of X", detName.Data()),
42 Form("%s_1d, Distribution of Y", detName.Data()),
43 Form("%s_1d, Distribution of channels", detName.Data()),
44 Form("%s_1d, Distribution of amplitudes", detName.Data())
45 };
46
47 vector <TString> titles = {
48 Form("%s, Distribution of iX", detName.Data()),
49 Form("%s, Distribution of iY", detName.Data()),
50 Form("%s, Distribution of X", detName.Data()),
51 Form("%s, Distribution of Y", detName.Data()),
52 Form("%s, Distribution of channels", detName.Data()),
53 Form("%s, Distribution of amplitudes", detName.Data())
54 };
55
56 if (names.size() != titles.size())
57 Fatal("BmnCalorimeterDetQa::CommonInfo()", "Sizes do not coincide!!!");
58
59 for (size_t iHisto = 0; iHisto < names.size(); iHisto++) {
60 Int_t nBins = fSteering->GetAxisAttributes(names[iHisto])[0];
61 Double_t xLow = fSteering->GetAxisAttributes(names[iHisto])[1];
62 Double_t xUp = fSteering->GetAxisAttributes(names[iHisto])[2];
63 fHistoManager->Create1 <TH1F> (names[iHisto], titles[iHisto], nBins, xLow, xUp);
64 }
65 }
66
67 ClassDef(BmnCalorimeterDetQa, 1);
68};
69
70#endif
BmnQaHistoManager * GetManager()
void Create1(const TString &name, const TString &title, Int_t nofBins, Double_t minBin, Double_t maxBin)
Helper function for creation of 1-dimensional histograms and profiles. Template argument is a real ob...
vector< Double_t > GetAxisAttributes(TString)
const std::map< int, std::string > names
STL namespace.