Skip to content

Commit 5b057d9

Browse files
committed
mv tpcSignalGeneric() from struct members to utils
1 parent 4600e37 commit 5b057d9

File tree

2 files changed

+11
-22
lines changed

2 files changed

+11
-22
lines changed

DPG/Tasks/TPC/tpcSkimsTableCreator.cxx

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -387,17 +387,6 @@ struct TreeWriterTpcV0 {
387387
return casc.cascradius();
388388
}
389389

390-
/// Evaluate tpcSignal with or without correction
391-
template <bool IsCorrectedDeDx, typename TrkType>
392-
double tpcSignalGeneric(const TrkType& track)
393-
{
394-
if constexpr (IsCorrectedDeDx) {
395-
return track.tpcSignalCorrected();
396-
} else {
397-
return track.tpcSignal();
398-
}
399-
}
400-
401390
Preslice<V0sWithID> perCollisionV0s = aod::v0data::collisionId;
402391
Preslice<CascsWithID> perCollisionCascs = aod::cascdata::collisionId;
403392

@@ -761,17 +750,6 @@ struct TreeWriterTpcTof {
761750
ccdb->setFatalWhenNull(false);
762751
}
763752

764-
/// Evaluate tpcSignal with or without correction
765-
template <bool IsCorrectedDeDx, typename TrkType>
766-
double tpcSignalGeneric(const TrkType& track)
767-
{
768-
if constexpr (IsCorrectedDeDx) {
769-
return track.tpcSignalCorrected();
770-
} else {
771-
return track.tpcSignal();
772-
}
773-
}
774-
775753
Preslice<Trks> perCollisionTracks = aod::track::collisionId;
776754
Preslice<TrksWithDEdxCorrection> perCollisionTracksWithCorrecteddEdx = aod::track::collisionId;
777755

DPG/Tasks/TPC/utilsTpcSkimsTableCreator.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,5 +93,16 @@ inline bool isTrackSelected(const TrackType& track, const int trackSelection)
9393
return isSelected;
9494
}
9595

96+
/// Evaluate tpcSignal with or without dEdx correction
97+
template <bool IsCorrectedDeDx, typename TrkType>
98+
inline double tpcSignalGeneric(const TrkType& track)
99+
{
100+
if constexpr (IsCorrectedDeDx) {
101+
return track.tpcSignalCorrected();
102+
} else {
103+
return track.tpcSignal();
104+
}
105+
}
106+
96107
} // namespace o2::dpg_tpcskimstablecreator
97108
#endif // DPG_TASKS_TPC_UTILSTPCSKIMSTABLECREATOR_H_

0 commit comments

Comments
 (0)