EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
TrackingTest_processor.h
Go to the documentation of this file.
1#pragma once
2
3#include <JANA/JEvent.h>
4#include <JANA/JEventProcessor.h>
5#include <TDirectory.h>
6#include <spdlog/fwd.h>
7#include <memory>
8
9class TrackingTest_processor : public JEventProcessor {
10public:
11 //----------------------------
12 // Init
13 //
14 // This is called once before the first call to the Process method
15 // below. You may, for example, want to open an output file here.
16 // Only one thread will call this.
17 void Init() override;
18
19 //----------------------------
20 // Process
21 //
22 // This is called for every event. Multiple threads may call this
23 // simultaneously. If you write something to an output file here
24 // then make sure to protect it with a mutex or similar mechanism.
25 // Minimize what is done while locked since that directly affects
26 // the multi-threaded performance.
27 void Process(const std::shared_ptr<const JEvent>& event) override;
28
29 //----------------------------
30 // Finish
31 //
32 // This is called once after all events have been processed. You may,
33 // for example, want to close an output file here.
34 // Only one thread will call this.
35 void Finish() override;
36
37private:
38 //----------------------------
39 // Test imminent tracking output
40 void ProcessTrackingResults(const std::shared_ptr<const JEvent>& event);
41
42 void ProcessTrackingMatching(const std::shared_ptr<const JEvent>& event);
43
44 void ProcessGloablMatching(const std::shared_ptr<const JEvent>& event);
45
46 std::shared_ptr<spdlog::logger> m_log;
47 TDirectory* m_dir_main{};
48};
Definition TrackingTest_processor.h:9
void Init() override
Definition TrackingTest_processor.cc:33
void Finish() override
Definition TrackingTest_processor.cc:70
void Process(const std::shared_ptr< const JEvent > &event) override
Definition TrackingTest_processor.cc:61