rivet is hosted by Hepforge, IPPP Durham
Inheritance diagram for CutsXor:
Collaboration diagram for CutsXor:

List of all members.

Public Member Functions

 CutsXor (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

Protected Member Functions

bool _accept (const CuttableBase &o) const

Private Attributes

const Cut cut1
const Cut cut2

Detailed Description

Definition at line 199 of file Cuts.cc.


Constructor & Destructor Documentation

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

Definition at line 201 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 208 of file Cuts.cc.

References CutsXor::cut1, and CutsXor::cut2.

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

Main work method.

bool accept ( const CuttableBase t) const [inherited]

Definition at line 26 of file Cuts.cc.

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

Comparison to another Cut.

Implements CutBase.

Definition at line 202 of file Cuts.cc.

References CutsXor::cut1, and CutsXor::cut2.

                                         {
      shared_ptr<CutsXor> cc = dynamic_pointer_cast<CutsXor>(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 214 of file Cuts.cc.

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

const Cut cut2 [private]

Definition at line 215 of file Cuts.cc.

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


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