Commit c7d40e2ba021264b2dc3bd4e382b56e75bb64f73
0 parents
first commit
Showing
3 changed files
with
118 additions
and
0 deletions
Show diff stats
1 | +++ a/DualTrackTagger/include/DualTrackTaggerModule.h | |
... | ... | @@ -0,0 +1,57 @@ |
1 | +#ifndef DUALTRACKTAGGERMODULE_H | |
2 | +#define DUALTRACKTAGGERMODULE_H | |
3 | + | |
4 | +#include <framework/core/Module.h> | |
5 | + | |
6 | +namespace Belle2 { | |
7 | + /** A module template. | |
8 | + * | |
9 | + * A detailed description of your module. | |
10 | + */ | |
11 | + class DualTrackTaggerModule : public Module { | |
12 | + public: | |
13 | + /** Constructor, for setting module description and parameters. */ | |
14 | + DualTrackTaggerModule(); | |
15 | + | |
16 | + /** Use to clean up anything you created in the constructor. */ | |
17 | + virtual ~DualTrackTaggerModule(); | |
18 | + | |
19 | + /** Use this to initialize resources or memory your module needs. | |
20 | + * | |
21 | + * Also register any outputs of your module (StoreArrays, StoreObjPtrs, relations) here, | |
22 | + * see the respective class documentation for details. | |
23 | + */ | |
24 | + virtual void initialize() override; | |
25 | + | |
26 | + /** Called once before a new run begins. | |
27 | + * | |
28 | + * This method gives you the chance to change run dependent constants like alignment parameters, etc. | |
29 | + */ | |
30 | + virtual void beginRun() override; | |
31 | + | |
32 | + /** Called once for each event. | |
33 | + * | |
34 | + * This is most likely where your module will actually do anything. | |
35 | + */ | |
36 | + virtual void event() override; | |
37 | + | |
38 | + /** Called once when a run ends. | |
39 | + * | |
40 | + * Use this method to save run information, which you aggregated over the last run. | |
41 | + */ | |
42 | + virtual void endRun() override; | |
43 | + | |
44 | + /** Clean up anything you created in initialize(). */ | |
45 | + virtual void terminate() override; | |
46 | + protected: | |
47 | + //definition of input parameters | |
48 | + | |
49 | + | |
50 | + private: | |
51 | + //define your own data members here | |
52 | + virtual void tagDuplicate(); | |
53 | + virtual bool compareTracks(); | |
54 | + virtual void identifyPotentialDuplicateTracks(); | |
55 | + }; | |
56 | +} | |
57 | +#endif | ... | ... |
1 | +++ a/DualTrackTagger/src/DualTrackTaggerModule.cc | |
... | ... | @@ -0,0 +1,56 @@ |
1 | +#include <analysis/modules/DualTrackTagger/DualTrackTaggerModule.h> | |
2 | + | |
3 | +//avoid having to wrap everything in the namespace explicitly | |
4 | +//only permissible in .cc files! | |
5 | +using namespace Belle2; | |
6 | + | |
7 | +//this line registers the module with the framework and actually makes it available | |
8 | +//in steering files or the the module list (basf2 -m). | |
9 | +//Note that the 'Module' part of the class name is missing, this is also the way it | |
10 | +//will be called in the module list. | |
11 | +REG_MODULE(DualTrackTagger) | |
12 | + | |
13 | +DualTrackTaggerModule::DualTrackTaggerModule() : Module() | |
14 | +{ | |
15 | + setDescription("Dual Track Tagger Module"); | |
16 | + | |
17 | + //add module parameters here [see one of the following tutorials] | |
18 | +} | |
19 | + | |
20 | + | |
21 | +DualTrackTaggerModule::~DualTrackTaggerModule() | |
22 | +{ | |
23 | +} | |
24 | + | |
25 | + | |
26 | +void DualTrackTaggerModule::initialize() | |
27 | +{ | |
28 | +} | |
29 | + | |
30 | +void DualTrackTaggerModule::beginRun() | |
31 | +{ | |
32 | +} | |
33 | + | |
34 | +void DualTrackTaggerModule::event() | |
35 | +{ | |
36 | +} | |
37 | + | |
38 | +void DualTrackTaggerModule::endRun() | |
39 | +{ | |
40 | +} | |
41 | + | |
42 | +void DualTrackTaggerModule::terminate() | |
43 | +{ | |
44 | +} | |
45 | + | |
46 | +void DualTrackTaggerModule::identifyPotentialDuplicateTracks() | |
47 | +{ | |
48 | +} | |
49 | + | |
50 | +bool DualTrackTaggerModule::compareTracks() | |
51 | +{ | |
52 | +} | |
53 | + | |
54 | +void DualTrackTaggerModule::tagDuplicate() | |
55 | +{ | |
56 | +} | ... | ... |