dcs timeout and number of retrievals set in the configuration instead of in AliShuttl...
authorrgrosso <rgrosso@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 6 Feb 2008 18:25:52 +0000 (18:25 +0000)
committerrgrosso <rgrosso@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 6 Feb 2008 18:25:52 +0000 (18:25 +0000)
SHUTTLE/AliShuttle.cxx
SHUTTLE/AliShuttleConfig.cxx
SHUTTLE/AliShuttleConfig.h
SHUTTLE/AliShuttleTrigger.cxx
SHUTTLE/AliShuttleTrigger.h
SHUTTLE/schema/Global.ldif
SHUTTLE/schema_prod/Global.ldif

index b49d6c8..e7d2935 100644 (file)
@@ -13,7 +13,7 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/* $Id:$ */
+/* $Id$ */
 
 //
 // This class is the main manager for AliShuttle. 
index 042b7d4..27b70b8 100644 (file)
@@ -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);
index d98ae22..0cde5e8 100644 (file)
@@ -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
index 8c06a08..d53ae72 100644 (file)
@@ -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);
index 1e37ac2..827f210 100644 (file)
@@ -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;}
index b729979..c27fa03 100644 (file)
@@ -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
+
index ba0ebad..ae5523e 100644 (file)
@@ -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