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