17 hFiberBadStatus_(nullptr),
24 hOrbitNumberDiff_(nullptr),
25 hSLinkCRCErr_(nullptr) {
27 for (
int i = 0;
i < 2; ++
i)
28 for (
int j = 0;
j < 2; ++
j)
29 for (
int k = 0;
k < 40; ++
k)
30 for (
int m = 0;
m < 40; ++
m) {
36 for (
int i = 0;
i < 56; ++
i) {
40 for (
int j = 0;
j < 36; ++
j)
44 for (
int i = 0;
i < 2; ++
i)
45 for (
int j = 0;
j < 2; ++
j) {
52 int nLines,
z, iz, ip, ix, iy, fed, kchip, pace, bundle, fiber, optorx;
53 ifstream
file(lutPath);
59 file >> iz >> ip >> ix >> iy >> fed >> kchip >> pace >> bundle >> fiber >> optorx;
61 z = (iz == -1) ? 2 : iz;
62 fed_[z - 1][ip - 1][ix - 1][iy - 1] = fed;
63 kchip_[z - 1][ip - 1][ix - 1][iy - 1] = kchip;
64 fiber_[z - 1][ip - 1][ix - 1][iy - 1] = (fiber - 1) + (optorx - 1) * 12;
69 cout <<
"ESIntegrityClient : Look up table file can not be found in " << lutPath << endl;
80 for (
int i = 0;
i < 2; ++
i)
81 for (
int j = 0;
j < 2; ++
j) {
82 int iz = (
i == 0) ? 1 : -1;
83 snprintf(histo, 200,
"ES Integrity Summary 1 Z %d P %d", iz,
j + 1);
84 meFED_[
i][
j] = _ibooker.
book2D(histo, histo, 40, 0.5, 40.5, 40, 0.5, 40.5);
88 snprintf(histo, 200,
"ES Integrity Summary 2 Z %d P %d", iz,
j + 1);
89 meKCHIP_[
i][
j] = _ibooker.
book2D(histo, histo, 40, 0.5, 40.5, 40, 0.5, 40.5);
96 double nDI_FedErr[56];
97 for (
int i = 0;
i < 56; ++
i)
102 me = _igetter.
get(
prefixME_ +
"/ESIntegrityTask/ES FEDs used for data taking");
105 me = _igetter.
get(
prefixME_ +
"/ESIntegrityTask/ES Fiber Off");
108 me = _igetter.
get(
prefixME_ +
"/ESIntegrityTask/ES Fiber Bad Status");
111 me = _igetter.
get(
prefixME_ +
"/ESIntegrityTask/ES SLink CRC Errors");
117 for (
int i = 1;
i <= 56; ++
i)
118 if (nevFEDs < hFED_->GetBinContent(
i))
119 nevFEDs = (int)
hFED_->GetBinContent(
i);
123 for (
int i = 1;
i <= 56; ++
i) {
125 if (
hFED_->GetBinContent(
i) > 0)
132 for (
int j = 0;
j < 36; ++
j) {
147 me = _igetter.
get(
prefixME_ +
"/ESRawDataTask/ES L1A DCC errors");
150 me = _igetter.
get(
prefixME_ +
"/ESRawDataTask/ES BX DCC errors");
153 me = _igetter.
get(
prefixME_ +
"/ESRawDataTask/ES Orbit Number DCC errors");
156 for (
int i = 1;
i <= 56; ++
i) {
160 if (
hL1ADiff_->GetBinContent(
i) > nDI_FedErr[
i - 1])
162 if (
hBXDiff_->GetBinContent(
i) > nDI_FedErr[
i - 1])
163 nDI_FedErr[
i - 1] =
hBXDiff_->GetBinContent(
i);
170 me = _igetter.
get(
prefixME_ +
"/ESIntegrityTask/ES KChip Flag 1 Error codes");
173 me = _igetter.
get(
prefixME_ +
"/ESIntegrityTask/ES KChip Flag 2 Error codes");
176 me = _igetter.
get(
prefixME_ +
"/ESIntegrityTask/ES KChip BC mismatch with OptoRX");
179 me = _igetter.
get(
prefixME_ +
"/ESIntegrityTask/ES KChip EC mismatch with OptoRX");
182 Int_t kchip_xval[1550];
183 for (
int i = 0;
i < 1550; ++
i) {
186 for (
int j = 1;
j < 16; ++
j) {
188 if (
hKF1_->GetBinContent(
i,
j + 1) > 0) {
194 if (
hKF2_->GetBinContent(
i,
j + 1) > 0) {
201 if (
hKBC_->GetBinContent(
i) > 0) {
207 if (
hKEC_->GetBinContent(
i) > 0) {
214 kchip_xval[
i] = xval;
218 for (
int iz = 0; iz < 2; ++iz)
219 for (
int ip = 0; ip < 2; ++ip)
220 for (
int ix = 0; ix < 40; ++ix)
221 for (
int iy = 0; iy < 40; ++iy) {
222 if (
fed_[iz][ip][ix][iy] == -1)
226 kchip_xval[
kchip_[iz][ip][ix][iy] - 1] = 0;
227 if ((kchip_[iz][ip][ix][iy] - 2) >= 0)
228 meKCHIP_[iz][ip]->setBinContent(ix + 1, iy + 1, kchip_xval[kchip_[iz][ip][ix][iy] - 2]);
233 for (
int iz = 0; iz < 2; ++iz)
234 for (
int ip = 0; ip < 2; ++ip)
235 for (
int ix = 0; ix < 40; ++ix)
236 for (
int iy = 0; iy < 40; ++iy) {
237 if (
fed_[iz][ip][ix][iy] == -1)
243 if (
hFED_->GetBinContent(
fed_[iz][ip][ix][iy] - 520 + 1) == nevFEDs)
258 if (kchip_xval[
kchip_[iz][ip][ix][iy] - 1] != 3 && kchip_xval[
kchip_[iz][ip][ix][iy] - 1] != 0) {
MonitorElement * meFED_[2][2]
T getUntrackedParameter(std::string const &, T const &) const
~ESIntegrityClient() override
Destructor.
virtual void setCurrentFolder(std::string const &fullpath)
virtual MonitorElement * get(std::string const &fullpath) const
MonitorElement * meKCHIP_[2][2]
void endLumiAnalyze(DQMStore::IGetter &) override
Analyze.
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
ESIntegrityClient(const edm::ParameterSet &ps)
Constructor.
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
T * getHisto(MonitorElement *, bool=false, T *=0) const
std::string fullPath() const
void book(DQMStore::IBooker &) override
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)