Skip to content

Commit 22302d0

Browse files
authored
FIT PostProc: Canvas for multiple rate drawing is turned off (#1696)
* FIT PostProc: bugfix for canvas * FIT PostProc: Canvas for rates is turned off * Clang format
1 parent e61c6ab commit 22302d0

3 files changed

Lines changed: 56 additions & 47 deletions

File tree

Modules/FIT/FDD/src/PostProcTask.cxx

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ void PostProcTask::initialize(Trigger, framework::ServiceRegistryRef services)
108108
mRateVertex = std::make_unique<TGraph>(0);
109109
mRateCentral = std::make_unique<TGraph>(0);
110110
mRateSemiCentral = std::make_unique<TGraph>(0);
111-
mRatesCanv = std::make_unique<TCanvas>("cRates", "trigger rates");
111+
// mRatesCanv = std::make_unique<TCanvas>("cRates", "trigger rates");
112112
mAmpl = new TProfile("MeanAmplPerChannel", "mean ampl per channel;Channel;Ampl #mu #pm #sigma", sNCHANNELS_PM, 0, sNCHANNELS_PM);
113113
mTime = new TProfile("MeanTimePerChannel", "mean time per channel;Channel;Time #mu #pm #sigma", sNCHANNELS_PM, 0, sNCHANNELS_PM);
114114

@@ -195,7 +195,7 @@ void PostProcTask::initialize(Trigger, framework::ServiceRegistryRef services)
195195
getObjectsManager()->startPublishing(mRateVertex.get());
196196
getObjectsManager()->startPublishing(mRateCentral.get());
197197
getObjectsManager()->startPublishing(mRateSemiCentral.get());
198-
getObjectsManager()->startPublishing(mRatesCanv.get());
198+
// getObjectsManager()->startPublishing(mRatesCanv.get());
199199
getObjectsManager()->startPublishing(mAmpl);
200200
getObjectsManager()->startPublishing(mTime);
201201

@@ -280,26 +280,29 @@ void PostProcTask::update(Trigger t, framework::ServiceRegistryRef)
280280
mRateCentral->SetPoint(n, n, getBinContent2Ddiag(hTrgCorr, "Central") / cycleDurationMS);
281281
mRateSemiCentral->SetPoint(n, n, getBinContent2Ddiag(hTrgCorr, "SemiCentral") / cycleDurationMS);
282282
}
283-
284-
mRatesCanv->cd();
285-
float vmin = std::min({ mRateOrA->GetYaxis()->GetXmin(), mRateOrC->GetYaxis()->GetXmin(), mRateVertex->GetYaxis()->GetXmin(), mRateCentral->GetYaxis()->GetXmin(), mRateSemiCentral->GetYaxis()->GetXmin() });
286-
float vmax = std::max({ mRateOrA->GetYaxis()->GetXmax(), mRateOrC->GetYaxis()->GetXmax(), mRateVertex->GetYaxis()->GetXmax(), mRateCentral->GetYaxis()->GetXmax(), mRateSemiCentral->GetYaxis()->GetXmax() });
287-
288-
auto hAxis = mRateOrA->GetHistogram();
289-
hAxis->GetYaxis()->SetTitleOffset(1.4);
290-
hAxis->SetMinimum(vmin);
291-
hAxis->SetMaximum(vmax * 1.1);
292-
hAxis->SetTitle("FDD trigger rates");
293-
hAxis->SetLineWidth(0);
294-
hAxis->Draw("AXIS");
295-
296-
mRateOrA->Draw("PL,SAME");
297-
mRateOrC->Draw("PL,SAME");
298-
mRateVertex->Draw("PL,SAME");
299-
mRateCentral->Draw("PL,SAME");
300-
mRateSemiCentral->Draw("PL,SAME");
301-
TLegend* leg = gPad->BuildLegend();
302-
leg->SetFillStyle(1);
283+
/*
284+
mRatesCanv->cd();
285+
float vmin = std::min({ mRateOrA->GetYaxis()->GetXmin(), mRateOrC->GetYaxis()->GetXmin(), mRateVertex->GetYaxis()->GetXmin(), mRateCentral->GetYaxis()->GetXmin(), mRateSemiCentral->GetYaxis()->GetXmin() });
286+
float vmax = std::max({ mRateOrA->GetYaxis()->GetXmax(), mRateOrC->GetYaxis()->GetXmax(), mRateVertex->GetYaxis()->GetXmax(), mRateCentral->GetYaxis()->GetXmax(), mRateSemiCentral->GetYaxis()->GetXmax() });
287+
288+
auto hAxis = mRateOrA->GetHistogram();
289+
hAxis->GetYaxis()->SetTitleOffset(1.4);
290+
hAxis->SetMinimum(vmin);
291+
hAxis->SetMaximum(vmax * 1.1);
292+
hAxis->SetTitle("FDD trigger rates");
293+
hAxis->SetLineWidth(0);
294+
hAxis->Draw("AXIS");
295+
296+
mRateOrA->Draw("PL,SAME");
297+
mRateOrC->Draw("PL,SAME");
298+
mRateVertex->Draw("PL,SAME");
299+
mRateCentral->Draw("PL,SAME");
300+
mRateSemiCentral->Draw("PL,SAME");
301+
TLegend* leg = gPad->BuildLegend();
302+
leg->SetFillStyle(1);
303+
mRatesCanv->Modified();
304+
mRatesCanv->Update();
305+
*/
303306
}
304307

305308
auto mo3 = mDatabase->retrieveMO(mPathDigitQcTask, "AmpPerChannel", t.timestamp, t.activity);

Modules/FIT/FT0/src/PostProcTask.cxx

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ void PostProcTask::initialize(Trigger, framework::ServiceRegistryRef services)
108108
mRateVertex = std::make_unique<TGraph>(0);
109109
mRateCentral = std::make_unique<TGraph>(0);
110110
mRateSemiCentral = std::make_unique<TGraph>(0);
111-
mRatesCanv = std::make_unique<TCanvas>("cRates", "trigger rates");
111+
// mRatesCanv = std::make_unique<TCanvas>("cRates", "trigger rates");
112112
mAmpl = new TProfile("MeanAmplPerChannel", "mean ampl per channel;Channel;Ampl #mu #pm #sigma", o2::ft0::Constants::sNCHANNELS_PM, 0, o2::ft0::Constants::sNCHANNELS_PM);
113113
mTime = new TProfile("MeanTimePerChannel", "mean time per channel;Channel;Time #mu #pm #sigma", o2::ft0::Constants::sNCHANNELS_PM, 0, o2::ft0::Constants::sNCHANNELS_PM);
114114

@@ -195,7 +195,7 @@ void PostProcTask::initialize(Trigger, framework::ServiceRegistryRef services)
195195
getObjectsManager()->startPublishing(mRateVertex.get());
196196
getObjectsManager()->startPublishing(mRateCentral.get());
197197
getObjectsManager()->startPublishing(mRateSemiCentral.get());
198-
getObjectsManager()->startPublishing(mRatesCanv.get());
198+
// getObjectsManager()->startPublishing(mRatesCanv.get());
199199
getObjectsManager()->startPublishing(mAmpl);
200200
getObjectsManager()->startPublishing(mTime);
201201

@@ -280,26 +280,29 @@ void PostProcTask::update(Trigger t, framework::ServiceRegistryRef)
280280
mRateCentral->SetPoint(n, n, getBinContent2Ddiag(hTrgCorr, "Central") / cycleDurationMS);
281281
mRateSemiCentral->SetPoint(n, n, getBinContent2Ddiag(hTrgCorr, "SemiCentral") / cycleDurationMS);
282282
}
283-
284-
mRatesCanv->cd();
285-
float vmin = std::min({ mRateOrA->GetYaxis()->GetXmin(), mRateOrC->GetYaxis()->GetXmin(), mRateVertex->GetYaxis()->GetXmin(), mRateCentral->GetYaxis()->GetXmin(), mRateSemiCentral->GetYaxis()->GetXmin() });
286-
float vmax = std::max({ mRateOrA->GetYaxis()->GetXmax(), mRateOrC->GetYaxis()->GetXmax(), mRateVertex->GetYaxis()->GetXmax(), mRateCentral->GetYaxis()->GetXmax(), mRateSemiCentral->GetYaxis()->GetXmax() });
287-
288-
auto hAxis = mRateOrA->GetHistogram();
289-
hAxis->GetYaxis()->SetTitleOffset(1.4);
290-
hAxis->SetMinimum(vmin);
291-
hAxis->SetMaximum(vmax * 1.1);
292-
hAxis->SetTitle("FT0 trigger rates");
293-
hAxis->SetLineWidth(0);
294-
hAxis->Draw("AXIS");
295-
296-
mRateOrA->Draw("PL,SAME");
297-
mRateOrC->Draw("PL,SAME");
298-
mRateVertex->Draw("PL,SAME");
299-
mRateCentral->Draw("PL,SAME");
300-
mRateSemiCentral->Draw("PL,SAME");
301-
TLegend* leg = gPad->BuildLegend();
302-
leg->SetFillStyle(1);
283+
/*
284+
mRatesCanv->cd();
285+
float vmin = std::min({ mRateOrA->GetYaxis()->GetXmin(), mRateOrC->GetYaxis()->GetXmin(), mRateVertex->GetYaxis()->GetXmin(), mRateCentral->GetYaxis()->GetXmin(), mRateSemiCentral->GetYaxis()->GetXmin() });
286+
float vmax = std::max({ mRateOrA->GetYaxis()->GetXmax(), mRateOrC->GetYaxis()->GetXmax(), mRateVertex->GetYaxis()->GetXmax(), mRateCentral->GetYaxis()->GetXmax(), mRateSemiCentral->GetYaxis()->GetXmax() });
287+
288+
auto hAxis = mRateOrA->GetHistogram();
289+
hAxis->GetYaxis()->SetTitleOffset(1.4);
290+
hAxis->SetMinimum(vmin);
291+
hAxis->SetMaximum(vmax * 1.1);
292+
hAxis->SetTitle("FT0 trigger rates");
293+
hAxis->SetLineWidth(0);
294+
hAxis->Draw("AXIS");
295+
296+
mRateOrA->Draw("PL,SAME");
297+
mRateOrC->Draw("PL,SAME");
298+
mRateVertex->Draw("PL,SAME");
299+
mRateCentral->Draw("PL,SAME");
300+
mRateSemiCentral->Draw("PL,SAME");
301+
TLegend* leg = gPad->BuildLegend();
302+
leg->SetFillStyle(1);
303+
mRatesCanv->Modified();
304+
mRatesCanv->Update();
305+
*/
303306
}
304307

305308
auto mo3 = mDatabase->retrieveMO(mPathDigitQcTask, "AmpPerChannel", t.timestamp, t.activity);

Modules/FIT/FV0/src/PostProcTask.cxx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ void PostProcTask::initialize(Trigger, framework::ServiceRegistryRef services)
108108
mRateOrAin = std::make_unique<TGraph>(0);
109109
mRateTrgCharge = std::make_unique<TGraph>(0);
110110
mRateTrgNchan = std::make_unique<TGraph>(0);
111-
mRatesCanv = std::make_unique<TCanvas>("cRates", "trigger rates");
111+
// mRatesCanv = std::make_unique<TCanvas>("cRates", "trigger rates");
112112
mAmpl = new TProfile("MeanAmplPerChannel", "mean ampl per channel;Channel;Ampl #mu #pm #sigma", sNCHANNELS_FV0_PLUSREF, 0, sNCHANNELS_FV0_PLUSREF);
113113
mTime = new TProfile("MeanTimePerChannel", "mean time per channel;Channel;Time #mu #pm #sigma", sNCHANNELS_FV0_PLUSREF, 0, sNCHANNELS_FV0_PLUSREF);
114114

@@ -195,7 +195,7 @@ void PostProcTask::initialize(Trigger, framework::ServiceRegistryRef services)
195195
getObjectsManager()->startPublishing(mRateOrAin.get());
196196
getObjectsManager()->startPublishing(mRateTrgCharge.get());
197197
getObjectsManager()->startPublishing(mRateTrgNchan.get());
198-
getObjectsManager()->startPublishing(mRatesCanv.get());
198+
// getObjectsManager()->startPublishing(mRatesCanv.get());
199199
getObjectsManager()->startPublishing(mAmpl);
200200
getObjectsManager()->startPublishing(mTime);
201201

@@ -280,7 +280,7 @@ void PostProcTask::update(Trigger t, framework::ServiceRegistryRef)
280280
mRateTrgCharge->SetPoint(n, n, getBinContent2Ddiag(hTrgCorr, "TrgCharge") / cycleDurationMS);
281281
mRateTrgNchan->SetPoint(n, n, getBinContent2Ddiag(hTrgCorr, "TrgNChan") / cycleDurationMS);
282282
}
283-
283+
/*
284284
mRatesCanv->cd();
285285
float vmin = std::min({ mRateOrA->GetYaxis()->GetXmin(), mRateOrAout->GetYaxis()->GetXmin(), mRateOrAin->GetYaxis()->GetXmin(), mRateTrgCharge->GetYaxis()->GetXmin(), mRateTrgNchan->GetYaxis()->GetXmin() });
286286
float vmax = std::max({ mRateOrA->GetYaxis()->GetXmax(), mRateOrAout->GetYaxis()->GetXmax(), mRateOrAin->GetYaxis()->GetXmax(), mRateTrgCharge->GetYaxis()->GetXmax(), mRateTrgNchan->GetYaxis()->GetXmax() });
@@ -300,6 +300,9 @@ void PostProcTask::update(Trigger t, framework::ServiceRegistryRef)
300300
mRateTrgNchan->Draw("PL,SAME");
301301
TLegend* leg = gPad->BuildLegend();
302302
leg->SetFillStyle(1);
303+
mRatesCanv->Modified();
304+
mRatesCanv->Update();
305+
*/
303306
}
304307

305308
auto mo3 = mDatabase->retrieveMO(mPathDigitQcTask, "AmpPerChannel", t.timestamp, t.activity);

0 commit comments

Comments
 (0)