Skip to content

Commit 4c1f9b2

Browse files
ddobrigkalibuild
andauthored
[PWGLF] Fix autodetection of old format in strangeness tof pid (#13236)
Co-authored-by: ALICE Builder <alibuild@users.noreply.github.com>
1 parent aa9b01e commit 4c1f9b2

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

PWGLF/TableProducer/Strangeness/strangenesstofpid.cxx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,12 +1360,13 @@ struct strangenesstofpid {
13601360

13611361
void processDerivedData(soa::Join<aod::StraCollisions, aod::StraStamps, aod::StraEvTimes> const& collisions, V0DerivedDatas const& V0s, CascDerivedDatas const& cascades, dauTracks const& dauTrackTable, aod::DauTrackTOFPIDs const& dauTrackTOFPIDs)
13621362
{
1363-
// auto-determine if current or old generation of dauTrackTOFPIDs
1364-
if (dauTrackTOFPIDs.size() == 0) {
1365-
return;
1363+
bool isNewTOFFormat = true; // can only happen for new format
1364+
1365+
// auto-determine if using old format
1366+
if (dauTrackTOFPIDs.size() != 0) {
1367+
auto firstTOFPID = dauTrackTOFPIDs.rawIteratorAt(0);
1368+
isNewTOFFormat = firstTOFPID.straCollisionId() < 0 ? false : true;
13661369
}
1367-
auto firstTOFPID = dauTrackTOFPIDs.rawIteratorAt(0);
1368-
bool isNewTOFFormat = firstTOFPID.straCollisionId() < 0 ? false : true;
13691370

13701371
if (!isNewTOFFormat && calculationMethod.value > 0) {
13711372
LOGF(fatal, "Using the old derived data format with the new calculation method is not viable due to lack of needed info! Crashing.");

0 commit comments

Comments
 (0)