in AliShuttle.cxx: SHUTTLE logbook is updated in case of invalid run times:
authoracolla <acolla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 12 Dec 2007 10:06:29 +0000 (10:06 +0000)
committeracolla <acolla@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 12 Dec 2007 10:06:29 +0000 (10:06 +0000)
time_start==0 && time_end==0

logbook is NOT updated if time_start != 0 && time_end == 0, because it may mean that the run is still ongoing.

SHUTTLE/AliShuttle.cxx
SHUTTLE/AliShuttleTrigger.cxx

index af34760..25575b3 100644 (file)
 
 /*
 $Log$
+Revision 1.68  2007/12/11 10:15:17  acolla
+Added marking SHUTTLE=DONE for invalid runs
+(invalid start time or end time) and runs with totalEvents < 1
+
 Revision 1.67  2007/12/07 19:14:36  acolla
 in AliShuttleTrigger:
 
@@ -2025,11 +2029,32 @@ AliShuttleLogbookEntry* AliShuttle::QueryRunParameters(Int_t run)
        UInt_t startTime = entry->GetStartTime();
        UInt_t endTime = entry->GetEndTime();
 
-       if (!startTime || !endTime || startTime > endTime) 
+//     if (!startTime || !endTime || startTime > endTime) 
+//     {
+//             Log("SHUTTLE",
+//                     Form("QueryRunParameters - Invalid parameters for Run %d: startTime = %d, endTime = %d. Skipping!",
+//                             run, startTime, endTime));              
+//             
+//             Log("SHUTTLE", Form("Marking SHUTTLE done for run %d", run));
+//             fLogbookEntry = entry;  
+//             if (!UpdateShuttleLogbook("shuttle_done"))
+//             {
+//                     AliError(Form("Could not update logbook for run %d !", run));
+//             }
+//             fLogbookEntry = 0;
+//                             
+//             delete entry;
+//             delete aRow;
+//             delete aResult;
+//             return 0;
+//     }
+
+       if (!startTime) 
        {
                Log("SHUTTLE",
-                       Form("QueryRunParameters - Invalid parameters for Run %d: startTime = %d, endTime = %d. Skipping!",
-                               run, startTime, endTime));              
+                       Form("QueryRunParameters - Invalid parameters for Run %d: " 
+                               "startTime = %d, endTime = %d. Skipping!",
+                                       run, startTime, endTime));              
                
                Log("SHUTTLE", Form("Marking SHUTTLE done for run %d", run));
                fLogbookEntry = entry;  
@@ -2045,6 +2070,50 @@ AliShuttleLogbookEntry* AliShuttle::QueryRunParameters(Int_t run)
                return 0;
        }
        
+       if (startTime && !endTime) 
+       {
+               // TODO Here we don't mark SHUTTLE done, because this may mean 
+               //the run is still ongoing!!            
+               Log("SHUTTLE",
+                       Form("QueryRunParameters - Invalid parameters for Run %d: "
+                            "startTime = %d, endTime = %d. Skipping (Shuttle won't be marked as DONE)!",
+                                       run, startTime, endTime));              
+               
+               //Log("SHUTTLE", Form("Marking SHUTTLE done for run %d", run));
+               //fLogbookEntry = entry;        
+               //if (!UpdateShuttleLogbook("shuttle_done"))
+               //{
+               //      AliError(Form("Could not update logbook for run %d !", run));
+               //}
+               //fLogbookEntry = 0;
+                               
+               delete entry;
+               delete aRow;
+               delete aResult;
+               return 0;
+       }
+                       
+       if (startTime && endTime && (startTime > endTime)) 
+       {
+               Log("SHUTTLE",
+                       Form("QueryRunParameters - Invalid parameters for Run %d: "
+                               "startTime = %d, endTime = %d. Skipping!",
+                                       run, startTime, endTime));              
+               
+               Log("SHUTTLE", Form("Marking SHUTTLE done for run %d", run));
+               fLogbookEntry = entry;  
+               if (!UpdateShuttleLogbook("shuttle_done"))
+               {
+                       AliError(Form("Could not update logbook for run %d !", run));
+               }
+               fLogbookEntry = 0;
+                               
+               delete entry;
+               delete aRow;
+               delete aResult;
+               return 0;
+       }
+                       
        TString totEventsStr = entry->GetRunParameter("totalEvents");  
        Int_t totEvents = totEventsStr.Atoi();
        if (totEvents < 1) 
index 8599c4b..8c06a08 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
  $Log$
+ Revision 1.15  2007/12/10 18:29:23  acolla
+ Some log added to the listen mode
+
  Revision 1.14  2007/12/07 19:14:36  acolla
  in AliShuttleTrigger:
 
@@ -246,10 +249,11 @@ void AliShuttleTrigger::Run() {
                        break;
                }
                
+               nTry++;
+               AliInfo(Form("Received %d triggers so far", nTry));
+               
                if (fConfig->GetRunMode() == AliShuttleConfig::kTest)
                {
-                       nTry++;
-                       AliInfo(Form("Received %d triggers so far", nTry));
                        if(nTry>=nMaxTry)
                        {
                                AliInfo(Form("Collect() ran more than %d times -> Exiting!",