EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
TrackingOccupancy_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
10
11class TrackingOccupancy_processor : public JEventProcessor {
12public:
13 //----------------------------
14 // Init
15 //
16 // This is called once before the first call to the Process method
17 // below. You may, for example, want to open an output file here.
18 // Only one thread will call this.
19 void Init() override;
20
21 //----------------------------
22 // Process
23 //
24 // This is called for every event. Multiple threads may call this
25 // simultaneously. If you write something to an output file here
26 // then make sure to protect it with a mutex or similar mechanism.
27 // Minimize what is done while locked since that directly affects
28 // the multi-threaded performance.
29 void Process(const std::shared_ptr<const JEvent>& event) override;
30
31 //----------------------------
32 // Finish
33 //
34 // This is called once after all events have been processed. You may,
35 // for example, want to close an output file here.
36 // Only one thread will call this.
37 void Finish() override;
38
39private:
40 TrackingOccupancyAnalysis m_occupancy_analysis;
41 HitReconstructionAnalysis m_hit_reco_analysis;
42
43 TDirectory* m_dir_main{};
44
45 std::shared_ptr<spdlog::logger> m_log;
46};
Definition HitReconstructionAnalysis.h:16
Definition TrackingOccupancyAnalysis.h:16
Definition TrackingOccupancy_processor.h:11
void Finish() override
Definition TrackingOccupancy_processor.cc:57
void Process(const std::shared_ptr< const JEvent > &event) override
Definition TrackingOccupancy_processor.cc:46
void Init() override
Definition TrackingOccupancy_processor.cc:17