Skip to content

Commit

Permalink
Remove the totalRepeat variables
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcarcell committed Dec 7, 2023
1 parent ccf88bc commit 73d2063
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 12 deletions.
4 changes: 1 addition & 3 deletions detector/calorimeter/ECalBarrel_o2_v01_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
string det_type = x_det.typeStr();
Material air = theDetector.air();
double totalThickness = layering.totalThickness();
// These are used later but clang complains
int totalRepeat [[maybe_unused]] = 0;
// Used later but clang complains without the [[maybe_unused]] attribute
int totalSlices [[maybe_unused]] = 0;
double gap = xml_dim_t(x_det).gap();
int nsides = dim.numsides();
Expand Down Expand Up @@ -112,7 +111,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
for (xml_coll_t c(x_det, _U(layer)); c; ++c) {
xml_comp_t x_layer = c;
int repeat = x_layer.repeat();
totalRepeat += repeat;
totalSlices += x_layer.numChildren(_U(slice));
}

Expand Down
4 changes: 1 addition & 3 deletions detector/calorimeter/GenericCalBarrel_o1_v01_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
string det_type = x_det.typeStr();
Material air = theDetector.air();
double totalThickness = layering.totalThickness();
// These are used later but clang complains
int totalRepeat [[maybe_unused]] = 0;
// Used later but clang complains without the [[maybe_unused]] attribute
int totalSlices [[maybe_unused]] = 0;
double gap = xml_dim_t(x_det).gap();
int nsides = dim.numsides();
Expand Down Expand Up @@ -115,7 +114,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
for (xml_coll_t c(x_det, _U(layer)); c; ++c) {
xml_comp_t x_layer = c;
int repeat = x_layer.repeat();
totalRepeat += repeat;
totalSlices += x_layer.numChildren(_U(slice));
}

Expand Down
3 changes: 1 addition & 2 deletions detector/calorimeter/HCalBarrel_o1_v01_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
string det_type = x_det.typeStr();
Material air = theDetector.air();
double totalThickness = layering.totalThickness();
int totalRepeat [[maybe_unused]] = 0;
// Used later but clang complains without the [[maybe_unused]] attribute
int totalSlices [[maybe_unused]] = 0;
double gap = xml_dim_t(x_det).gap();
int nsides = dim.numsides();
Expand Down Expand Up @@ -110,7 +110,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
for (xml_coll_t c(x_det, _U(layer)); c; ++c) {
xml_comp_t x_layer = c;
int repeat = x_layer.repeat();
totalRepeat += repeat;
totalSlices += x_layer.numChildren(_U(slice));
}

Expand Down
3 changes: 1 addition & 2 deletions detector/calorimeter/SteppedMuonBarrel_o2_v02_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
string det_type = x_det.typeStr();
Material air = theDetector.air();
double totalThickness = layering.totalThickness();
int totalRepeat [[maybe_unused]] = 0;
// Used later but clang complains without the [[maybe_unused]] attribute
int totalSlices [[maybe_unused]] = 0;
double gap = xml_dim_t(x_det).gap();
int nsides = dim.numsides();
Expand Down Expand Up @@ -96,7 +96,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
for (xml_coll_t c(x_det, _U(layer)); c; ++c) {
xml_comp_t x_layer = c;
int repeat = x_layer.repeat();
totalRepeat += repeat;
totalSlices += x_layer.numChildren(_U(slice));
}

Expand Down
3 changes: 1 addition & 2 deletions detector/calorimeter/YokeBarrel_o1_v01_geo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
string det_type = x_det.typeStr();
Material air = theDetector.air();
double totalThickness = layering.totalThickness();
int totalRepeat [[maybe_unused]] = 0;
// Used later but clang complains without the [[maybe_unused]] attribute
int totalSlices [[maybe_unused]] = 0;
double gap = xml_dim_t(x_det).gap();
int numSides = dim.numsides();
Expand Down Expand Up @@ -102,7 +102,6 @@ static Ref_t create_detector(Detector& theDetector, xml_h e, SensitiveDetector s
for (xml_coll_t c(x_det, _U(layer)); c; ++c) {
xml_comp_t x_layer = c;
int repeat = x_layer.repeat();
totalRepeat += repeat;
totalSlices += x_layer.numChildren(_U(slice));
}

Expand Down

0 comments on commit 73d2063

Please sign in to comment.