Nymph  v1.5.2
Flow-Based Data Processing Framework
KTTestCuts.hh
Go to the documentation of this file.
1 /*
2  * KTTestCuts.hh
3  *
4  * Created on: Nov 2, 2016
5  * Author: obla999
6  */
7 
8 #ifndef NYMPH_KTTESTCUTS_HH_
9 #define NYMPH_KTTESTCUTS_HH_
10 
11 #include "KTCut.hh"
12 #include "KTData.hh"
13 #include "KTMemberVariable.hh"
14 
15 
16 namespace Nymph
17 {
18 
19  class KTTestData : public KTExtensibleData< KTTestData >
20  {
21  public:
22  KTTestData();
23  virtual ~KTTestData();
24 
25  MEMBERVARIABLE(bool, IsAwesome);
26 
27  public:
28  static const std::string sName;
29 
30  };
31 
32  // Cuts data that is NOT awesome
33  class KTAwesomeCut : public KTCutOneArg< KTTestData >
34  {
35  public:
36  struct Result : KTExtensibleCutResult< Result >
37  {
38  static const std::string sName;
39  };
40 
41  public:
42  KTAwesomeCut(const std::string& name = "default-awesome-cut");
43  virtual ~KTAwesomeCut();
44 
45  bool Configure(const scarab::param_node& node);
46 
47  bool Apply(KTData& data, KTTestData& testData);
48  };
49 
50  // Cuts data that is IS awesome
51  class KTNotAwesomeCut : public KTCutOneArg< KTTestData >
52  {
53  public:
54  struct Result : KTExtensibleCutResult< Result >
55  {
56  static const std::string sName;
57  };
58 
59  public:
60  KTNotAwesomeCut(const std::string& name = "default-not-awesome-cut");
61  virtual ~KTNotAwesomeCut();
62 
63  bool Configure(const scarab::param_node& node);
64 
65  bool Apply(KTData& data, KTTestData& testData);
66  };
67 
68 }
69 
70 
71 #endif /* NYMPH_KTTESTCUTS_HH_ */
static const std::string sName
Definition: KTTestCuts.hh:56
static const std::string sName
Definition: KTTestCuts.hh:38
static const std::string sName
Definition: KTTestCuts.hh:28
MEMBERVARIABLE(bool, IsAwesome)
virtual ~KTTestData()
Definition: KTTestCuts.cc:30