R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BWhiterabbitPropagator.cxx
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// --------------------------------------------------------------
15// ----- R3BWhiterabbitPropagator -----
16// ----- Created May 28th 2021 by J.L. Rodriguez-Sanchez -----
17// --------------------------------------------------------------
18
19#include "FairLogger.h"
20#include "FairRootManager.h"
21
23
24#include "TClonesArray.h"
25
27 : R3BWhiterabbitPropagator("R3BWhiterabbitPropagator", 1, "WRMaster")
28{
29}
30
31R3BWhiterabbitPropagator::R3BWhiterabbitPropagator(const TString& name, Int_t iVerbose, const TString& namewr)
32 : FairTask(name, iVerbose)
33 , fInputItem(NULL)
34 , fNameWR(namewr)
35{
36}
37
39{
40 LOG(debug) << "R3BWhiterabbitPropagator::Delete instance";
41 if (fInputItem)
42 {
43 delete fInputItem;
44 fInputItem = NULL;
45 }
46}
47
49{
50 LOG(info) << "R3BWhiterabbitPropagator::Init()";
51 FairRootManager* frm = FairRootManager::Instance();
52 if (NULL == frm)
53 {
54 LOG(fatal) << "R3BWhiterabbitPropagator::Init() FairRootManager not found";
55 return kFATAL;
56 }
57
58 // get access to input data
59 fInputItem = dynamic_cast<TClonesArray*>(frm->GetObject(fNameWR + "Data"));
60 if (!fInputItem)
61 {
62 LOG(fatal) << "R3BWhiterabbitPropagator::Init() " + fNameWR + "Data not found";
63 return kFATAL;
64 }
65
66 frm->Register(fNameWR + "Data", fNameWR, fInputItem, kTRUE);
67
68 return kSUCCESS;
69}
70
71void R3BWhiterabbitPropagator::Exec(Option_t* option) { return; }
72
ClassImp(R3BWhiterabbitPropagator)
virtual InitStatus Init() override
Method for task initialization.
virtual ~R3BWhiterabbitPropagator()
Destructor.
R3BWhiterabbitPropagator()
Default constructor.
virtual void Exec(Option_t *option) override
Method for event loop implementation.