Skip to content

Commit 2373242

Browse files
authored
Clang tidy on Trigger, TrigScint, Tools, SimCore, Recon, Packing, Hcal, Ecal, DQM (#1827)
1 parent 612fd98 commit 2373242

File tree

173 files changed

+3220
-3180
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

173 files changed

+3220
-3180
lines changed

DQM/include/DQM/VisiblesCutflow.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class VisiblesCutflow : public framework::Analyzer {
2626
void analyze(const framework::Event& event) override;
2727

2828
private:
29-
std::unique_ptr<ldmx::Ort::ONNXRuntime> rt_;
29+
std::unique_ptr<ldmx::ort::ONNXRuntime> rt_;
3030
double bdt_cut_val_{0.};
3131
std::string feature_list_name_;
3232

DQM/src/DQM/EcalClusterAnalyzer.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ void EcalClusterAnalyzer::analyze(const framework::Event& event) {
126126
// for each contrib in this simhit
127127
const auto& contrib = it->getContrib(i);
128128
// get origin electron ID
129-
ancestor = contrib.originID;
129+
ancestor = contrib.origin_id_;
130130
// store energy from this contrib at index = origin electron ID
131-
if (ancestor <= nbr_of_electrons) edep[ancestor] += contrib.edep;
131+
if (ancestor <= nbr_of_electrons) edep[ancestor] += contrib.edep_;
132132
if (!tagged && i != 0 && prev_ancestor != ancestor) {
133133
// if origin electron ID does not match previous origin electron ID
134134
// this hit has contributions from several electrons, ie mixed case

DQM/src/DQM/EcalDigiVerifier.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ void EcalDigiVerifier::analyze(const framework::Event &event) {
149149
num_mod_with_more_than_2hits);
150150

151151
if (total_rec_energy > 6000.) {
152-
setStorageHint(framework::hint_should_keep);
152+
setStorageHint(framework::HINT_SHOULD_KEEP);
153153
} else {
154-
setStorageHint(framework::hint_should_drop);
154+
setStorageHint(framework::HINT_SHOULD_DROP);
155155
}
156156

157157
return;

DQM/src/DQM/HCalRawDigi.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void HCalRawDigi::analyze(const framework::Event& event) {
3535
for (unsigned int i_sample{0}; i_sample < digis.getNumSamplesPerDigi();
3636
i_sample++) {
3737
histograms_.fill("adc_by_channel_sample" + std::to_string(i_sample),
38-
i_digi, digi.at(i_sample).adc_t());
38+
i_digi, digi.at(i_sample).adcT());
3939
}
4040
i_digi++;
4141
}

DQM/src/DQM/HgcrocPulseTruthAnalyzer.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void HgcrocPulseTruthAnalyzer::analyze(const framework::Event& event) {
2828
if (d.isADC()) {
2929
int sum_adc = 0;
3030
for (int i = 0; i < d.size(); i++) {
31-
sum_adc += d.at(i).adc_t();
31+
sum_adc += d.at(i).adcT();
3232
}
3333
histograms_.fill("vpeak_sumADC", vpeak, sum_adc);
3434
} else {

DQM/src/DQM/NtuplizeHgcrocDigiCollection.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ void NtuplizeHgcrocDigiCollection::analyze(const framework::Event& event) {
145145
tot_comp_ = d.at(i_sample_).isTOTComplete();
146146
tot_ = d.at(i_sample_).tot();
147147
toa_ = d.at(i_sample_).toa();
148-
int adc_t = d.at(i_sample_).adc_t();
148+
int adc_t = d.at(i_sample_).adcT();
149149
raw_adc_ = adc_t;
150150
adc_ = adc_t - pedestal_table.get(d.id(), 0);
151151
flat_tree_->Fill();

DQM/src/DQM/PhotoNuclearDQM.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,12 @@ void PhotoNuclearDQM::analyze(const framework::Event &event) {
234234
}
235235

236236
// Get the recoil electron
237-
auto [trackID, recoil] = Analysis::getRecoil(particle_map);
237+
auto [trackID, recoil] = analysis::getRecoil(particle_map);
238238
findRecoilProperties(recoil);
239239

240240
// Use the recoil electron to retrieve the gamma that underwent a
241241
// photo-nuclear reaction.
242-
auto pn_gamma{Analysis::getPNGamma(particle_map, recoil, 2500.)};
242+
auto pn_gamma{analysis::getPNGamma(particle_map, recoil, 2500.)};
243243
if (pn_gamma == nullptr) {
244244
ldmx_log(warn) << "PN Daughter is lost, skipping";
245245
return;

DQM/src/DQM/SimObjects.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,9 +198,9 @@ void SimObjects::analyze(const framework::Event& event) {
198198
histograms_.fill(pt.name() + ".n_contribs", n_contribs);
199199
for (unsigned int i_contrib{0}; i_contrib < n_contribs; i_contrib++) {
200200
ldmx::SimCalorimeterHit::Contrib contrib{hit.getContrib(i_contrib)};
201-
histograms_.fill(pt.name() + ".incidents", contrib.incidentID);
202-
histograms_.fill(pt.name() + ".tracks", contrib.trackID);
203-
histograms_.fill(pt.name() + ".pdg", contrib.pdgCode);
201+
histograms_.fill(pt.name() + ".incidents", contrib.incident_id_);
202+
histograms_.fill(pt.name() + ".tracks", contrib.track_id_);
203+
histograms_.fill(pt.name() + ".pdg", contrib.pdg_code_);
204204
}
205205

206206
histograms_.fill(pt.name() + ".edep", hit.getEdep());

DQM/src/DQM/VisiblesCutflow.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
namespace dqm {
2323

2424
void VisiblesCutflow::configure(framework::config::Parameters &parameters) {
25-
rt_ = std::make_unique<ldmx::Ort::ONNXRuntime>(
25+
rt_ = std::make_unique<ldmx::ort::ONNXRuntime>(
2626
parameters.get<std::string>("bdt_file"));
2727
feature_list_name_ = parameters.get<std::string>("feature_list_name");
2828
bdt_cut_val_ = parameters.get<double>("disc_cut");
@@ -367,7 +367,7 @@ void VisiblesCutflow::analyze(const framework::Event &event) {
367367
bdt_features.push_back(hcal_energy);
368368
bdt_features.push_back(r_mean_from_photon_track);
369369

370-
ldmx::Ort::FloatArrays inputs({bdt_features});
370+
ldmx::ort::FloatArrays inputs({bdt_features});
371371
float pred =
372372
rt_->run({feature_list_name_}, inputs, {"probabilities"})[0].at(1);
373373

Ecal/include/Ecal/EcalPnetVetoProcessor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class EcalPnetVetoProcessor : public framework::Producer {
7373

7474
float disc_cut_ = -99;
7575
std::vector<std::vector<float>> data_;
76-
std::unique_ptr<ldmx::Ort::ONNXRuntime> rt_;
76+
std::unique_ptr<ldmx::ort::ONNXRuntime> rt_;
7777

7878
/** Name of the collection which will containt the results. */
7979
std::string collection_name_{"EcalPnetVeto"};

0 commit comments

Comments
 (0)