File indexing completed on 2025-04-19 09:06:49
0001
0002 #ifndef RIVET_TRIGGERPROJECTION_HH
0003 #define RIVET_TRIGGERPROJECTION_HH
0004
0005 #include "Rivet/Projection.hh"
0006
0007 namespace Rivet {
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 class TriggerProjection: public Projection {
0019 public:
0020
0021
0022 TriggerProjection() : _passed(true) {
0023 setName("TriggerProjection");
0024 }
0025
0026 virtual ~TriggerProjection() {}
0027
0028
0029 RIVET_DEFAULT_PROJ_CLONE(TriggerProjection);
0030
0031
0032 using Projection::operator =;
0033
0034
0035 bool operator()() const {
0036 return _passed;
0037 }
0038
0039
0040 protected:
0041
0042 virtual void project(const Event&) {
0043 pass();
0044 }
0045
0046
0047 void pass() {
0048 _passed = true;
0049 }
0050
0051
0052 virtual CmpState compare(const Projection&) const {
0053 return CmpState::EQ;
0054 }
0055
0056
0057 void fail() {
0058 _passed = false;
0059 }
0060
0061 protected:
0062
0063 bool _passed;
0064
0065 };
0066
0067
0068 }
0069
0070 #endif