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
HelloService.cpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file HelloService.cpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2019 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
#include "
HelloService.hpp
"
10
11
#include "
ACTFW/Framework/WhiteBoard.hpp
"
12
13
namespace
FW {
14
15
HelloService::HelloService
(
const
Config
& cfg,
Acts::Logging::Level
level)
16
:
BareService
(
"HelloService"
, level), m_cfg(cfg) {}
17
18
void
HelloService::startRun
() {
19
// nothing to do for this example service.
20
// in a real service this is would be a good place to run costly one-time
21
// initialization.
22
}
23
24
void
HelloService::prepare
(
AlgorithmContext
& ctx) {
25
// integer division should round down
26
std::size_t blockIndex = ctx.
eventNumber
/
m_cfg
.
eventsPerBlock
;
27
// add block index to the event store
28
ctx.
eventStore
.
add
(
m_cfg
.
blockIndexName
, std::move(blockIndex));
29
}
30
31
}
// namespace FW
acts
blob
master
Examples
Run
HelloWorld
HelloService.cpp
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:24:24
using
1.8.2 with
ECCE GitHub integration