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
G4BaseNtupleManager.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4BaseNtupleManager.cc
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
27
// Author: Ivana Hrivnacova, 20/07/2017 (ivana@ipno.in2p3.fr)
28
29
#include "
G4BaseNtupleManager.hh
"
30
31
//_____________________________________________________________________________
32
G4BaseNtupleManager::G4BaseNtupleManager
(
const
G4AnalysisManagerState
& state)
33
:
G4VNtupleManager
(state),
34
fFirstNtupleColumnId(0),
35
fLockFirstNtupleColumnId(
false
)
36
{}
37
38
//_____________________________________________________________________________
39
G4BaseNtupleManager::~G4BaseNtupleManager
()
40
{
41
}
42
43
//
44
// private methods
45
//
46
47
//_____________________________________________________________________________
48
G4int
G4BaseNtupleManager::GetCurrentNtupleId
()
const
49
{
50
return
GetNofNtupleBookings
() +
fFirstId
- 1;
51
}
52
53
//
54
// protected methods
55
//
56
57
//_____________________________________________________________________________
58
G4int
G4BaseNtupleManager::CreateNtupleIColumn
(
const
G4String
&
name
,
59
std::vector<int>* vector)
60
{
61
return
CreateNtupleIColumn
(
GetCurrentNtupleId
(), name, vector);
62
}
63
64
//_____________________________________________________________________________
65
G4int
G4BaseNtupleManager::CreateNtupleFColumn
(
const
G4String
&
name
,
66
std::vector<float>* vector)
67
{
68
return
CreateNtupleFColumn
(
GetCurrentNtupleId
(), name, vector);
69
}
70
71
//_____________________________________________________________________________
72
G4int
G4BaseNtupleManager::CreateNtupleDColumn
(
const
G4String
&
name
,
73
std::vector<double>* vector)
74
{
75
return
CreateNtupleDColumn
(
GetCurrentNtupleId
(), name, vector);
76
}
77
78
//_____________________________________________________________________________
79
G4int
G4BaseNtupleManager::CreateNtupleSColumn
(
const
G4String
&
name
)
80
{
81
return
CreateNtupleSColumn
(
GetCurrentNtupleId
(), name);
82
}
83
84
//_____________________________________________________________________________
85
void
G4BaseNtupleManager::FinishNtuple
()
86
{
87
return
FinishNtuple
(
GetCurrentNtupleId
());
88
}
89
90
//_____________________________________________________________________________
91
G4bool
G4BaseNtupleManager::FillNtupleIColumn
(
G4int
id
,
G4int
value
)
92
{
93
return
FillNtupleIColumn
(
fFirstId
,
id
, value);
94
}
95
96
//_____________________________________________________________________________
97
G4bool
G4BaseNtupleManager::FillNtupleFColumn
(
G4int
id
,
G4float
value
)
98
{
99
return
FillNtupleFColumn
(
fFirstId
,
id
, value);
100
}
101
102
//_____________________________________________________________________________
103
G4bool
G4BaseNtupleManager::FillNtupleDColumn
(
G4int
id
,
G4double
value
)
104
{
105
return
FillNtupleDColumn
(
fFirstId
,
id
, value);
106
}
107
108
//_____________________________________________________________________________
109
G4bool
G4BaseNtupleManager::FillNtupleSColumn
(
G4int
id
,
const
G4String
&
value
)
110
{
111
return
FillNtupleSColumn
(
fFirstId
,
id
, value);
112
}
113
114
//_____________________________________________________________________________
115
G4bool
G4BaseNtupleManager::AddNtupleRow
()
116
{
117
return
AddNtupleRow
(
fFirstId
);
118
}
119
120
//_____________________________________________________________________________
121
G4bool
G4BaseNtupleManager::SetFirstNtupleColumnId
(
G4int
firstId)
122
{
123
if
(
fLockFirstNtupleColumnId
) {
124
G4ExceptionDescription
description;
125
description
126
<<
"Cannot set FirstNtupleColumnId as its value was already used."
;
127
G4Exception
(
"G4BaseNtupleManager::SetFirstNtupleColumnId()"
,
128
"Analysis_W013"
,
JustWarning
, description);
129
return
false
;
130
}
131
132
fFirstNtupleColumnId
= firstId;
133
return
true
;
134
}
135
geant4
tree
geant4-10.6-release
source
analysis
management
src
G4BaseNtupleManager.cc
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:11
using
1.8.2 with
ECCE GitHub integration