Skip to content

Commit a0616f4

Browse files
fix for code guidelines
1 parent df753bf commit a0616f4

File tree

4 files changed

+4
-53
lines changed

4 files changed

+4
-53
lines changed

Modules/ZDC/include/ZDC/ZDCRecBeautifyPlots.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
namespace o2::quality_control_modules::zdc
2323
{
2424

25-
/// \brief Example QC Check
25+
/// \brief ZDC Beautify for centroids plots
2626
/// \author Stefan Cristi Zugravel
2727
class ZDCRecBeautifyPlots : public o2::quality_control::checker::CheckInterface
2828
{

Modules/ZDC/src/ZDCRawDataCheck.cxx

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,6 @@ Quality ZDCRawDataCheck::check(std::map<std::string, std::shared_ptr<MonitorObje
5757
// For -> Histo to check
5858
for (int ih = 0; ih < (int)mVectHistoCheck.size(); ih++) {
5959
if (mo->getName() == mVectHistoCheck.at(ih).nameHisto) {
60-
// std::ofstream debugFile;
61-
// debugFile.open("debug.txt", std::ios::app);
62-
// if (debugFile.good()) {
63-
// debugFile << mo->getName() << " ";
64-
// debugFile << mVectHistoCheck.at(ih).nameHisto;
65-
// debugFile << " = ";
66-
// if (mo->getName() == mVectHistoCheck.at(ih).nameHisto) {
67-
// debugFile << " equal ";
68-
// }
69-
// else {
70-
// debugFile << " no equal ";
71-
// }
72-
// debugFile << "= \n";
73-
// debugFile.close();
74-
// }
7560
if ((mo->getName() == "hpedSummary")) {
7661
mVectHistoCheck.at(ih).numE = 0;
7762
mVectHistoCheck.at(ih).numW = 0;
@@ -211,15 +196,6 @@ Quality ZDCRawDataCheck::check(std::map<std::string, std::shared_ptr<MonitorObje
211196
if (!std::equal(std::begin(ratio_array), std::end(ratio_array), std::begin(COMPARATOR_ARRAY))) {
212197
mVectHistoCheck.at(ih).numE += 1;
213198
mVectHistoCheck.at(ih).stringE = mVectHistoCheck.at(ih).stringE + mVectHistoCheck.at(ih).paramch.at(x).ch + " ";
214-
// std::ofstream debugFile;
215-
// debugFile.open("debug.txt", std::ios::app);
216-
// if (debugFile.good()) {
217-
// debugFile << mVectHistoCheck.at(ih).numE << " ";
218-
// debugFile << mVectHistoCheck.at(ih).stringE << " ";
219-
// //debugFile << mVectHistoCheck.at(ih).paramch.at(x).ch << " ";
220-
// debugFile << "= \n";
221-
// debugFile.close();
222-
// }
223199
}
224200
}
225201
}
@@ -243,16 +219,13 @@ Quality ZDCRawDataCheck::check(std::map<std::string, std::shared_ptr<MonitorObje
243219
}
244220
}
245221
}
246-
// dumpStruct();
247222
return result;
248223
}
249224

250225
std::string ZDCRawDataCheck::getAcceptedType() { return "TH1"; }
251226

252227
void ZDCRawDataCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkResult)
253228
{
254-
// dumpStruct();
255-
256229
for (int ih = 0; ih < (int)mVectHistoCheck.size(); ih++) {
257230

258231
if (mo->getName() == mVectHistoCheck.at(ih).nameHisto) {
@@ -291,15 +264,6 @@ void ZDCRawDataCheck::beautify(std::shared_ptr<MonitorObject> mo, Quality checkR
291264
h->SetFillColor(kGreen);
292265
msg->Draw();
293266
} else if (mVectHistoCheck.at(ih).quality == 3) {
294-
// std::ofstream debugFile;
295-
// debugFile.open("debug.txt", std::ios::app);
296-
// if (debugFile.good()) {
297-
// debugFile << mVectHistoCheck.at(ih).numE << " ";
298-
// debugFile << mVectHistoCheck.at(ih).stringE << " ";
299-
// //debugFile << mVectHistoCheck.at(ih).paramch.at(x).ch << " ";
300-
// debugFile << "= \n";
301-
// debugFile.close();
302-
// }
303267
std::string errorSt = getCurrentDataTime() + " Errors --> Call the expert. " + mVectHistoCheck.at(ih).stringE;
304268
TLatex* msg = new TLatex(mVectHistoCheck.at(ih).posMsgX, mVectHistoCheck.at(ih).posMsgY, errorSt.c_str());
305269
msg->SetNDC();
@@ -397,7 +361,6 @@ void ZDCRawDataCheck::init(const Activity& activity)
397361
COMPARATOR_ARRAY[i] = false;
398362
}
399363
}
400-
// dumpStruct();
401364
}
402365

403366
void ZDCRawDataCheck::setChName(std::string channel)

Modules/ZDC/src/ZDCRecBeautifyPlots.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
///
1313
/// \file ZDCRecBeautifyPlots.cxx
14-
/// \author My Name
14+
/// \author Stefan Cristi Zugravel
1515
///
1616

1717
#include "ZDC/ZDCRecBeautifyPlots.h"

Modules/ZDC/src/ZDCRecDataTask.cxx

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -198,14 +198,12 @@ void ZDCRecDataTask::setBinHisto2D(int numBinX, double minBinX, double maxBinX,
198198
setMaxBinY(maxBinY);
199199
}
200200

201-
// Begin Stefan addition
202201
// CENTRAL_EVENT_CONFIG -> tdcLimit [ns] ; centraleventconfig [discrete value]
203202
void ZDCRecDataTask::SetConfigCentralEvent(float tdcLimit, int centraleventconfig)
204203
{
205204
settdcLimit(tdcLimit);
206205
setcentraleventconfigvalue(centraleventconfig);
207206
}
208-
// End Stefan addition
209207

210208
void ZDCRecDataTask::dumpHistoStructure()
211209
{
@@ -565,7 +563,6 @@ void ZDCRecDataTask::initHisto()
565563
addNewHisto("CENTR_ZNC", "h_CENTR_ZNC", "ZNC Centroid (cm)", "ADC", "CXZNC", "ADC", "CYZNC", 0);
566564
addNewHisto("CENTR_ZNC", "h_CENTR_ZNC_cut_ZEM", "ZNC Centroid (cm)", "ADC", "CXZNC", "ADC", "CYZNC", 0);
567565

568-
// Begin Stefan addition
569566
// Here we set the parameters for the configuration of the logic which selects the central events
570567
if (auto param = mCustomParameters.find("CENTRAL_EVENT_CONFIG"); param != mCustomParameters.end()) {
571568
ILOG(Debug, Devel) << "Custom parameter - CENTRAL_EVENT_CONFIG: " << param->second << ENDM;
@@ -574,7 +571,6 @@ void ZDCRecDataTask::initHisto()
574571
} else {
575572
SetConfigCentralEvent(0.0, 0);
576573
}
577-
// End Stefan addition
578574
}
579575

580576
bool ZDCRecDataTask::add1DHisto(std::string typeH, std::string name, std::string title, std::string typeCh1, std::string ch1, int bin)
@@ -621,12 +617,6 @@ bool ZDCRecDataTask::add2DHisto(std::string typeH, std::string name, std::string
621617
h2d.ch1 = ch1;
622618
h2d.typech2 = typeCh2;
623619
h2d.ch2 = ch2;
624-
// Begin Stefan addition
625-
if (typeH == "CENTR_ZNA") {
626-
// h2d.histo->GetXaxis()->SetTitle("test2");
627-
// h2d.histo->GetYaxis()->SetTitle("test2");
628-
}
629-
// End Stefan Addition
630620
int ih = (int)mHisto2D.size();
631621
mHisto2D.push_back(h2d);
632622
h2d.typeh.clear();
@@ -875,7 +865,7 @@ int ZDCRecDataTask::process(const gsl::span<const o2::zdc::BCRecData>& RecBC,
875865
mEv.centroidZNA(x, y);
876866
mHisto2D.at(i).histo->Fill(x, y);
877867
} else {
878-
if (IsEventCentral()) { // STEFAN
868+
if (IsEventCentral()) {
879869
mEv.centroidZNA(x, y);
880870
mHisto2D.at(i).histo->Fill(x, y);
881871
}
@@ -886,7 +876,7 @@ int ZDCRecDataTask::process(const gsl::span<const o2::zdc::BCRecData>& RecBC,
886876
mEv.centroidZNC(x, y);
887877
mHisto2D.at(i).histo->Fill(x, y);
888878
} else {
889-
if (IsEventCentral()) { // STEFAN
879+
if (IsEventCentral()) {
890880
mEv.centroidZNC(x, y);
891881
mHisto2D.at(i).histo->Fill(x, y);
892882
}
@@ -897,7 +887,6 @@ int ZDCRecDataTask::process(const gsl::span<const o2::zdc::BCRecData>& RecBC,
897887
return 0;
898888
}
899889

900-
// Begin Stefan addition
901890
bool ZDCRecDataTask::IsEventCentral()
902891
{
903892
if (fcentraleventconfigvalue == 1) {
@@ -911,7 +900,6 @@ bool ZDCRecDataTask::IsEventCentral()
911900
return false;
912901
}
913902
}
914-
// End Stefan addition
915903

916904
float ZDCRecDataTask::getADCRecValue(std::string typech, std::string ch)
917905
{

0 commit comments

Comments
 (0)