Skip to content

Commit

Permalink
Merge pull request cms-sw#1498 from smuzaffar/thread-safety-fix-PolyF…
Browse files Browse the repository at this point in the history
…it2DParametrizedMagneticField

Multithreading fixes -- Thread safety fix for PolyFit2DParametrizedMagneticField.cc
  • Loading branch information
ktf committed Nov 19, 2013
2 parents 6c65770 + c885f4c commit 2a2b393
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion MagneticField/ParametrizedEngine/plugins/BFit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ void BFit::SetField(double B)

//_______________________________________________________________________________
void BFit::GetField(double r, double z, double phi,
double &Br, double &Bz, double &Bphi)
double &Br, double &Bz, double &Bphi) const
{
//Get field components in the point (r,z,phi). Always return Bphi=0.
//Parameters phi and Bphi introduced in order to keep interface
Expand Down
2 changes: 1 addition & 1 deletion MagneticField/ParametrizedEngine/plugins/BFit.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class BFit {

void SetField(double B);
void GetField(double r, double z, double phi,
double &Br, double &Bz, double &Bphi);
double &Br, double &Bz, double &Bphi) const;
};
}

Expand Down
2 changes: 1 addition & 1 deletion MagneticField/ParametrizedEngine/plugins/rz_poly.cc
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ rz_poly& rz_poly::operator*=(double *C)
}

//_______________________________________________________________________________
double rz_poly::GetSVal(double r, double z, double *C)
double rz_poly::GetSVal(double r, double z, const double *C) const
{
//Return value of a polynomial, ignoring terms, that are switched off

Expand Down
10 changes: 5 additions & 5 deletions MagneticField/ParametrizedEngine/plugins/rz_poly.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ class rz_poly { // represent a set of homogeneous polynomials
rz_poly& operator*=(double C);
rz_poly& operator*=(double *C);

double GetSVal(double r, double z, double *C);
double GetSVal(double r, double z, const double *C) const;
double *GetVVal(double r, double z, double *rez_out = 0);

int GetMaxRPow() {return max_nr-1;}
int GetMaxZPow() {return max_nz-1;}
int GetLength() {return (int)data.size();}
int GetNActive() {return n_active;}
int GetMaxRPow() const {return max_nr-1;}
int GetMaxZPow() const {return max_nz-1;}
int GetLength() const {return (int)data.size();}
int GetNActive() const {return n_active;}

double *Expand(double *C);

Expand Down

0 comments on commit 2a2b393

Please sign in to comment.