Hi Volker,

In this particular situation, there is nothing calling function
could do to improve the situation. The proper solution is
to fix the configuration file.

Issuing edm::LogError can potentially result in a large amount
of CPU time wasted -- in case it is ignored and the person
running the code only finds out about the problem later.

Regards,
Igor

On 05/12/2014 08:07 AM, Volker Adler wrote:
>
> In JetMETCorrections/FFTJetObjects/interface/L2RecoScaleCalculator.h:
>
> > +
> > +class L2RecoScaleCalculator : public AbsFFTSpecificScaleCalculator
> > +{
> > +public:
> > +    inline explicit L2RecoScaleCalculator(const edm::ParameterSet& ps)
> > +        : m_radiusFactor(ps.getParameter<double>("radiusFactor")) {}
> > +
> > +    inline virtual ~L2RecoScaleCalculator() {}
> > +
> > +    inline virtual void mapFFTJet(const reco::Jet& /* jet */,
> > +                                  const reco::FFTJet<float>& fftJet,
> > +                                  const math::XYZTLorentzVector& /* current */,
> > +                                  double* buf, const unsigned dim) const
> > +    {
> > +        if (dim != 1)
> > +            throw cms::Exception("FFTJetBadConfig")
>
> A possible solution could be to issue an |edm::LogError| and turn this into a |bool| function returning |false| in case of failure with a meaningful assignment to |buf[0]| -- or let the |double| be 
> returned directly to be assigned in the calling function, which would also allow for a more flexible usage in the future.
>
> —
> Reply to this email directly or view it on GitHub <https://github.com/cms-sw/cmssw/pull/3810/files#r12526899>.
>