#include "eff_utils/RawEffTool.hpp" #include "eff_utils/EffExceptions.hpp" #include "eff_utils/EffInfo.hpp" #include "eff_utils/Efficiency.hpp" #include "eff_utils/EffVal.hpp" #include using namespace eff_utils; EffVal RawEffTool::Eff(std::vector vec) { EffVal retval; int ndim = vec.size(); int mdim = _eff->Info().EffNVars(); if(ndim < 0 || ndim > 2 || ndim != mdim) // do not allow larger than 3 dimensions for now throw EffConfigException("RawEffTool::Eff dimension out of range"); switch(ndim) { case 1: retval = _eff->Eff(vec[0]); break; case 2: retval = _eff->Eff(vec[0],vec[1]); break; case 3: retval = _eff->Eff(vec[0],vec[1],vec[2]); break; default: throw EffConfigException("RawEffTool::Eff dimension really out of range!"); } // end switch return retval; } // end Eff RawEffTool::~RawEffTool() {;}