Skip to content

Commit 574e9aa

Browse files
committed
apply clang-format
1 parent ac66d94 commit 574e9aa

File tree

4 files changed

+24
-24
lines changed

4 files changed

+24
-24
lines changed

infra/Cuts.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void Cuts::AddCut(const SimpleCut& cut) {
8383
}
8484

8585
void Cuts::AddCuts(const std::vector<SimpleCut>& cuts) {
86-
for(auto& cut : cuts) {
86+
for (auto& cut : cuts) {
8787
AddCut(cut);
8888
}
8989
}

infra/Cuts.hpp

+17-17
Original file line numberDiff line numberDiff line change
@@ -52,23 +52,23 @@ class Cuts {
5252

5353
void AddCuts(const std::vector<SimpleCut>& cuts);
5454

55-
// // Base case for variadic recursion (handles when there's just one argument left)
56-
// template<typename T>
57-
// void AddCuts(const T& t) {
58-
// AddCuts(t); // Call the appropriate overload for a single argument (like std::vector<SimpleCut>)
59-
// }
60-
//
61-
// // Recursive case for variadic template (multiple arguments)
62-
// template<typename T, typename... Args>
63-
// void AddCuts(const T& t, const Args&... args) {
64-
// AddCuts(t);
65-
// AddCuts(args...);
66-
// }
67-
//
68-
// template<typename... Args> // TODO this constructor hangs. Needs debugging
69-
// Cuts(std::string name, Args... args) : name_(std::move(name)) {
70-
// AddCuts(args...);
71-
// }
55+
// // Base case for variadic recursion (handles when there's just one argument left)
56+
// template<typename T>
57+
// void AddCuts(const T& t) {
58+
// AddCuts(t); // Call the appropriate overload for a single argument (like std::vector<SimpleCut>)
59+
// }
60+
//
61+
// // Recursive case for variadic template (multiple arguments)
62+
// template<typename T, typename... Args>
63+
// void AddCuts(const T& t, const Args&... args) {
64+
// AddCuts(t);
65+
// AddCuts(args...);
66+
// }
67+
//
68+
// template<typename... Args> // TODO this constructor hangs. Needs debugging
69+
// Cuts(std::string name, Args... args) : name_(std::move(name)) {
70+
// AddCuts(args...);
71+
// }
7272

7373
/**
7474
* @brief Evaluates all SimpleCuts

infra/HelperFunctions.hpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ inline std::string ToStringWithPrecision(const T a_value, const int n) {
1818

1919
inline std::vector<AnalysisTree::SimpleCut> CreateSliceCuts(const std::vector<float>& ranges, const std::string& cutNamePrefix, const std::string& branchFieldName) {
2020
std::vector<AnalysisTree::SimpleCut> sliceCuts;
21-
for(int iRange=0; iRange<ranges.size()-1; iRange++) {
22-
const std::string cutName = cutNamePrefix + ToStringWithPrecision(ranges.at(iRange), 2) + "_" + ToStringWithPrecision(ranges.at(iRange+1), 2);
23-
sliceCuts.emplace_back(AnalysisTree::RangeCut(branchFieldName, ranges.at(iRange), ranges.at(iRange+1), cutName));
21+
for (int iRange = 0; iRange < ranges.size() - 1; iRange++) {
22+
const std::string cutName = cutNamePrefix + ToStringWithPrecision(ranges.at(iRange), 2) + "_" + ToStringWithPrecision(ranges.at(iRange + 1), 2);
23+
sliceCuts.emplace_back(AnalysisTree::RangeCut(branchFieldName, ranges.at(iRange), ranges.at(iRange + 1), cutName));
2424
}
2525

2626
return sliceCuts;
2727
}
2828

29-
}
30-
#endif // ANALYSISTREE_INFRA_HELPER_FUNCTIONS_HPP
29+
}// namespace HelperFunctions
30+
#endif// ANALYSISTREE_INFRA_HELPER_FUNCTIONS_HPP

infra/SimpleCut.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class SimpleCut {
4545

4646
SimpleCut(const std::vector<Variable>& vars, std::function<bool(std::vector<double>&)> lambda, std::string title = "") : title_(std::move(title)),
4747
lambda_(std::move(lambda)) {
48-
for(auto& var : vars) {
48+
for (auto& var : vars) {
4949
vars_.emplace_back(var);
5050
}
5151
FillBranchNames();

0 commit comments

Comments
 (0)