BmnRoot
Loading...
Searching...
No Matches
BmnVacWallReconstructor.cxx
Go to the documentation of this file.
1
9
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
29{
30
31 if (!IsActive())
32 return;
33
34 TStopwatch sw;
35 sw.Start();
36 sw.Stop();
37 fworkTime += sw.RealTime();
38}
39
40void 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
50{
51 printf("Work time of BmnVacWallReconstructor: %4.2f sec.\n", fworkTime);
52}
virtual void OnlineWrite(const std::unique_ptr< TTree > &resultTree)
Write task resul to tree.
virtual void Exec(Option_t *opt)