Skip to content

Commit 90334d1

Browse files
committed
do not nest namespaces (c++11 compat)
1 parent 7bba1c9 commit 90334d1

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

src/EntryConfig.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ using TH1FD = TH1F;
1313
using TH2FD = TH2F;
1414
#endif
1515

16-
namespace AnalysisTree::QA {
16+
namespace AnalysisTree {
17+
namespace QA {
1718

1819
struct fill2_struct : public Utils::Visitor<void> {
1920
fill2_struct(double val1, double val2) : val1_(val1), val2_(val2) {}
@@ -74,7 +75,7 @@ EntryConfig::EntryConfig(const Axis& x, const Axis& y, Variable& weight, const s
7475
}
7576

7677
EntryConfig::EntryConfig(const Axis& x, Cuts* cuts_x, const Axis& y, Cuts* cuts_y, const std::string& name) : type_(PlotType::kIntegral2D),
77-
axes_({x, y}) {
78+
axes_({x, y}) {
7879
const std::string cutNameX = cuts_x != nullptr ? cuts_x->GetName() : "";
7980
const std::string cutNameY = cuts_y != nullptr ? cuts_y->GetName() : "";
8081
const std::string cutNameSeparator = cuts_x != nullptr && cuts_y != nullptr ? "_" : "";
@@ -231,4 +232,5 @@ std::string EntryConfig::GetDirectoryName() const {
231232
return name;
232233
}
233234

234-
}// namespace AnalysisTree::QA
235+
}// namespace QA
236+
}// namespace AnalysisTree

src/EntryConfig.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
#include "AnalysisTree/Cuts.hpp"
1313
#include "AnalysisTree/Utils.hpp"
1414

15-
namespace AnalysisTree::QA {
15+
namespace AnalysisTree {
16+
namespace QA {
1617

1718
class Axis : public Variable, public TAxis {
1819
public:
@@ -106,5 +107,6 @@ class EntryConfig {
106107
inline bool FloatingEqualZero(const double value, const double eps = 1e-6) { return std::fabs(value) < eps; }
107108
inline bool FloatingEqualOne(const double value, const double eps = 1e-6) { return std::fabs(value - 1) < eps; }
108109

109-
}// namespace AnalysisTree::QA
110+
}// namespace QA
111+
}// namespace AnalysisTree
110112
#endif//ANALYSISTREE_QA_ENTRYCONFIG_H

src/Task.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
#include <utility>
44

5-
namespace AnalysisTree::QA {
5+
namespace AnalysisTree {
6+
namespace QA {
67

78
size_t Task::AddH1(const std::string& name, const Axis& x, Cuts* cuts, Variable weight) {
89
CreateOutputFileIfNotYet();
@@ -151,4 +152,5 @@ std::string Task::ConstructOutputDirectoryName() const {
151152
return dirName;
152153
}
153154

154-
}// namespace AnalysisTree::QA
155+
}// namespace QA
156+
}// namespace AnalysisTree

0 commit comments

Comments
 (0)