Skip to content

Commit

Permalink
base/{steer,sim}: Use override
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianTackeGSI authored and dennisklein committed Nov 11, 2022
1 parent 9512cd0 commit 1292f9d
Show file tree
Hide file tree
Showing 12 changed files with 76 additions and 76 deletions.
6 changes: 3 additions & 3 deletions base/sim/FairBaseContFact.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ class FairBaseContFact : public FairContFact
/**default ctor*/
FairBaseContFact();
/**default dtor*/
~FairBaseContFact() {}
~FairBaseContFact() override {}
/** Calls the constructor of the corresponding parameter container.
* For an actual context, which is not an empty string and not the default context
* of this container, the name is concatinated with the context. */
FairParSet* createContainer(FairContainer*);
ClassDef(FairBaseContFact, 0);
FairParSet* createContainer(FairContainer*) override;
ClassDefOverride(FairBaseContFact, 0);
};

#endif /* !FAIRBASECONTFACT_H */
10 changes: 5 additions & 5 deletions base/sim/FairBaseParSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@ class FairBaseParSet : public FairParGenericSet
const char* title = "Class for base parameter io",
const char* context = "BaseDefaultContext");
/** dtor*/
~FairBaseParSet(void);
~FairBaseParSet() override;
/** clear*/
void clear(void);
void clear() override;
/**
* Fills all persistent data members into the list for write.
* @param FairParamList : Parameter list to be filled
*/
void putParams(FairParamList*);
void putParams(FairParamList*) override;
/**
* Fills all persistent data members from the list after reading. The function
* returns false, when a data member is not in the list.
* @param FairParamList : Parameter list to be filled
*/

Bool_t getParams(FairParamList*);
Bool_t getParams(FairParamList*) override;
/**
* Set the detector list used in the simulation
* @param array: TObjArray of detector
Expand Down Expand Up @@ -110,7 +110,7 @@ class FairBaseParSet : public FairParGenericSet
/// Random Seed from gRandom
UInt_t fRandomSeed;

ClassDef(FairBaseParSet, 6);
ClassDefOverride(FairBaseParSet, 6);

private:
FairBaseParSet(const FairBaseParSet& L);
Expand Down
26 changes: 13 additions & 13 deletions base/sim/FairGeaneApplication.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class FairGeaneApplication : public TVirtualMCApplication
*@param Debug true to print step info*/
FairGeaneApplication(Bool_t Debug);
/** default destructor */
virtual ~FairGeaneApplication();
~FairGeaneApplication() override;
/** Return Field used in simulation*/
FairField* GetField() { return fxField; }
/** Initialize MC engine */
Expand All @@ -46,23 +46,23 @@ class FairGeaneApplication : public TVirtualMCApplication
*/
void SetField(FairField* field);
/** Define action at each step, dispatch the action to the corresponding detectors */
void GeaneStepping(); // MC Application
void ConstructGeometry();
void GeaneStepping() override; // MC Application
void ConstructGeometry() override;
/** Singelton instance
*/
static FairGeaneApplication* Instance();

/**pure virtual functions that hasve to be implimented */

void InitGeometry() { ; }
void GeneratePrimaries() { ; }
void BeginEvent() { ; }
void BeginPrimary() { ; }
void PreTrack() { ; }
void PostTrack() { ; }
void FinishPrimary() { ; }
void FinishEvent() { ; }
void Stepping() { ; }
void InitGeometry() override { ; }
void GeneratePrimaries() override { ; }
void BeginEvent() override { ; }
void BeginPrimary() override { ; }
void PreTrack() override { ; }
void PostTrack() override { ; }
void FinishPrimary() override { ; }
void FinishEvent() override { ; }
void Stepping() override { ; }
void StopRun() { ; }

private:
Expand All @@ -76,7 +76,7 @@ class FairGeaneApplication : public TVirtualMCApplication
TLorentzVector fTrkPos; //!

// Interface to MonteCarlo application
ClassDef(FairGeaneApplication, 1);
ClassDefOverride(FairGeaneApplication, 1);

private:
FairGeaneApplication(const FairGeaneApplication&);
Expand Down
10 changes: 5 additions & 5 deletions base/sim/FairGeoParSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,21 @@ class FairGeoParSet : public FairParGenericSet
const char* title = "Class for base parameter io",
const char* context = "BaseDefaultContext");
/** dtor*/
~FairGeoParSet(void);
~FairGeoParSet() override;
/** clear*/
void clear(void);
void clear() override;
/**
* Fills all persistent data members into the list for write.
* @param FairParamList : Parameter list to be filled
*/
void putParams(FairParamList*);
void putParams(FairParamList*) override;
/**
* Fills all persistent data members from the list after reading. The function
* returns false, when a data member is not in the list.
* @param FairParamList : Parameter list to be filled
*/

Bool_t getParams(FairParamList*);
Bool_t getParams(FairParamList*) override;
/**
* Set the Geometry node list used in the simulation
* @param array: TObjArray of Geometry nodes
Expand All @@ -75,7 +75,7 @@ class FairGeoParSet : public FairParGenericSet
TObjArray* fGeoNodes; //!
/// Full Geometry
TGeoManager* fGeom;
ClassDef(FairGeoParSet, 1);
ClassDefOverride(FairGeoParSet, 1);

private:
FairGeoParSet(const FairGeoParSet& L);
Expand Down
6 changes: 3 additions & 3 deletions base/sim/FairModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ class FairModule : public TNamed
/**Standard ctor*/
FairModule(const char* Name, const char* title, Bool_t Active = kFALSE);
/**default dtor*/
virtual ~FairModule();
~FairModule() override;
/**Print method should be implemented in detector or module*/
virtual void Print(Option_t*) const { ; }
void Print(Option_t*) const override { ; }
/**Set the geometry file name o be used*/
virtual void SetGeometryFileName(TString fname, TString geoVer = "0");
/**Get the Geometry file name*/
Expand Down Expand Up @@ -165,7 +165,7 @@ class FairModule : public TNamed
Bool_t fGeoSaved; //! flag for initialisation
TVirtualMC* fMC; //! cahed pointer to MC (available only after initialization)

ClassDef(FairModule, 4);
ClassDefOverride(FairModule, 4);
};

template<class T, class U>
Expand Down
8 changes: 4 additions & 4 deletions base/sim/FairParticle.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ class FairParticle : public TObject

FairParticle();

virtual ~FairParticle();
~FairParticle() override;

// methods
void SetMother(FairParticle* particle);
void AddDaughter(FairParticle* particle);
virtual void Print(Option_t* option = "") const;
void Print(Option_t* option = "") const override;
void PrintDaughters() const;

// get methods
Expand All @@ -71,7 +71,7 @@ class FairParticle : public TObject
FairParticle* GetMother() const;
Int_t GetNofDaughters() const;
FairParticle* GetDaughter(Int_t i) const;
virtual const char* GetName() const { return fname.Data(); }
const char* GetName() const override { return fname.Data(); }
TMCParticleType GetMCType() { return fmcType; }
Double_t GetMass() { return fmass; }
Double_t GetCharge() { return fcharge; }
Expand Down Expand Up @@ -113,7 +113,7 @@ class FairParticle : public TObject
Int_t fbaryon;
Bool_t fstable;

ClassDef(FairParticle, 3);
ClassDefOverride(FairParticle, 3);
};

#endif // FAIR_PARTICLE_H
18 changes: 9 additions & 9 deletions base/sim/fastsim/FairFastSimDetector.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ class FairFastSimDetector : public FairDetector

FairFastSimDetector(const char* name, Int_t DetId = 0);

virtual ~FairFastSimDetector();
~FairFastSimDetector() override;

virtual void Initialize() = 0;
void Initialize() override = 0;

virtual Bool_t ProcessHits(FairVolume* vol = 0) final;
Bool_t ProcessHits(FairVolume* vol = 0) override final;

virtual void EndOfEvent() {}
void EndOfEvent() override {}

virtual void Register() = 0;
void Register() override = 0;

virtual TClonesArray* GetCollection(Int_t iColl) const = 0;
TClonesArray* GetCollection(Int_t iColl) const override = 0;

virtual void Reset() = 0;
void Reset() override = 0;

virtual void ConstructGeometry();
void ConstructGeometry() override;

protected:
virtual void FastSimProcessParticle() = 0;
Expand All @@ -48,7 +48,7 @@ class FairFastSimDetector : public FairDetector

FairFastSimDetector& operator=(const FairFastSimDetector&);

ClassDef(FairFastSimDetector, 1);
ClassDefOverride(FairFastSimDetector, 1);
};

#endif //! FAIRFASTSIMDETECTOR_H
30 changes: 15 additions & 15 deletions base/steer/FairAnaSelector.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,23 @@ class FairAnaSelector : public TSelector
, fCurrentDirectory("")
{}

virtual ~FairAnaSelector() {}
virtual Int_t Version() const { return 1; }
virtual void Begin(TTree* tree);
virtual void SlaveBegin(TTree* tree);
virtual void Init(TTree* tree);
virtual Bool_t Notify();
virtual Bool_t Process(Long64_t entry);
virtual Int_t GetEntry(Long64_t entry, Int_t getall = 0)
~FairAnaSelector() override {}
Int_t Version() const override { return 1; }
void Begin(TTree* tree) override;
void SlaveBegin(TTree* tree) override;
void Init(TTree* tree) override;
Bool_t Notify() override;
Bool_t Process(Long64_t entry) override;
Int_t GetEntry(Long64_t entry, Int_t getall = 0) override
{
return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0;
}
virtual void SetOption(const char* option) { fOption = option; }
virtual void SetObject(TObject* obj) { fObject = obj; }
virtual void SetInputList(TList* input) { fInput = input; }
virtual TList* GetOutputList() const { return fOutput; }
virtual void SlaveTerminate();
virtual void Terminate();
void SetOption(const char* option) override { fOption = option; }
void SetObject(TObject* obj) override { fObject = obj; }
void SetInputList(TList* input) override { fInput = input; }
TList* GetOutputList() const override { return fOutput; }
void SlaveTerminate() override;
void Terminate() override;

void SetFairRunAnaProof(FairRunAnaProof* runAna) { fRunAna = runAna; }

Expand All @@ -75,7 +75,7 @@ class FairAnaSelector : public TSelector

TString fCurrentDirectory;

ClassDef(FairAnaSelector, 0);
ClassDefOverride(FairAnaSelector, 0);
};

#endif // FAIRANASELECTOR_H
16 changes: 8 additions & 8 deletions base/steer/FairRingSorterTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,18 @@ class FairRingSorterTask : public FairTask
}

/** Destructor **/
virtual ~FairRingSorterTask() { delete fSorter; }
~FairRingSorterTask() override { delete fSorter; }

/** Virtual method Init **/
virtual InitStatus Init();
virtual InitStatus ReInit();
InitStatus Init() override;
InitStatus ReInit() override;

/** Virtual method Exec **/
virtual void Exec(Option_t* opt);
virtual void FinishEvent();
virtual void FinishTask();
void Exec(Option_t* opt) override;
void FinishEvent() override;
void FinishTask() override;

virtual void SetParContainers(){};
void SetParContainers() override {}

void SetPersistance(Bool_t p = kTRUE) { fPersistance = p; };
Bool_t GetPersistance() { return fPersistance; };
Expand All @@ -121,7 +121,7 @@ class FairRingSorterTask : public FairTask
FairRingSorterTask(const FairRingSorterTask&);
FairRingSorterTask& operator=(const FairRingSorterTask&);

ClassDef(FairRingSorterTask, 2);
ClassDefOverride(FairRingSorterTask, 2);
};

#endif
6 changes: 3 additions & 3 deletions base/steer/FairRootManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class FairRootManager : public TObject
{
public:
/**dtor*/
virtual ~FairRootManager();
~FairRootManager() override;
Bool_t AllDataProcessed();
/** Add a branch name to the Branchlist and give it an id*/
Int_t AddBranchToList(const char* name);
Expand Down Expand Up @@ -195,7 +195,7 @@ class FairRootManager : public TObject
* this method truncate the full path from the branch names
*/

Int_t Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0);
Int_t Write(const char* name = nullptr, Int_t option = 0, Int_t bufsize = 0) override;
/** Write the current TGeoManager to file*/
void WriteGeometry();
/**Write the file header object to the output file*/
Expand Down Expand Up @@ -419,7 +419,7 @@ class FairRootManager : public TObject
// data members
Int_t fId; // This manager ID

ClassDef(FairRootManager, 13);
ClassDefOverride(FairRootManager, 13);
};

// FIXME: move to source since we can make it non-template dependent
Expand Down
12 changes: 6 additions & 6 deletions base/steer/FairTSBufferFunctional.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ class StopTime : public BinaryFunctor
/**
* \parameter b: StopTime: All data older than StopTime is returned
*/
bool Call(FairTimeStamp* a, double b)
bool Call(FairTimeStamp* a, double b) override
{
fRequestTime = b;
// std::cout << "StopTime: " << a->GetTimeStamp() << " > " << b << std::endl;
return a->GetTimeStamp() > b;
};

bool TimeOut()
bool TimeOut() override
{
if (fRequestTime != fOldTime) {
fOldTime = fRequestTime;
Expand All @@ -90,7 +90,7 @@ class StopTime : public BinaryFunctor
}
}

void ResetTimeOut() { fSameTimeRequestCounter = 0; }
void ResetTimeOut() override { fSameTimeRequestCounter = 0; }

private:
double fRequestTime;
Expand All @@ -112,7 +112,7 @@ class TimeGap : public BinaryFunctor
/**
* \parameter b : TimeGap: All data between two time gaps which are larger than TimeGap are returned
*/
bool Call(FairTimeStamp* a, double b)
bool Call(FairTimeStamp* a, double b) override
{
double aTime = a->GetTimeStamp();

Expand Down Expand Up @@ -161,7 +161,7 @@ class FairTSBufferFunctional : public TObject
BinaryFunctor* stopFunction,
BinaryFunctor* startFunction = 0);

virtual ~FairTSBufferFunctional(){};
~FairTSBufferFunctional() override {}
TClonesArray* GetData(Double_t stopParameter);
TClonesArray* GetData(Double_t startParameter, Double_t stopParameter);
Int_t GetBranchIndex() { return fBranchIndex; }
Expand Down Expand Up @@ -215,7 +215,7 @@ class FairTSBufferFunctional : public TObject
FairTSBufferFunctional(const FairTSBufferFunctional&);
FairTSBufferFunctional& operator=(const FairTSBufferFunctional&);

ClassDef(FairTSBufferFunctional, 0);
ClassDefOverride(FairTSBufferFunctional, 0);
};

#endif
Loading

0 comments on commit 1292f9d

Please sign in to comment.