Skip to content

Commit 8cf6b07

Browse files
committed
Apply patches
1 parent 9b3c3bb commit 8cf6b07

File tree

4 files changed

+38
-31
lines changed

4 files changed

+38
-31
lines changed

Geometry/Records/interface/VeryForwardMisalignedGeometryRecord.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
class VeryForwardMisalignedGeometryRecord
2626
: public edm::eventsetup::DependentRecordImplementation<
2727
VeryForwardMisalignedGeometryRecord,
28-
edm::mpl::Vector<VeryForwardIdealGeometryRecord, IdealGeometryRecord, RPMisalignedAlignmentRecord /*, ... */> > {};
28+
edm::mpl::Vector<VeryForwardIdealGeometryRecord, IdealGeometryRecord, RPMisalignedAlignmentRecord /*, ... */> > {
29+
};
2930

3031
#endif

Geometry/Records/interface/VeryForwardRealGeometryRecord.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
* \ingroup TotemRPGeometry
2222
* \brief Event setup record containing the real (actual) geometry information.
2323
**/
24-
class VeryForwardRealGeometryRecord : public edm::eventsetup::DependentRecordImplementation<
25-
VeryForwardRealGeometryRecord,
26-
edm::mpl::Vector<VeryForwardIdealGeometryRecord, IdealGeometryRecord, RPRealAlignmentRecord /*, ... */> > {};
24+
class VeryForwardRealGeometryRecord
25+
: public edm::eventsetup::DependentRecordImplementation<
26+
VeryForwardRealGeometryRecord,
27+
edm::mpl::Vector<VeryForwardIdealGeometryRecord, IdealGeometryRecord, RPRealAlignmentRecord /*, ... */> > {};
2728

2829
#endif

Geometry/VeryForwardGeometryBuilder/plugins/CTPPSGeometryESModule.cc

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ class CTPPSGeometryESModule : public edm::ESProducer {
7070
std::unique_ptr<DetGeomDesc> produceMisalignedGDFromPreprocessedDB(const VeryForwardMisalignedGeometryRecord&);
7171
std::unique_ptr<CTPPSGeometry> produceMisalignedTG(const VeryForwardMisalignedGeometryRecord&);
7272

73-
template <typename REC , typename GEO>
73+
template <typename REC, typename GEO>
7474
std::unique_ptr<DetGeomDesc> produceGD(const GEO&,
7575
const std::optional<REC>&,
76-
edm::ESGetToken<DetGeomDesc,GEO> const&,
77-
edm::ESGetToken<CTPPSRPAlignmentCorrectionsData,REC> const&,
76+
edm::ESGetToken<DetGeomDesc, GEO> const&,
77+
edm::ESGetToken<CTPPSRPAlignmentCorrectionsData, REC> const&,
7878
const char* name);
7979

8080
const unsigned int verbosity_;
@@ -108,7 +108,8 @@ CTPPSGeometryESModule::CTPPSGeometryESModule(const edm::ParameterSet& iConfig)
108108
realAlignmentToken_ = c1.consumesFrom<CTPPSRPAlignmentCorrectionsData, RPRealAlignmentRecord>(edm::ESInputTag());
109109

110110
auto c2 = setWhatProduced(this, &CTPPSGeometryESModule::produceMisalignedGDFromPreprocessedDB);
111-
misAlignmentToken_ = c2.consumesFrom<CTPPSRPAlignmentCorrectionsData, RPMisalignedAlignmentRecord>(edm::ESInputTag());
111+
misAlignmentToken_ =
112+
c2.consumesFrom<CTPPSRPAlignmentCorrectionsData, RPMisalignedAlignmentRecord>(edm::ESInputTag());
112113
} else if (!fromDD4hep_) {
113114
auto c = setWhatProduced(this, &CTPPSGeometryESModule::produceIdealGD);
114115
ddToken_ = c.consumes<DDCompactView>(edm::ESInputTag("", iConfig.getParameter<std::string>("compactViewTag")));
@@ -118,7 +119,8 @@ CTPPSGeometryESModule::CTPPSGeometryESModule(const edm::ParameterSet& iConfig)
118119
realAlignmentToken_ = c1.consumesFrom<CTPPSRPAlignmentCorrectionsData, RPRealAlignmentRecord>(edm::ESInputTag());
119120

120121
auto c2 = setWhatProduced(this, &CTPPSGeometryESModule::produceMisalignedGD);
121-
misAlignmentToken_ = c2.consumesFrom<CTPPSRPAlignmentCorrectionsData, RPMisalignedAlignmentRecord>(edm::ESInputTag());
122+
misAlignmentToken_ =
123+
c2.consumesFrom<CTPPSRPAlignmentCorrectionsData, RPMisalignedAlignmentRecord>(edm::ESInputTag());
122124
} else {
123125
auto c = setWhatProduced(this, &CTPPSGeometryESModule::produceIdealGD);
124126
dd4hepToken_ =
@@ -129,12 +131,13 @@ CTPPSGeometryESModule::CTPPSGeometryESModule(const edm::ParameterSet& iConfig)
129131
realAlignmentToken_ = c1.consumesFrom<CTPPSRPAlignmentCorrectionsData, RPRealAlignmentRecord>(edm::ESInputTag());
130132

131133
auto c2 = setWhatProduced(this, &CTPPSGeometryESModule::produceMisalignedGD);
132-
misAlignmentToken_ = c2.consumesFrom<CTPPSRPAlignmentCorrectionsData, RPMisalignedAlignmentRecord>(edm::ESInputTag());
134+
misAlignmentToken_ =
135+
c2.consumesFrom<CTPPSRPAlignmentCorrectionsData, RPMisalignedAlignmentRecord>(edm::ESInputTag());
133136
}
134137

135138
auto c_RTG = setWhatProduced(this, &CTPPSGeometryESModule::produceRealTG);
136139
dgdRealToken_ = c_RTG.consumes<DetGeomDesc>(edm::ESInputTag());
137-
140+
138141
auto c_MTG = setWhatProduced(this, &CTPPSGeometryESModule::produceMisalignedTG);
139142
dgdMisToken_ = c_MTG.consumes<DetGeomDesc>(edm::ESInputTag());
140143
}
@@ -168,25 +171,25 @@ std::unique_ptr<DetGeomDesc> CTPPSGeometryESModule::produceIdealGD(const IdealGe
168171
}
169172
}
170173

171-
std::unique_ptr<DetGeomDesc> CTPPSGeometryESModule::produceIdealGDFromPreprocessedDB(const VeryForwardIdealGeometryRecord& iRecord) {
172-
173-
// Get the PDetGeomDesc from EventSetup
174-
auto const& myDB = iRecord.get(dbToken_);
175-
176-
edm::LogInfo("CTPPSGeometryESModule") << " myDB size = " << myDB.container_.size();
174+
std::unique_ptr<DetGeomDesc> CTPPSGeometryESModule::produceIdealGDFromPreprocessedDB(
175+
const VeryForwardIdealGeometryRecord& iRecord) {
176+
// Get the PDetGeomDesc from EventSetup
177+
auto const& myDB = iRecord.get(dbToken_);
177178

178-
// Build geo from PDetGeomDesc DB object.
179-
auto pdet = std::make_unique<DetGeomDesc>(myDB);
180-
return pdet;
179+
edm::LogInfo("CTPPSGeometryESModule") << " myDB size = " << myDB.container_.size();
181180

181+
// Build geo from PDetGeomDesc DB object.
182+
auto pdet = std::make_unique<DetGeomDesc>(myDB);
183+
return pdet;
182184
}
183185

184-
template <typename REC , typename GEO>
185-
std::unique_ptr<DetGeomDesc> CTPPSGeometryESModule::produceGD(GEO const& iIdealRec,
186-
std::optional<REC> const& iAlignRec,
187-
edm::ESGetToken<DetGeomDesc,GEO> const& iGDToken,
188-
edm::ESGetToken<CTPPSRPAlignmentCorrectionsData,REC> const& iAlignToken,
189-
const char* name) {
186+
template <typename REC, typename GEO>
187+
std::unique_ptr<DetGeomDesc> CTPPSGeometryESModule::produceGD(
188+
GEO const& iIdealRec,
189+
std::optional<REC> const& iAlignRec,
190+
edm::ESGetToken<DetGeomDesc, GEO> const& iGDToken,
191+
edm::ESGetToken<CTPPSRPAlignmentCorrectionsData, REC> const& iAlignToken,
192+
const char* name) {
190193
// get the input GeometricalDet
191194
auto const& idealGD = iIdealRec.get(iGDToken);
192195

@@ -211,7 +214,8 @@ std::unique_ptr<DetGeomDesc> CTPPSGeometryESModule::produceGD(GEO const& iIdealR
211214
return CTPPSGeometryESCommon::applyAlignments(idealGD, alignments);
212215
}
213216

214-
std::unique_ptr<DetGeomDesc> CTPPSGeometryESModule::produceRealGDFromPreprocessedDB(const VeryForwardRealGeometryRecord& iRecord) {
217+
std::unique_ptr<DetGeomDesc> CTPPSGeometryESModule::produceRealGDFromPreprocessedDB(
218+
const VeryForwardRealGeometryRecord& iRecord) {
215219
return produceGD(iRecord.getRecord<VeryForwardIdealGeometryRecord>(),
216220
iRecord.tryToGetRecord<RPRealAlignmentRecord>(),
217221
idealDBGDToken_,

Geometry/VeryForwardGeometryBuilder/src/DetGeomDesc.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,18 @@ DetGeomDesc::DetGeomDesc(const PDetGeomDesc::Item& item)
9090
RotationMatrix rot(item.axx_, item.axy_, item.axz_, item.ayx_, item.ayy_, item.ayz_, item.azx_, item.azy_, item.azz_);
9191
m_rot = rot;
9292
// Set the m_isABox flag for the box shaped sensors, so that m_params are properly set
93-
if( (m_name == DDD_CTPPS_PIXELS_SENSOR_NAME || m_name == DDD_CTPPS_PIXELS_SENSOR_NAME_2x2 ||
93+
if ((m_name == DDD_CTPPS_PIXELS_SENSOR_NAME || m_name == DDD_CTPPS_PIXELS_SENSOR_NAME_2x2 ||
9494
m_name == DDD_CTPPS_DIAMONDS_SEGMENT_NAME || m_name == DDD_CTPPS_UFSD_SEGMENT_NAME ||
95-
m_name.substr(0,7) == DDD_TOTEM_TIMING_SENSOR_TMPL.substr(0,7)) && m_params.size()>2 )
95+
m_name.substr(0, 7) == DDD_TOTEM_TIMING_SENSOR_TMPL.substr(0, 7)) &&
96+
m_params.size() > 2)
9697
m_isABox = true;
9798
else
9899
m_isABox = false;
99100
m_diamondBoxParams = computeDiamondDimensions(m_isABox, m_isDD4hep, m_params);
100101
}
101102

102103
DetGeomDesc::DetGeomDesc(const PDetGeomDesc& pd) {
103-
for (auto i : pd.container_) {
104+
for (const auto& i : pd.container_) {
104105
DetGeomDesc* gd = new DetGeomDesc(i);
105106
this->addComponent(gd);
106107
}
@@ -153,7 +154,7 @@ void DetGeomDesc::deepDeleteComponents() {
153154
}
154155

155156
std::string DetGeomDesc::computeNameWithNoNamespace(std::string_view nameFromView) const {
156-
const auto& semiColonPos = nameFromView.find(":");
157+
const auto& semiColonPos = nameFromView.find(':');
157158
const std::string name{(semiColonPos != std::string::npos ? nameFromView.substr(semiColonPos + 1) : nameFromView)};
158159
return name;
159160
}

0 commit comments

Comments
 (0)