Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-09-27 07:03:09

0001 #pragma once
0002 
0003 #include <JANA/JApplication.h>
0004 #include <JANA/JEvent.h>
0005 #include <JANA/JEventProcessor.h>
0006 #include <TDirectory.h>
0007 #include <spdlog/fwd.h>
0008 #include <memory>
0009 
0010 class TrackingTest_processor:public JEventProcessor
0011 {
0012 public:
0013     explicit TrackingTest_processor(JApplication *);
0014     ~TrackingTest_processor() override = default;
0015 
0016     //----------------------------
0017     // Init
0018     //
0019     // This is called once before the first call to the Process method
0020     // below. You may, for example, want to open an output file here.
0021     // Only one thread will call this.
0022     void Init() override;
0023 
0024     //----------------------------
0025     // Process
0026     //
0027     // This is called for every event. Multiple threads may call this
0028     // simultaneously. If you write something to an output file here
0029     // then make sure to protect it with a mutex or similar mechanism.
0030     // Minimize what is done while locked since that directly affects
0031     // the multi-threaded performance.
0032     void Process(const std::shared_ptr<const JEvent>& event) override;
0033 
0034     //----------------------------
0035     // Finish
0036     //
0037     // This is called once after all events have been processed. You may,
0038     // for example, want to close an output file here.
0039     // Only one thread will call this.
0040     void Finish() override;
0041 
0042 private:
0043 
0044     //----------------------------
0045     // Test imminent tracking output
0046     void ProcessTrackingResults(const std::shared_ptr<const JEvent>& event);
0047 
0048     void ProcessTrackingMatching(const std::shared_ptr<const JEvent>& event);
0049 
0050     void ProcessGloablMatching(const std::shared_ptr<const JEvent>& event);
0051 
0052 
0053     std::shared_ptr<spdlog::logger> m_log;
0054     TDirectory *m_dir_main;
0055 };