-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #341 from JeffersonLab/nbrei_examples_testing
Fix examples and add testing to CI
- Loading branch information
Showing
19 changed files
with
193 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// Copyright 2024, Jefferson Science Associates, LLC. | ||
// Subject to the terms in the LICENSE file found in the top-level directory. | ||
|
||
|
||
#include <JANA/Topology/JEventTapArrow.h> | ||
#include <JANA/Utils/JEventPool.h> | ||
#include <JANA/JEventProcessor.h> | ||
#include <JANA/JEventUnfolder.h> | ||
#include <JANA/JEvent.h> | ||
|
||
|
||
JEventTapArrow::JEventTapArrow(std::string name, | ||
EventQueue *input_queue, | ||
EventQueue *output_queue, | ||
JEventPool *pool) | ||
: JPipelineArrow(std::move(name), | ||
false, | ||
false, | ||
false, | ||
input_queue, | ||
output_queue, | ||
pool) {} | ||
|
||
void JEventTapArrow::add_processor(JEventProcessor* proc) { | ||
m_procs.push_back(proc); | ||
} | ||
|
||
void JEventTapArrow::process(Event* event, bool& success, JArrowMetrics::Status& status) { | ||
|
||
LOG_DEBUG(m_logger) << "JEventTapArrow '" << get_name() << "': Starting event# " << (*event)->GetEventNumber() << LOG_END; | ||
for (JEventProcessor* proc : m_procs) { | ||
JCallGraphEntryMaker cg_entry(*(*event)->GetJCallGraphRecorder(), proc->GetTypeName()); // times execution until this goes out of scope | ||
if (proc->GetCallbackStyle() != JEventProcessor::CallbackStyle::LegacyMode) { | ||
proc->DoTap(*event); | ||
} | ||
} | ||
LOG_DEBUG(m_logger) << "JEventTapArrow '" << get_name() << "': Finished event# " << (*event)->GetEventNumber() << LOG_END; | ||
success = true; | ||
status = JArrowMetrics::Status::KeepGoing; | ||
} | ||
|
||
void JEventTapArrow::initialize() { | ||
LOG_DEBUG(m_logger) << "Initializing arrow '" << get_name() << "'" << LOG_END; | ||
for (auto processor : m_procs) { | ||
processor->DoInitialize(); | ||
LOG_INFO(m_logger) << "Initialized JEventProcessor '" << processor->GetTypeName() << "'" << LOG_END; | ||
} | ||
} | ||
|
||
void JEventTapArrow::finalize() { | ||
LOG_DEBUG(m_logger) << "Finalizing arrow '" << get_name() << "'" << LOG_END; | ||
for (auto processor : m_procs) { | ||
processor->DoFinalize(); | ||
LOG_INFO(m_logger) << "Finalized JEventProcessor '" << processor->GetTypeName() << "'" << LOG_END; | ||
} | ||
} | ||
|
Oops, something went wrong.