CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Static Public Member Functions
reco::modules::ParameterAdapter< helpers::MCTruthPairSelector< T > > Struct Template Reference

#include <MCTruthPairSelector.h>

Static Public Member Functions

static
helpers::MCTruthPairSelector
< T
make (const edm::ParameterSet &cfg)
 

Detailed Description

template<typename T>
struct reco::modules::ParameterAdapter< helpers::MCTruthPairSelector< T > >

Definition at line 44 of file MCTruthPairSelector.h.

Member Function Documentation

template<typename T >
static helpers::MCTruthPairSelector<T> reco::modules::ParameterAdapter< helpers::MCTruthPairSelector< T > >::make ( const edm::ParameterSet cfg)
inlinestatic

Definition at line 45 of file MCTruthPairSelector.h.

References HLT_25ns14e33_v1_cff::checkCharge, spr::find(), newFWLiteAna::found, AlCaHLTBitMon_QueryRunRegistry::string, and vint.

45  {
46  const std::string matchPDGId( "matchPDGId" );
47  const std::string checkCharge( "checkCharge" );
48  bool ck = false;
49  std::vector<std::string> bools = cfg.template getParameterNamesForType<bool>();
50  bool found = find( bools.begin(), bools.end(), checkCharge ) != bools.end();
51  if (found) ck = cfg.template getParameter<bool>( checkCharge );
52  typedef std::vector<int> vint;
53  std::vector<std::string> ints = cfg.template getParameterNamesForType<vint>();
54  found = find( ints.begin(), ints.end(), matchPDGId ) != ints.end();
55  if ( found ) {
56  vint ids = cfg.template getParameter<vint>( matchPDGId );
57  return helpers::MCTruthPairSelector<T>( ids.begin(), ids.end(), ck );
58  } else {
60  }
61  }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
double vint[400]