Commit a153471c authored by Simon Spannagel's avatar Simon Spannagel
Browse files

Allow requiring "number_of_tracks" along with "number_of_events"

parent e2d6f9c5
Pipeline #237494 failed with stages
in 2 minutes and 57 seconds
......@@ -312,8 +312,9 @@ Algorithm* Analysis::create_algorithm(void* library, Configuration config) {
// Run the analysis loop - this initialises, runs and finalises all algorithms
void Analysis::run() {
// Check if we have an event limit:
// Check if we have an event or track limit:
int number_of_events = global_config.get<int>("number_of_events", -1);
int number_of_tracks = global_config.get<int>("number_of_tracks", -1);
// Loop over all events, running each algorithm on each "event"
LOG(STATUS) << "========================| Event loop |========================";
......@@ -329,6 +330,10 @@ void Analysis::run() {
if(number_of_events > -1 && m_events >= number_of_events)
break;
// Check if we have reached the maximum number of tracks
if(number_of_tracks > -1 && m_tracks >= number_of_tracks)
break;
// Run all algorithms
for(auto& algorithm : m_algorithms) {
// Set run module section header
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment