Commit 4a69b442 authored by Vesa Oikonen's avatar Vesa Oikonen
Browse files

code style

parent c7f0faa5
......@@ -20,8 +20,8 @@
/*****************************************************************************/
/** Check whether parameter names are the same in two PAR data.
Comparison is very strict, thus the names may need
to be preprocessed if this is used for other purpose than SW testing.
Comparison is very strict, thus the names may need to be preprocessed if this is used for
other purpose than SW testing.
@return 0 in case of match, 1 if no match or error.
@author Vesa Oikonen
*/
......@@ -139,8 +139,8 @@ int parCompareParameterUnits(
/*****************************************************************************/
/** Check whether TAC names are the same in two PAR data.
Comparison is very strict, thus the names may need
to be preprocessed if this is used for other purpose than SW testing.
Comparison is very strict, thus the names may need to be preprocessed if this is used for
other purpose than SW testing.
@return 0 in case of match, 1 if no match or error.
@author Vesa Oikonen
*/
......@@ -242,8 +242,7 @@ int parCompareParameters(
if(verbose>1) printf("%s()\n", __func__);
/* Check that required data exists */
if(d1==NULL || d2==NULL || d1->tacNr<1 || d2->tacNr<1
|| d1->parNr<1 || d2->parNr<1) {
if(d1==NULL || d2==NULL || d1->tacNr<1 || d2->tacNr<1 || d1->parNr<1 || d2->parNr<1) {
statusSet(status, __func__, __FILE__, __LINE__, TPCERROR_NO_DATA);
return 1;
}
......@@ -279,11 +278,8 @@ int parCompareParameters(
if(checkpar) {
for(tj=0; tj<d1->tacNr; tj++) if(ti<0 || tj==ti) {
for(pj=0; pj<d1->parNr; pj++) if(pi<0 || pj==pi) {
if(doubleMatch(d1->r[tj].p[pj], d2->r[tj].p[pj], test_abs)==1)
continue;
if(test_rel>0.0 &&
doubleMatchRel(d1->r[tj].p[pj], d2->r[tj].p[pj], test_rel)==1)
continue;
if(doubleMatch(d1->r[tj].p[pj], d2->r[tj].p[pj], test_abs)==1) continue;
if(test_rel>0.0 && doubleMatchRel(d1->r[tj].p[pj], d2->r[tj].p[pj], test_rel)==1) continue;
if(verbose>0) {
double s=fabs(d1->r[tj].p[pj]-d2->r[tj].p[pj]);
printf("par1.r[%d].p[%d] := %g\n", tj, pj, d1->r[tj].p[pj]);
......@@ -299,11 +295,8 @@ int parCompareParameters(
if(checksd) {
for(tj=0; tj<d1->tacNr; tj++) if(ti<0 || tj==ti) {
for(pj=0; pj<d1->parNr; pj++) if(pi<0 || pj==pi) {
if(doubleMatch(d1->r[tj].sd[pj], d2->r[tj].sd[pj], test_abs)==1)
continue;
if(test_rel>0.0 &&
doubleMatchRel(d1->r[tj].sd[pj], d2->r[tj].sd[pj], test_rel)==1)
continue;
if(doubleMatch(d1->r[tj].sd[pj], d2->r[tj].sd[pj], test_abs)==1) continue;
if(test_rel>0.0 && doubleMatchRel(d1->r[tj].sd[pj], d2->r[tj].sd[pj], test_rel)==1) continue;
if(verbose>0) {
double s=fabs(d1->r[tj].sd[pj]-d2->r[tj].sd[pj]);
printf("par1.r[%d].sd[%d] := %g\n", tj, pj, d1->r[tj].sd[pj]);
......@@ -319,11 +312,8 @@ int parCompareParameters(
if(checkcl) {
for(tj=0; tj<d1->tacNr; tj++) if(ti<0 || tj==ti) {
for(pj=0; pj<d1->parNr; pj++) if(pi<0 || pj==pi) {
if(doubleMatch(d1->r[tj].cl1[pj], d2->r[tj].cl1[pj], test_abs)==1)
continue;
if(test_rel>0.0 &&
doubleMatchRel(d1->r[tj].cl1[pj], d2->r[tj].cl1[pj], test_rel)==1)
continue;
if(doubleMatch(d1->r[tj].cl1[pj], d2->r[tj].cl1[pj], test_abs)==1) continue;
if(test_rel>0.0 && doubleMatchRel(d1->r[tj].cl1[pj], d2->r[tj].cl1[pj], test_rel)==1) continue;
if(verbose>0) {
double s=fabs(d1->r[tj].cl1[pj]-d2->r[tj].cl1[pj]);
printf("par1.r[%d].cl1[%d] := %g\n", tj, pj, d1->r[tj].cl1[pj]);
......@@ -337,11 +327,8 @@ int parCompareParameters(
}
for(tj=0; tj<d1->tacNr; tj++) if(ti<0 || tj==ti) {
for(pj=0; pj<d1->parNr; pj++) if(pi<0 || pj==pi) {
if(doubleMatch(d1->r[tj].cl2[pj], d2->r[tj].cl2[pj], test_abs)==1)
continue;
if(test_rel>0.0 &&
doubleMatchRel(d1->r[tj].cl2[pj], d2->r[tj].cl2[pj], test_rel)==1)
continue;
if(doubleMatch(d1->r[tj].cl2[pj], d2->r[tj].cl2[pj], test_abs)==1) continue;
if(test_rel>0.0 && doubleMatchRel(d1->r[tj].cl2[pj], d2->r[tj].cl2[pj], test_rel)==1) continue;
if(verbose>0) {
double s=fabs(d1->r[tj].cl2[pj]-d2->r[tj].cl2[pj]);
printf("par1.r[%d].cl2[%d] := %g\n", tj, pj, d1->r[tj].cl2[pj]);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment