]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
more error messages.
authorrdm <rdm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 11 Dec 2003 14:53:34 +0000 (14:53 +0000)
committerrdm <rdm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 11 Dec 2003 14:53:34 +0000 (14:53 +0000)
RAW/AliRawEvent.cxx
RAW/alimdc.cxx

index ffabb189568531b5a03f102ad4dcd1f8417c3879..747fa29bfc1c213f6f2a4f76694423a2a2335ba0 100644 (file)
@@ -478,7 +478,10 @@ Bool_t AliRawDB::Create()
 
 again:
    const char *fname = GetFileName();
-   if (!fname) return kFALSE;
+   if (!fname) {
+      Error("Create", "error getting raw DB file name");
+      return kFALSE;
+   }
 
    fRawDB = TFile::Open(fname, GetOpenOption(),
                         Form("ALICE MDC%d raw DB", kMDC), fCompress);
@@ -1143,14 +1146,14 @@ void AliRunDB::UpdateAliEn(AliStats *stats)
    lfn += "/";
    lfn += gSystem->BaseName(stats->GetFileName());
 
-   //printf("AliEn: AddFile(%s, %s, %d)\n", lfn.Data(), stats->GetFileName(),
-   //       (int)stats->GetFileSize());
-
-//   g->AddFile(lfn, stats->GetFileName(), (int)stats->GetFileSize());
    Int_t result = g->AddFile(lfn, stats->GetFileName(),
                             (int)stats->GetFileSize());
-   ALIDEBUG(1)
-      Info("UpdateAliEn", "TGrid::AddFile returned %d\n", result);
+
+   if (result == -1) {
+      Error("UpdateAliEn", "error adding file to AliEn catalog");
+      printf("AliEn: AddFile(%s, %s, %d)\n", lfn.Data(), stats->GetFileName(),
+             (int)stats->GetFileSize());
+   }
 
    delete g;
 }
@@ -1317,7 +1320,6 @@ Int_t AliMDC::Run()
 #ifdef USE_EB
    Int_t eorFlag = 0;
    while (!(eorFlag = ebEor())) {
-//   while (!ebEor()) {
       struct iovec *ebvec;
       if ((ebvec = ebGetNextEvent()) == (void *)-1) {
          Error("Run", "error getting next event (%s)", ebGetLastError());
@@ -1532,11 +1534,14 @@ Int_t AliMDC::Run()
          printf("Written raw DB at a rate of %.1f MB/s\n",
                 rawdb->GetBytesWritten() / timer.RealTime() / 1000000.);
 
-         // Write stats object to raw db, run db and MySQL
+         // Write stats object to raw db, run db, MySQL and AliEn
          stats->WriteToDB(rawdb);
          delete stats;
 
-         if (!rawdb->NextFile()) return 1;
+         if (!rawdb->NextFile()) {
+            Error("Run", "error opening next raw data file");
+            return 1;
+         }
 
          printf("Filling raw DB %s\n", rawdb->GetDBName());
          stats = new AliStats(rawdb->GetDBName(), fCompress, fUseFilter);
@@ -1593,7 +1598,7 @@ Int_t AliMDC::Run()
 #ifdef USE_EB
    // Print eor flag
    if (eorFlag) {
-      printf("Event builder reported end of run: %d\n", eorFlag);
+      Info("Run", "event builder reported end of run (%d)", eorFlag);
    }
 #endif
 
index c598e78903ba09436d58405a3a3a3a449bf01706..9e903c182dcb6f9eb617e6535836f0c79e6740c4 100644 (file)
@@ -175,7 +175,12 @@ int main(int argc, char **argv)
 #endif
 
    Int_t result = 0;
+
    result = mdcproc.Run();
-   printf( "Run exits, status:%d\n", result );
+
+   if (result == 0)
+      Info(argv[0], "normal termination of run");
+   else
+      Error(argv[0], "error termination of run, status: %d", result);
    return result;
 }