Skip to content

Commit

Permalink
code-format and fix skeletons (cms-sw#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
waredjeb authored and AuroraPerego committed Apr 11, 2024
1 parent 06605aa commit 3c01931
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 166 deletions.
14 changes: 8 additions & 6 deletions RecoHGCal/TICL/plugins/TracksterLinkingPassthrough.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@

using namespace ticl;

void TracksterLinkingPassthrough::linkTracksters(const Inputs& input, std::vector<Trackster>& resultTracksters,
std::vector<std::vector<unsigned int>>& linkedResultTracksters,
std::vector<std::vector<unsigned int>>& linkedTracksterIdToInputTracksterId) {
void TracksterLinkingPassthrough::linkTracksters(
const Inputs& input,
std::vector<Trackster>& resultTracksters,
std::vector<std::vector<unsigned int>>& linkedResultTracksters,
std::vector<std::vector<unsigned int>>& linkedTracksterIdToInputTracksterId) {
resultTracksters.reserve(input.tracksters.size());
linkedResultTracksters.resize(input.tracksters.size());
linkedTracksterIdToInputTracksterId.resize(input.tracksters.size());
// Merge all trackster collections into a single collection
for (size_t i = 0; i < input.tracksters.size(); ++i) {
resultTracksters.push_back(input.tracksters[i]);
linkedResultTracksters[i].push_back(resultTracksters.size() - 1);
linkedTracksterIdToInputTracksterId[i].push_back(resultTracksters.size() - 1);
resultTracksters.push_back(input.tracksters[i]);
linkedResultTracksters[i].push_back(resultTracksters.size() - 1);
linkedTracksterIdToInputTracksterId[i].push_back(resultTracksters.size() - 1);
}
}
11 changes: 3 additions & 8 deletions RecoHGCal/TICL/plugins/TracksterLinkingPassthrough.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,26 @@
#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h"
#include "RecoHGCal/TICL/interface/TracksterLinkingAlgoBase.h"


namespace ticl {

class TracksterLinkingPassthrough : public TracksterLinkingAlgoBase {
public:
TracksterLinkingPassthrough(const edm::ParameterSet& conf, edm::ConsumesCollector iC)
: TracksterLinkingAlgoBase(conf, iC) {

}
: TracksterLinkingAlgoBase(conf, iC) {}

~TracksterLinkingPassthrough() override {}

void linkTracksters(const Inputs& input,
std::vector<Trackster>& resultTracksters,
std::vector<std::vector<unsigned int>>& linkedResultTracksters,
std::vector<std::vector<unsigned int>>& linkedTracksterIdToInputTracksterId) override;

void initialize(const HGCalDDDConstants* hgcons,
const hgcal::RecHitTools rhtools,
const edm::ESHandle<MagneticField> bfieldH,
const edm::ESHandle<Propagator> propH) override{};

static void fillPSetDescription(edm::ParameterSetDescription& iDesc) {
iDesc.add<int>("algo_verbosity", 0);
}
static void fillPSetDescription(edm::ParameterSetDescription& iDesc) { iDesc.add<int>("algo_verbosity", 0); }
};

} // namespace ticl
Expand Down
Loading

0 comments on commit 3c01931

Please sign in to comment.