Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
PHParameterContainerInterface.h
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PHParameterContainerInterface.h
1
// Tell emacs that this is a C++ source
2
// -*- C++ -*-.
3
#ifndef PHPARAMETER_PHPARAMETERCONTAINERINTERFACE_H
4
#define PHPARAMETER_PHPARAMETERCONTAINERINTERFACE_H
5
6
#include <map>
7
#include <string>
8
9
class
PHCompositeNode
;
10
class
PHParameters
;
11
class
PHParametersContainer
;
12
13
class
PHParameterContainerInterface
14
{
15
public
:
16
PHParameterContainerInterface
(
const
std::string
&
name
);
17
// PHParameterContainerInterface contains pointer to memory
18
// copy ctor and = operator need explicit implementation, do just delete it here
19
PHParameterContainerInterface
(
const
PHParameterContainerInterface
&) =
delete
;
20
PHParameterContainerInterface
&
operator=
(
PHParameterContainerInterface
const
&) =
delete
;
21
22
virtual
~PHParameterContainerInterface
();
23
24
void
set_name
(
const
std::string
&name);
25
virtual
void
SetDefaultParameters
() = 0;
26
27
// Get/Set parameters from macro
28
void
set_double_param
(
const
int
id
,
const
std::string
&name,
const
double
dval);
29
double
get_double_param
(
const
int
id
,
const
std::string
&name)
const
;
30
void
set_int_param
(
const
int
id
,
const
std::string
&name,
const
int
ival);
31
int
get_int_param
(
const
int
id
,
const
std::string
&name)
const
;
32
void
set_string_param
(
const
int
id
,
const
std::string
&name,
const
std::string
&sval);
33
std::string
get_string_param
(
const
int
id
,
const
std::string
&name)
const
;
34
35
void
UpdateParametersWithMacro
();
36
void
CreateInitialize
(
const
int
detid);
37
void
SaveToNodeTree
(
PHCompositeNode
*runNode,
const
std::string
&nodename);
38
void
PutOnParNode
(
PHCompositeNode
*parNode,
const
std::string
&nodename);
39
int
ExistDetid
(
const
int
detid)
const
;
40
41
protected
:
42
void
set_default_double_param
(
const
std::string
&name,
const
double
dval);
43
void
set_default_int_param
(
const
std::string
&name,
const
int
ival);
44
void
set_default_string_param
(
const
std::string
&name,
const
std::string
&sval);
45
void
InitializeParameters
();
46
const
PHParametersContainer
*
GetParamsContainer
() {
return
paramscontainer
; }
47
PHParametersContainer
*
GetParamsContainerModify
() {
return
paramscontainer
; }
48
const
PHParameters
*
GetDefaultParameters
() {
return
defaultparams
; }
49
50
private
:
51
PHParametersContainer
*
paramscontainer
=
nullptr
;
52
PHParameters
*
defaultparams
=
nullptr
;
53
std::map<int, PHParameters *>
macroparams
;
54
};
55
56
#endif // PHPARAMETER_PHPARAMETERCONTAINERINTERFACE_H
coresoftware
blob
master
offline
database
PHParameter
PHParameterContainerInterface.h
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:04
using
1.8.2 with
sPHENIX GitHub integration