EICrecon
JANA based reconstruction for the EPIC detector
Loading...
Searching...
No Matches
PrimaryVertices_factory.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-3.0-or-later
2// Copyright (C) 2024 Xin Dong
3
4#pragma once
5
6#include <JANA/JEvent.h>
7#include <memory>
8#include <string>
9#include <utility>
10#include <vector>
11
16
17namespace eicrecon {
18
20 : public JOmniFactory<PrimaryVertices_factory, PrimaryVerticesConfig> {
21
22public:
24
25private:
26 std::unique_ptr<AlgoT> m_algo;
27
28 PodioInput<edm4eic::Vertex> m_rc_vertices_input{this};
29
30 // Declare outputs
31 PodioOutput<edm4eic::Vertex> m_primary_vertices_output{this};
32
33 Service<AlgorithmsInit_service> m_algorithmsInit{this};
34
35public:
36 void Configure() {
37 m_algo = std::make_unique<AlgoT>(GetPrefix());
38 m_algo->level((algorithms::LogLevel)logger()->level());
39
40 m_algo->applyConfig(config());
41 m_algo->init();
42 }
43
44 void Process(int32_t /* run_number */, uint64_t /* event_number */) {
45 m_algo->process({m_rc_vertices_input()}, {m_primary_vertices_output().get()});
46 }
47};
48
49} // namespace eicrecon
Definition JOmniFactory.h:30
PrimaryVerticesConfig & config()
Retrieve reference to embedded config object.
Definition JOmniFactory.h:576
std::shared_ptr< spdlog::logger > & logger()
Retrieve reference to already-configured logger.
Definition JOmniFactory.h:573
std::string GetPrefix()
Definition JOmniFactory.h:570
Definition PrimaryVertices_factory.h:20
void Configure()
Definition PrimaryVertices_factory.h:36
void Process(int32_t, uint64_t)
Definition PrimaryVertices_factory.h:44
Definition PrimaryVertices.h:21
-client
Definition CalorimeterClusterRecoCoG.cc:37