From 12b2f80dc4561a54383af657ff5e922aec5703be Mon Sep 17 00:00:00 2001 From: "Stephen A. Wood" <saw@jlab.org> Date: Tue, 22 Sep 2015 12:16:36 -0400 Subject: [PATCH] Don't require hodoscope to be present. --- src/THcHallCSpectrometer.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/THcHallCSpectrometer.cxx b/src/THcHallCSpectrometer.cxx index 7ec7c3c..54421c9 100644 --- a/src/THcHallCSpectrometer.cxx +++ b/src/THcHallCSpectrometer.cxx @@ -172,13 +172,14 @@ Int_t THcHallCSpectrometer::ReadDatabase( const TDatime& date ) THaDetector* det = GetDetector("hod"); // THaDetector* det = app->GetDetector( shower_detector_name ); - if( !dynamic_cast<THcHodoscope*>(det) ) { + if( dynamic_cast<THcHodoscope*>(det) ) { + fHodo = static_cast<THcHodoscope*>(det); // fHodo is a membervariable + } else { Error("THcHallCSpectrometer", "Cannot find hodoscope detector %s", detector_name ); - return fStatus = kInitError; + fHodo = NULL; } - fHodo = static_cast<THcHodoscope*>(det); // fHodo is a membervariable // fShower = static_cast<THcShower*>(det); // fShower is a membervariable @@ -272,7 +273,8 @@ Int_t THcHallCSpectrometer::ReadDatabase( const TDatime& date ) ifile.open(reconCoeffFilename.c_str()); if(!ifile.is_open()) { Error(here, "error opening reconstruction coefficient file %s",reconCoeffFilename.c_str()); - return kInitError; // Is this the right return code? + // return kInitError; // Is this the right return code? + return kOK; } string line="!"; -- GitLab