Skip to content

Commit cb62974

Browse files
ChristianTackeGSIkarabowi
authored andcommitted
Cleanup FairEventHeader
(cherry picked from commit 2489938)
1 parent 6148f13 commit cb62974

2 files changed

Lines changed: 17 additions & 25 deletions

File tree

base/event/FairEventHeader.cxx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/********************************************************************************
2-
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
2+
* Copyright (C) 2014-2023 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
33
* *
44
* This software is distributed under the terms of the *
55
* GNU Lesser General Public Licence (LGPL) version 3, *
@@ -14,15 +14,6 @@
1414

1515
#include "FairRootManager.h"
1616

17-
FairEventHeader::FairEventHeader()
18-
: fRunId(0)
19-
, fEventTime(-1.)
20-
, fInputFileId(0)
21-
, fMCEntryNo(0)
22-
{}
23-
24-
FairEventHeader::~FairEventHeader() {}
25-
2617
void FairEventHeader::Register(Bool_t Persistence)
2718
{
2819
FairRootManager::Instance()->Register("EventHeader.", "EvtHeader", this, Persistence);

base/event/FairEventHeader.h

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/********************************************************************************
2-
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
2+
* Copyright (C) 2014-2023 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
33
* *
44
* This software is distributed under the terms of the *
55
* GNU Lesser General Public Licence (LGPL) version 3, *
@@ -25,19 +25,24 @@ class FairEventHeader : public TNamed
2525
{
2626
public:
2727
/** Default constructor */
28-
FairEventHeader();
28+
FairEventHeader() = default;
29+
30+
/**
31+
* Destructor
32+
*/
33+
~FairEventHeader() override = default;
2934

3035
/** Get the run ID for this run*/
31-
UInt_t GetRunId() { return fRunId; }
36+
UInt_t GetRunId() const { return fRunId; }
3237

3338
/** Get the MC time for this event*/
34-
Double_t GetEventTime() { return fEventTime; }
39+
Double_t GetEventTime() const { return fEventTime; }
3540

3641
/** Get the MC input file Id for this event*/
37-
Int_t GetInputFileId() { return fInputFileId; }
42+
Int_t GetInputFileId() const { return fInputFileId; }
3843

3944
/**The entry number in the original MC chain */
40-
Int_t GetMCEntryNumber() { return fMCEntryNo; }
45+
Int_t GetMCEntryNumber() const { return fMCEntryNo; }
4146

4247
/** Set the run ID for this run
4348
* @param runid : unique run id
@@ -55,23 +60,19 @@ class FairEventHeader : public TNamed
5560
/**The entry number in the original MC chain */
5661
void SetMCEntryNumber(Int_t id) { fMCEntryNo = id; }
5762

58-
/**
59-
* Destructor
60-
*/
61-
virtual ~FairEventHeader();
6263
virtual void Register(Bool_t Persistance = kTRUE);
6364

6465
protected:
6566
/** Run Id */
66-
UInt_t fRunId;
67+
UInt_t fRunId{0};
6768
/** Event Time **/
68-
Double_t fEventTime;
69+
Double_t fEventTime{-1.};
6970
/** Input file identifier, the file description is in the File header*/
70-
Int_t fInputFileId;
71+
Int_t fInputFileId{0};
7172
/**MC entry number from input chain*/
72-
Int_t fMCEntryNo;
73+
Int_t fMCEntryNo{0};
7374

74-
ClassDef(FairEventHeader, 3);
75+
ClassDefOverride(FairEventHeader, 3);
7576
};
7677

7778
#endif

0 commit comments

Comments
 (0)