BmnRoot
Loading...
Searching...
No Matches
BmnTrigDetQa.h
Go to the documentation of this file.
1#include <TNamed.h>
2#include <TH1F.h>
3#include <TClonesArray.h>
4#include "BmnQaHistoManager.h"
5
7
8#ifndef BMNTRIGDETQA_H
9#define BMNTRIGDETQA_H 1
10
11using namespace std;
12
13class BmnTrigDetQa : public TNamed {
14public:
15
18 };
19 BmnTrigDetQa(vector <TString>, UInt_t);
20 BmnTrigDetQa(map <TClonesArray*, TString>, UInt_t);
21
23 virtual ~BmnTrigDetQa() {
24 };
25
26 // Setters
27
28 // Getters
29
31 return fHistoManager;
32 }
33
34private:
35 BmnOfflineQaSteering* fSteering;
36 BmnQaHistoManager* fHistoManager;
37
38 void CommonInfo(TString detName, TString prefix) {
39 vector <TString> names = {
40 Form("%sTRIGGERS_1d, %s, Distribution of inn. channels", prefix.Data(), detName.Data()),
41 Form("%sTRIGGERS_1d, %s, Distribution of times", prefix.Data(), detName.Data()),
42 Form("%sTRIGGERS_1d, %s, Distribution of amplitudes", prefix.Data(), detName.Data())
43 };
44
45 vector <TString> titles = {
46 Form("%s, Distribution of inn. channels", detName.Data()),
47 Form("%s, Distribution of times", detName.Data()),
48 Form("%s, Distribution of amplitudes", detName.Data())
49 };
50
51 if (names.size() != titles.size())
52 Fatal("BmnTrigDetQa::CommonInfo()", "Sizes do not coincide!!!");
53
54 for (size_t iHisto = 0; iHisto < names.size(); iHisto++)
55 {
56 Int_t nBins = fSteering->GetAxisAttributes(names[iHisto])[0];
57 Double_t xLow = fSteering->GetAxisAttributes(names[iHisto])[1];
58 Double_t xUp = fSteering->GetAxisAttributes(names[iHisto])[2];
59 fHistoManager->Create1 <TH1F> (names[iHisto], titles[iHisto], nBins, xLow, xUp);
60 }
61 }
62
63 ClassDef(BmnTrigDetQa, 1);
64
65};
66
67#endif
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)
BmnQaHistoManager * GetManager()
virtual ~BmnTrigDetQa()
const std::map< int, std::string > names
STL namespace.