R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BEventHeaderPropagator.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
#include <FairRootManager.h>
15
16
#include "
R3BEventHeaderPropagator.h
"
17
#include "
R3BFileSource.h
"
18
#include "
R3BLogger.h
"
19
20
R3BEventHeaderPropagator::R3BEventHeaderPropagator
()
21
:
R3BEventHeaderPropagator
(
"R3BEventHeaderPropagator"
, 1,
"EventHeader."
)
22
{
23
}
24
25
R3BEventHeaderPropagator::R3BEventHeaderPropagator
(
const
TString& name, Int_t iVerbose, std::string_view nameheader)
26
: FairTask(name, iVerbose)
27
, fNameHeader(nameheader)
28
{
29
}
30
31
InitStatus
R3BEventHeaderPropagator::Init
()
32
{
33
R3BLOG
(info,
""
);
34
FairRootManager* frm = FairRootManager::Instance();
35
fHeader =
dynamic_cast<
R3BEventHeader
*
>
(frm->GetObject(
"EventHeader."
));
36
R3BLOG_IF
(fatal, !fHeader,
"EventHeader. not found."
);
37
R3BLOG_IF
(info, fHeader,
"EventHeader. found."
);
38
39
frm->Register(fNameHeader.data(),
"EventHeader"
, fHeader, kTRUE);
40
41
fSource = frm->GetSource();
42
R3BLOG_IF
(fatal, !fSource,
"R3BFileSource not found."
);
43
44
return
kSUCCESS;
45
}
46
47
void
R3BEventHeaderPropagator::Exec
(Option_t*
/*option*/
)
48
{
49
if
(fSource !=
nullptr
)
50
{
51
fHeader->SetRunId(fSource->GetRunId());
52
}
53
}
54
55
ClassImp
(
R3BEventHeaderPropagator
);
ClassImp
ClassImp(R3BEventHeaderPropagator)
R3BEventHeaderPropagator.h
R3BFileSource.h
R3BLogger.h
R3BLOG
#define R3BLOG(severity, x)
Definition
R3BLogger.h:35
R3BLOG_IF
#define R3BLOG_IF(severity, condition, x)
Definition
R3BLogger.h:46
R3BEventHeader
Definition
R3BEventHeader.h:20
R3BEventHeaderPropagator
Definition
R3BEventHeaderPropagator.h:25
R3BEventHeaderPropagator::Init
InitStatus Init() override
Method for task initialization.
Definition
R3BEventHeaderPropagator.cxx:31
R3BEventHeaderPropagator::R3BEventHeaderPropagator
R3BEventHeaderPropagator()
Default constructor.
Definition
R3BEventHeaderPropagator.cxx:20
R3BEventHeaderPropagator::Exec
void Exec(Option_t *) override
Method for event loop implementation.
Definition
R3BEventHeaderPropagator.cxx:47
r3bbase
R3BEventHeaderPropagator.cxx
Generated by
1.13.2