From ff3781ad009f137ba9ce58f54427c6c25460da38 Mon Sep 17 00:00:00 2001 From: rgrosso Date: Wed, 6 Feb 2008 18:25:52 +0000 Subject: [PATCH] dcs timeout and number of retrievals set in the configuration instead of in AliShuttleTrigger constructor. Updated global configuration --- SHUTTLE/AliShuttle.cxx | 2 +- SHUTTLE/AliShuttleConfig.cxx | 21 +++++++++++++++++++-- SHUTTLE/AliShuttleConfig.h | 4 ++++ SHUTTLE/AliShuttleTrigger.cxx | 5 +++-- SHUTTLE/AliShuttleTrigger.h | 2 +- SHUTTLE/schema/Global.ldif | 16 ++++++++++------ SHUTTLE/schema_prod/Global.ldif | 17 +++++++++++++---- 7 files changed, 51 insertions(+), 16 deletions(-) diff --git a/SHUTTLE/AliShuttle.cxx b/SHUTTLE/AliShuttle.cxx index b49d6c8dda9..e7d2935b1d6 100644 --- a/SHUTTLE/AliShuttle.cxx +++ b/SHUTTLE/AliShuttle.cxx @@ -13,7 +13,7 @@ * provided "as is" without express or implied warranty. * **************************************************************************/ -/* $Id:$ */ +/* $Id$ */ // // This class is the main manager for AliShuttle. diff --git a/SHUTTLE/AliShuttleConfig.cxx b/SHUTTLE/AliShuttleConfig.cxx index 042b7d42260..27b70b80340 100644 --- a/SHUTTLE/AliShuttleConfig.cxx +++ b/SHUTTLE/AliShuttleConfig.cxx @@ -537,6 +537,7 @@ AliShuttleConfig::AliShuttleConfig(const char* host, Int_t port, fRunTypelbTable(""), fMaxRetries(0), fPPTimeOut(0), + fDCSTimeOut(0), fPPMaxMem(0), fMonitorHost(""), fMonitorTable(""), @@ -990,6 +991,22 @@ UInt_t AliShuttleConfig::SetGlobalConfig(TList* list) tmpStr = anAttribute->GetValue(); fPPTimeOut = tmpStr.Atoi(); + anAttribute = anEntry->GetAttribute("dcsTimeOut"); + if (!anAttribute) { + AliError("Can't find dcsTimeOut attribute!"); + return 4; + } + tmpStr = anAttribute->GetValue(); + fDCSTimeOut = tmpStr.Atoi(); + + anAttribute = anEntry->GetAttribute("nDCSretries"); + if (!anAttribute) { + AliError("Can't find dcsTimeOut attribute!"); + return 4; + } + tmpStr = anAttribute->GetValue(); + fDCSRetries = tmpStr.Atoi(); + anAttribute = anEntry->GetAttribute("ppMaxMem"); if (!anAttribute) { AliError("Can't find ppMaxMem attribute!"); @@ -1360,9 +1377,9 @@ void AliShuttleConfig::Print(Option_t* option) const result += "\n"; } - result += Form("PP time out = %d - max PP mem size = %d KB - max retries = %d " + result += Form("PP time out = %d - DCS time out = %d - max PP mem size = %d KB - max retries = %d " "- DIM trigger waiting timeout = %d\n", - fPPTimeOut, fPPMaxMem, fMaxRetries, fTriggerWait); + fPPTimeOut, fDCSTimeOut, fPPMaxMem, fMaxRetries, fTriggerWait); result += Form("FLAGS: keepDCSMap = %d - keepTempFolder = %d - SendMail = %d \n", fKeepDCSMap, fKeepTempFolder, fSendMail); const TObjArray* shuttleAdmins = GetAdmins(kGlobal); diff --git a/SHUTTLE/AliShuttleConfig.h b/SHUTTLE/AliShuttleConfig.h index d98ae22cf96..0cde5e8fa05 100644 --- a/SHUTTLE/AliShuttleConfig.h +++ b/SHUTTLE/AliShuttleConfig.h @@ -60,6 +60,8 @@ public: Int_t GetMaxRetries() const { return fMaxRetries; } Int_t GetPPTimeOut() const { return fPPTimeOut; } + Int_t GetDCSTimeOut() const { return fDCSTimeOut; } + Int_t GetDCSRetries() const { return fDCSRetries; } Int_t GetPPMaxMem() const { return fPPMaxMem; } Bool_t KeepDCSMap() const { return fKeepDCSMap; } @@ -205,6 +207,8 @@ private: Int_t fMaxRetries; // number of retries of a failed preprocessor Int_t fPPTimeOut; // timeout until a preprocessor is killed + Int_t fDCSTimeOut; // timeout until the query to DCS is terminated + Int_t fDCSRetries; // number of retries until the query to DCS connection is terminated Int_t fPPMaxMem; // maximum allowed memory until a preprocessor is killed TString fMonitorHost; // host of the MonaLisa monitoring server diff --git a/SHUTTLE/AliShuttleTrigger.cxx b/SHUTTLE/AliShuttleTrigger.cxx index 8c06a08c891..d53ae7207e9 100644 --- a/SHUTTLE/AliShuttleTrigger.cxx +++ b/SHUTTLE/AliShuttleTrigger.cxx @@ -129,8 +129,7 @@ Bool_t TerminateSignalHandler::Notify() } //______________________________________________________________________________________________ -AliShuttleTrigger::AliShuttleTrigger(const AliShuttleConfig* config, - UInt_t timeout, Int_t retries): +AliShuttleTrigger::AliShuttleTrigger(const AliShuttleConfig* config): fConfig(config), fShuttle(NULL), fNotified(kFALSE), fTerminate(kFALSE), fMutex(), fCondition(&fMutex), @@ -145,6 +144,8 @@ AliShuttleTrigger::AliShuttleTrigger(const AliShuttleConfig* config, // if (!fConfig->IsValid()) AliFatal("********** !!!!! Invalid configuration !!!!! **********"); + UInt_t timeout = fConfig->GetDCSTimeOut(); + Int_t retries = fConfig->GetDCSRetries(); fShuttle = new AliShuttle(config, timeout, retries); TerminateSignalHandler* fQuitSignalHandler = new TerminateSignalHandler(this, kSigQuit); diff --git a/SHUTTLE/AliShuttleTrigger.h b/SHUTTLE/AliShuttleTrigger.h index 1e37ac26734..827f2104c83 100644 --- a/SHUTTLE/AliShuttleTrigger.h +++ b/SHUTTLE/AliShuttleTrigger.h @@ -46,7 +46,7 @@ private: class AliShuttleTrigger: public TObject { public: - AliShuttleTrigger(const AliShuttleConfig* config, UInt_t timeout = 5000, Int_t retries = 5); + AliShuttleTrigger(const AliShuttleConfig* config); ~AliShuttleTrigger(); AliShuttle* GetShuttle() {return fShuttle;} diff --git a/SHUTTLE/schema/Global.ldif b/SHUTTLE/schema/Global.ldif index b7299790daf..c27fa03aaf6 100644 --- a/SHUTTLE/schema/Global.ldif +++ b/SHUTTLE/schema/Global.ldif @@ -1,4 +1,3 @@ -# Global config dn: name=globalConfig,o=shuttle,dc=cern,dc=ch objectClass: top objectClass: globalConfig @@ -13,14 +12,19 @@ shuttleLbTable: logbook_shuttle runTypeLbTable: logbook_detectors ppTimeOut: 3600 ppMaxMem: 2097152 -ppMaxRetries: 2 +ppmaxRetries: 2 monitorHost: aliendb1.cern.ch monitorTable: SHUTTLE -triggerWait: 10 mode: test -keepDCSMap: 0 -keepTempFolder: 0 +triggerWait: 100 shuttleAdmin: alberto.colla@cern.ch shuttleAdmin: Jan.Fiete.Grosse-Oetringhaus@cern.ch +shuttleAdmin: chiara.zampolli@cern.ch +shuttleAdmin: raffaele.grosso@cern.ch +sendMail: 1 +keepDCSMap: 0 +keepTempFolder: 0 amandaAdmin: svetozar.kapusta@cern.ch -sendMail: 1 \ No newline at end of file +dcsTimeOut: 3500 +nDCSretries: 5 + diff --git a/SHUTTLE/schema_prod/Global.ldif b/SHUTTLE/schema_prod/Global.ldif index ba0ebad6325..ae5523e0115 100644 --- a/SHUTTLE/schema_prod/Global.ldif +++ b/SHUTTLE/schema_prod/Global.ldif @@ -1,4 +1,3 @@ -# Global config dn: name=globalConfig,o=shuttle_prod,dc=cern,dc=ch objectClass: top objectClass: globalConfig @@ -11,11 +10,21 @@ daqLbPort: 1444 daqLbTable: logbook shuttleLbTable: logbook_shuttle runTypeLbTable: logbook_detectors -ppTimeOut: 3600 ppMaxMem: 2097152 -ppMaxRetries: 2 +ppmaxRetries: 2 monitorHost: aliendb1.cern.ch monitorTable: SHUTTLE_PROD -triggerWait: 100 mode: prod +triggerWait: 600 +ppTimeOut: 1200 +keepDCSMap: 1 +keepTempFolder: 1 +dcsTimeOut: 1100 +sendMail: 1 +shuttleAdmin: alberto.colla@cern.ch +shuttleAdmin: chiara.zampolli@cern.ch +shuttleAdmin: raffaele.grosso@cern.ch +amandaAdmin: Jan.Fiete.Grosse-Oetringhaus@cern.ch +amandaAdmin: svetozar.kapusta@cern.ch +nDCSretries: 5 -- 2.39.3