ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
|
#include <acts/blob/master/Examples/Framework/include/ACTFW/Framework/Sequencer.hpp>
Classes | |
struct | Config |
Public Member Functions | |
Sequencer (const Config &cfg) | |
void | addService (std::shared_ptr< IService > service) |
void | addContextDecorator (std::shared_ptr< IContextDecorator > decorator) |
void | addReader (std::shared_ptr< IReader > reader) |
void | addAlgorithm (std::shared_ptr< IAlgorithm > algorithm) |
void | addWriter (std::shared_ptr< IWriter > writer) |
int | run () |
Private Member Functions | |
std::vector< std::string > | listAlgorithmNames () const |
List of all configured algorithm names. | |
std::pair< size_t, size_t > | determineEventsRange () const |
Determine range of (requested) events; [SIZE_MAX, SIZE_MAX) for error. | |
const Acts::Logger & | logger () const |
Private Attributes | |
Config | m_cfg |
std::vector< std::shared_ptr < IService > > | m_services |
std::vector< std::shared_ptr < IContextDecorator > > | m_decorators |
std::vector< std::shared_ptr < IReader > > | m_readers |
std::vector< std::shared_ptr < IAlgorithm > > | m_algorithms |
std::vector< std::shared_ptr < IWriter > > | m_writers |
std::unique_ptr< const Acts::Logger > | m_logger |
A simple algorithm sequencer for event processing.
This is the backbone of the framework. It reads events from file, runs the configured algorithms for each event, and writes selected data back to a file.
Definition at line 31 of file Sequencer.hpp.
View newest version in sPHENIX GitHub at line 31 of file Sequencer.hpp
FW::Sequencer::Sequencer | ( | const Config & | cfg | ) |
Definition at line 24 of file Sequencer.cpp.
View newest version in sPHENIX GitHub at line 24 of file Sequencer.cpp
References m_cfg, and FW::Sequencer::Config::numThreads.
void FW::Sequencer::addAlgorithm | ( | std::shared_ptr< IAlgorithm > | algorithm | ) |
Append an algorithm to the sequence of algorithms.
std::invalid_argument | if the algorithm is NULL. |
Definition at line 59 of file Sequencer.cpp.
View newest version in sPHENIX GitHub at line 59 of file Sequencer.cpp
References ACTS_INFO.
Referenced by main(), materialMappingExample(), and propagationExample().
void FW::Sequencer::addContextDecorator | ( | std::shared_ptr< IContextDecorator > | decorator | ) |
Add a context decorator to the set of context decorators.
std::invalid_argument | if the decorator is NULL. |
Definition at line 42 of file Sequencer.cpp.
View newest version in sPHENIX GitHub at line 42 of file Sequencer.cpp
References ACTS_INFO.
Referenced by main(), and propagationExample().
Add a reader to the set of readers.
std::invalid_argument | if the reader is NULL. |
Definition at line 51 of file Sequencer.cpp.
View newest version in sPHENIX GitHub at line 51 of file Sequencer.cpp
References ACTS_INFO.
Referenced by main(), and materialMappingExample().
Add a service to the set of services.
std::invalid_argument | if the service is NULL. |
Definition at line 34 of file Sequencer.cpp.
View newest version in sPHENIX GitHub at line 34 of file Sequencer.cpp
References ACTS_INFO.
Add a writer to the set of writers.
std::invalid_argument | if the writer is NULL. |
Definition at line 67 of file Sequencer.cpp.
View newest version in sPHENIX GitHub at line 67 of file Sequencer.cpp
References ACTS_INFO.
Referenced by main(), materialMappingExample(), materialValidationExample(), and propagationExample().
|
private |
Determine range of (requested) events; [SIZE_MAX, SIZE_MAX) for error.
Definition at line 109 of file Sequencer.cpp.
View newest version in sPHENIX GitHub at line 109 of file Sequencer.cpp
References ACTS_ERROR, ACTS_INFO, max, min, and Acts::UnitConstants::u.
|
private |
List of all configured algorithm names.
Definition at line 75 of file Sequencer.cpp.
View newest version in sPHENIX GitHub at line 75 of file Sequencer.cpp
References algorithm.
|
inlineprivate |
Definition at line 111 of file Sequencer.hpp.
View newest version in sPHENIX GitHub at line 111 of file Sequencer.hpp
References m_logger.
int FW::Sequencer::run | ( | ) |
Run the event loop.
main()
return code This function is intended to be run as the last thing in the tool main function and its return value can be used directly as the program return value, i.e.
int main(int argc, char* argv[]) { Sequencer::Config cfg; ... // configure the sequencer Sequencer seq; ... // set up the algorithms return seq.run(); }
This will run the start-of-run hook for all configured services, run all configured readers, algorithms, and writers for each event, then invoke the end-of-run hook for all configured writers.
Decorate the context
Definition at line 226 of file Sequencer.cpp.
View newest version in sPHENIX GitHub at line 226 of file Sequencer.cpp
References ACTS_INFO, Acts::getDefaultLogger(), init(), r, SUCCESS, sw, nlohmann::to_string(), and zero.
Referenced by main(), materialMappingExample(), materialValidationExample(), and propagationExample().
|
private |
Definition at line 107 of file Sequencer.hpp.
View newest version in sPHENIX GitHub at line 107 of file Sequencer.hpp
|
private |
Definition at line 103 of file Sequencer.hpp.
View newest version in sPHENIX GitHub at line 103 of file Sequencer.hpp
Referenced by Sequencer().
|
private |
Definition at line 105 of file Sequencer.hpp.
View newest version in sPHENIX GitHub at line 105 of file Sequencer.hpp
|
private |
Definition at line 109 of file Sequencer.hpp.
View newest version in sPHENIX GitHub at line 109 of file Sequencer.hpp
Referenced by logger().
|
private |
Definition at line 106 of file Sequencer.hpp.
View newest version in sPHENIX GitHub at line 106 of file Sequencer.hpp
|
private |
Definition at line 104 of file Sequencer.hpp.
View newest version in sPHENIX GitHub at line 104 of file Sequencer.hpp
|
private |
Definition at line 108 of file Sequencer.hpp.
View newest version in sPHENIX GitHub at line 108 of file Sequencer.hpp