CMS 3D CMS Logo

Public Member Functions | Private Attributes

StringCutObjectSelector< T, DefaultLazyness > Struct Template Reference

#include <StringCutObjectSelector.h>

List of all members.

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.

                                                                            : 
    type_(typeid(T)) {
    if(! reco::parser::cutParser<T>(cut, select_, lazy)) {
      throw edm::Exception(edm::errors::Configuration,
                           "failed to parse \"" + cut + "\"");
    }
  }
template<typename T, bool DefaultLazyness = false>
StringCutObjectSelector< T, DefaultLazyness >::StringCutObjectSelector ( const reco::parser::SelectorPtr select) [inline]

Definition at line 24 of file StringCutObjectSelector.h.

                                                                : 
    select_(select),
    type_(typeid(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.

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

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]