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