Skip to content

Commit

Permalink
PWGLF: Fix compilation warnings: braced-scalar-init (AliceO2Group#5442)
Browse files Browse the repository at this point in the history
* PWGLF: Fix compilation warnings: braced-scalar-init

* Fix MegaLinter errors
  • Loading branch information
vkucera authored and christianreckziegel committed May 2, 2024
1 parent 0e72ab9 commit a059db3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
12 changes: 6 additions & 6 deletions PWGLF/TableProducer/LFStrangeTreeCreator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,12 @@ struct LFStrangeTreeCreator {
histos.add<TH1>("zVtx", ";#it{z}_{vtx} (cm);Entries", HistType::kTH1F, {zVtxAxis});

// v0 QA
histos.add<TH1>("massLambda", ";#it{M}(p + #pi^{-}) (GeV/#it{c}^{2});Entries", {HistType::kTH1F, {massLambdaAxis}});
histos.add<TH1>("cosPa", ";cosPa;Entries", {HistType::kTH1F}, {cosPaAxis});
histos.add<TH1>("radius", ";radius;Entries", {HistType::kTH1F}, {radiusAxis});
histos.add<TH1>("dcaV0daugh", ";dcaV0daugh;Entries", {HistType::kTH1F}, {dcaV0daughAxis});
histos.add<TH1>("dcaPosPv", ";dcaPosPv;Entries", {HistType::kTH1F}, {dcaDaughPvAxis});
histos.add<TH1>("dcaNegPv", ";dcaNegPv;Entries", {HistType::kTH1F}, {dcaDaughPvAxis});
histos.add<TH1>("massLambda", ";#it{M}(p + #pi^{-}) (GeV/#it{c}^{2});Entries", HistType::kTH1F, {massLambdaAxis});
histos.add<TH1>("cosPa", ";cosPa;Entries", HistType::kTH1F, {cosPaAxis});
histos.add<TH1>("radius", ";radius;Entries", HistType::kTH1F, {radiusAxis});
histos.add<TH1>("dcaV0daugh", ";dcaV0daugh;Entries", HistType::kTH1F, {dcaV0daughAxis});
histos.add<TH1>("dcaPosPv", ";dcaPosPv;Entries", HistType::kTH1F, {dcaDaughPvAxis});
histos.add<TH1>("dcaNegPv", ";dcaNegPv;Entries", HistType::kTH1F, {dcaDaughPvAxis});
}

void processData(soa::Join<aod::Collisions, aod::EvSels, aod::CentFT0Cs>::iterator const& collision, TracksFull const& tracks, aod::V0Datas const& V0s, aod::BCsWithTimestamps const&)
Expand Down
2 changes: 1 addition & 1 deletion PWGLF/Tasks/QC/lfITSTPCMatchingQA.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ struct lfmatchingqa {
void init(o2::framework::InitContext&)
{
histos.add<TH1>("zVtx", ";#it{z}_{vtx} (cm);Entries", HistType::kTH1F, {zVtxAxis});
histos.add<TH2>("tpcSignal", ";#it{p}_{TPC} (GeV/#it{c});TPC signal (a.u.)", {HistType::kTH2F}, {momAxisFine, tpcAxisFine});
histos.add<TH2>("tpcSignal", ";#it{p}_{TPC} (GeV/#it{c});TPC signal (a.u.)", HistType::kTH2F, {momAxisFine, tpcAxisFine});

// use a THnSparse for all the information
auto thnPi = histos.add("thnPi", ";#it{p}_{TPC} (GeV/#it{c}); #it{p}_{GLO} (GeV/#it{c}); #it{p}_{TPC} - #it{p}_{glo} (GeV/#it{c}); DCA_{xy} (cm); <ITS Cluster size> x cos(#lambda); TPC signal (a.u.); n#sigma_{TPC} (pi); PID hypothesis; MC PDG code; MC Gen P (GeV/c)",
Expand Down
12 changes: 8 additions & 4 deletions PWGLF/Utils/rsnOutput.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@
///
/// \author Veronika Barbasova <vbarbaso@cern.ch>

#ifndef PWGLF_RSNOUTPUT_H_
#define PWGLF_RSNOUTPUT_H_
#ifndef PWGLF_UTILS_RSNOUTPUT_H_
#define PWGLF_UTILS_RSNOUTPUT_H_

#include <string>
#include <utility>
#include <vector>

#include "Framework/HistogramRegistry.h"
#include "Framework/Logger.h"
Expand Down Expand Up @@ -100,7 +104,7 @@ class Output
mFillPoint = new double[mCurrentAxisTypes.size()];

LOGF(info, "Number of axis added: %d", mCurrentAxes.size());
mPairHisto = new HistogramConfigSpec({HistType::kTHnSparseF}, mCurrentAxes);
mPairHisto = new HistogramConfigSpec(HistType::kTHnSparseF, mCurrentAxes);
};

template <typename T>
Expand Down Expand Up @@ -243,4 +247,4 @@ class OutputSparse : public Output
} // namespace rsn
} // namespace o2::analysis

#endif
#endif // PWGLF_UTILS_RSNOUTPUT_H_

0 comments on commit a059db3

Please sign in to comment.