Skip to content

Commit 2536a06

Browse files
authored
TRD: Benefit from custom streamer for labels (#3068)
* 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
1 parent 9e859b7 commit 2536a06

4 files changed

Lines changed: 3 additions & 16 deletions

File tree

DataFormats/simulation/include/SimulationDataFormat/MCCompLabel.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class MCCompLabel
4949
// mask for all used fields
5050
static constexpr ULong64_t maskFull = (ul0x1 << (nbitsTrackID + nbitsEvID + nbitsSrcID)) - 1;
5151

52-
MCCompLabel(int trackID, int evID, int srcID, bool fake) { set(trackID, evID, srcID, fake); }
52+
MCCompLabel(int trackID, int evID, int srcID, bool fake = false) { set(trackID, evID, srcID, fake); }
5353
MCCompLabel(bool noise = false)
5454
{
5555
if (noise) {

Detectors/TRD/base/include/TRDBase/MCLabel.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,7 @@ namespace o2
1919
{
2020
namespace trd
2121
{
22-
23-
class MCLabel : public o2::MCCompLabel
24-
{
25-
public:
26-
MCLabel() = default;
27-
MCLabel(int trackID, int eventID, int srcID)
28-
: o2::MCCompLabel(trackID, eventID, srcID, false) {}
29-
30-
ClassDefNV(MCLabel, 1);
31-
};
32-
22+
using MCLabel = o2::MCCompLabel;
3323
} // namespace trd
3424
} // namespace o2
3525

Detectors/TRD/base/src/TRDBaseLinkDef.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
#pragma link C++ class o2::trd::CalDet + ;
2626
#pragma link C++ class o2::trd::CalROC + ;
2727
#pragma link C++ class o2::trd::PadResponse + ;
28-
#pragma link C++ class o2::trd::MCLabel + ;
2928
#pragma link C++ class o2::trd::PadParameters < unsigned short > +;
3029
#pragma link C++ class o2::trd::PadParameters < float > +;
3130
#pragma link C++ class o2::trd::PadParameters < char > +;
@@ -46,6 +45,4 @@
4645

4746
#include "SimulationDataFormat/MCTruthContainer.h"
4847

49-
#pragma link C++ class o2::dataformats::MCTruthContainer < o2::trd::MCLabel> + ;
50-
5148
#endif

macro/analyzeDigitLabels.C

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ void analyzeTOF(TTree* reftree)
245245
void analyzeTRD(TTree* reftree)
246246
{
247247
LabelStats result;
248-
analyse<o2::trd::MCLabel>(reftree, "TRDMCLabels", result);
248+
analyse<o2::MCCompLabel>(reftree, "TRDMCLabels", result);
249249
std::cout << gPrefix << " TRD ";
250250
result.print();
251251
}

0 commit comments

Comments
 (0)