making the timeout dependent on the run duration
authorrgrosso <rgrosso@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 20 Feb 2013 17:51:26 +0000 (17:51 +0000)
committerrgrosso <rgrosso@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 20 Feb 2013 17:51:26 +0000 (17:51 +0000)
SHUTTLE/AliShuttle.cxx

index 660e339..43d1ffd 100644 (file)
@@ -1437,7 +1437,10 @@ Bool_t AliShuttle::Process(AliShuttleLogbookEntry* entry)
                        {
                                Long_t expiredTime = time(0) - begin;
 
-                               if (expiredTime > fConfig->GetPPTimeOut())
+                               // the run-dependent timeout is the timeout from the configuration plus a twentieth of
+                               // the run duration, e.g. 3 additional minutes for 1h run or 1/2h for a 10h run
+                               Int_t runDepTimeOut = fConfig->GetPPTimeOut() + (GetCurrentEndTime() - GetCurrentStartTime()) * 0.05;
+                               if (expiredTime > runDepTimeOut)
                                {
                                         TString logMsg;
                                        AliShuttleStatus *currentStatus = ReadShuttleStatus();