Skip to content

Commit 07025b0

Browse files
committed
restrict (most) new setters to private access
1 parent 28115fb commit 07025b0

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

Fit/DomainWall.hh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,16 @@ namespace KinKal {
5151
auto const& prevWeight() const { return prevwt_; }
5252
auto const& nextWeight() const { return nextwt_; }
5353
auto const& fwdCovarianceRotation() const { return dpdpdb_; }
54-
void setPrevPtr(DOMAINPTR const& ptr){ prev_ = ptr; }
55-
void setNextPtr(DOMAINPTR const& ptr){ next_ = ptr; }
5654

5755
private:
5856
DOMAINPTR prev_, next_; // pointers to previous and next domains
5957
DVEC dpfwd_; // parameter change across this domain wall in the forwards time direction
6058
Weights prevwt_, nextwt_; // cache of weights
6159
PSMAT dpdpdb_; // forward rotation of covariance matrix going in the forwards direction
6260

61+
// modifiers to support cloning
62+
void setPrevPtr(DOMAINPTR const& ptr){ prev_ = ptr; }
63+
void setNextPtr(DOMAINPTR const& ptr){ next_ = ptr; }
6364
};
6465

6566
template<class KTRAJ> DomainWall<KTRAJ>::DomainWall(

Fit/Material.hh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,13 @@ namespace KinKal {
3939
auto const& elementXing() const { return *exingptr_; }
4040
auto const& elementXingPtr() const { return exingptr_; }
4141
auto const& referenceTrajectory() const { return exingptr_->referenceTrajectory(); }
42-
// other accessors
4342
auto const& weights() const { return nextwt_; }
44-
void setElementXingPtr(EXINGPTR const& ptr){ exingptr_ = ptr; }
4543
private:
4644
EXINGPTR exingptr_; // element crossing for this effect
4745
Weights nextwt_; // cache of weight forwards of this effect.
46+
47+
// modifiers to support cloning
48+
void setElementXingPtr(EXINGPTR const& ptr){ exingptr_ = ptr; }
4849
};
4950

5051
template<class KTRAJ> Material<KTRAJ>::Material(EXINGPTR const& exingptr, PTRAJ const& ptraj) : exingptr_(exingptr) {

Fit/Measurement.hh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,11 @@ namespace KinKal {
3737
std::unique_ptr< Effect<KTRAJ> > clone(CloneContext&) const override;
3838
// access the underlying hit
3939
HITPTR const& hit() const { return hit_; }
40-
// other accessors
41-
void setHitPtr(HITPTR const& ptr){ hit_ = ptr; }
4240
private:
4341
HITPTR hit_ ; // hit used for this measurement
42+
43+
// modifiers to support cloning
44+
void setHitPtr(HITPTR const& ptr){ hit_ = ptr; }
4445
};
4546

4647
template<class KTRAJ> Measurement<KTRAJ>::Measurement(HITPTR const& hit,PTRAJ const& ptraj) : hit_(hit) {

0 commit comments

Comments
 (0)