CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
StringCutObjectSelector< T, DefaultLazyness > Struct Template Reference

#include <StringCutObjectSelector.h>

Public Member Functions

bool operator() (const T &t) const
 
 StringCutObjectSelector (const reco::parser::SelectorPtr &select)
 
 StringCutObjectSelector (const std::string &cut, bool lazy=DefaultLazyness)
 

Private Attributes

reco::parser::SelectorPtr select_
 
edm::TypeWithDict type_
 

Detailed Description

template<typename T, bool DefaultLazyness = false>
struct StringCutObjectSelector< T, DefaultLazyness >

Definition at line 16 of file StringCutObjectSelector.h.

Constructor & Destructor Documentation

◆ StringCutObjectSelector() [1/2]

template<typename T, bool DefaultLazyness = false>
StringCutObjectSelector< T, DefaultLazyness >::StringCutObjectSelector ( const std::string &  cut,
bool  lazy = DefaultLazyness 
)
inline

Definition at line 17 of file StringCutObjectSelector.h.

17  : type_(typeid(T)) {
18  if (!reco::parser::cutParser<T>(cut, select_, lazy)) {
19  throw edm::Exception(edm::errors::Configuration, "failed to parse \"" + cut + "\"");
20  }
21  }

◆ StringCutObjectSelector() [2/2]

template<typename T, bool DefaultLazyness = false>
StringCutObjectSelector< T, DefaultLazyness >::StringCutObjectSelector ( const reco::parser::SelectorPtr select)
inline

Definition at line 22 of file StringCutObjectSelector.h.

22 : select_(select), type_(typeid(T)) {}

Member Function Documentation

◆ operator()()

template<typename T, bool DefaultLazyness = false>
bool StringCutObjectSelector< T, DefaultLazyness >::operator() ( const T t) const
inline

Definition at line 23 of file StringCutObjectSelector.h.

23  {
24  edm::ObjectWithDict o(type_, const_cast<T *>(&t));
25  return (*select_)(o);
26  }

Referenced by pat::PATTriggerMatchSelector< bool, pat::TriggerObjectStandAlone >::operator()().

Member Data Documentation

◆ select_

template<typename T, bool DefaultLazyness = false>
reco::parser::SelectorPtr StringCutObjectSelector< T, DefaultLazyness >::select_
private

◆ type_

template<typename T, bool DefaultLazyness = false>
edm::TypeWithDict StringCutObjectSelector< T, DefaultLazyness >::type_
private
TkAlMuonSelectors_cfi.cut
cut
Definition: TkAlMuonSelectors_cfi.py:5
edm::ObjectWithDict
Definition: ObjectWithDict.h:17
singleTopDQM_cfi.select
select
Definition: singleTopDQM_cfi.py:50
StringCutObjectSelector::select_
reco::parser::SelectorPtr select_
Definition: StringCutObjectSelector.h:29
EcalTangentSkim_cfg.o
o
Definition: EcalTangentSkim_cfg.py:36
T
long double T
Definition: Basic3DVectorLD.h:48
Exception
Definition: hltDiff.cc:246
StringCutObjectSelector::type_
edm::TypeWithDict type_
Definition: StringCutObjectSelector.h:30
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
edm::errors::Configuration
Definition: EDMException.h:36