Skip to content

Commit

Permalink
Fix incorrect indentation (revealed by 'misleading indentation warning')
Browse files Browse the repository at this point in the history
  • Loading branch information
pcanal committed Apr 9, 2016
1 parent 148e09f commit ff6289e
Show file tree
Hide file tree
Showing 6 changed files with 132 additions and 132 deletions.
16 changes: 8 additions & 8 deletions geom/geom/src/TGeoPcon.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -687,14 +687,14 @@ TGeoVolume *TGeoPcon::Divide(TGeoVolume *voldiv, const char *divname, Int_t iaxi
shape = new TGeoPcon(-step/2, step, fNz);
for (is=0; is<fNz; is++)
((TGeoPcon*)shape)->DefineSection(is, fZ[is], fRmin[is], fRmax[is]);
vol = new TGeoVolume(divname, shape, voldiv->GetMedium());
vmulti->AddVolume(vol);
opt = "Phi";
for (id=0; id<ndiv; id++) {
voldiv->AddNodeOffset(vol, id, start+id*step+step/2, opt.Data());
((TGeoNodeOffset*)voldiv->GetNodes()->At(voldiv->GetNdaughters()-1))->SetFinder(finder);
}
return vmulti;
vol = new TGeoVolume(divname, shape, voldiv->GetMedium());
vmulti->AddVolume(vol);
opt = "Phi";
for (id=0; id<ndiv; id++) {
voldiv->AddNodeOffset(vol, id, start+id*step+step/2, opt.Data());
((TGeoNodeOffset*)voldiv->GetNodes()->At(voldiv->GetNdaughters()-1))->SetFinder(finder);
}
return vmulti;
case 3: //--- Z division
// find start plane
for (ipl=0; ipl<fNz-1; ipl++) {
Expand Down
4 changes: 2 additions & 2 deletions graf2d/gpad/src/TPad.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1151,8 +1151,8 @@ void TPad::Divide(Int_t nx, Int_t ny, Float_t xmargin, Float_t ymargin, Int_t co
pad->SetBorderMode(0);
if (i == 0) pad->SetLeftMargin(xl*nx);
else pad->SetLeftMargin(0);
pad->SetRightMargin(0);
pad->SetTopMargin(0);
pad->SetRightMargin(0);
pad->SetTopMargin(0);
if (j == ny-1) pad->SetBottomMargin(yb*ny);
else pad->SetBottomMargin(0);
pad->Draw();
Expand Down
14 changes: 7 additions & 7 deletions hist/hist/src/TLimit.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,13 @@ bool TLimit::Fluctuate(TLimitDataSource * input, TLimitDataSource * output,
for(int i=1; i<=newsignal->GetNbinsX(); i++) {
newsignal->SetBinContent(i,oldsignal->GetBinContent(i)+generator->Gaus(0,oldsignal->GetBinError(i)));
}
newsignal->SetDirectory(0);
TH1 *newbackground = (TH1*)(output->GetBackground()->At(channel));
TH1 *oldbackground = (TH1*)(input->GetBackground()->At(channel));
if(stat)
for(int i=1; i<=newbackground->GetNbinsX(); i++)
newbackground->SetBinContent(i,oldbackground->GetBinContent(i)+generator->Gaus(0,oldbackground->GetBinError(i)));
newbackground->SetDirectory(0);
newsignal->SetDirectory(0);
TH1 *newbackground = (TH1*)(output->GetBackground()->At(channel));
TH1 *oldbackground = (TH1*)(input->GetBackground()->At(channel));
if(stat)
for(int i=1; i<=newbackground->GetNbinsX(); i++)
newbackground->SetBinContent(i,oldbackground->GetBinContent(i)+generator->Gaus(0,oldbackground->GetBinError(i)));
newbackground->SetDirectory(0);
}
return 1;
}
Expand Down
216 changes: 108 additions & 108 deletions math/matrix/src/TMatrixDEigen.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -437,91 +437,91 @@ void TMatrixDEigen::MakeSchurr(TMatrixD &v,TVectorD &d,TVectorD &e,TMatrixD &H)
eps*(TMath::Abs(p)*(TMath::Abs(pH[off_m_1+m-1])+TMath::Abs(z)+
TMath::Abs(pH[off_m1+m+1]))))
break;
m--;
}

for (i = m+2; i <= n; i++) {
const Int_t off_i = i*nn;
pH[off_i+i-2] = 0.0;
if (i > m+2)
pH[off_i+i-3] = 0.0;
}

// Double QR step involving rows l:n and columns m:n

for (k = m; k <= n-1; k++) {
const Int_t off_k = k*nn;
const Int_t off_k1 = (k+1)*nn;
const Int_t off_k2 = (k+2)*nn;
const Int_t notlast = (k != n-1);
if (k != m) {
p = pH[off_k+k-1];
q = pH[off_k1+k-1];
r = (notlast ? pH[off_k2+k-1] : 0.0);
x = TMath::Abs(p)+TMath::Abs(q)+TMath::Abs(r);
if (x != 0.0) {
p = p/x;
q = q/x;
r = r/x;
}
}
if (x == 0.0)
break;
s = TMath::Sqrt(p*p+q*q+r*r);
if (p < 0) {
s = -s;
}
if (s != 0) {
if (k != m)
pH[off_k+k-1] = -s*x;
else if (l != m)
pH[off_k+k-1] = -pH[off_k+k-1];
p = p+s;
x = p/s;
y = q/s;
z = r/s;
q = q/p;
r = r/p;

// Row modification

for (j = k; j < nn; j++) {
p = pH[off_k+j]+q*pH[off_k1+j];
if (notlast) {
p = p+r*pH[off_k2+j];
pH[off_k2+j] = pH[off_k2+j]-p*z;
}
pH[off_k+j] = pH[off_k+j]-p*x;
pH[off_k1+j] = pH[off_k1+j]-p*y;
}

// Column modification

for (i = 0; i <= TMath::Min(n,k+3); i++) {
const Int_t off_i = i*nn;
p = x*pH[off_i+k]+y*pH[off_i+k+1];
if (notlast) {
p = p+z*pH[off_i+k+2];
pH[off_i+k+2] = pH[off_i+k+2]-p*r;
}
pH[off_i+k] = pH[off_i+k]-p;
pH[off_i+k+1] = pH[off_i+k+1]-p*q;
}

// Accumulate transformations

for (i = low; i <= high; i++) {
const Int_t off_i = i*nn;
p = x*pV[off_i+k]+y*pV[off_i+k+1];
if (notlast) {
p = p+z*pV[off_i+k+2];
pV[off_i+k+2] = pV[off_i+k+2]-p*r;
}
pV[off_i+k] = pV[off_i+k]-p;
pV[off_i+k+1] = pV[off_i+k+1]-p*q;
}
} // (s != 0)
} // k loop
m--;
}

for (i = m+2; i <= n; i++) {
const Int_t off_i = i*nn;
pH[off_i+i-2] = 0.0;
if (i > m+2)
pH[off_i+i-3] = 0.0;
}

// Double QR step involving rows l:n and columns m:n

for (k = m; k <= n-1; k++) {
const Int_t off_k = k*nn;
const Int_t off_k1 = (k+1)*nn;
const Int_t off_k2 = (k+2)*nn;
const Int_t notlast = (k != n-1);
if (k != m) {
p = pH[off_k+k-1];
q = pH[off_k1+k-1];
r = (notlast ? pH[off_k2+k-1] : 0.0);
x = TMath::Abs(p)+TMath::Abs(q)+TMath::Abs(r);
if (x != 0.0) {
p = p/x;
q = q/x;
r = r/x;
}
}
if (x == 0.0)
break;
s = TMath::Sqrt(p*p+q*q+r*r);
if (p < 0) {
s = -s;
}
if (s != 0) {
if (k != m)
pH[off_k+k-1] = -s*x;
else if (l != m)
pH[off_k+k-1] = -pH[off_k+k-1];
p = p+s;
x = p/s;
y = q/s;
z = r/s;
q = q/p;
r = r/p;

// Row modification

for (j = k; j < nn; j++) {
p = pH[off_k+j]+q*pH[off_k1+j];
if (notlast) {
p = p+r*pH[off_k2+j];
pH[off_k2+j] = pH[off_k2+j]-p*z;
}
pH[off_k+j] = pH[off_k+j]-p*x;
pH[off_k1+j] = pH[off_k1+j]-p*y;
}

// Column modification

for (i = 0; i <= TMath::Min(n,k+3); i++) {
const Int_t off_i = i*nn;
p = x*pH[off_i+k]+y*pH[off_i+k+1];
if (notlast) {
p = p+z*pH[off_i+k+2];
pH[off_i+k+2] = pH[off_i+k+2]-p*r;
}
pH[off_i+k] = pH[off_i+k]-p;
pH[off_i+k+1] = pH[off_i+k+1]-p*q;
}

// Accumulate transformations

for (i = low; i <= high; i++) {
const Int_t off_i = i*nn;
p = x*pV[off_i+k]+y*pV[off_i+k+1];
if (notlast) {
p = p+z*pV[off_i+k+2];
pV[off_i+k+2] = pV[off_i+k+2]-p*r;
}
pV[off_i+k] = pV[off_i+k]-p;
pV[off_i+k+1] = pV[off_i+k+1]-p*q;
}
} // (s != 0)
} // k loop
} // check convergence
} // while (n >= low)

Expand All @@ -538,32 +538,32 @@ void TMatrixDEigen::MakeSchurr(TMatrixD &v,TVectorD &d,TVectorD &e,TMatrixD &H)

const Int_t off_n = n*nn;
if (q == 0) {
Int_t l = n;
pH[off_n+n] = 1.0;
for (i = n-1; i >= 0; i--) {
const Int_t off_i = i*nn;
const Int_t off_i1 = (i+1)*nn;
w = pH[off_i+i]-p;
r = 0.0;
for (j = l; j <= n; j++) {
const Int_t off_j = j*nn;
r = r+pH[off_i+j]*pH[off_j+n];
}
if (pE[i] < 0.0) {
z = w;
s = r;
} else {
l = i;
if (pE[i] == 0.0) {
if (w != 0.0)
pH[off_i+n] = -r/w;
Int_t l = n;
pH[off_n+n] = 1.0;
for (i = n-1; i >= 0; i--) {
const Int_t off_i = i*nn;
const Int_t off_i1 = (i+1)*nn;
w = pH[off_i+i]-p;
r = 0.0;
for (j = l; j <= n; j++) {
const Int_t off_j = j*nn;
r = r+pH[off_i+j]*pH[off_j+n];
}
if (pE[i] < 0.0) {
z = w;
s = r;
} else {
l = i;
if (pE[i] == 0.0) {
if (w != 0.0)
pH[off_i+n] = -r/w;
else
pH[off_i+n] = -r/(eps*norm);
pH[off_i+n] = -r/(eps*norm);

// Solve real equations

} else {
x = pH[off_i+i+1];
x = pH[off_i+i+1];
y = pH[off_i1+i];
q = (pD[i]-p)*(pD[i]-p)+pE[i]*pE[i];
t = (x*s-z*r)/q;
Expand All @@ -578,8 +578,8 @@ void TMatrixDEigen::MakeSchurr(TMatrixD &v,TVectorD &d,TVectorD &e,TMatrixD &H)

t = TMath::Abs(pH[off_i+n]);
if ((eps*t)*t > 1) {
for (j = i; j <= n; j++) {
const Int_t off_j = j*nn;
for (j = i; j <= n; j++) {
const Int_t off_j = j*nn;
pH[off_j+n] = pH[off_j+n]/t;
}
}
Expand Down
8 changes: 4 additions & 4 deletions math/matrix/src/TMatrixTBase.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -869,14 +869,14 @@ void TMatrixTBase<Element>::Print(Option_t *option) const
for (Int_t sheet_counter = 1; sheet_counter <= ncols; sheet_counter += cols_per_sheet) {
printf("\n\n |");
for (Int_t j = sheet_counter; j < sheet_counter+cols_per_sheet && j <= ncols; j++)
printf(ftopbar,j+collwb-1);
printf(ftopbar,j+collwb-1);
printf("\n%s\n",topbar);
if (fNelems <= 0) continue;
for (Int_t i = 1; i <= nrows; i++) {
printf("%4d |",i+rowlwb-1);
printf("%4d |",i+rowlwb-1);
for (Int_t j = sheet_counter; j < sheet_counter+cols_per_sheet && j <= ncols; j++)
printf(format,(*this)(i+rowlwb-1,j+collwb-1));
printf("\n");
printf(format,(*this)(i+rowlwb-1,j+collwb-1));
printf("\n");
}
}
printf("\n");
Expand Down
6 changes: 3 additions & 3 deletions math/matrix/src/TMatrixTSparse.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@ TMatrixTSparse<Element>::TMatrixTSparse(EMatrixCreatorsOp1 op,const TMatrixTSpar
for (Int_t i = rowLwb; i <= rowLwb+nrows-1; i++)
for (Int_t j = colLwb; j <= colLwb+ncols-1; j++)
if (i==j) nr_nonzeros++;
Allocate(nrows,ncols,rowLwb,colLwb,1,nr_nonzeros);
UnitMatrix();
break;
Allocate(nrows,ncols,rowLwb,colLwb,1,nr_nonzeros);
UnitMatrix();
break;
}
case kTransposed:
{
Expand Down

0 comments on commit ff6289e

Please sign in to comment.