Skip to content

Commit

Permalink
Merge pull request #111 from rest-for-physics/jgalan_hits_iterator_fix
Browse files Browse the repository at this point in the history
TRestDetectorHitsEvent::Sort disabled for MacOs
  • Loading branch information
jgalan authored Mar 19, 2024
2 parents 360f43a + 2a39606 commit d3ee48f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/TRestDetectorHitsEvent.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ void TRestDetectorHitsEvent::Initialize() {

void TRestDetectorHitsEvent::Sort(bool(compareCondition)(const TRestHits::iterator& hit1,
const TRestHits::iterator& hit2)) {
#ifndef __APPLE__
if (compareCondition == 0) {
// default sort logic: z from smaller to greater
std::sort(fHits->begin(), fHits->end(),
Expand All @@ -146,6 +147,10 @@ void TRestDetectorHitsEvent::Sort(bool(compareCondition)(const TRestHits::iterat
} else {
std::sort(fHits->begin(), fHits->end(), compareCondition);
}
#else
std::cout << "TRestDetectorHitsEvent::Sort is not implemented on MacOs!!" << std::endl;
std::cout << "This method implementation should be reviewed for proper operation in Mac" << std::endl;
#endif
}

void TRestDetectorHitsEvent::Shuffle(int NLoop) {
Expand Down

0 comments on commit d3ee48f

Please sign in to comment.