21#include "FairParamList.h"
29 : FairParGenericSet(name, title, context)
34 for (Int_t p = 0; p < fNumPmts; p++)
36 fTrigmap[p].resize(fNumPlanes);
38 for (Int_t plane = 0; plane < fNumPlanes; plane++)
39 for (Int_t p = 0; p < fNumPmts; p++)
41 fTrigmap[p][plane] =
new TArrayI(fNumPaddles);
42 for (Int_t paddle = 0; paddle < fNumPaddles; paddle++)
43 fTrigmap[p][plane]->AddAt(0, paddle);
51 for (Int_t plane = 0; plane < fNumPlanes; plane++)
52 for (Int_t p = 0; p < fNumPmts; p++)
54 if (fTrigmap[p][plane])
55 delete fTrigmap[p][plane];
72 R3BLOG(fatal,
"FairParamList not found");
75 list->add(
"neulandPlanesPar", fNumPlanes);
76 list->add(
"neulandPaddlesPar", fNumPaddles);
78 R3BLOG(info,
"Nb of planes: " << fNumPlanes);
79 R3BLOG(info,
"Nb of paddles: " << fNumPaddles);
81 for (Int_t p = 0; p < fNumPmts; p++)
83 fTrigmap[p].resize(fNumPlanes);
86 for (Int_t plane = 0; plane < fNumPlanes; plane++)
87 for (Int_t p = 0; p < fNumPmts; p++)
89 fTrigmap[p][plane]->Set(fNumPaddles);
90 sprintf(name,
"neulandplane%dPmt%dPar", plane + 1, p + 1);
91 list->add(name, *fTrigmap[p][plane]);
101 R3BLOG(fatal,
"FairParamList not found");
104 if (!list->fill(
"neulandPlanesPar", &fNumPlanes))
106 R3BLOG(info,
"Could not initialize neulandPlanesPar");
109 if (!list->fill(
"neulandPaddlesPar", &fNumPaddles))
111 R3BLOG(info,
"Could not initialize neulandPaddlesPar");
115 for (Int_t p = 0; p < fNumPmts; p++)
117 fTrigmap[p].resize(fNumPlanes);
120 for (Int_t plane = 0; plane < fNumPlanes; plane++)
121 for (Int_t p = 0; p < fNumPmts; p++)
123 fTrigmap[p][plane]->Set(fNumPaddles);
124 sprintf(name,
"neulandplane%dPmt%dPar", plane + 1, p + 1);
126 if (!(list->fill(name, fTrigmap[p][plane])))
128 R3BLOG(error,
"Could not initialize " << name);
142 R3BLOG(info,
"Mapping params for Neuland: Num of planes: " << fNumPlanes <<
" and paddles: " << fNumPaddles);
144 for (Int_t plane = 0; plane < fNumPlanes; plane++)
145 for (Int_t p = 0; p < fNumPmts; p++)
146 for (Int_t paddle = 0; paddle < fNumPaddles; paddle++)
149 "Plane: " << plane + 1 <<
", pmt: " << p + 1 <<
", paddle: " << paddle + 1
150 <<
", value: " << fTrigmap[p][plane]->GetAt(paddle));
#define R3BLOG(severity, x)
ClassImp(R3BNeulandMappingPar)
virtual ~R3BNeulandMappingPar()
Destructor.
virtual void putParams(FairParamList *list)
Store all parameters using FairRuntimeDB.
Bool_t getParams(FairParamList *list)
Retrieve all parameters using FairRuntimeDB.
virtual void print()
Print values of parameters to the standard output.
virtual void clear()
Reset all parameters.
R3BNeulandMappingPar(const TString &name="neulandMappingPar", const TString &title="Neuland Mapping parameters", const TString &context="neulandMappingContext")
Standard constructor.