CMS 3D CMS Logo

PdgIdSelector Struct Reference

#include <PhysicsTools/Utilities/interface/PdgIdSelector.h>

List of all members.

Public Member Functions

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

Private Attributes

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


Detailed Description

Definition at line 12 of file PdgIdSelector.h.


Constructor & Destructor Documentation

PdgIdSelector::PdgIdSelector ( const std::vector< int > &  pdgId  )  [inline]

Definition at line 13 of file PdgIdSelector.h.

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

00013                                                 { 
00014     for( std::vector<int>::const_iterator i = pdgId.begin(); i != pdgId.end(); ++ i )
00015       pdgId_.push_back( abs( * i ) );
00016      begin_ = pdgId_.begin();
00017      end_ = pdgId_.end();
00018   }

PdgIdSelector::PdgIdSelector ( const PdgIdSelector o  )  [inline]

Definition at line 19 of file PdgIdSelector.h.

00019                                            :
00020     pdgId_( o.pdgId_ ), begin_( pdgId_.begin() ), end_( pdgId_.end() ) { }
  PdgIdSelector & operator==( const PdgIdSelector & o ) {


Member Function Documentation

template<typename T>
bool PdgIdSelector::operator() ( const T &  t  )  const [inline]

Definition at line 25 of file PdgIdSelector.h.

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

00025                                        { 
00026     return std::find( begin_, end_, abs( t.pdgId() ) ) != end_;
00027   }

PdgIdSelector& PdgIdSelector::operator== ( const PdgIdSelector o  )  [inline]

Definition at line 21 of file PdgIdSelector.h.

00021                                                         {
00022     * this = o; return * this;
00023   }


Member Data Documentation

std::vector<int>::const_iterator PdgIdSelector::begin_ [private]

Definition at line 30 of file PdgIdSelector.h.

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

std::vector<int>::const_iterator PdgIdSelector::end_ [private]

Definition at line 30 of file PdgIdSelector.h.

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

std::vector<int> PdgIdSelector::pdgId_ [private]

Definition at line 29 of file PdgIdSelector.h.

Referenced by PdgIdSelector().


The documentation for this struct was generated from the following file:
Generated on Tue Jun 9 18:29:29 2009 for CMSSW by  doxygen 1.5.4