BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
CbmParTest.cxx
Go to the documentation of this file.
1
2
#include "
CbmParTest.h
"
3
4
#include "FairParamList.h"
5
6
#include <iomanip>
7
#include <iostream>
8
9
CbmParTest::CbmParTest
(
const
char
* name,
const
char
* title,
const
char
* context)
10
:
FairParGenericSet
(name, title, context)
11
{
12
clear
();
13
histo1
=
new
TH1F
(
"h1"
,
"test histogram"
, 100, -3, 3);
14
histo1
->SetDirectory(0);
15
}
16
17
CbmParTest::~CbmParTest
(
void
) {}
18
19
void
CbmParTest::clear
(
void
)
20
{
21
p1
= 0.F;
22
for
(
Int_t
i
= 0;
i
< 5000;
i
++) {
23
ai
[
i
] = 0;
24
}
25
if
(
histo1
)
26
histo1
->Reset();
27
}
28
29
void
CbmParTest::putParams
(FairParamList* l)
30
{
31
if
(!l)
32
return
;
33
l->add(
"p1"
,
p1
);
34
l->addObject(
"ai"
,
ai
, 5000);
35
l->addObject(
"histo1"
,
histo1
);
36
}
37
38
Bool_t
CbmParTest::getParams
(FairParamList* l)
39
{
40
if
(!l)
41
return
kFALSE
;
42
if
(!l->fill(
"p1"
, &
p1
))
43
return
kFALSE
;
44
if
(!l->fillObject(
"ai"
,
ai
, 5000))
45
return
kFALSE
;
46
if
(!l->fillObject(
"histo1"
,
histo1
))
47
return
kFALSE
;
48
histo1
->SetDirectory(0);
49
return
kTRUE
;
50
}
CbmParTest.h
i
int i
Definition
P4_F32vec4.h:22
Bool_t
bool Bool_t
Int_t
int Int_t
kFALSE
constexpr Bool_t kFALSE
kTRUE
constexpr Bool_t kTRUE
CbmParTest::~CbmParTest
~CbmParTest(void)
Definition
CbmParTest.cxx:17
CbmParTest::p1
Float_t p1
Definition
CbmParTest.h:10
CbmParTest::getParams
Bool_t getParams(FairParamList *)
Definition
CbmParTest.cxx:38
CbmParTest::CbmParTest
CbmParTest(const char *name="CbmParTest", const char *title="Test class for parameter io", const char *context="TestDefaultContext")
Definition
CbmParTest.cxx:9
CbmParTest::putParams
void putParams(FairParamList *)
Definition
CbmParTest.cxx:29
CbmParTest::histo1
TH1F * histo1
Definition
CbmParTest.h:12
CbmParTest::clear
void clear(void)
Definition
CbmParTest.cxx:19
CbmParTest::ai
Int_t ai[5000]
Definition
CbmParTest.h:11
FairParGenericSet
TH1F
detectors
sts
CbmParTest.cxx
Generated on
for BmnRoot by
1.17.0