BmnRoot
26.10.0-210-gc52d34b0
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnVacWallReconstructor.cxx
Go to the documentation of this file.
1
/** @file BmnVacWallReconstructor.cxx
2
** @author Nikolay Karpushkin <karpushkin@inr.ru>
3
** @date 03.04.2021
4
**
5
** Code for BmnVacWall points info transition on reconstruction stage
6
**/
7
8
#include "
BmnVacWallReconstructor.h
"
9
10
InitStatus
BmnVacWallReconstructor::Init
()
11
{
12
fworkTime
= 0.;
13
fpFairRootMgr
= FairRootManager::Instance();
14
fArrayOfPoints
= (
TClonesArray
*)
fpFairRootMgr
->GetObject(
"VacWallPoint"
);
15
16
if
(!
fArrayOfPoints
) {
17
std::cout <<
"BmnVacWallReconstructor::Init(): branch with Digits not found! Task will be deactivated"
18
<< std::endl;
19
SetActive(
kFALSE
);
20
return
kERROR;
21
}
22
fpFairRootMgr
->Register(
"VacWallPoint"
,
"VacWall"
,
fArrayOfPoints
,
kTRUE
);
23
24
LOG(detail) <<
"VacWall Reconstructor ready"
;
25
return
kSUCCESS;
26
}
27
28
void
BmnVacWallReconstructor::Exec
(
Option_t
* opt)
29
{
30
31
if
(!IsActive())
32
return
;
33
34
TStopwatch
sw;
35
sw.
Start
();
36
sw.
Stop
();
37
fworkTime
+= sw.
RealTime
();
38
}
39
40
void
BmnVacWallReconstructor::OnlineWrite
(
const
std::unique_ptr<TTree>& resultTree)
41
{
42
if
(!IsActive())
43
return
;
44
45
resultTree->Branch(
"VacWallPoint"
, &
fArrayOfPoints
);
46
resultTree->Fill();
47
}
48
49
void
BmnVacWallReconstructor::Finish
()
50
{
51
printf(
"Work time of BmnVacWallReconstructor: %4.2f sec.\n"
,
fworkTime
);
52
}
BmnVacWallReconstructor.h
kFALSE
constexpr Bool_t kFALSE
kTRUE
constexpr Bool_t kTRUE
Option_t
const char Option_t
BmnVacWallReconstructor::Init
virtual InitStatus Init()
Definition
BmnVacWallReconstructor.cxx:10
BmnVacWallReconstructor::fpFairRootMgr
FairRootManager * fpFairRootMgr
Definition
BmnVacWallReconstructor.h:36
BmnVacWallReconstructor::OnlineWrite
virtual void OnlineWrite(const std::unique_ptr< TTree > &resultTree)
Write task resul to tree.
Definition
BmnVacWallReconstructor.cxx:40
BmnVacWallReconstructor::Exec
virtual void Exec(Option_t *opt)
Definition
BmnVacWallReconstructor.cxx:28
BmnVacWallReconstructor::fArrayOfPoints
TClonesArray * fArrayOfPoints
Definition
BmnVacWallReconstructor.h:37
BmnVacWallReconstructor::fworkTime
float fworkTime
Definition
BmnVacWallReconstructor.h:39
BmnVacWallReconstructor::Finish
virtual void Finish()
Definition
BmnVacWallReconstructor.cxx:49
TClonesArray
TStopwatch
TStopwatch::RealTime
Double_t RealTime()
TStopwatch::Start
void Start(Bool_t reset=kTRUE)
TStopwatch::Stop
void Stop()
reconstruction
vacwall
BmnVacWallReconstructor.cxx
Generated on
for BmnRoot by
1.17.0