Skip to content

Commit

Permalink
Clang formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
aferrero2707 committed Sep 22, 2024
1 parent ddb350d commit 3b31948
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions Modules/Common/src/ObjectComparatorBinByBinDeviation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@ Quality ObjectComparatorBinByBinDeviation::compare(TObject* object, TObject* ref
auto* histogram = std::get<0>(checkResult);
auto* referenceHistogram = std::get<1>(checkResult);

int binRangeX[2] = { 1, histogram->GetXaxis()->GetNbins()};
if( getXRange().has_value()) {
int binRangeX[2] = { 1, histogram->GetXaxis()->GetNbins() };
if (getXRange().has_value()) {
binRangeX[0] = histogram->GetXaxis()->FindBin(getXRange()->first);
binRangeX[1] = histogram->GetXaxis()->FindBin(getXRange()->second);
}

int binRangeY[2] = { 1, histogram->GetYaxis()->GetNbins()};
if( getYRange().has_value()) {
int binRangeY[2] = { 1, histogram->GetYaxis()->GetNbins() };
if (getYRange().has_value()) {
binRangeY[0] = histogram->GetYaxis()->FindBin(getYRange()->first);
binRangeY[1] = histogram->GetYaxis()->FindBin(getYRange()->second);
}

int binRangeZ[2] = { 1, histogram->GetZaxis()->GetNbins()};
int binRangeZ[2] = { 1, histogram->GetZaxis()->GetNbins() };

// compute the average relative deviation between the bins
double averageDeviation = 0;
Expand Down
4 changes: 2 additions & 2 deletions Modules/Common/src/ObjectComparatorChi2.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Quality ObjectComparatorChi2::compare(TObject* object, TObject* referenceObject,
// if X and/or Y ranges are specified, set the appropriate bin range in the corresponding axis
// to restrict the histogram area where the test is applied
const double epsilon = 1.0e-6;
if( getXRange().has_value()) {
if (getXRange().has_value()) {
int binMin = histogram->GetXaxis()->FindBin(getXRange()->first);
// subtract a small amount to the upper edge to avoid getting the next bin
int binMax = histogram->GetXaxis()->FindBin(getXRange()->second - epsilon);
Expand All @@ -49,7 +49,7 @@ Quality ObjectComparatorChi2::compare(TObject* object, TObject* referenceObject,
referenceHistogram->GetXaxis()->SetRange(binMin, binMax);
}

if( getYRange().has_value()) {
if (getYRange().has_value()) {
int binMin = histogram->GetYaxis()->FindBin(getYRange()->first);
// subtract a small amount to the upper edge to avoid getting the next bin
int binMax = histogram->GetYaxis()->FindBin(getYRange()->second - epsilon);
Expand Down
10 changes: 5 additions & 5 deletions Modules/Common/src/ObjectComparatorDeviation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,17 @@ Quality ObjectComparatorDeviation::compare(TObject* object, TObject* referenceOb
auto* referenceHistogram = std::get<1>(checkResult);

const double epsilon = 1.0e-6;
int binRangeX[2] = { 1, histogram->GetXaxis()->GetNbins()};
int binRangeY[2] = { 1, histogram->GetYaxis()->GetNbins()};
int binRangeZ[2] = { 1, histogram->GetZaxis()->GetNbins()};
int binRangeX[2] = { 1, histogram->GetXaxis()->GetNbins() };
int binRangeY[2] = { 1, histogram->GetYaxis()->GetNbins() };
int binRangeZ[2] = { 1, histogram->GetZaxis()->GetNbins() };

if( getXRange().has_value()) {
if (getXRange().has_value()) {
binRangeX[0] = histogram->GetXaxis()->FindBin(getXRange()->first);
// subtract a small amount to the upper edge to avoid getting the next bin
binRangeX[1] = histogram->GetXaxis()->FindBin(getXRange()->second - epsilon);
}

if( getYRange().has_value()) {
if (getYRange().has_value()) {
binRangeY[0] = histogram->GetYaxis()->FindBin(getYRange()->first);
// subtract a small amount to the upper edge to avoid getting the next bin
binRangeY[1] = histogram->GetYaxis()->FindBin(getYRange()->second - epsilon);
Expand Down
2 changes: 1 addition & 1 deletion Modules/Common/src/ReferenceComparatorCheck.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ void ReferenceComparatorCheck::drawHorizontalRange(const std::string& moName, TC
// draw an horizontal double arrow marking the X-axis range
double xMin = ratioPlot->GetXaxis()->GetBinLowEdge(ratioPlot->GetXaxis()->FindBin(rangeX->first));
double xMax = ratioPlot->GetXaxis()->GetBinUpEdge(ratioPlot->GetXaxis()->FindBin(rangeX->second - 1.0e-6));
auto arrow = new TArrow(xMin,1.8,xMax,1.8,0.015,"<|>");
auto arrow = new TArrow(xMin, 1.8, xMax, 1.8, 0.015, "<|>");
arrow->SetLineColor(getQualityColor(quality));
arrow->SetFillColor(getQualityColor(quality));
ratioPlot->GetListOfFunctions()->Add(arrow);
Expand Down

0 comments on commit 3b31948

Please sign in to comment.