Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Drop empty overriden methods in FairDetector classes #1594

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 1 addition & 10 deletions examples/MQ/pixelDetector/src/Pixel.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2014-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2014-2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
Expand Down Expand Up @@ -60,16 +60,7 @@ class Pixel : public FairDetector
* any optional action in your detector during the transport.
*/

// virtual void CopyClones( TClonesArray* cl1, TClonesArray* cl2 ,
// Int_t offset) {;}
void SetSpecialPhysicsCuts() override { ; }
void EndOfEvent() override;
void FinishPrimary() override { ; }
void FinishRun() override { ; }
void BeginPrimary() override { ; }
void PostTrack() override { ; }
void PreTrack() override { ; }
void BeginEvent() override { ; }

Bool_t IsSensitive(const std::string& name) override;
FairModule* CloneModule() const override;
Expand Down
15 changes: 1 addition & 14 deletions examples/advanced/Tutorial3/simulation/FairTestDetector.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2014-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2014-2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
Expand Down Expand Up @@ -70,20 +70,7 @@ class FairTestDetector : public FairDetector
* any optional action in your detector during the transport.
*/

/*
virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2, Int_t offset)
{
;
}
*/
void SetSpecialPhysicsCuts() override { ; }
void EndOfEvent() override;
void FinishPrimary() override { ; }
void FinishRun() override { ; }
void BeginPrimary() override { ; }
void PostTrack() override { ; }
void PreTrack() override { ; }
void BeginEvent() override { ; }

private:
/** Track information to be stored until the track leaves the
Expand Down
12 changes: 1 addition & 11 deletions examples/advanced/propagator/src/FairTutPropDet.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2019-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2019-2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
Expand All @@ -18,7 +18,6 @@ class TClonesArray;

class FairTutPropDet : public FairDetector
{

public:
/** Name : Detector Name
* Active: kTRUE for active detectors (ProcessHits() will be called)
Expand Down Expand Up @@ -59,16 +58,7 @@ class FairTutPropDet : public FairDetector
* any optional action in your detector during the transport.
*/

// virtual void CopyClones( TClonesArray* cl1, TClonesArray* cl2 ,
// Int_t offset) {;}
void SetSpecialPhysicsCuts() override { ; }
void EndOfEvent() override;
void FinishPrimary() override { ; }
void FinishRun() override { ; }
void BeginPrimary() override { ; }
void PostTrack() override { ; }
void PreTrack() override { ; }
void BeginEvent() override { ; }

void SetPointsArrayName(const std::string& tempName) { fPointsArrayName = tempName; };

Expand Down
11 changes: 1 addition & 10 deletions examples/simulation/Tutorial1/src/FairTutorialDet1.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2014-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2014-2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
Expand Down Expand Up @@ -66,16 +66,7 @@ class FairTutorialDet1 : public FairDetector
* any optional action in your detector during the transport.
*/

// virtual void CopyClones( TClonesArray* cl1, TClonesArray* cl2 ,
// Int_t offset) {;}
void SetSpecialPhysicsCuts() override { ; }
void EndOfEvent() override;
void FinishPrimary() override { ; }
void FinishRun() override { ; }
void BeginPrimary() override { ; }
void PostTrack() override { ; }
void PreTrack() override { ; }
void BeginEvent() override { ; }

FairModule* CloneModule() const override;

Expand Down
11 changes: 1 addition & 10 deletions examples/simulation/Tutorial2/src/FairTutorialDet2.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2014-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2014-2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
Expand Down Expand Up @@ -63,16 +63,7 @@ class FairTutorialDet2 : public FairDetector
* any optional action in your detector during the transport.
*/

// virtual void CopyClones( TClonesArray* cl1, TClonesArray* cl2 ,
// Int_t offset) {;}
virtual void SetSpecialPhysicsCuts() { ; }
virtual void EndOfEvent();
virtual void FinishPrimary() { ; }
virtual void FinishRun() { ; }
virtual void BeginPrimary() { ; }
virtual void PostTrack() { ; }
virtual void PreTrack() { ; }
virtual void BeginEvent() { ; }

virtual FairModule* CloneModule() const;

Expand Down
10 changes: 1 addition & 9 deletions examples/simulation/Tutorial4/src/mc/FairTutorialDet4.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2014-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2014-2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
Expand Down Expand Up @@ -76,15 +76,7 @@ class FairTutorialDet4 : public FairDetector
* any optional action in your detector during the transport.
*/

// virtual void CopyClones(TClonesArray* cl1, TClonesArray* cl2 , Int_t offset) {}
virtual void SetSpecialPhysicsCuts() {}
virtual void EndOfEvent();
virtual void FinishPrimary() {}
virtual void FinishRun() {}
virtual void BeginPrimary() {}
virtual void PostTrack() {}
virtual void PreTrack() {}
virtual void BeginEvent() {}

void SetModifyGeometry(Bool_t val) { fModifyGeometry = val; }
void SetGlobalCoordinates(Bool_t val) { fGlobalCoordinates = val; }
Expand Down
11 changes: 1 addition & 10 deletions examples/simulation/rutherford/src/FairRutherford.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2014-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2014-2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
Expand Down Expand Up @@ -62,16 +62,7 @@ class FairRutherford : public FairDetector
* any optional action in your detector during the transport.
*/

// virtual void CopyClones( TClonesArray* cl1, TClonesArray* cl2 ,
// Int_t offset) {;}
void SetSpecialPhysicsCuts() override {}
void EndOfEvent() override;
void FinishPrimary() override {}
void FinishRun() override {}
void BeginPrimary() override {}
void PostTrack() override {}
void PreTrack() override {}
void BeginEvent() override {}

FairModule* CloneModule() const override;

Expand Down
2 changes: 1 addition & 1 deletion fairroot/base/sim/FairModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class FairModule : public TNamed
virtual void ConstructGDMLGeometry(__attribute__((unused)) TGeoMatrix* posrot);
/** custom settings of processes and cuts for media to be forwarded to the
** detector simulation */
virtual void SetSpecialPhysicsCuts() { ; }
virtual void SetSpecialPhysicsCuts() {}
/** Clone this object (used in MT mode only)*/
virtual FairModule* CloneModule() const;
/** Init worker run (used in MT mode only) */
Expand Down
10 changes: 1 addition & 9 deletions templates/NewDetector_root_containers/NewDetector.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2014-2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
Expand All @@ -19,7 +19,6 @@ class TClonesArray;

class NewDetector : public FairDetector
{

public:
/** Name : Detector Name
* Active: kTRUE for active detectors (ProcessHits() will be called)
Expand Down Expand Up @@ -63,14 +62,7 @@ class NewDetector : public FairDetector
* any optional action in your detector during the transport.
*/

virtual void SetSpecialPhysicsCuts() { ; }
virtual void EndOfEvent();
virtual void FinishPrimary() { ; }
virtual void FinishRun() { ; }
virtual void BeginPrimary() { ; }
virtual void PostTrack() { ; }
virtual void PreTrack() { ; }
virtual void BeginEvent() { ; }

virtual FairModule* CloneModule() const;

Expand Down
9 changes: 1 addition & 8 deletions templates/NewDetector_stl_containers/NewDetector.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2014-2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
Expand Down Expand Up @@ -60,14 +60,7 @@ class NewDetector : public FairDetector
* any optional action in your detector during the transport.
*/

virtual void SetSpecialPhysicsCuts() { ; }
virtual void EndOfEvent();
virtual void FinishPrimary() { ; }
virtual void FinishRun() { ; }
virtual void BeginPrimary() { ; }
virtual void PostTrack() { ; }
virtual void PreTrack() { ; }
virtual void BeginEvent() { ; }

virtual FairModule* CloneModule() const;

Expand Down
10 changes: 1 addition & 9 deletions templates/project_root_containers/NewDetector/NewDetector.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2014-2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
Expand All @@ -19,7 +19,6 @@ class TClonesArray;

class NewDetector : public FairDetector
{

public:
/** Name : Detector Name
* Active: kTRUE for active detectors (ProcessHits() will be called)
Expand Down Expand Up @@ -63,14 +62,7 @@ class NewDetector : public FairDetector
* any optional action in your detector during the transport.
*/

virtual void SetSpecialPhysicsCuts() { ; }
virtual void EndOfEvent();
virtual void FinishPrimary() { ; }
virtual void FinishRun() { ; }
virtual void BeginPrimary() { ; }
virtual void PostTrack() { ; }
virtual void PreTrack() { ; }
virtual void BeginEvent() { ; }

virtual FairModule* CloneModule() const;

Expand Down
9 changes: 1 addition & 8 deletions templates/project_stl_containers/NewDetector/NewDetector.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2014-2024 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
Expand Down Expand Up @@ -60,14 +60,7 @@ class NewDetector : public FairDetector
* any optional action in your detector during the transport.
*/

virtual void SetSpecialPhysicsCuts() { ; }
virtual void EndOfEvent();
virtual void FinishPrimary() { ; }
virtual void FinishRun() { ; }
virtual void BeginPrimary() { ; }
virtual void PostTrack() { ; }
virtual void PreTrack() { ; }
virtual void BeginEvent() { ; }

virtual FairModule* CloneModule() const;

Expand Down