Skip to content

Commit

Permalink
Fix MuFilterHit constructors
Browse files Browse the repository at this point in the history
Add copy constructor, assignment operator (both default)
and make single-argument constructor explicit to avoid
accidental conversion
  • Loading branch information
olantwin committed Jun 19, 2024
1 parent dc1822d commit 70f3f4e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions shipLHC/MuFilterHit.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ class MuFilterHit : public SndlhcHit

/** Default constructor **/
MuFilterHit();
MuFilterHit(Int_t detID);
explicit MuFilterHit(Int_t detID);
/** Constructor with detector id, number of SiPMs per side, number of sides **/
MuFilterHit(Int_t detID,Int_t nP,Int_t nS);
MuFilterHit(const MuFilterHit& hit) = default;
MuFilterHit& operator=(const MuFilterHit& hit) = default;

// Constructor from MuFilterPoint
MuFilterHit(Int_t detID,std::vector<MuFilterPoint*>);
Expand All @@ -41,14 +43,11 @@ class MuFilterHit : public SndlhcHit
bool isVertical();
bool isShort(Int_t);
private:
/** Copy constructor **/
MuFilterHit(const MuFilterHit& hit);
MuFilterHit operator=(const MuFilterHit& hit);

Float_t flag; ///< flag
Float_t fMasked[16]; /// masked signal

ClassDef(MuFilterHit,5);
ClassDef(MuFilterHit, 6);


};
Expand Down

0 comments on commit 70f3f4e

Please sign in to comment.