Skip to content

Commit bdd30ac

Browse files
authored
[PWGLF] Fix non found histos (#9759)
1 parent d8e94dc commit bdd30ac

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

PWGLF/Tasks/Strangeness/strangenessInJets.cxx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,10 +917,12 @@ struct StrangenessInJets {
917917
LOG(info) << "Looking for 2D weight histogram '" << name.value << "' for " << name.name;
918918
if (name.value == "") {
919919
LOG(info) << " -> Skipping";
920+
return;
920921
}
921922
histo = static_cast<TH2F*>(l->FindObject(name.value.c_str()));
922923
if (!histo) {
923924
LOG(error) << "Could not open histogram '" << name.value << "'";
925+
return;
924926
}
925927
LOG(info) << "Opened histogram " << histo->ClassName() << " " << histo->GetName();
926928
};
@@ -936,10 +938,12 @@ struct StrangenessInJets {
936938
LOG(info) << "Looking for 1D weight histogram '" << name.value << "' for " << name.name;
937939
if (name.value == "") {
938940
LOG(info) << " -> Skipping";
941+
return;
939942
}
940943
histo = static_cast<TH1F*>(l->FindObject(name.value.c_str()));
941944
if (!histo) {
942945
LOG(error) << "Could not open histogram '" << name.value << "'";
946+
return;
943947
}
944948
LOG(info) << "Opened histogram " << histo->ClassName() << " " << histo->GetName();
945949
};

0 commit comments

Comments
 (0)