AliDCSClient client(host, port, fTimeout, fRetries, multiSplit);
TMap* result = 0;
+ UInt_t startQuery = GetStartTimeDCSQuery();
+ UInt_t endQuery = GetEndTimeDCSQuery();
+ if (fCurrentDetector == "GRP" && (endQuery - startQuery) <= 120) { // enlarging DCS query for GRP when a run is shorter than 2 minutes (i.e. the time of forced archival of GRP DPs)
+ Log(fCurrentDetector.Data(), Form("GetValueSet: run lasting less than 120 seconds, enlarging DCS window for DPs retrival to 130 s"));
+ startQuery = endQuery - 130; // we add 130 s to be sure that there is something (even if the archival is forced after 120 s)
+ }
+
if (type == kAlias)
{
//result = client.GetAliasValues(entries, GetCurrentStartTime()-offset,
// GetCurrentEndTime()+offset);
- result = client.GetAliasValues(entries, GetStartTimeDCSQuery(),
- GetEndTimeDCSQuery());
+
+ result = client.GetAliasValues(entries, startQuery, endQuery);
}
else if (type == kDP)
{
//result = client.GetDPValues(entries, GetCurrentStartTime()-offset,
// GetCurrentEndTime()+offset);
- result = client.GetDPValues(entries, GetStartTimeDCSQuery(),
- GetEndTimeDCSQuery());
+ result = client.GetDPValues(entries, startQuery, endQuery);
}
if (result == 0)
#include "AliShuttleTrigger.h"
#include <TSystem.h>
+#include <TGrid.h>
#include <TObjString.h>
#include "AliLog.h"
fMutex.Lock();
while (!(fNotified || fTerminate)) {
- received=fCondition.TimedWaitRelative(1000*fConfig->GetTriggerWait());
- CheckTerminate();
- if (received==1) break; // 1 = timeout
+ for (Int_t iwait = 0; iwait < 10; iwait++){
+ received = fCondition.TimedWaitRelative(1000*fConfig->GetTriggerWait()/10); // to keep the connection to the server alive every minute while waiting for new runs
+ if (received == 1) {
+ if (gGrid) {
+ AliInfo(Form("Keeping the connection to the server alive while waiting for new runs - %d waited from last one", fConfig->GetTriggerWait()/10*iwait));
+ gGrid->Pwd();
+ }
+ else {
+ AliInfo("No gGrid initialized so far, we cannot keep the connection to the server alive while waiting for new runs");
+ }
+ }
+ }
+ //received=fCondition.TimedWaitRelative(1000*fConfig->GetTriggerWait());
+ CheckTerminate();
+ if (received==1) break; // 1 = timeout
}
fNotified = kFALSE;
to.Remove(to.Length()-1);
AliDebug(2, Form("to: %s",to.Data()));
- // mail body
+ // mail body
TString bodyFileName;
bodyFileName.Form("%s/mail.body", fShuttle->GetShuttleLogDir());
gSystem->ExpandPathName(bodyFileName);