]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
GetFileSources returns empty list in case of no files, but successful query
authorjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 27 Apr 2007 07:06:48 +0000 (07:06 +0000)
committerjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 27 Apr 2007 07:06:48 +0000 (07:06 +0000)
No mails sent in testmode

SHUTTLE/AliShuttle.cxx
SHUTTLE/AliShuttleConfig.cxx
SHUTTLE/TestShuttle/AliTestShuttle.cxx
SHUTTLE/schema/shuttle.schema

index c204ff2040a45c0c68d8299c68f7f59faf70ec72..d73677f6155f8c1bb0ede385d8e93f13f82c114e 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.39  2007/04/17 12:43:57  acolla
+Correction in StoreOCDB; change of text in mail to detector expert
+
 Revision 1.38  2007/04/12 08:26:18  jgrosseo
 updated comment
 
@@ -416,15 +419,15 @@ Bool_t AliShuttle::StoreOCDB()
                return kFALSE;
        }
        
+       AliInfo("Storing OCDB data ...");
+       Bool_t resultCDB = StoreOCDB(fgkMainCDB);
+
        AliInfo("Storing reference data ...");
        Bool_t resultRef = StoreOCDB(fgkMainRefStorage);
        
        AliInfo("Storing reference files ...");
        Bool_t resultRefFiles = StoreRefFilesToGrid();
        
-       AliInfo("Storing OCDB data ...");
-       Bool_t resultCDB = StoreOCDB(fgkMainCDB);
-
        return resultCDB && resultRef && resultRefFiles;
 }
 
@@ -438,9 +441,6 @@ Bool_t AliShuttle::StoreOCDB(const TString& gridURI)
        TObjArray* gridIds=0;
 
        Bool_t result = kTRUE;
-       // to check whether all files have been transferred, or some files were left behind
-       // because the run is not first unprocessed
-       Bool_t willDoAgain = kFALSE;  
 
        const char* type = 0;
        TString localURI;
@@ -495,7 +495,6 @@ Bool_t AliShuttle::StoreOCDB(const TString& gridURI)
                        Log("SHUTTLE", Form("StoreOCDB - %s: object %s has validity infinite but "
                                                "there are previous unprocessed runs!",
                                                fCurrentDetector.Data(), aLocId.GetPath().Data()));
-                       willDoAgain=kTRUE;
                        continue;
                }
 
@@ -541,12 +540,6 @@ Bool_t AliShuttle::StoreOCDB(const TString& gridURI)
                }
        }
        localEntries->Clear();
-       
-       if(result && willDoAgain) {
-               Log(fCurrentDetector.Data(), 
-                       "Some files have been left on local storage, will try again later!");
-               result = kFALSE;
-       }
 
        return result;
 }
@@ -610,10 +603,9 @@ Bool_t AliShuttle::StoreRefFilesToGrid()
        //
        // Transfers the reference file to the Grid.
        //
-       // The file is stored under the following location: 
+       // The files are stored under the following location: 
        // <base folder of reference storage>/<DET>/<RUN#>_<gridFileName>
-       // where <gridFileName> is the second parameter given to the function
-       //      
+       //
        
        AliCDBManager* man = AliCDBManager::Instance();
        AliCDBStorage* sto = man->GetStorage(fgkLocalRefStorage);
@@ -922,8 +914,15 @@ Bool_t AliShuttle::ContinueProcessing()
        if (fConfig->StrictRunOrder(fCurrentDetector) &&
                !fFirstUnprocessed[GetDetPos(fCurrentDetector)])
        {
-               Log("SHUTTLE", Form("ContinueProcessing - %s requires strict run ordering but this is not the first unprocessed run!"));
-               return kFALSE;
+               if (fTestMode == kNone)
+               {
+                       Log("SHUTTLE", Form("ContinueProcessing - %s requires strict run ordering but this is not the first unprocessed run!"));
+                       return kFALSE;
+               }
+               else
+               {
+                       Log("SHUTTLE", Form("ContinueProcessing - In TESTMODE - Although %s requires strict run ordering and this is not the first unprocessed run, the SHUTTLE continues"));
+               }
        }
 
        AliShuttleStatus* status = ReadShuttleStatus();
@@ -1868,17 +1867,18 @@ TList* AliShuttle::GetFileSources(Int_t system, const char* detector, const char
                return 0;
        }
 
+       TList *list = new TList();
+       list->SetOwner(1);
+       
        if (aResult->GetRowCount() == 0)
        {
                Log(detector,
                        Form("GetFileSources - No entry in %s FXS table for id: %s", GetSystemName(system), id));
                delete aResult;
-               return 0;
+               return list;
        }
 
        TSQLRow* aRow;
-       TList *list = new TList();
-       list->SetOwner(1);
 
        while ((aRow = aResult->Next()))
        {
@@ -2478,8 +2478,7 @@ Bool_t AliShuttle::SendMail()
        to.Remove(to.Length()-1);
        AliDebug(2, Form("to: %s",to.Data()));
 
-       // TODO this will be removed...
-       if (to.Contains("not_yet_set")) {
+       if (to.IsNull()) {
                AliInfo("List of detector responsibles not yet set!");
                return kFALSE;
        }
@@ -2492,7 +2491,7 @@ Bool_t AliShuttle::SendMail()
 
        TString body = Form("Dear %s expert(s), \n\n", fCurrentDetector.Data());
        body += Form("SHUTTLE just detected that your preprocessor "
-                       "FAILED after %d retries in run %d!!\n\n", fConfig->GetMaxRetries(), GetCurrentRun());
+                       "exited with ERROR state in run %d!!\n\n", GetCurrentRun());
        body += Form("Please check %s status on the web page asap!\n\n", fCurrentDetector.Data());
        body += Form("The last 10 lines of %s log file are following:\n\n");
 
index 335ecd1cd66215ae4fe96576be56cc109bd41e08..28e5d4f73437fb318936d1081d077d57b7be4a03 100644 (file)
 
 /*
 $Log$
+Revision 1.20  2007/04/04 10:33:36  jgrosseo
+1) Storing of files to the Grid is now done _after_ your preprocessors succeeded. This is transparent, which means that you can still use the same functions (Store, StoreReferenceData) to store files to the Grid. However, the Shuttle first stores them locally and transfers them after the preprocessor finished. The return code of these two functions has changed from UInt_t to Bool_t which gives you the success of the storing.
+In case of an error with the Grid, the Shuttle will retry the storing later, the preprocessor does not need to be run again.
+
+2) The meaning of the return code of the preprocessor has changed. 0 is now success and any other value means failure. This value is stored in the log and you can use it to keep details about the error condition.
+
+3) New function StoreReferenceFile to _directly_ store a file (without opening it) to the reference storage.
+
+4) The memory usage of the preprocessor is monitored. If it exceeds 2 GB it is terminated.
+
+5) New function AliPreprocessor::ProcessDCS(). If you do not need to have DCS data in all cases, you can skip the processing by implemting this function and returning kFALSE under certain conditions. E.g. if there is a certain run type.
+If you always need DCS data (like before), you do not need to implement it.
+
+6) The run type has been added to the monitoring page
+
 Revision 1.19  2007/02/28 10:41:56  acolla
 Run type field added in SHUTTLE framework. Run type is read from "run type" logbook and retrieved by
 AliPreprocessor::GetRunType() function.
@@ -185,18 +200,20 @@ fStrictRunOrder(kFALSE)
                fStrictRunOrder = (Bool_t) strictRunStr.Atoi();
        }
 
-       anAttribute = entry->GetAttribute("responsible"); // MUST
+       anAttribute = entry->GetAttribute("responsible"); // MAY
         if (!anAttribute)
        {
-               AliError(Form("Invalid configuration! No \"responsible\" attribute!"));
-               return;
+               AliDebug(2, "Warning! No \"responsible\" attribute!");
         }
-       const char* aResponsible;
-       while ((aResponsible = anAttribute->GetValue()))
+       else
        {
-               fResponsibles->AddLast(new TObjString(aResponsible));
+               const char* aResponsible;
+               while ((aResponsible = anAttribute->GetValue()))
+               {
+                       fResponsibles->AddLast(new TObjString(aResponsible));
+               }
        }
-
+       
        anAttribute = entry->GetAttribute("DCSHost"); // MAY
        if (!anAttribute)
        {
index 9ce785149d93a56a863bed6f744f68fd29e3de7c..a81a00c936037d815fa3dd06bedd76c1db2886ab 100644 (file)
 
 /*
 $Log$
+Revision 1.11  2007/04/04 10:33:36  jgrosseo
+1) Storing of files to the Grid is now done _after_ your preprocessors succeeded. This is transparent, which means that you can still use the same functions (Store, StoreReferenceData) to store files to the Grid. However, the Shuttle first stores them locally and transfers them after the preprocessor finished. The return code of these two functions has changed from UInt_t to Bool_t which gives you the success of the storing.
+In case of an error with the Grid, the Shuttle will retry the storing later, the preprocessor does not need to be run again.
+
+2) The meaning of the return code of the preprocessor has changed. 0 is now success and any other value means failure. This value is stored in the log and you can use it to keep details about the error condition.
+
+3) New function StoreReferenceFile to _directly_ store a file (without opening it) to the reference storage.
+
+4) The memory usage of the preprocessor is monitored. If it exceeds 2 GB it is terminated.
+
+5) New function AliPreprocessor::ProcessDCS(). If you do not need to have DCS data in all cases, you can skip the processing by implemting this function and returning kFALSE under certain conditions. E.g. if there is a certain run type.
+If you always need DCS data (like before), you do not need to implement it.
+
+6) The run type has been added to the monitoring page
+
 Revision 1.10  2007/02/28 10:41:01  acolla
 Run type field added in SHUTTLE framework. Run type is read from "run type" logbook and retrieved by
 AliPreprocessor::GetRunType() function.
@@ -273,8 +288,8 @@ TList* AliTestShuttle::GetFileSources(Int_t system, const char* detector, const
     sourceList = dynamic_cast<TMap*> (sourceListPair->Value());
   if (!sourceList)
   {
-    AliError(Form("Could not find any file in %s with id %s (%s)", fkSystemNames[system], id, key.Data()));
-    return 0;
+    AliInfo(Form("Could not find any file in %s with id %s (%s)", fkSystemNames[system], id, key.Data()));
+    return new TList;
   }
 
   TIterator* iter = sourceList->GetTable()->MakeIterator();
index 9830705e375b0a50a11ad5827f3c9be74217a5da..c301dd48d2aca788edfdd7c8869beea88c80cc1c 100644 (file)
@@ -14,8 +14,8 @@ objectclass ( DETECTOR_CONFIG
         NAME 'AliShuttleDetector'
         DESC 'ALICE: Shuttle configuration object.'
         SUP top
-        MUST (det $ StrictRunOrder $ responsible)
-        MAY  (DCSHost $ DCSPort $ DCSalias $ DCSdatapoint) )
+        MUST (det $ StrictRunOrder)
+        MAY  (DCSHost $ DCSPort $ DCSalias $ DCSdatapoint $ responsible) )
 
 
 objectidentifier SYS_CONFIG SHUTTLE_BASE:2