R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BDataPropagator.cxx
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) 2022 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3 * Copyright (C) 2022-2026 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#include "FairLogger.h"
15#include <FairRootManager.h>
16
17#include "R3BDataPropagator.h"
18#include "R3BLogger.h"
19
20#include <Rtypes.h>
21#include <TClonesArray.h>
22#include <utility>
23
25 : R3BDataPropagator("R3BDataPropagator", 1)
26{
27}
28
29R3BDataPropagator::R3BDataPropagator(const TString& name, int iVerbose, TString namebranch)
30 : FairTask(name, iVerbose)
31 , fNameBranch(std::move(namebranch))
32{
33}
34
36{
37 R3BLOG(info, "");
38 auto* frm = FairRootManager::Instance();
39
40 fInputData = dynamic_cast<TClonesArray*>(frm->GetObject(fNameBranch));
41 if (!fInputData)
42 {
43 R3BLOG(fatal, "branch " << fNameBranch << "not found");
44 return kFATAL;
45 }
46 else
47 R3BLOG(info, "branch " << fNameBranch << " found");
48
49 frm->Register(fNameBranch, "Data", fInputData, kTRUE);
50
51 return kSUCCESS;
52}
53
54void R3BDataPropagator::Exec(Option_t* /*option*/) { R3BLOG(debug, "Called"); } // NOLINT
55
#define R3BLOG(severity, x)
Definition R3BLogger.h:33
ClassImp(R3B::Neuland::Cal2HitPar)
TClonesArray * fInputData
InitStatus Init() override
Method for task initialization.
void Exec(Option_t *) override
Method for event loop implementation.
R3BDataPropagator()
Default constructor.