Compilation warnings
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 13 Nov 2011 18:00:16 +0000 (18:00 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sun, 13 Nov 2011 18:00:16 +0000 (18:00 +0000)
ITS/AliITSDDLModuleMapSDD.cxx
ITS/AliITSOnlineSDDCMN.cxx
ITS/AliITSOnlineSDDTP.cxx

index 87bde4b..ec88e65 100644 (file)
@@ -302,7 +302,7 @@ void AliITSDDLModuleMapSDD::ReadDDLModuleMap(Char_t *ddlmapfile){
   Int_t mod;
   for(Int_t iddl=0;iddl<kDDLsNumber;iddl++){
     for(Int_t ichan=0; ichan<kModulesPerDDL; ichan++){
-      fscanf(fil,"%d",&mod);
+      if(fscanf(fil,"%d",&mod)<1)AliError(Form("Not able to read file %s ",ddlmapfile));
       fDDLModuleMap[iddl][ichan]=mod;
     }
   }
index 982843d..81de509 100644 (file)
@@ -80,12 +80,15 @@ void AliITSOnlineSDDCMN::ReadBaselines(){
     }
     return;
   }
-  fscanf(basf,"%d\n",&fHighThreshold);
-  fscanf(basf,"%d\n",&fLowThreshold);
+  Int_t check = fscanf(basf,"%d\n",&fHighThreshold);
+  if(check<1)AliError("Error while reading file with baselines");
+  check = fscanf(basf,"%d\n",&fLowThreshold);
+  if(check<1)AliError("Error while reading file with baselines");
   Int_t n,ok,eqbase,offbase;
   Float_t base,rms,cmn,corrnoi;
   for(Int_t ian=0;ian<fgkNAnodes;ian++){
-    fscanf(basf,"%d %d %f %d %d %f %f %f\n",&n,&ok,&base,&eqbase,&offbase,&rms,&cmn,&corrnoi);
+    check = fscanf(basf,"%d %d %f %d %d %f %f %f\n",&n,&ok,&base,&eqbase,&offbase,&rms,&cmn,&corrnoi);
+    if(check<1)AliError("Error while reading file with baselines");
     fGoodAnode[ian]=ok;
     fBaseline[ian]=base;
     fEqBaseline[ian]=eqbase;
index 63c8fd5..c684c15 100644 (file)
@@ -102,12 +102,15 @@ void AliITSOnlineSDDTP::ReadBaselines(){
     }
     return;
   }
-  fscanf(basf,"%d\n",&fHighThreshold);
-  fscanf(basf,"%d\n",&fLowThreshold);
+  Int_t check = fscanf(basf,"%d\n",&fHighThreshold);
+  if(check<1)AliError("Error while reading file with baselines");
+  check = fscanf(basf,"%d\n",&fLowThreshold);
+  if(check<1)AliError("Error while reading file with baselines");
   Int_t n,ok,eqbase,offbase;
   Float_t base,rms,cmn,corrnoi;
   for(Int_t ian=0;ian<fgkNAnodes;ian++){
-    fscanf(basf,"%d %d %f %d %d %f %f %f\n",&n,&ok,&base,&eqbase,&offbase,&rms,&cmn,&corrnoi);
+    check = fscanf(basf,"%d %d %f %d %d %f %f %f\n",&n,&ok,&base,&eqbase,&offbase,&rms,&cmn,&corrnoi);
+    if(check<1)AliError("Error while reading file with baselines");
     fBaseline[ian]=base;
     fEqBaseline[ian]=eqbase;
     fOffsetBaseline[ian]=offbase;