HepMC_helper::NCutter Class Reference

#include <NCutter.h>

Inheritance diagram for HepMC_helper::NCutter:

Inheritance graph
[legend]
Collaboration diagram for HepMC_helper::NCutter:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 NCutter ()
 NCutter (const Selectors selectors)
 NCutter (const IMCselector *selector)
 NCutter (const NCutter &src)
 ~NCutter ()
IMCselectorcreate () const
bool operator() (const Particle *const) const
bool operator() (const Particle &p) const
bool operator() (const Particle &p)

Private Types

typedef std::vector< IMCselector * > Selectors

Private Attributes

Selectors m_selectors

Detailed Description

Definition at line 27 of file NCutter.h.


Member Typedef Documentation

typedef std::vector<IMCselector*> HepMC_helper::NCutter::Selectors [private]

Definition at line 28 of file NCutter.h.


Constructor & Destructor Documentation

HepMC_helper::NCutter::NCutter (  )  [inline]

Definition at line 34 of file NCutter.h.

00034 {m_selectors.push_back( new All() ); }

HepMC_helper::NCutter::NCutter ( const Selectors  selectors  )  [inline]

Definition at line 36 of file NCutter.h.

00036                                       {
00037       Selectors::const_iterator i=selectors.begin();
00038       for(; i != selectors.end(); ++i) m_selectors.push_back((*i)->create());
00039     }

HepMC_helper::NCutter::NCutter ( const IMCselector selector  )  [inline]

Definition at line 41 of file NCutter.h.

00041                                         { 
00042       m_selectors.push_back(selector->create() );
00043     }    

HepMC_helper::NCutter::NCutter ( const NCutter src  )  [inline]

Definition at line 45 of file NCutter.h.

00045                                  :IMCselector(){
00046       Selectors::const_iterator i=(src.m_selectors).begin();
00047       for(;i != (src.m_selectors).end(); ++i){
00048         m_selectors.push_back((*i)->create());
00049       }
00050     }  

HepMC_helper::NCutter::~NCutter (  )  [inline]

Definition at line 52 of file NCutter.h.

00052                {
00053       Selectors::iterator i=m_selectors.begin();
00054       for(; i != m_selectors.end(); ++i) delete(*i);
00055     }


Member Function Documentation

IMCselector * HepMC_helper::NCutter::create (  )  const [virtual]

Implements HepMC_helper::IMCselector.

Definition at line 103 of file HepMC_helper.cxx.

00103 {return new NCutter(*this);}

bool HepMC_helper::NCutter::operator() ( const Particle const  )  const [virtual]

Implements HepMC_helper::IMCselector.

Definition at line 93 of file HepMC_helper.cxx.

00093                                                           {
00094     for (vector<IMCselector*>::const_iterator i = m_selectors.begin();
00095          i != m_selectors.end(); i++) { 
00096       if ( !(*i)->operator()(p) ) return false;
00097     }
00098     return true;
00099   }

bool HepMC_helper::NCutter::operator() ( const Particle p  )  const

Definition at line 100 of file HepMC_helper.cxx.

00100                                                      {
00101     return this->operator()(&p);
00102   } 

bool HepMC_helper::IMCselector::operator() ( const Particle p  )  [inline, inherited]

Definition at line 27 of file IMCselector.h.

00027 {return this->operator()(&p);} 


Member Data Documentation

Selectors HepMC_helper::NCutter::m_selectors [private]

Definition at line 30 of file NCutter.h.


The documentation for this class was generated from the following files:
Generated on Fri Sep 21 13:20:59 2007 for AtlfastUtils by  doxygen 1.5.1