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