/** * Returns the value associated to a parameter name in the IDF * @param parameterName :: parameter name in the IDF * @return the value associated to the parameter name */ std::string DetectorEfficiencyCorUser::getValFromInstrumentDef( const std::string ¶meterName) { const ParameterMap &pmap = m_inputWS->constInstrumentParameters(); Instrument_const_sptr instrument = m_inputWS->getInstrument(); Parameter_sptr par = pmap.getRecursive(instrument->getChild(0).get(), parameterName); if (par) { std::string ret = par->asString(); g_log.debug() << "Parsed parameter " << parameterName << ": " << ret << "\n"; return ret; } else { throw Kernel::Exception::InstrumentDefinitionError( "There is no <" + parameterName + "> in the instrument definition!"); } }