CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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  :
18  type_(typeid(T)) {
19  if(! reco::parser::cutParser<T>(cut, select_, lazy)) {
21  "failed to parse \"" + cut + "\"");
22  }
23  }
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 24 of file StringCutObjectSelector.h.

24  :
25  select_(select),
26  type_(typeid(T)) {
27  }
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 28 of file StringCutObjectSelector.h.

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

28  {
29  edm::ObjectWithDict o(type_, const_cast<T *>(& t));
30  return (*select_)(o);
31  }
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