Retagger.h
Go to the documentation of this file.
1 /* The retagger support frame and trace tag rule sets like FrameFanin
2  * and FrameFanout but also support a "merge" ruleset which can
3  * combine trace sets. For exaple an element of the tag_rules in
4  * configuration may look like:
5  {
6  type: "Retagger",
7  data: {
8  tag_rules: [{
9  merge: {
10  "gauss\d": "gauss",
11  "wiener\d": "wiener",
12  }
13  }],
14  }
15  }
16 
17  * This would put all trace sets tagged like gauss0, gauss1, etc into
18  * an output trace set tagged "gauss".
19  *
20  * Note that although Retagger is a 1-1 frame filter, the tag_rules is
21  * a list in order to match the data structure pattern with
22  * FrameFanout and FrameFanin.
23  *
24  * This component, like others that do tag management, do not carry
25  * forward tags by default. Any to be carried forward need to be given
26  * in either the "frame" or "trace" rulesets.
27  */
28 
29 #ifndef WIRECELL_GEN_RETAGGER
30 #define WIRECELL_GEN_RETAGGER
31 
34 #include "WireCellUtil/TagRules.h"
35 
36 namespace WireCell {
37 
38  namespace Gen {
39 
40  class Retagger : public IFrameFilter, public IConfigurable {
41  public:
42  Retagger();
43  virtual ~Retagger();
44 
45  virtual void configure(const WireCell::Configuration& config);
47 
48  virtual bool operator()(const input_pointer& inframe, output_pointer& outframe);
49 
50  private:
52  };
53  }
54 }
55 
56 #endif
virtual void configure(const WireCell::Configuration &config)
Accept a configuration.
Definition: Retagger.cxx:18
std::shared_ptr< const IFrame > input_pointer
Definition: IFunctionNode.h:39
static Config * config
Definition: config.cpp:1054
virtual WireCell::Configuration default_configuration() const
Optional, override to return a hard-coded default configuration.
Definition: Retagger.cxx:24
virtual bool operator()(const input_pointer &inframe, output_pointer &outframe)
The calling signature:
Definition: Retagger.cxx:31
std::shared_ptr< const IFrame > output_pointer
Definition: IFunctionNode.h:40
Definition: Main.h:22
tagrules::Context m_trctx
Definition: Retagger.h:51
Json::Value Configuration
Definition: Configuration.h:50