Rivet API documentation

Rivet 4.1.3
TriggerProjection.hh
1// -*- C++ -*-
2#ifndef RIVET_TRIGGERPROJECTION_HH
3#define RIVET_TRIGGERPROJECTION_HH
4
5#include "Rivet/Projection.hh"
6
7namespace Rivet {
8
9
19 public:
20
23 : _passed(true) {
24 setName("TriggerProjection");
25 }
26
27 virtual ~TriggerProjection() { }
28
31
33 using Projection::operator=;
34
36 bool operator()() const {
37 return _passed;
38 }
39
40
41 protected:
42
43 virtual void project(const Event&) {
44 pass();
45 }
46
48 void pass() {
49 _passed = true;
50 }
51
53 virtual CmpState compare(const Projection&) const {
54 return CmpState::EQ;
55 }
56
58 void fail() {
59 _passed = false;
60 }
61
62 protected:
63
64 bool _passed;
65 };
66
67
68}
69
70#endif
Projection()
The default constructor.
friend class Event
Event is a friend.
Definition Projection.hh:33
void setName(const std::string &name)
Used by derived classes to set their name.
Definition Projection.hh:146
Base class for projections returning a bool corresponding to a trigger.
Definition TriggerProjection.hh:18
virtual CmpState compare(const Projection &) const
Compare projections.
Definition TriggerProjection.hh:53
void fail()
Indicate that the event has failed the trigger.
Definition TriggerProjection.hh:58
bool operator()() const
Return true if the event has passed some trigger or selection criteria.
Definition TriggerProjection.hh:36
TriggerProjection()
The default constructor.
Definition TriggerProjection.hh:22
virtual void project(const Event &)
Definition TriggerProjection.hh:43
RIVET_DEFAULT_PROJ_CLONE(TriggerProjection)
Clone on the heap.
void pass()
Indicate that the event has passed the trigger.
Definition TriggerProjection.hh:48
Definition LHCbCommon.hh:9