|
|
|||
File indexing completed on 2026-05-17 08:10:38
0001 #pragma once 0002 0003 #include <JANA/JEventProcessor.h> 0004 #include <TDirectory.h> 0005 #include <spdlog/fwd.h> 0006 #include <memory> 0007 0008 class TrackingEfficiency_processor : public JEventProcessor { 0009 public: 0010 //---------------------------- 0011 // Init 0012 // 0013 // This is called once before the first call to the Process method 0014 // below. You may, for example, want to open an output file here. 0015 // Only one thread will call this. 0016 void Init() override; 0017 0018 //---------------------------- 0019 // Process 0020 // 0021 // This is called for every event. Multiple threads may call this 0022 // simultaneously. If you write something to an output file here 0023 // then make sure to protect it with a mutex or similar mechanism. 0024 // Minimize what is done while locked since that directly affects 0025 // the multi-threaded performance. 0026 void Process(const std::shared_ptr<const JEvent>& event) override; 0027 0028 //---------------------------- 0029 // Finish 0030 // 0031 // This is called once after all events have been processed. You may, 0032 // for example, want to close an output file here. 0033 // Only one thread will call this. 0034 void Finish() override; 0035 0036 private: 0037 TDirectory* m_dir_main{}; /// Main TDirectory for this plugin 'occupancy_ana' 0038 0039 std::shared_ptr<spdlog::logger> m_log; 0040 };
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|