EIC Software
Reference for
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
RootTrackParameterWriter.hpp
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file RootTrackParameterWriter.hpp
1
// This file is part of the Acts project.
2
//
3
// Copyright (C) 2017-2018 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 "
ActsExamples/Framework/WriterT.hpp
"
12
#include <
Acts/EventData/TrackParameters.hpp
>
13
14
#include <mutex>
15
16
class
TFile;
17
class
TTree;
18
19
namespace
ActsExamples {
20
21
using
BoundTrackParameters
=
Acts::BoundTrackParameters
;
22
using
TrackParameterWriter
=
WriterT<std::vector<BoundTrackParameters>
>;
23
25
26
class
RootTrackParameterWriter
final :
public
TrackParameterWriter
{
27
public
:
28
struct
Config
{
29
std::string
collection
;
30
std::string
filePath
;
31
std::string
fileMode
=
"RECREATE"
;
32
std::string
treeName
=
"trackparameters"
;
33
TFile*
rootFile
=
nullptr
;
34
};
35
40
RootTrackParameterWriter
(
const
Config
& cfg,
41
Acts::Logging::Level
level =
Acts::Logging::INFO
);
42
44
~RootTrackParameterWriter
()
override
;
45
47
ProcessCode
endRun
() final override;
48
49
protected:
53
ProcessCode
writeT
(
54
const
AlgorithmContext
& ctx,
55
const std::
vector
<
BoundTrackParameters
>& trackParams) final override;
56
57
private:
58
Config
m_cfg
;
59
std::mutex
m_writeMutex
;
60
TFile*
m_outputFile
{
nullptr
};
61
TTree*
m_outputTree
{
nullptr
};
62
int
m_eventNr
{0};
63
float
m_d0
{0.};
64
float
m_z0
{0.};
65
float
m_phi
{0.};
66
float
m_theta
{0.};
67
float
m_qp
{0.};
68
};
69
70
}
// namespace ActsExamples
acts
blob
sPHENIX
Examples
Io
Root
include
ActsExamples
Io
Root
RootTrackParameterWriter.hpp
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:25
using
1.8.2 with
EIC GitHub integration