CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 std::string &cut, bool lazy=DefaultLazyness)
 
 StringCutObjectSelector (const reco::parser::SelectorPtr &select)
 

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

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  }
reco::parser::SelectorPtr select_
long double T
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)) {}
reco::parser::SelectorPtr select_
long double T

Member Function Documentation

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

Definition at line 23 of file StringCutObjectSelector.h.

Referenced by pat::PATTriggerMatchSelector< T1, T2 >::operator()().

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

Member Data Documentation

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