diff --git a/src/DRICH_geo.cpp b/src/DRICH_geo.cpp index 43a8c4b279d53ad32455db6dae6934f53e1a52bb..c13aa3f622ac1f0bd70711eb09d4026adc6282c0 100644 --- a/src/DRICH_geo.cpp +++ b/src/DRICH_geo.cpp @@ -121,11 +121,11 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec // if debugging optics, override some settings bool debug_optics = debug_optics_mode > 0; if(debug_optics) { - printout(WARNING,"DRich_geo","DEBUGGING DRICH OPTICS"); + printout(WARNING,"DRICH_geo","DEBUGGING DRICH OPTICS"); switch(debug_optics_mode) { case 1: vesselMat = aerogelMat = filterMat = sensorMat = gasvolMat = desc.material("VacuumOptical"); break; case 2: vesselMat = aerogelMat = filterMat = sensorMat = desc.material("VacuumOptical"); break; - default: printout(FATAL,"DRich_geo","UNKNOWN debug_optics_mode"); return det; + default: printout(FATAL,"DRICH_geo","UNKNOWN debug_optics_mode"); return det; }; aerogelVis = sensorVis = mirrorVis; gasvolVis = vesselVis = desc.invisible(); @@ -219,14 +219,8 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec // Used in several places; TVector3 nx(1,0,0), ny(0,-1,0); - // Get access to the readout structure decoder; may want to simply call desc.readout("DRICHHits"); - const auto &rdspecs = desc.readouts(); - if (rdspecs.size() != 1) { - printout(FATAL,"DRich_geo","Expect a single readout structure in XML file"); - return det; - } //if - // Do not mess up with casting of (*desc.readouts().begin()).second; just call desc.readout(); - const auto decoder = desc.readout((*rdspecs.begin()).first.c_str()).idSpec().decoder(); + // Get access to the readout structure decoder + const auto decoder = desc.readout("DRICHHits").idSpec().decoder(); const auto &mvalue = (*decoder)["module"], &svalue = (*decoder)["sector"]; uint64_t msmask = mvalue.mask() | svalue.mask(); detector->SetReadoutCellMask(msmask); diff --git a/src/PFRICH_geo.cpp b/src/PFRICH_geo.cpp index 15adc0cc0208a07be1141aa20365e84c664afc57..b4c59578520f5b8d02026e5506fccd22fb40e1bf 100644 --- a/src/PFRICH_geo.cpp +++ b/src/PFRICH_geo.cpp @@ -152,14 +152,8 @@ static Ref_t createDetector(Detector& desc, xml::Handle_t handle, SensitiveDetec // Used in several places; TVector3 nx(1,0,0), ny(0,1,0); - // Get access to the readout structure decoder; may want to simply call desc.readout("DRICHHits"); - const auto &rdspecs = desc.readouts(); - if (rdspecs.size() != 1) { - printout(FATAL,"DRich_geo","Expect a single readout structure in XML file"); - return det; - } //if - // Do not mess up with casting of (*desc.readouts().begin()).second; just call desc.readout(); - const auto decoder = desc.readout((*rdspecs.begin()).first.c_str()).idSpec().decoder(); + // Get access to the readout structure decoder + const auto decoder = desc.readout("PFRICHHits").idSpec().decoder(); const auto &mvalue = (*decoder)["module"]; uint64_t msmask = mvalue.mask(); detector->SetReadoutCellMask(msmask);