BmnRoot
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 <iostream>
7
#include <iomanip>
8
9
CbmParTest::CbmParTest
(
const
char
* name,
const
char
* title,
const
char
* context)
10
: FairParGenericSet(name,title,context) {
11
clear
();
12
histo1
=
new
TH1F(
"h1"
,
"test histogram"
,100,-3,3);
13
histo1
->SetDirectory(0);
14
}
15
16
CbmParTest::~CbmParTest
(
void
) {
17
}
18
19
void
CbmParTest::clear
(
void
) {
20
p1
=0.F;
21
for
(Int_t
i
=0;
i
<5000;
i
++) {
22
ai
[
i
]=0;
23
}
24
if
(
histo1
)
histo1
->Reset();
25
}
26
27
void
CbmParTest::putParams
(FairParamList* l) {
28
if
(!l)
return
;
29
l->add(
"p1"
,
p1
);
30
l->addObject(
"ai"
,
ai
,5000);
31
l->addObject(
"histo1"
,
histo1
);
32
}
33
34
Bool_t
CbmParTest::getParams
(FairParamList* l) {
35
if
(!l)
return
kFALSE;
36
if
(!l->fill(
"p1"
,&
p1
))
return
kFALSE;
37
if
(!l->fillObject(
"ai"
,
ai
,5000))
return
kFALSE;
38
if
(!l->fillObject(
"histo1"
,
histo1
))
return
kFALSE;
39
histo1
->SetDirectory(0);
40
return
kTRUE;
41
}
CbmParTest.h
i
int i
Definition
P4_F32vec4.h:22
CbmParTest::~CbmParTest
~CbmParTest(void)
Definition
CbmParTest.cxx:16
CbmParTest::p1
Float_t p1
Definition
CbmParTest.h:10
CbmParTest::getParams
Bool_t getParams(FairParamList *)
Definition
CbmParTest.cxx:34
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:27
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
detectors
sts
CbmParTest.cxx
Generated on Fri May 15 2026 10:40:52 for BmnRoot by
1.9.8