Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TRestDetectorHitsEvent::Sort disabled for MacOs #111

Merged
merged 2 commits into from
Mar 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading