Skip to content

Commit c5d2faa

Browse files
ChristianTackeGSIdennisklein
authored andcommitted
chore(online): Use override
1 parent be06038 commit c5d2faa

12 files changed

Lines changed: 42 additions & 64 deletions

fairroot/online/source/FairLmdSource.h

Lines changed: 7 additions & 7 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, *
@@ -33,17 +33,17 @@ class FairLmdSource : public FairMbsSource
3333
public:
3434
FairLmdSource();
3535
FairLmdSource(const FairLmdSource& source);
36-
virtual ~FairLmdSource();
36+
~FairLmdSource() override;
3737

3838
void AddFile(TString fileName);
3939
void AddPath(TString dir, TString wildCard);
4040
inline Int_t GetCurrentFile() const { return fCurrentFile; }
4141
inline const TList* GetFileNames() const { return fFileNames; }
4242

43-
virtual Bool_t Init();
44-
virtual Int_t ReadEvent(UInt_t = 0);
45-
virtual void Close();
46-
Bool_t SpecifyRunId()
43+
Bool_t Init() override;
44+
Int_t ReadEvent(UInt_t = 0) override;
45+
void Close() override;
46+
Bool_t SpecifyRunId() override
4747
{
4848
ReadEvent(0);
4949
return true;
@@ -65,7 +65,7 @@ class FairLmdSource : public FairMbsSource
6565

6666
FairLmdSource& operator=(const FairLmdSource&);
6767

68-
ClassDef(FairLmdSource, 0);
68+
ClassDefOverride(FairLmdSource, 0);
6969
};
7070

7171
#endif

fairroot/online/source/FairMbsSource.cxx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,7 @@
1717

1818
#include <fairlogger/Logger.h>
1919

20-
FairMbsSource::FairMbsSource()
21-
: FairOnlineSource()
22-
{
23-
}
24-
25-
FairMbsSource::FairMbsSource(const FairMbsSource &source)
26-
: FairOnlineSource(source)
27-
{
28-
}
29-
30-
FairMbsSource::~FairMbsSource() {}
31-
32-
Bool_t FairMbsSource::Unpack(Int_t *data,
20+
Bool_t FairMbsSource::Unpack(Int_t* data,
3321
Int_t size,
3422
Short_t type,
3523
Short_t subType,

fairroot/online/source/FairMbsSource.h

Lines changed: 8 additions & 8 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, *
@@ -23,13 +23,13 @@
2323
class FairMbsSource : public FairOnlineSource
2424
{
2525
public:
26-
FairMbsSource();
27-
FairMbsSource(const FairMbsSource& source);
28-
virtual ~FairMbsSource();
26+
FairMbsSource() = default;
27+
FairMbsSource(const FairMbsSource& source) = default;
28+
~FairMbsSource() override = default;
2929

30-
virtual Bool_t Init() = 0;
31-
virtual Int_t ReadEvent(UInt_t = 0) = 0;
32-
virtual void Close() = 0;
30+
Bool_t Init() override = 0;
31+
Int_t ReadEvent(UInt_t = 0) override = 0;
32+
void Close() override = 0;
3333

3434
protected:
3535
Bool_t Unpack(Int_t* data,
@@ -40,7 +40,7 @@ class FairMbsSource : public FairOnlineSource
4040
Short_t subCrate,
4141
Short_t control);
4242

43-
ClassDef(FairMbsSource, 0);
43+
ClassDefOverride(FairMbsSource, 0);
4444
};
4545

4646
#endif

fairroot/online/source/FairMbsStreamSource.cxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ FairMbsStreamSource::FairMbsStreamSource(const FairMbsStreamSource& source)
3434
{
3535
}
3636

37-
FairMbsStreamSource::~FairMbsStreamSource() {}
38-
3937
Bool_t FairMbsStreamSource::Init()
4038
{
4139
return ConnectToServer();

fairroot/online/source/FairMbsStreamSource.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ class FairMbsStreamSource : public FairMbsSource
2828
public:
2929
FairMbsStreamSource(TString tServerName);
3030
FairMbsStreamSource(const FairMbsStreamSource& source);
31-
virtual ~FairMbsStreamSource();
31+
~FairMbsStreamSource() override = default;
3232

33-
virtual Bool_t Init();
34-
virtual Int_t ReadEvent(UInt_t = 0);
35-
virtual void Close();
36-
Bool_t SpecifyRunId()
33+
Bool_t Init() override;
34+
Int_t ReadEvent(UInt_t = 0) override;
35+
void Close() override;
36+
Bool_t SpecifyRunId() override
3737
{
3838
ReadEvent(0);
3939
return true;
@@ -55,7 +55,7 @@ class FairMbsStreamSource : public FairMbsSource
5555
FairMbsStreamSource& operator=(const FairMbsStreamSource&);
5656

5757
public:
58-
ClassDef(FairMbsStreamSource, 0);
58+
ClassDefOverride(FairMbsStreamSource, 0);
5959
};
6060

6161
#endif

fairroot/online/source/FairOnlineSource.h

Lines changed: 2 additions & 2 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, *
@@ -27,7 +27,7 @@ class FairOnlineSource : public FairSource
2727
public:
2828
FairOnlineSource();
2929
FairOnlineSource(const FairOnlineSource& source);
30-
virtual ~FairOnlineSource();
30+
~FairOnlineSource() override;
3131

3232
inline void AddUnpacker(FairUnpack* unpacker) { fUnpackers->Add(unpacker); }
3333
inline const TObjArray* GetUnpackers() const { return fUnpackers; }

fairroot/online/source/FairRemoteSource.h

Lines changed: 6 additions & 6 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, *
@@ -26,11 +26,11 @@ class FairRemoteSource : public FairMbsSource
2626
public:
2727
FairRemoteSource(char* node);
2828
FairRemoteSource(const FairRemoteSource& source);
29-
virtual ~FairRemoteSource();
29+
~FairRemoteSource() override;
3030

31-
virtual Bool_t Init();
32-
virtual Int_t ReadEvent(UInt_t = 0);
33-
virtual void Close();
31+
Bool_t Init() override;
32+
Int_t ReadEvent(UInt_t = 0) override;
33+
void Close() override;
3434

3535
inline const char* GetNode() const { return fNode; }
3636

@@ -43,7 +43,7 @@ class FairRemoteSource : public FairMbsSource
4343
FairRemoteSource& operator=(const FairRemoteSource&);
4444

4545
public:
46-
ClassDef(FairRemoteSource, 0);
46+
ClassDefOverride(FairRemoteSource, 0);
4747
};
4848

4949
#endif

fairroot/online/source/FairUnpack.cxx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,4 @@ FairUnpack::FairUnpack(Short_t type, Short_t subType, Short_t procId, Short_t su
2020
, fProcId(procId)
2121
, fSubCrate(subCrate)
2222
, fControl(control)
23-
{
24-
}
25-
26-
FairUnpack::~FairUnpack() {}
23+
{}

fairroot/online/source/FairUnpack.h

Lines changed: 3 additions & 3 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, *
@@ -21,7 +21,7 @@ class FairUnpack : public TObject
2121
{
2222
public:
2323
FairUnpack(Short_t type, Short_t subType, Short_t procId, Short_t subCrate, Short_t control);
24-
virtual ~FairUnpack();
24+
~FairUnpack() override = default;
2525

2626
virtual Bool_t Init() = 0;
2727
virtual Bool_t ReInit() { return kTRUE; }
@@ -46,7 +46,7 @@ class FairUnpack : public TObject
4646
virtual void Register() = 0;
4747

4848
public:
49-
ClassDef(FairUnpack, 0);
49+
ClassDefOverride(FairUnpack, 0);
5050
};
5151

5252
#endif

fairroot/online/source/MRevBuffer.cxx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -907,11 +907,6 @@ REvent::REvent()
907907
// piData = 0;
908908
}
909909

910-
REvent::~REvent()
911-
{
912-
// LOG(info) << " ~REvent() ...";
913-
}
914-
915910
void REvent::ReFillHead(Int_t* pHead)
916911
{
917912
iSize = pHead[0]; // event size without header in 2-byte-words

0 commit comments

Comments
 (0)