Skip to content

Commit

Permalink
fixed segmentation fault when no miscParam file specified
Browse files Browse the repository at this point in the history
  • Loading branch information
samdejong86 committed Aug 2, 2017
1 parent 4ea39a8 commit 20365ac
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/RunAction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,13 @@ RunAction::RunAction(DetectorConstruction* detConstruction)
analysisManager->CreateNtupleDColumn(GeoNtuple, "HE3TUBE_"+HE3tags[i], HE3vals[i]);
}

MISCtags = miscObjects[0].getTags();
MISCvals.resize(MISCtags.size());

for(int i=0; i<(int)MISCtags.size(); i++){
analysisManager->CreateNtupleDColumn(GeoNtuple, "MISC_"+MISCtags[i], MISCvals[i]);
if(miscObjects.size()!=0){
MISCtags = miscObjects[0].getTags();
MISCvals.resize(MISCtags.size());

for(int i=0; i<(int)MISCtags.size(); i++){
analysisManager->CreateNtupleDColumn(GeoNtuple, "MISC_"+MISCtags[i], MISCvals[i]);
}
}

gParam = fDetConstruction->GetgParam();
Expand Down

0 comments on commit 20365ac

Please sign in to comment.