CMS 3D CMS Logo

List of all members | Static Public Member Functions
reco::componenthelper::MultipleComponents< C, T, F, S > Struct Template Reference

#include <component.h>

Static Public Member Functions

static T get (const Candidate &c, size_t i)
 
static size_t numberOf (const Candidate &c)
 

Detailed Description

template<typename C, typename T, T(C::*)(size_t) const F, size_t(C::*)() const S>
struct reco::componenthelper::MultipleComponents< C, T, F, S >

Definition at line 36 of file component.h.

Member Function Documentation

◆ get()

template<typename C , typename T , T(C::*)(size_t) const F, size_t(C::*)() const S>
static T reco::componenthelper::MultipleComponents< C, T, F, S >::get ( const Candidate c,
size_t  i 
)
inlinestatic

Definition at line 43 of file component.h.

References correctionTermsCaloMet_cff::C, c, Exception, F(), and mps_fire::i.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), submitPVValidationJobs.BetterConfigParser::__updateDict(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), rrapi.RRApi::count(), util.rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), submitPVValidationJobs.BetterConfigParser::getResultingSection(), util.rrapi.RRApi::report(), rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), rrapi.RRApi::tables(), util.rrapi.RRApi::tables(), util.rrapi.RRApi::tags(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

43  {
44  const C *dc = dynamic_cast<const C *>(&c);
45  if (dc == nullptr)
46  return T();
47  if (i < (dc->*S)())
48  return (dc->*F)(i);
49  else
50  throw cms::Exception("Error") << "index " << i << " out ot range";
51  }
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163
long double T

◆ numberOf()

template<typename C , typename T , T(C::*)(size_t) const F, size_t(C::*)() const S>
static size_t reco::componenthelper::MultipleComponents< C, T, F, S >::numberOf ( const Candidate c)
inlinestatic

Definition at line 37 of file component.h.

References correctionTermsCaloMet_cff::C, and c.

37  {
38  const C *dc = dynamic_cast<const C *>(&c);
39  if (dc == nullptr)
40  return 0;
41  return (dc->*S)();
42  }