Skip to content

Commit 4e754c5

Browse files
author
Sunanda Banerjee
committed
Code check
1 parent c07289d commit 4e754c5

File tree

2 files changed

+22
-16
lines changed

2 files changed

+22
-16
lines changed

Geometry/ForwardCommonData/plugins/DDRPDPosition.cc

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "DetectorDescription/Core/interface/DDTypes.h"
2020
#include "DetectorDescription/Core/interface/DDutils.h"
2121

22-
#define EDM_ML_DEBUG
22+
//#define EDM_ML_DEBUG
2323

2424
class DDRPDPosition : public DDAlgorithm {
2525
public:
@@ -35,27 +35,29 @@ class DDRPDPosition : public DDAlgorithm {
3535
void execute(DDCompactView& cpv) override;
3636

3737
private:
38-
std::vector<double> xpos_; //Positions along x-axis
39-
double ypos_; //Position along y-axis
40-
double zpos_; //Position along z-axis
41-
std::string childName_; //Children name
38+
std::vector<double> xpos_; //Positions along x-axis
39+
double ypos_; //Position along y-axis
40+
double zpos_; //Position along z-axis
41+
std::string childName_; //Children name
4242
};
4343

4444
DDRPDPosition::DDRPDPosition() { edm::LogVerbatim("ForwardGeom") << "DDRPDPosition test: Creating an instance"; }
4545

4646
void DDRPDPosition::initialize(const DDNumericArguments& nArgs,
47-
const DDVectorArguments& vArgs,
48-
const DDMapArguments&,
49-
const DDStringArguments& sArgs,
50-
const DDStringVectorArguments&) {
47+
const DDVectorArguments& vArgs,
48+
const DDMapArguments&,
49+
const DDStringArguments& sArgs,
50+
const DDStringVectorArguments&) {
5151
xpos_ = vArgs["positionX"];
5252
ypos_ = nArgs["positionY"];
5353
zpos_ = nArgs["positionZ"];
5454
childName_ = sArgs["ChildName"];
5555
#ifdef EDM_ML_DEBUG
56-
edm::LogVerbatim("ForwardGeom") << "DDRPDPosition: Parameters for positioning-- " << xpos_.size() << " copies of " << childName_ << " to be positioned inside " << parent().name() << " at y = " << ypos_ << ", z = " << zpos_ << " and at x = (";
56+
edm::LogVerbatim("ForwardGeom") << "DDRPDPosition: Parameters for positioning-- " << xpos_.size() << " copies of "
57+
<< childName_ << " to be positioned inside " << parent().name() << " at y = " << ypos_
58+
<< ", z = " << zpos_ << " and at x = (";
5759
std::ostringstream st1;
58-
for (const auto & x : xpos_)
60+
for (const auto& x : xpos_)
5961
st1 << x << " ";
6062
edm::LogVerbatim("ForwardGeom") << st1.str() << ")";
6163
#endif
@@ -71,7 +73,8 @@ void DDRPDPosition::execute(DDCompactView& cpv) {
7173

7274
cpv.position(child, parentName, jj + 1, tran, rot);
7375
#ifdef EDM_ML_DEBUG
74-
edm::LogVerbatim("ForwardGeom") << "DDRPDPosition: " << child << " number " << jj + 1 << " positioned in " << parentName << " at " << tran << " with no rotation";
76+
edm::LogVerbatim("ForwardGeom") << "DDRPDPosition: " << child << " number " << jj + 1 << " positioned in "
77+
<< parentName << " at " << tran << " with no rotation";
7578
#endif
7679
}
7780
}

Geometry/ForwardCommonData/plugins/dd4hep/DDRPDPosition.cc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <vector>
99
#include <sstream>
1010

11-
#define EDM_ML_DEBUG
11+
//#define EDM_ML_DEBUG
1212

1313
static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext& ctxt, xml_h e) {
1414
cms::DDNamespace ns(ctxt, e, true);
@@ -22,9 +22,11 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext
2222
dd4hep::Volume parent = ns.volume(args.parentName());
2323
dd4hep::Volume child = ns.volume(ns.prepend(childName));
2424
#ifdef EDM_ML_DEBUG
25-
edm::LogVerbatim("ForwardGeom") << "DDRPDPosition: Parameters for positioning-- " << xpos.size() << " copies of " << child.name() << " to be positioned inside " << parent.name() << " at y = " << ypos << ", z = " << zpos << " and at x = (";
25+
edm::LogVerbatim("ForwardGeom") << "DDRPDPosition: Parameters for positioning-- " << xpos.size() << " copies of "
26+
<< child.name() << " to be positioned inside " << parent.name() << " at y = " << ypos
27+
<< ", z = " << zpos << " and at x = (";
2628
std::ostringstream st1;
27-
for (const auto & x : xpos)
29+
for (const auto& x : xpos)
2830
st1 << x << " ";
2931
edm::LogVerbatim("ForwardGeom") << st1.str() << ")";
3032
#endif
@@ -33,7 +35,8 @@ static long algorithm(dd4hep::Detector& /* description */, cms::DDParsingContext
3335
dd4hep::Position tran(xpos[jj], ypos, zpos);
3436
parent.placeVolume(child, jj + 1, tran);
3537
#ifdef EDM_ML_DEBUG
36-
edm::LogVerbatim("ForwardGeom") << "DDRPDPosition: " << child.name() << " number " << jj + 1 << " positioned in " << parent.name() << " at " << tran << " with no rotation";
38+
edm::LogVerbatim("ForwardGeom") << "DDRPDPosition: " << child.name() << " number " << jj + 1 << " positioned in "
39+
<< parent.name() << " at " << tran << " with no rotation";
3740
#endif
3841
}
3942
return cms::s_executed;

0 commit comments

Comments
 (0)