Skip to content

Commit ebc292f

Browse files
improve logs
1 parent e38f721 commit ebc292f

3 files changed

Lines changed: 8 additions & 10 deletions

File tree

src/Axis.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ using std::setw;
99

1010
void Axis::Print() const {
1111
cout << setw(25) << this->name_ << " ";
12-
if (this->IsVariableBinSize()) {
13-
cout << setw(4) << this->GetNbins() << setw(6) << this->GetXmin() << " .. " << setw(2) << this->GetXmax();
14-
} else {
15-
cout << setw(4) << this->GetNbins() << setw(6) << this->GetXmin() << setw(6) << this->GetXmax();
16-
}
12+
cout << setw(6) << this->GetNbins() << setw(6) << this->GetXmin() << setw(6) << this->GetXmax();
1713
}
1814

1915
}

src/Axis.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Axis : public Variable, public TAxis {
1414
this->SetTitle(title.c_str());
1515
if(this->GetFields().size() == 1 && this->GetFields().at(0).GetName() == "ones"){
1616
this->lambda_ = [](const std::vector<double>& ){ return 1; };
17-
this->name_ = "Ones";
17+
this->name_ = this->GetBranchName() + ".ones";
1818
}
1919
}
2020
const char* GetName() const override { return Variable::GetName().c_str(); }

src/EntryConfig.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
namespace AnalysisTree {
99
namespace QA {
1010

11+
using std::cout;
12+
using std::endl;
13+
using std::setw;
14+
using std::left;
15+
1116
struct fill_struct : public Utils::Visitor<void> {
1217
fill_struct(double val1, double val2) : val1_(val1), val2_(val2) {}
1318
void operator()(TH1*) const { throw std::runtime_error("Cannot apply Fill(va1, val2) to TH1"); }
@@ -162,10 +167,7 @@ std::string EntryConfig::GetDirectoryName() const {
162167
}
163168

164169
void EntryConfig::Print() const {
165-
using std::cout;
166-
using std::endl;
167-
using std::setw;
168-
170+
cout << left;
169171
switch (type_) {
170172
case PlotType::kHisto1D : cout << setw(12) << "1D histo"; break;
171173
case PlotType::kHisto2D : cout << setw(12) << "2D histo"; break;

0 commit comments

Comments
 (0)