ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Sequencer.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Sequencer.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2017 CERN for the benefit of the Acts project
4
//
5
// This Source Code Form is subject to the terms of the Mozilla Public
6
// License, v. 2.0. If a copy of the MPL was not distributed with this
7
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
9
#pragma once
10
11
#include <
Acts/Utilities/Logger.hpp
>
12
#include <cstddef>
13
#include <memory>
14
#include <string>
15
#include <utility>
16
#include <vector>
17
18
#include "
ACTFW/Framework/IAlgorithm.hpp
"
19
#include "
ACTFW/Framework/IContextDecorator.hpp
"
20
#include "
ACTFW/Framework/IReader.hpp
"
21
#include "
ACTFW/Framework/IService.hpp
"
22
#include "
ACTFW/Framework/IWriter.hpp
"
23
24
namespace
FW {
25
31
class
Sequencer
{
32
public
:
33
struct
Config
{
35
size_t
skip
= 0;
37
size_t
events
= SIZE_MAX;
39
Acts::Logging::Level
logLevel
=
Acts::Logging::INFO
;
41
int
numThreads
= -1;
43
std::string
outputDir
;
44
};
45
46
Sequencer
(
const
Config
& cfg);
47
51
void
addService
(std::shared_ptr<IService> service);
55
void
addContextDecorator
(std::shared_ptr<IContextDecorator> decorator);
59
void
addReader
(std::shared_ptr<IReader> reader);
63
void
addAlgorithm
(std::shared_ptr<IAlgorithm>
algorithm
);
67
void
addWriter
(std::shared_ptr<IWriter> writer);
68
95
int
run
();
96
97
private
:
99
std::vector<std::string>
listAlgorithmNames
()
const
;
101
std::pair<size_t, size_t>
determineEventsRange
()
const
;
102
103
Config
m_cfg
;
104
std::vector<std::shared_ptr<IService>>
m_services
;
105
std::vector<std::shared_ptr<IContextDecorator>>
m_decorators
;
106
std::vector<std::shared_ptr<IReader>>
m_readers
;
107
std::vector<std::shared_ptr<IAlgorithm>>
m_algorithms
;
108
std::vector<std::shared_ptr<IWriter>>
m_writers
;
109
std::unique_ptr<const Acts::Logger>
m_logger
;
110
111
const
Acts::Logger
&
logger
()
const
{
return
*
m_logger
; }
112
};
113
114
}
// namespace FW
acts
blob
master
Examples
Framework
include
ACTFW
Framework
Sequencer.hpp
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:23
using
1.8.2 with
ECCE GitHub integration