From fe340d89be590d5155cee0bf757bcd697884336f Mon Sep 17 00:00:00 2001 From: Sandro Wenzel Date: Tue, 3 Mar 2020 15:59:49 +0100 Subject: [PATCH 1/2] TRD: Benefit from custom streamer for labels * use standard MCCompLabel for TRD * generalize MCCompLabel constructor * benefit from custom streamer for MCTruthContainer for TRD fixed https://alice.its.cern.ch/jira/browse/O2-1213 --- .../include/SimulationDataFormat/MCCompLabel.h | 2 +- Detectors/TRD/base/include/TRDBase/MCLabel.h | 12 +----------- Detectors/TRD/base/src/TRDBaseLinkDef.h | 3 --- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/DataFormats/simulation/include/SimulationDataFormat/MCCompLabel.h b/DataFormats/simulation/include/SimulationDataFormat/MCCompLabel.h index b31e2e1cff3cd..90d5c1a7ba5a2 100644 --- a/DataFormats/simulation/include/SimulationDataFormat/MCCompLabel.h +++ b/DataFormats/simulation/include/SimulationDataFormat/MCCompLabel.h @@ -49,7 +49,7 @@ class MCCompLabel // mask for all used fields static constexpr ULong64_t maskFull = (ul0x1 << (nbitsTrackID + nbitsEvID + nbitsSrcID)) - 1; - MCCompLabel(int trackID, int evID, int srcID, bool fake) { set(trackID, evID, srcID, fake); } + MCCompLabel(int trackID, int evID, int srcID, bool fake = false) { set(trackID, evID, srcID, fake); } MCCompLabel(bool noise = false) { if (noise) { diff --git a/Detectors/TRD/base/include/TRDBase/MCLabel.h b/Detectors/TRD/base/include/TRDBase/MCLabel.h index 07f698e0cc719..d0cc90f020a99 100644 --- a/Detectors/TRD/base/include/TRDBase/MCLabel.h +++ b/Detectors/TRD/base/include/TRDBase/MCLabel.h @@ -19,17 +19,7 @@ namespace o2 { namespace trd { - -class MCLabel : public o2::MCCompLabel -{ - public: - MCLabel() = default; - MCLabel(int trackID, int eventID, int srcID) - : o2::MCCompLabel(trackID, eventID, srcID, false) {} - - ClassDefNV(MCLabel, 1); -}; - +using MCLabel = o2::MCCompLabel; } // namespace trd } // namespace o2 diff --git a/Detectors/TRD/base/src/TRDBaseLinkDef.h b/Detectors/TRD/base/src/TRDBaseLinkDef.h index cd95dfb3eaacb..4ed7262d8f185 100644 --- a/Detectors/TRD/base/src/TRDBaseLinkDef.h +++ b/Detectors/TRD/base/src/TRDBaseLinkDef.h @@ -25,7 +25,6 @@ #pragma link C++ class o2::trd::CalDet + ; #pragma link C++ class o2::trd::CalROC + ; #pragma link C++ class o2::trd::PadResponse + ; -#pragma link C++ class o2::trd::MCLabel + ; #pragma link C++ class o2::trd::PadParameters < unsigned short > +; #pragma link C++ class o2::trd::PadParameters < float > +; #pragma link C++ class o2::trd::PadParameters < char > +; @@ -46,6 +45,4 @@ #include "SimulationDataFormat/MCTruthContainer.h" -#pragma link C++ class o2::dataformats::MCTruthContainer < o2::trd::MCLabel> + ; - #endif From 13b4eb6ab72763dd46dc0138b4d4a98deb8df72b Mon Sep 17 00:00:00 2001 From: Sandro Wenzel Date: Tue, 3 Mar 2020 22:42:18 +0100 Subject: [PATCH 2/2] Update analyzeDigitLabels.C --- macro/analyzeDigitLabels.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macro/analyzeDigitLabels.C b/macro/analyzeDigitLabels.C index c18e5835c26c9..ef7cf32519a4d 100644 --- a/macro/analyzeDigitLabels.C +++ b/macro/analyzeDigitLabels.C @@ -245,7 +245,7 @@ void analyzeTOF(TTree* reftree) void analyzeTRD(TTree* reftree) { LabelStats result; - analyse(reftree, "TRDMCLabels", result); + analyse(reftree, "TRDMCLabels", result); std::cout << gPrefix << " TRD "; result.print(); }