test
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
PdgIdExcluder Struct Reference

#include <PdgIdExcluder.h>

Public Member Functions

template<typename T >
bool operator() (const T &t) const
 
PdgIdExcluderoperator= (const PdgIdExcluder &o)
 
 PdgIdExcluder (const std::vector< int > &pdgId)
 
 PdgIdExcluder (const PdgIdExcluder &o)
 

Private Attributes

std::vector< int >::const_iterator begin_
 
std::vector< int >::const_iterator end_
 
std::vector< int > pdgId_
 

Detailed Description

Definition at line 12 of file PdgIdExcluder.h.

Constructor & Destructor Documentation

PdgIdExcluder::PdgIdExcluder ( const std::vector< int > &  pdgId)
inline

Definition at line 13 of file PdgIdExcluder.h.

References funct::abs(), begin_, end_, i, and pdgId_.

13  {
14  for( std::vector<int>::const_iterator i = pdgId.begin(); i != pdgId.end(); ++ i )
15  pdgId_.push_back( abs( * i ) );
16  begin_ = pdgId_.begin();
17  end_ = pdgId_.end();
18  }
int i
Definition: DBlmapReader.cc:9
std::vector< int > pdgId_
Definition: PdgIdExcluder.h:29
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< int >::const_iterator end_
Definition: PdgIdExcluder.h:30
std::vector< int >::const_iterator begin_
Definition: PdgIdExcluder.h:30
PdgIdExcluder::PdgIdExcluder ( const PdgIdExcluder o)
inline

Definition at line 19 of file PdgIdExcluder.h.

19  :
20  pdgId_( o.pdgId_ ), begin_( pdgId_.begin() ), end_( pdgId_.end() ) { }
std::vector< int > pdgId_
Definition: PdgIdExcluder.h:29
std::vector< int >::const_iterator end_
Definition: PdgIdExcluder.h:30
std::vector< int >::const_iterator begin_
Definition: PdgIdExcluder.h:30

Member Function Documentation

template<typename T >
bool PdgIdExcluder::operator() ( const T t) const
inline

Definition at line 25 of file PdgIdExcluder.h.

References funct::abs(), begin_, end_, and spr::find().

25  {
26  return std::find( begin_, end_, abs( t.pdgId() ) ) == end_;
27  }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
std::vector< int >::const_iterator end_
Definition: PdgIdExcluder.h:30
std::vector< int >::const_iterator begin_
Definition: PdgIdExcluder.h:30
PdgIdExcluder& PdgIdExcluder::operator= ( const PdgIdExcluder o)
inline

Definition at line 21 of file PdgIdExcluder.h.

References connectstrParser::o.

21  {
22  * this = o; return * this;
23  }

Member Data Documentation

std::vector<int>::const_iterator PdgIdExcluder::begin_
private

Definition at line 30 of file PdgIdExcluder.h.

Referenced by operator()(), and PdgIdExcluder().

std::vector<int>::const_iterator PdgIdExcluder::end_
private

Definition at line 30 of file PdgIdExcluder.h.

Referenced by operator()(), and PdgIdExcluder().

std::vector<int> PdgIdExcluder::pdgId_
private

Definition at line 29 of file PdgIdExcluder.h.

Referenced by PdgIdExcluder().