@@ -389,8 +389,11 @@ struct TreeWriterTpcV0 {
389389 constexpr bool IsWithTrackQa = ModeId != ModeStandard;
390390
391391 std::vector<int64_t > labelTrack2TrackQA;
392- if constexpr (IsWithTrackQa) {
392+ if (IsWithTrackQa) {
393+ // this action should not be under constexpr, otherwise the processStandard() function crashes when it is subscribed for myTracks but they're not used
393394 labelTrack2TrackQA.resize (myTracks.size (), -1 );
395+ }
396+ if constexpr (IsWithTrackQa) {
394397 for (const auto & trackQA : tracksQA) {
395398 const int64_t trackId = trackQA.trackId ();
396399 labelTrack2TrackQA.at (trackId) = trackQA.globalIndex ();
@@ -501,7 +504,11 @@ struct TreeWriterTpcV0 {
501504 PROCESS_SWITCH (TreeWriterTpcV0, processStandardWithCorrecteddEdx, " Standard V0 Samples for PID with corrected dEdx" , false );
502505
503506 void processWithdEdxTrQA (Colls const & collisions,
504- Trks const & myTracks, V0sWithID const & myV0s, CascsWithID const & myCascs, aod::BCsWithTimestamps const &, aod::TracksQAVersion const & tracksQA)
507+ Trks const & myTracks,
508+ V0sWithID const & myV0s,
509+ CascsWithID const & myCascs,
510+ aod::BCsWithTimestamps const &,
511+ aod::TracksQAVersion const & tracksQA)
505512 {
506513 runV0<false , ModeWithdEdxTrkQA, Trks, aod::BCsWithTimestamps>(collisions, myTracks, myV0s, myCascs, tracksQA);
507514 }
0 commit comments