R3BROOT
R3B analysis software
Toggle main menu visibility
Loading...
Searching...
No Matches
testNeulandQcal.C
Go to the documentation of this file.
1
/******************************************************************************
2
* Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3
* Copyright (C) 2019-2025 Members of R3B Collaboration *
4
* *
5
* This software is distributed under the terms of the *
6
* GNU General Public Licence (GPL) version 3, *
7
* copied verbatim in the file "LICENSE". *
8
* *
9
* In applying this license GSI does not waive the privileges and immunities *
10
* granted to it by virtue of its status as an Intergovernmental Organization *
11
* or submit itself to any jurisdiction. *
12
******************************************************************************/
13
14
void
testNeulandQcal
()
15
{
16
TStopwatch timer;
17
timer.Start();
18
19
TString outputFileName =
"data_qcal.root"
;
// name of output file
20
21
// Create analysis run -------------------------------------------------------
22
FairRunAna* run =
new
FairRunAna();
23
run->SetOutputFile(outputFileName.Data());
24
// ---------------------------------------------------------------------------
25
26
// ----- Runtime DataBase info -----------------------------------------------
27
FairRuntimeDb* rtdb = run->GetRuntimeDb();
28
// ---------------------------------------------------------------------------
29
30
// ---------------------------------------------------------------------------
31
run->AddTask(
new
R3BNeulandQCalFiller
());
32
// ---------------------------------------------------------------------------
33
34
// ---------------------------------------------------------------------------
35
R3BNeulandTacquilaMapped2QCalPar
* pedpar =
new
R3BNeulandTacquilaMapped2QCalPar
();
36
pedpar->
SetPlanes
(1);
37
run->AddTask(pedpar);
38
// ---------------------------------------------------------------------------
39
40
// Initialize ----------------------------------------------------------------
41
FairLogger::GetLogger()->SetLogScreenLevel(
"info"
);
42
run->Init();
43
// ---------------------------------------------------------------------------
44
45
// Run -----------------------------------------------------------------------
46
run->Run(0, 10000);
47
rtdb->saveOutput();
48
// ---------------------------------------------------------------------------
49
50
timer.Stop();
51
Double_t rtime = timer.RealTime();
52
Double_t ctime = timer.CpuTime();
53
cout << endl << endl;
54
cout <<
"Real time "
<< rtime <<
" s, CPU time "
<< ctime <<
"s"
<< endl << endl;
55
56
R3BNeulandQCalPar
* par = (
R3BNeulandQCalPar
*)rtdb->getContainer(
"NeulandQCalPar"
);
57
Bool_t failed =
false
;
58
59
for
(Int_t i = 0; i < 100; i++)
60
if
(par->
GetParAt
(1, i / 2 + 1, i % 2 + 1) != i + 100)
61
{
62
failed =
true
;
63
cout <<
"["
<< 1 <<
", "
<< i / 50 + 1 <<
", "
<< i % 2 + 1 <<
"] Expected: "
<< i + 100 <<
" but value is "
64
<< par->
GetParAt
(1, i / 2 + 1, i % 2 + 1) << endl;
65
}
66
67
if
(failed)
68
cout <<
" Test failed! "
<< endl;
69
else
70
cout <<
" Test successful! "
<< endl;
71
}
R3BNeulandQCalFiller::R3BNeulandQCalFiller
R3BNeulandQCalFiller()
Definition
R3BNeulandQCalFiller.cxx:20
R3BNeulandQCalPar
Definition
R3BNeulandQCalPar.h:26
R3BNeulandQCalPar::GetParAt
Int_t GetParAt(Int_t plane, Int_t bar, Int_t side)
Method to get the pedestal offset of a PMT.
Definition
R3BNeulandQCalPar.h:89
R3BNeulandTacquilaMapped2QCalPar
Definition
R3BNeulandTacquilaMapped2QCalPar.h:25
R3BNeulandTacquilaMapped2QCalPar::SetPlanes
void SetPlanes(Int_t planes)
Definition
R3BNeulandTacquilaMapped2QCalPar.h:38
R3BNeulandTacquilaMapped2QCalPar::R3BNeulandTacquilaMapped2QCalPar
R3BNeulandTacquilaMapped2QCalPar()
Definition
R3BNeulandTacquilaMapped2QCalPar.cxx:34
testNeulandQcal
void testNeulandQcal()
Definition
testNeulandQcal.C:14
neuland
test
calibration
testNeulandQcal.C
Generated by
1.18.0