]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - SHUTTLE/AliShuttle.cxx
Updating the AliAnalysisFemtoTask to work with
[u/mrichter/AliRoot.git] / SHUTTLE / AliShuttle.cxx
index b49d6c8dda9dbe75e607048945867e3ad6977118..ba681caf028961983c721084f558d28066dce5f6 100644 (file)
@@ -13,7 +13,7 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/* $Id:$ */
+/* $Id$ */
 
 //
 // This class is the main manager for AliShuttle. 
@@ -2099,6 +2099,26 @@ const char* AliShuttle::GetFile(Int_t system, const char* detector,
                        continue;
                } 
 
+                if (fileSize.Length()>0)
+                {
+                        // compare filesize of local file with the one stored in the FXS DB
+                       TString command=("stat --format=%s");
+                       Int_t sizeComp = gSystem->Exec(Form("%s %s |grep %s 2>&1 > /dev/null",
+                                               command.Data(), localFileName.Data(),fileSize.Data()));
+
+                       if ( sizeComp != 0)
+                       {
+                               Log(detector, Form("GetFileName - size of file %s does not match with local copy!",
+                                                       filePath.Data()));
+                               result = kFALSE;
+                               continue;
+                       }
+
+               } else {
+                       Log(fCurrentDetector, Form("GetFile - size of file %s not set in %s database, skipping comparison",
+                                               filePath.Data(), GetSystemName(system)));
+                }
+
                if (fileChecksum.Length()>0)
                {
                        // compare md5sum of local file with the one stored in the FXS DB
@@ -3024,7 +3044,7 @@ Bool_t AliShuttle::SendMail()
                cc += Form("%s,", anAdmin->GetName());
        }
        if (cc.Length() > 0)
-         cc.Remove(to.Length()-1);
+         cc.Remove(cc.Length()-1);
        AliDebug(2, Form("cc: %s",to.Data()));
 
        TString subject = Form("%s Shuttle preprocessor FAILED in run %d (run type = %s)!",
@@ -3156,7 +3176,7 @@ Bool_t AliShuttle::SendMailToDCS()
                cc += Form("%s,", anAdmin->GetName());
        }
        if (cc.Length() > 0)
-         cc.Remove(to.Length()-1);
+         cc.Remove(cc.Length()-1);
        AliDebug(2, Form("cc: %s",to.Data()));
 
        TString subject = Form("Retrieval of data points for %s FAILED in run %d !",