rivet is hosted by Hepforge, IPPP Durham

AND, OR, NOT, and XOR objects for combining cuts. More...

Inheritance diagram for CutsOr:
Collaboration diagram for CutsOr:

List of all members.

Public Member Functions

 CutsOr (const Cut &c1, const Cut &c2)
bool operator== (const Cut &c) const
 Comparison to another Cut.
template<typename ClassToCheck >
bool accept (const ClassToCheck &) const
template<>
bool accept (const CuttableBase &t) const
template<typename ClassToCheck >
bool operator() (const ClassToCheck &x) const
 Call operator alias for accept.

Protected Member Functions

bool _accept (const CuttableBase &o) const

Private Attributes

const Cut cut1
const Cut cut2

Detailed Description

AND, OR, NOT, and XOR objects for combining cuts.

Combiners

Definition at line 188 of file Cuts.cc.


Constructor & Destructor Documentation

CutsOr ( const Cut c1,
const Cut c2 
) [inline]

Definition at line 190 of file Cuts.cc.

: cut1(c1), cut2(c2) {}

Member Function Documentation

bool _accept ( const CuttableBase o) const [inline, protected, virtual]

Implements CutBase.

Definition at line 197 of file Cuts.cc.

References CutsOr::cut1, and CutsOr::cut2.

                                              {
      return cut1->accept(o) || cut2->accept(o);
    }
bool accept ( const ClassToCheck &  ) const [inherited]

Main work method, checking whether the cut is passed

Referenced by CutBase::operator()().

bool accept ( const CuttableBase t) const [inherited]

Definition at line 23 of file Cuts.cc.

                                                                {
    return _accept(t);
  }
bool operator() ( const ClassToCheck &  x) const [inline, inherited]

Call operator alias for accept.

Note:
A bit subtle, because this gets wrapped in a shared_ptr so you need to dereference to get the functor

Definition at line 21 of file Cuts.hh.

References CutBase::accept().

{ return accept(x); }
bool operator== ( const Cut ) const [inline, virtual]

Comparison to another Cut.

Implements CutBase.

Definition at line 191 of file Cuts.cc.

References CutsOr::cut1, and CutsOr::cut2.

                                        {
      std::shared_ptr<CutsOr> cc = dynamic_pointer_cast<CutsOr>(c);
      return cc && (   ( cut1 == cc->cut1  &&  cut2 == cc->cut2 )
                       || ( cut1 == cc->cut2  &&  cut2 == cc->cut1 ));
    }

Member Data Documentation

const Cut cut1 [private]

Definition at line 201 of file Cuts.cc.

Referenced by CutsOr::_accept(), and CutsOr::operator==().

const Cut cut2 [private]

Definition at line 202 of file Cuts.cc.

Referenced by CutsOr::_accept(), and CutsOr::operator==().


The documentation for this class was generated from the following file: