]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - SHUTTLE/AliShuttleConfig.cxx
Warnings fixed.
[u/mrichter/AliRoot.git] / SHUTTLE / AliShuttleConfig.cxx
index dccd4b60036e75c8ff55a98366ec5c805ea3e308..d4ad90f8bf6bc9174e338962c11c73260ddf3b3b 100644 (file)
 
 /*
 $Log$
+Revision 1.27  2007/12/17 03:23:32  jgrosseo
+several bugfixes
+added "empty preprocessor" as placeholder for Acorde in FDR
+
+Revision 1.26  2007/12/07 19:14:36  acolla
+in AliShuttleTrigger:
+
+Added automatic collection of new runs on a regular time basis (settable from the configuration)
+
+in AliShuttleConfig: new members
+
+- triggerWait: time to wait for DIM trigger (s) before starting automatic collection of new runs
+- mode: run mode (test, prod) -> used to build log folder (logs or logs_PROD)
+
+in AliShuttle:
+
+- logs now stored in logs/#RUN/DET_#RUN.log
+
+Revision 1.25  2007/11/26 16:58:37  acolla
+Monalisa configuration added: host and table name
+
+Revision 1.24  2007/10/24 10:44:08  acolla
+
+debug AliInfo removed
+
+Revision 1.23  2007/09/28 15:27:40  acolla
+
+AliDCSClient "multiSplit" option added in the DCS configuration
+in AliDCSMessage: variable MAX_BODY_SIZE set to 500000
+
+Revision 1.22  2007/09/27 16:53:13  acolla
+Detectors can have more than one AMANDA server. SHUTTLE queries the servers sequentially,
+merges the dcs aliases/DPs in one TMap and sends it to the preprocessor.
+
+Revision 1.21  2007/04/27 07:06:48  jgrosseo
+GetFileSources returns empty list in case of no files, but successful query
+No mails sent in testmode
+
+Revision 1.20  2007/04/04 10:33:36  jgrosseo
+1) Storing of files to the Grid is now done _after_ your preprocessors succeeded. This is transparent, which means that you can still use the same functions (Store, StoreReferenceData) to store files to the Grid. However, the Shuttle first stores them locally and transfers them after the preprocessor finished. The return code of these two functions has changed from UInt_t to Bool_t which gives you the success of the storing.
+In case of an error with the Grid, the Shuttle will retry the storing later, the preprocessor does not need to be run again.
+
+2) The meaning of the return code of the preprocessor has changed. 0 is now success and any other value means failure. This value is stored in the log and you can use it to keep details about the error condition.
+
+3) New function StoreReferenceFile to _directly_ store a file (without opening it) to the reference storage.
+
+4) The memory usage of the preprocessor is monitored. If it exceeds 2 GB it is terminated.
+
+5) New function AliPreprocessor::ProcessDCS(). If you do not need to have DCS data in all cases, you can skip the processing by implemting this function and returning kFALSE under certain conditions. E.g. if there is a certain run type.
+If you always need DCS data (like before), you do not need to implement it.
+
+6) The run type has been added to the monitoring page
+
+Revision 1.19  2007/02/28 10:41:56  acolla
+Run type field added in SHUTTLE framework. Run type is read from "run type" logbook and retrieved by
+AliPreprocessor::GetRunType() function.
+Added some ldap definition files.
+
 Revision 1.18  2007/01/23 19:20:03  acolla
 Removed old ldif files, added TOF, MCH ldif files. Added some options in
 AliShuttleConfig::Print. Added in Ali Shuttle: SetShuttleTempDir and
@@ -117,7 +175,7 @@ some docs added
 // will be retrieved (used by AliShuttle).
 //
 
-
+#include <Riostream.h>
 #include "AliShuttleConfig.h"
 #include "AliShuttleInterface.h"
 
@@ -128,22 +186,20 @@ some docs added
 #include <TLDAPResult.h>
 #include <TLDAPEntry.h>
 #include <TLDAPAttribute.h>
+#include <TKey.h>
 
 
-AliShuttleConfig::AliShuttleConfigHolder::AliShuttleConfigHolder(const TLDAPEntry* entry):
-fDetector(""),
+AliShuttleConfig::AliShuttleDCSConfigHolder::AliShuttleDCSConfigHolder(const TLDAPEntry* entry):
 fDCSHost(""),
 fDCSPort(0),
+fMultiSplit(100),
 fDCSAliases(0),
 fDCSDataPoints(0),
 fDCSAliasesComp(0),
 fDCSDataPointsComp(0),
-fResponsibles(0),
-fIsValid(kFALSE),
-fSkipDCSQuery(kFALSE),
-fStrictRunOrder(kFALSE)
+fIsValid(kFALSE)
 {
-// constructor of the shuttle configuration holder
+// constructor of the shuttle DCS configuration holder
 
        TLDAPAttribute* anAttribute;
        fDCSAliases = new TObjArray();
@@ -154,68 +210,39 @@ fStrictRunOrder(kFALSE)
        fDCSAliasesComp->SetOwner(1);
        fDCSDataPointsComp = new TObjArray();
        fDCSDataPointsComp->SetOwner(1);
-       fResponsibles = new TObjArray();
-       fResponsibles->SetOwner(1);
-
-       anAttribute = entry->GetAttribute("det"); // MUST
-        if (!anAttribute)
-       {
-               AliError(Form("Invalid configuration! No \"det\" attribute!"));
-               return;
-        }
-       fDetector = anAttribute->GetValue();
-
-       anAttribute = entry->GetAttribute("StrictRunOrder"); // MAY
-        if (!anAttribute)
-       {
-               AliWarning(Form("%s did not set StrictRunOrder flag - the default is FALSE",
-                               fDetector.Data()));
-        } else {
-               TString strictRunStr = anAttribute->GetValue();
-               if (!(strictRunStr == "0" || strictRunStr == "1"))
-               {
-                       AliError("Invalid configuration! StrictRunOrder flag must be 0 or 1!");
-                       return;
-               }
-               fStrictRunOrder = (Bool_t) strictRunStr.Atoi();
-       }
-
-       anAttribute = entry->GetAttribute("responsible"); // MUST
-        if (!anAttribute)
-       {
-               AliError(Form("Invalid configuration! No \"responsible\" attribute!"));
-               return;
-        }
-       const char* aResponsible;
-       while ((aResponsible = anAttribute->GetValue()))
-       {
-               fResponsibles->AddLast(new TObjString(aResponsible));
-       }
 
-       anAttribute = entry->GetAttribute("DCSHost"); // MAY
+       
+       anAttribute = entry->GetAttribute("dcsHost"); 
        if (!anAttribute)
        {
-               AliDebug(2,
-                       Form("%s has not DCS host entry - Shuttle will skip DCS data query!",
-                               fDetector.Data()));
-               fIsValid = kTRUE;
-               fSkipDCSQuery = kTRUE;
+               AliError("Unexpected: no DCS host!");
                return;
        }
 
        fDCSHost = anAttribute->GetValue();
 
-       anAttribute = entry->GetAttribute("DCSPort"); // MAY
+       anAttribute = entry->GetAttribute("dcsPort");
         if (!anAttribute)
        {
-               AliError(Form("Invalid configuration! %s has DCS Host but no port number!",
-                               fDetector.Data()));
+               AliError("Unexpected: no DCS port!");
                return;
         }
        TString portStr = anAttribute->GetValue();
        fDCSPort = portStr.Atoi();
 
-       anAttribute = entry->GetAttribute("DCSalias"); // MAY
+       anAttribute = entry->GetAttribute("multiSplit"); // MAY
+        if (anAttribute)
+       {
+               TString multiSplitStr = anAttribute->GetValue();
+               fMultiSplit = multiSplitStr.Atoi();
+               if(fMultiSplit == 0) {
+                       AliError("MultiSplit must be a positive integer!");
+                       return;
+               }
+               
+       }
+       
+       anAttribute = entry->GetAttribute("dcsAlias"); // MAY
         if (anAttribute)
        {
                const char* anAlias;
@@ -226,7 +253,7 @@ fStrictRunOrder(kFALSE)
                }
        }
 
-       anAttribute = entry->GetAttribute("DCSdatapoint"); // MAY
+       anAttribute = entry->GetAttribute("dcsDP"); // MAY
         if (anAttribute)
        {
                const char* aDataPoint;
@@ -236,12 +263,142 @@ fStrictRunOrder(kFALSE)
                ExpandAndAdd(fDCSDataPoints, aDataPoint);
                }
        }
-
+       
        fIsValid = kTRUE;
 }
 
 //______________________________________________________________________________________________
-void AliShuttleConfig::AliShuttleConfigHolder::ExpandAndAdd(TObjArray* target, const char* entry)
+AliShuttleConfig::AliShuttleConfig(const AliShuttleConfig & other):
+       TObject(),
+       fConfigHost(other.fConfigHost),
+       fAlienPath(other.fAlienPath),
+       fDAQlbHost(other.fDAQlbHost),
+       fDAQlbPort(other.fDAQlbPort),
+       fDAQlbUser(other.fDAQlbUser),
+       fDAQlbPass(other.fDAQlbPass),
+       fDAQlbDB(other.fDAQlbDB),
+       fDAQlbTable(other.fDAQlbTable),
+       fShuttlelbTable(other.fShuttlelbTable),
+       fRunTypelbTable(other.fRunTypelbTable),
+       fPasswdFilePath(other.fPasswdFilePath),
+       fMaxRetries(other.fMaxRetries),
+       fPPTimeOut(other.fPPTimeOut),
+       fDCSTimeOut(other.fDCSTimeOut),
+       fDCSRetries(other.fDCSRetries),
+       fDCSQueryOffset(other.fDCSQueryOffset),
+       fDCSDelay(other.fDCSDelay),
+       fPPMaxMem(other.fPPMaxMem),
+       fMonitorHost(other.fMonitorHost),
+       fMonitorTable(other.fMonitorTable),
+       fTriggerWait(other.fTriggerWait),
+       fRunMode(other.fRunMode),
+       fDetectorMap(),
+       fDetectorList(other.fDetectorList),
+       fShuttleInstanceHost(other.fShuttleInstanceHost),
+       fProcessedDetectors(other.fProcessedDetectors),
+       fKeepDCSMap(other.fKeepDCSMap),
+       fKeepTempFolder(other.fKeepTempFolder),
+       fSendMail(other.fSendMail),
+       fProcessAll(other.fProcessAll),
+       fIsValid(other.fIsValid)
+{
+       //
+       // copy ctor
+       //
+       for (Int_t i = 0; i<3; i++){
+               fFXSHost[i]=other.fFXSHost[i];
+               fFXSPort[i]=other.fFXSPort[i];
+               fFXSUser[i]=other.fFXSUser[i];
+               fFXSPass[i]=other.fFXSPass[i];
+               fFXSBaseFolder[i]=other.fFXSBaseFolder[i];
+               fFXSdbHost[i]=other.fFXSdbHost[i];
+               fFXSdbPort[i]=other.fFXSdbPort[i];
+               fFXSdbUser[i]=other.fFXSdbUser[i];
+               fFXSdbPass[i]=other.fFXSdbPass[i];
+               fFXSdbName[i]=other.fFXSdbName[i];
+               fFXSdbTable[i]=other.fFXSdbTable[i];
+       }
+       for (Int_t i = 0; i<5; i++){
+               fAdmin[i] = new TObjArray();
+               fAdmin[i]->AddAt(other.fAdmin[i]->At(i),i);
+       }
+
+       TIter iter((other.fDetectorMap).GetTable());
+       TPair* aPair = 0;
+       
+       while ((aPair = (TPair*) iter.Next())) {
+               AliShuttleDetConfigHolder *holder =(AliShuttleDetConfigHolder *)aPair->Value();
+               TKey *key = (TKey*)aPair->Key();
+               fDetectorMap.Add(key,holder);
+       }
+
+
+} 
+//_____________________________________________________________________________________________                
+AliShuttleConfig& AliShuttleConfig::operator=(const AliShuttleConfig &other) 
+{
+       //
+       //assignment operator
+       //
+       this->fConfigHost=other.fConfigHost;
+       this->fDAQlbHost=other.fDAQlbHost;
+       this->fDAQlbPort=other.fDAQlbPort;
+       this->fDAQlbUser=other.fDAQlbUser;
+       this->fDAQlbPass=other.fDAQlbPass;
+       this->fDAQlbDB=other.fDAQlbDB;
+       this->fDAQlbTable=other.fDAQlbTable;
+       this->fShuttlelbTable=other.fShuttlelbTable;
+       this->fRunTypelbTable=other.fRunTypelbTable;
+       this->fPasswdFilePath=other.fPasswdFilePath;
+       this->fMaxRetries=other.fMaxRetries;
+       this->fPPTimeOut=other.fPPTimeOut;
+       this->fDCSTimeOut=other.fDCSTimeOut;
+       this->fDCSRetries=other.fDCSRetries;
+       this->fDCSQueryOffset=other.fDCSQueryOffset;
+        this->fDCSDelay=other.fDCSDelay;
+       this->fPPMaxMem=other.fPPMaxMem;
+       this->fMonitorHost=other.fMonitorHost;
+       this->fMonitorTable=other.fMonitorTable;
+       this->fTriggerWait=other.fTriggerWait;
+       this->fRunMode=other.fRunMode;
+       this->fDetectorList=other.fDetectorList;
+       this->fShuttleInstanceHost=other.fShuttleInstanceHost;
+       this->fProcessedDetectors=other.fProcessedDetectors;
+       this->fKeepDCSMap=other.fKeepDCSMap;
+       this->fKeepTempFolder=other.fKeepTempFolder;
+       this->fSendMail=other.fSendMail;
+       this->fProcessAll=other.fProcessAll;
+       this->fIsValid=other.fIsValid;
+       for (Int_t i = 0; i<3; i++){
+               this->fFXSHost[i]=other.fFXSHost[i];
+               this->fFXSPort[i]=other.fFXSPort[i];
+               this->fFXSUser[i]=other.fFXSUser[i];
+               this->fFXSPass[i]=other.fFXSPass[i];
+               this->fFXSBaseFolder[i]=other.fFXSBaseFolder[i];
+               this->fFXSdbHost[i]=other.fFXSdbHost[i];
+               this->fFXSdbPort[i]=other.fFXSdbPort[i];
+               this->fFXSdbUser[i]=other.fFXSdbUser[i];
+               this->fFXSdbPass[i]=other.fFXSdbPass[i];
+               this->fFXSdbName[i]=other.fFXSdbName[i];
+               this->fFXSdbTable[i]=other.fFXSdbTable[i];
+       }
+       for (Int_t i = 0; i<5; i++){
+               this->fAdmin[i] = new TObjArray();
+               this->fAdmin[i]->AddAt(other.fAdmin[i]->At(i),i);
+       }
+
+       TIter iter((other.fDetectorMap).GetTable());
+       TPair* aPair = 0;
+       
+       while ((aPair = (TPair*) iter.Next())) {
+               AliShuttleDetConfigHolder *holder =(AliShuttleDetConfigHolder *)aPair->Value();
+               TKey *key = (TKey*)aPair->Key();
+               this->fDetectorMap.Add(key,holder);
+       }
+       return *this;
+} 
+//______________________________________________________________________________________________
+void AliShuttleConfig::AliShuttleDCSConfigHolder::ExpandAndAdd(TObjArray* target, const char* entry)
 {
        //
        // adds <entry> to <target> applying expanding of the name
@@ -298,13 +455,201 @@ void AliShuttleConfig::AliShuttleConfigHolder::ExpandAndAdd(TObjArray* target, c
 }
 
 //______________________________________________________________________________________________
-AliShuttleConfig::AliShuttleConfigHolder::~AliShuttleConfigHolder()
+AliShuttleConfig::AliShuttleDCSConfigHolder::~AliShuttleDCSConfigHolder()
 {
 // destructor of the shuttle configuration holder
 
        delete fDCSAliases;
        delete fDCSDataPoints;
+       delete fDCSAliasesComp;
+       delete fDCSDataPointsComp;      
+}
+
+//______________________________________________________________________________________________
+AliShuttleConfig::AliShuttleDetConfigHolder::AliShuttleDetConfigHolder(const TLDAPEntry* entry):
+fDetector(""),
+fDCSConfig(),
+fResponsibles(0),
+fIsValid(kFALSE),
+fSkipDCSQuery(kFALSE),
+fStrictRunOrder(kFALSE)
+{
+// constructor of the shuttle configuration holder
+
+       TLDAPAttribute* anAttribute;
+       
+       fResponsibles = new TObjArray();
+       fResponsibles->SetOwner(1);
+       fDCSConfig = new TObjArray();
+       fDCSConfig->SetOwner(1);
+
+       anAttribute = entry->GetAttribute("det"); // MUST
+        if (!anAttribute)
+       {
+               AliError(Form("No \"det\" attribute!"));
+               return;
+        }
+       fDetector = anAttribute->GetValue();
+
+       anAttribute = entry->GetAttribute("strictRunOrder"); // MAY
+        if (!anAttribute)
+       {
+               AliWarning(Form("%s did not set strictRunOrder flag - the default is FALSE",
+                               fDetector.Data()));
+        } else {
+               TString strictRunStr = anAttribute->GetValue();
+               if (!(strictRunStr == "0" || strictRunStr == "1"))
+               {
+                       AliError("strictRunOrder flag must be 0 or 1!");
+                       return;
+               }
+               fStrictRunOrder = (Bool_t) strictRunStr.Atoi();
+       }
+
+       anAttribute = entry->GetAttribute("responsible"); // MAY
+        if (!anAttribute)
+       {
+               AliDebug(2, "Warning! No \"responsible\" attribute!");
+        }
+       else
+       {
+               const char* aResponsible;
+               while ((aResponsible = anAttribute->GetValue()))
+               {
+                       fResponsibles->AddLast(new TObjString(aResponsible));
+               }
+       }
+
+       fIsValid = kTRUE;
+}
+
+//______________________________________________________________________________________________
+AliShuttleConfig::AliShuttleDetConfigHolder::~AliShuttleDetConfigHolder()
+{
+// destructor of the shuttle configuration holder
+
        delete fResponsibles;
+       delete fDCSConfig;
+}
+
+//______________________________________________________________________________________________
+const char* AliShuttleConfig::AliShuttleDetConfigHolder::GetDCSHost(Int_t iServ) const
+{
+       //
+       // returns DCS server host 
+       //
+       
+       if (iServ < 0 || iServ >= GetNServers()) return 0;
+       
+       AliShuttleDCSConfigHolder *aHolder = dynamic_cast<AliShuttleDCSConfigHolder *> 
+                                                       (fDCSConfig->At(iServ));
+       
+       return aHolder->GetDCSHost();
+}
+
+//______________________________________________________________________________________________
+Int_t AliShuttleConfig::AliShuttleDetConfigHolder::GetDCSPort(Int_t iServ) const
+{
+       //
+       // returns DCS server port 
+       //
+       
+       if (iServ < 0 || iServ >= GetNServers()) return 0;
+       
+       AliShuttleDCSConfigHolder *aHolder = dynamic_cast<AliShuttleDCSConfigHolder *> 
+                                                       (fDCSConfig->At(iServ));
+       
+       return aHolder->GetDCSPort();
+}
+
+//______________________________________________________________________________________________
+Int_t AliShuttleConfig::AliShuttleDetConfigHolder::GetMultiSplit(Int_t iServ) const
+{
+       //
+       // returns DCS "multi split" value
+       //
+       
+       if (iServ < 0 || iServ >= GetNServers()) return 0;
+       
+       AliShuttleDCSConfigHolder *aHolder = dynamic_cast<AliShuttleDCSConfigHolder *> 
+                                                       (fDCSConfig->At(iServ));
+       
+       return aHolder->GetMultiSplit();
+}
+
+//______________________________________________________________________________________________
+const TObjArray* AliShuttleConfig::AliShuttleDetConfigHolder::GetDCSAliases(Int_t iServ) const
+{
+       //
+       // returns collection of TObjString which represents the set of aliases
+       // which used for data retrieval for particular detector
+       //
+       
+       if (iServ < 0 || iServ >= GetNServers()) return 0;
+       
+       AliShuttleDCSConfigHolder *aHolder = dynamic_cast<AliShuttleDCSConfigHolder *> 
+                                                       (fDCSConfig->At(iServ));
+       
+       return aHolder->GetDCSAliases();
+}
+
+//______________________________________________________________________________________________
+const TObjArray* AliShuttleConfig::AliShuttleDetConfigHolder::GetDCSDataPoints(Int_t iServ) const
+{
+       //
+       // returns collection of TObjString which represents the set of aliases
+       // which used for data retrieval for particular detector
+       //
+
+       if (iServ < 0 || iServ >= GetNServers()) return 0;
+
+       AliShuttleDCSConfigHolder *aHolder = dynamic_cast<AliShuttleDCSConfigHolder *> 
+                                                       (fDCSConfig->At(iServ));
+       
+       return aHolder->GetDCSDataPoints();
+}
+
+//______________________________________________________________________________________________
+const TObjArray* AliShuttleConfig::AliShuttleDetConfigHolder::GetCompactDCSAliases(Int_t iServ) const
+{
+       //
+       // returns collection of TObjString which represents the set of aliases
+       // which used for data retrieval for particular detector (Compact style)
+       //
+
+       if (iServ < 0 || iServ >= GetNServers()) return 0;
+
+       AliShuttleDCSConfigHolder *aHolder = dynamic_cast<AliShuttleDCSConfigHolder *> 
+                                                       (fDCSConfig->At(iServ));
+       
+       return aHolder->GetCompactDCSAliases();
+}
+
+//______________________________________________________________________________________________
+const TObjArray* AliShuttleConfig::AliShuttleDetConfigHolder::GetCompactDCSDataPoints(Int_t iServ) const
+{
+       //
+       // returns collection of TObjString which represents the set of aliases
+       // which used for data retrieval for particular detector (Compact style)
+       //
+
+       if (iServ < 0 || iServ >= GetNServers()) return 0;
+
+       AliShuttleDCSConfigHolder *aHolder = dynamic_cast<AliShuttleDCSConfigHolder *> 
+                                                       (fDCSConfig->At(iServ));
+       
+       return aHolder->GetCompactDCSDataPoints();
+}
+
+//______________________________________________________________________________________________
+void AliShuttleConfig::AliShuttleDetConfigHolder::AddDCSConfig(AliShuttleDCSConfigHolder* holder)
+{
+       //
+       // adds a DCS configuration set in the array of DCS configurations
+       // 
+       
+       if(!holder) return;
+       fDCSConfig->AddLast(holder);
 }
 
 ClassImp(AliShuttleConfig)
@@ -312,11 +657,39 @@ ClassImp(AliShuttleConfig)
 //______________________________________________________________________________________________
 AliShuttleConfig::AliShuttleConfig(const char* host, Int_t port,
        const char* binddn, const char* password, const char* basedn):
-       fIsValid(kFALSE), fConfigHost(host),
-       fDAQlbHost(""), fDAQlbPort(), fDAQlbUser(""), fDAQlbPass(""),
-       fDAQlbDB(""), fDAQlbTable(""), fShuttlelbTable(""), fRunTypelbTable(""),
-       fMaxRetries(0), fPPTimeOut(0), fDetectorMap(), fDetectorList(),
-       fShuttleInstanceHost(""), fProcessedDetectors(), fProcessAll(kFALSE)
+       fConfigHost(host), 
+       fAlienPath(""), 
+       fDAQlbHost(""), 
+       fDAQlbPort(), 
+       fDAQlbUser(""), 
+       fDAQlbPass(""),
+       fDAQlbDB(""), 
+       fDAQlbTable(""), 
+       fShuttlelbTable(""), 
+       fRunTypelbTable(""),
+       fPasswdFilePath(""),
+       fMaxRetries(0), 
+       fPPTimeOut(0), 
+       fDCSTimeOut(0), 
+       fDCSRetries(0), 
+       fDCSQueryOffset(0),
+       fDCSDelay(0),
+       fPPMaxMem(0), 
+       fMonitorHost(""), 
+       fMonitorTable(""), 
+       fTriggerWait(3600),
+       fRunMode(kTest),
+       fDetectorMap(), 
+       fDetectorList(),
+       fAdmin(),
+       fShuttleInstanceHost(""), 
+       fProcessedDetectors(), 
+       fKeepDCSMap(kFALSE),
+       fKeepTempFolder(kFALSE),
+       fSendMail(kFALSE),
+       fProcessAll(kFALSE), 
+       fIsValid(kFALSE)
+
 {
        //
        // host: ldap server host
@@ -324,12 +697,17 @@ AliShuttleConfig::AliShuttleConfig(const char* host, Int_t port,
        // binddn: binddn used for ldap binding (simple bind is used!).
        // password: password for binddn
        // basedn: this is basedn whose childeren entries which have
-       // (objectClass=shuttleConfig) will be used as detector configurations.
        //
 
-       fDetectorMap.SetOwner();
+       fDetectorMap.SetOwner(1);
        fDetectorList.SetOwner(0); //fDetectorList and fDetectorMap share the same object!
        fProcessedDetectors.SetOwner();
+       
+       for (int i=0; i<5; i++)
+       {
+               fAdmin[i] = new TObjArray(); 
+               fAdmin[i]->SetOwner();
+       }
 
        TLDAPServer aServer(host, port, binddn, password, 3);
 
@@ -340,107 +718,356 @@ AliShuttleConfig::AliShuttleConfig(const char* host, Int_t port,
        }
 
        // reads configuration for the shuttle running on this machine
-
-       fShuttleInstanceHost = gSystem->HostName();
-       TString queryFilter = Form("(ShuttleHost=%s)", fShuttleInstanceHost.Data());
-
-       TLDAPResult* aResult = aServer.Search(basedn, LDAP_SCOPE_ONELEVEL, queryFilter.Data());
-
-       if (!aResult) {
-               AliError(Form("Can't find configuration with base DN: %s",
-                               basedn));
-               return;
-       }
-
-       if (aResult->GetCount() == 0) {
-               AliError(Form("No Shuttle instance for host = %s!",
-                                       fShuttleInstanceHost.Data()));
-               AliError(Form("All detectors will be processed."));
-               fProcessAll=kTRUE;
-       }
-
-       if (aResult->GetCount() > 1) {
-               AliError(Form("More than one Shuttle instance for host %s!",
-                                       fShuttleInstanceHost.Data()));
-               delete aResult;
-               return;
-       }
-
+       
+       TLDAPResult* aResult = 0;
        TLDAPEntry* anEntry = 0;
-       TLDAPAttribute* anAttribute = 0;
-
-       if(!fProcessAll){
-               anEntry = aResult->GetNext();
-               anAttribute = anEntry->GetAttribute("detectors");
-               const char *detName;
-               while((detName = anAttribute->GetValue())){
-                       TObjString *objDet= new TObjString(detName);
-                       fProcessedDetectors.Add(objDet);
-               }
-       }
-
-       delete anEntry; delete aResult;
-
-       // Detector configuration (DCS Archive DB settings)
-
-       aResult = aServer.Search(basedn, LDAP_SCOPE_ONELEVEL, "(objectClass=AliShuttleDetector)");
-       if (!aResult) {
-               AliError(Form("Can't find configuration with base DN: %s", basedn));
+       
+       TList dcsList;
+       dcsList.SetOwner(1);
+       TList detList;
+       detList.SetOwner(1);
+       TList globalList;
+       globalList.SetOwner(1);
+       TList sysList;
+       sysList.SetOwner(1);
+       TList hostList;
+       hostList.SetOwner(1);
+       
+       aResult = aServer.Search(basedn, LDAP_SCOPE_SUBTREE, 0, 0);
+       
+       if (!aResult) 
+       {
+               AliError(Form("Can't find configuration with base DN: %s !", basedn));
                return;
        }
-
-
-       while ((anEntry = aResult->GetNext())) {
-               AliShuttleConfigHolder* aHolder = new AliShuttleConfigHolder(anEntry);
-               delete anEntry;
-
-               if (!aHolder->IsValid()) {
-                       AliError("Detector configuration error!");
-                       delete aHolder;
-                       delete aResult;
-                       return;
+       
+       while ((anEntry = aResult->GetNext())) 
+       {
+               TString dn = anEntry->GetDn();
+               
+               if (dn.BeginsWith("dcsHost=")) 
+               {
+                       dcsList.Add(anEntry);
+               } 
+               else if (dn.BeginsWith("det="))
+               {
+                       detList.Add(anEntry);
                }
-
-               TObjString* detStr = new TObjString(aHolder->GetDetector());
-               fDetectorMap.Add(detStr, aHolder);
-               fDetectorList.AddLast(detStr);
+               else if (dn.BeginsWith("name=globalConfig"))
+               {
+                       globalList.Add(anEntry);
+               }
+               else if (dn.BeginsWith("system="))
+               {
+                       sysList.Add(anEntry);
+               }
+               else if (dn.BeginsWith("shuttleHost="))
+               {
+                       hostList.Add(anEntry);
+               }
+               else 
+               {
+                       delete anEntry;
+               }
+       
        }
-
        delete aResult;
+       
+       Int_t result=0;
+       
+       result += SetGlobalConfig(&globalList);
+       result += SetSysConfig(&sysList);
+       result += SetPasswords();
+       result += SetDetConfig(&detList,&dcsList);
+       result += SetHostConfig(&hostList);
+       
+       if(result) 
+       {
+               AliError("Configuration is INVALID!");
+       }
+       else 
+       {
+               fIsValid = kTRUE;
+       }
+}
 
-       // Global configuration (DAQ logbook)
+//______________________________________________________________________________________________
+AliShuttleConfig::~AliShuttleConfig()
+{
+// destructor
 
-       aResult = aServer.Search(basedn, LDAP_SCOPE_ONELEVEL,
-                       "(objectClass=AliShuttleGlobalConfig)");
-       if (!aResult) {
-               AliError(Form("Can't find configuration with base DN: %s",
-                               basedn));
-               return;
+       fDetectorMap.DeleteAll();
+       fDetectorList.Clear();
+       fProcessedDetectors.Delete();
+}
+
+//______________________________________________________________________________________________
+const TObjArray* AliShuttleConfig::GetDetectors() const
+{
+       //
+       // returns collection of TObjString which contains the name
+       // of every detector which is in the configuration.
+       //
+
+       return &fDetectorList;
+}
+
+//______________________________________________________________________________________________
+Bool_t AliShuttleConfig::HasDetector(const char* detector) const
+{
+       //
+       // checks for paricular detector in the configuration.
+       //
+       return fDetectorMap.GetValue(detector) != NULL;
+}
+
+//______________________________________________________________________________________________
+Int_t AliShuttleConfig::GetNServers(const char* detector) const
+{
+       //
+       // returns number of DCS servers for detector
+       //
+       
+       AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
+       if (!aHolder) {
+               AliError(Form("There isn't configuration for detector: %s",
+                       detector));
+               return 0;
        }
 
-       if (aResult->GetCount() == 0) {
-               AliError("Can't find DAQ logbook configuration!");
-               delete aResult;
-               return;
+       return aHolder->GetNServers();
+}
+
+
+//______________________________________________________________________________________________
+const char* AliShuttleConfig::GetDCSHost(const char* detector, Int_t iServ) const
+{
+       //
+       // returns i-th DCS server host used by particular detector
+       //
+       
+       AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
+       if (!aHolder) {
+               AliError(Form("There isn't configuration for detector: %s",
+                       detector));
+               return NULL;
        }
 
-       if (aResult->GetCount() > 1) {
-               AliError("More than one DAQ logbook configuration found!");
-               delete aResult;
-               return;
+       return aHolder->GetDCSHost(iServ);
+}
+
+//______________________________________________________________________________________________
+Int_t AliShuttleConfig::GetDCSPort(const char* detector, Int_t iServ) const
+{
+       //
+        // returns i-th DCS server port used by particular detector
+        //
+
+
+       AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
+        if (!aHolder) {
+                AliError(Form("There isn't configuration for detector: %s",
+                        detector));
+                return 0;
+        }
+
+       return aHolder->GetDCSPort(iServ);
+}
+
+//______________________________________________________________________________________________
+Int_t AliShuttleConfig::GetMultiSplit(const char* detector, Int_t iServ) const
+{
+       //
+        // returns i-th DCS "multi split" value
+        //
+
+
+       AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
+        if (!aHolder) {
+                AliError(Form("There isn't configuration for detector: %s",
+                        detector));
+                return 0;
+        }
+
+       return aHolder->GetMultiSplit(iServ);
+}
+
+//______________________________________________________________________________________________
+const TObjArray* AliShuttleConfig::GetDCSAliases(const char* detector, Int_t iServ) const
+{
+       //
+       // returns collection of TObjString which represents the i-th set of aliases
+       // which used for data retrieval for particular detector
+       //
+
+       AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
+        if (!aHolder) {
+                AliError(Form("There isn't configuration for detector: %s",
+                        detector));
+                return NULL;
+        }
+
+       return aHolder->GetDCSAliases(iServ);
+}
+
+//______________________________________________________________________________________________
+const TObjArray* AliShuttleConfig::GetDCSDataPoints(const char* detector, Int_t iServ) const
+{
+       //
+       // returns collection of TObjString which represents the set of aliases
+       // which used for data retrieval for particular detector
+       //
+
+       AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
+        if (!aHolder) {
+                AliError(Form("There isn't configuration for detector: %s",
+                        detector));
+                return NULL;
+        }
+
+       return aHolder->GetDCSDataPoints(iServ);
+}
+
+//______________________________________________________________________________________________
+const TObjArray* AliShuttleConfig::GetCompactDCSAliases(const char* detector, Int_t iServ) const
+{
+       //
+       // returns collection of TObjString which represents the i-th set of aliases
+       // which used for data retrieval for particular detector (Compact style)
+       //
+
+       AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
+        if (!aHolder) {
+                AliError(Form("There isn't configuration for detector: %s",
+                        detector));
+                return NULL;
+        }
+
+       return aHolder->GetCompactDCSAliases(iServ);
+}
+
+//______________________________________________________________________________________________
+const TObjArray* AliShuttleConfig::GetCompactDCSDataPoints(const char* detector, Int_t iServ) const
+{
+       //
+       // returns collection of TObjString which represents the set of aliases
+       // which used for data retrieval for particular detector (Compact style)
+       //
+
+       AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
+        if (!aHolder) {
+                AliError(Form("There isn't configuration for detector: %s",
+                        detector));
+                return NULL;
+        }
+
+       return aHolder->GetCompactDCSDataPoints(iServ);
+}
+
+//______________________________________________________________________________________________
+const TObjArray* AliShuttleConfig::GetResponsibles(const char* detector) const
+{
+       //
+       // returns collection of TObjString which represents the list of mail addresses
+       // of the detector's responsible(s)
+       //
+
+       AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
+        if (!aHolder) {
+                AliError(Form("There isn't configuration for detector: %s",
+                        detector));
+                return NULL;
+        }
+
+       return aHolder->GetResponsibles();
+}
+
+//______________________________________________________________________________________________
+const TObjArray* AliShuttleConfig::GetAdmins(Int_t sys) const
+{
+       //
+       // returns collection of TObjString which represents the list of mail addresses
+       // of the system's administrator(s) (DAQ, DCS, HLT, Global, Amanda)
+       //
+
+       if (sys < 0 || sys > 4) return 0;
+       return fAdmin[sys];
+}
+
+//______________________________________________________________________________________________
+Bool_t AliShuttleConfig::HostProcessDetector(const char* detector) const
+{
+       // return TRUE if detector is handled by host or if fProcessAll is TRUE
+
+       if(fProcessAll) return kTRUE;
+       TIter iter(&fProcessedDetectors);
+       TObjString* detName;
+       while((detName = (TObjString*) iter.Next())){
+               if(detName->String() == detector) return kTRUE;
        }
+       return kFALSE;
+}
+
+//______________________________________________________________________________________________
+Bool_t AliShuttleConfig::StrictRunOrder(const char* detector) const
+{
+       // return TRUE if detector wants strict run ordering of stored data
+
+       AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
+        if (!aHolder)
+       {
+                AliError(Form("There isn't configuration for detector: %s",
+                        detector));
+                return kTRUE;
+        }
+
+       return aHolder->StrictRunOrder();
+}
+
+//______________________________________________________________________________________________
+UInt_t AliShuttleConfig::SetGlobalConfig(TList* list)
+{
+       // Set the global configuration (DAQ Logbook + preprocessor monitoring settings)
 
-       anEntry = aResult->GetNext();
 
-       anAttribute = anEntry->GetAttribute("DAQLogbookHost");
+       TLDAPEntry* anEntry = 0;
+       TLDAPAttribute* anAttribute = 0;
+       
+       if (list->GetEntries() == 0) 
+       {
+               AliError("Global configuration not found!");
+               return 1;
+       } 
+       else if (list->GetEntries() > 1)
+       {
+               AliError("More than one global configuration found!");
+               return 2;
+       }
+       
+       anEntry = dynamic_cast<TLDAPEntry*> (list->At(0));
+       
+       if (!anEntry)
+       {
+               AliError("Unexpected! Global list does not contain a TLDAPEntry");
+               return 3;
+       } 
+       
+       
+       anAttribute = anEntry->GetAttribute("AlienPath");
        if (!anAttribute) {
-               AliError("Can't find DAQLogbookHost attribute!");
-               delete anEntry; delete aResult;
-               return;
+               AliError("Can't find AlienPath attribute!");
+               return 4;
+       }
+       fAlienPath = anAttribute->GetValue();
+
+       anAttribute = anEntry->GetAttribute("daqLbHost");
+       if (!anAttribute) {
+               AliError("Can't find daqLbHost attribute!");
+               return 4;
        }
        fDAQlbHost = anAttribute->GetValue();
 
-       anAttribute = anEntry->GetAttribute("DAQLogbookPort"); // MAY
+       anAttribute = anEntry->GetAttribute("daqLbPort"); // MAY
        if (anAttribute)
        {
                fDAQlbPort = ((TString) anAttribute->GetValue()).Atoi();
@@ -448,103 +1075,264 @@ AliShuttleConfig::AliShuttleConfig(const char* host, Int_t port,
                fDAQlbPort = 3306; // mysql
        }
 
-       anAttribute = anEntry->GetAttribute("DAQLogbookUser");
+       anAttribute = anEntry->GetAttribute("daqLbUser");
        if (!anAttribute) {
-               AliError("Can't find DAQLogbookUser attribute!");
-               delete aResult; delete anEntry;
-               return;
+               AliError("Can't find daqLbUser attribute!");
+               return 4;
        }
        fDAQlbUser = anAttribute->GetValue();
 
-       anAttribute = anEntry->GetAttribute("DAQLogbookPassword");
+       anAttribute = anEntry->GetAttribute("daqLbDB");
        if (!anAttribute) {
-               AliError("Can't find DAQLogbookPassword attribute!");
-               delete aResult; delete anEntry;
-               return;
+               AliError("Can't find daqLbDB attribute!");
+               return 4;
        }
-       fDAQlbPass = anAttribute->GetValue();
+       fDAQlbDB = anAttribute->GetValue();
 
-       anAttribute = anEntry->GetAttribute("DAQLogbookDB");
+       anAttribute = anEntry->GetAttribute("daqLbTable");
        if (!anAttribute) {
-               AliError("Can't find DAQLogbookDB attribute!");
-               delete aResult; delete anEntry;
-               return;
+               AliError("Can't find daqLbTable attribute!");
+               return 4;
        }
-       fDAQlbDB = anAttribute->GetValue();
+       fDAQlbTable = anAttribute->GetValue();
 
-       anAttribute = anEntry->GetAttribute("DAQLogbookTable");
+       anAttribute = anEntry->GetAttribute("shuttleLbTable");
        if (!anAttribute) {
-               AliError("Can't find DAQLogbookTable attribute!");
-               delete aResult; delete anEntry;
-               return;
+               AliError("Can't find shuttleLbTable attribute!");
+               return 4;
        }
-       fDAQlbTable = anAttribute->GetValue();
+       fShuttlelbTable = anAttribute->GetValue();
 
-       anAttribute = anEntry->GetAttribute("ShuttleLogbookTable");
+       anAttribute = anEntry->GetAttribute("runTypeLbTable");
        if (!anAttribute) {
-               AliError("Can't find ShuttleLogbookTable attribute!");
-               delete aResult; delete anEntry;
-               return;
+               AliError("Can't find runTypeLbTable attribute!");
+               return 4;
+       }
+       fRunTypelbTable = anAttribute->GetValue();
+
+       anAttribute = anEntry->GetAttribute("ppmaxRetries");
+       if (!anAttribute) {
+               AliError("Can't find ppmaxRetries attribute!");
+               return 4;
+       }
+       TString tmpStr = anAttribute->GetValue();
+       fMaxRetries = tmpStr.Atoi();
+
+       anAttribute = anEntry->GetAttribute("ppTimeOut");
+       if (!anAttribute) {
+               AliError("Can't find ppTimeOut attribute!");
+               return 4;
+       }
+       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("DCSQueryOffset");
+       if (!anAttribute) {
+               AliError("Can't find DCSQueryOffset attribute!");
+               return 4;
+       }
+       tmpStr = anAttribute->GetValue();
+       fDCSQueryOffset = tmpStr.Atoi();
+
+       anAttribute = anEntry->GetAttribute("DCSDelay");
+       if (!anAttribute) {
+               AliError("Can't find DCSDelay attribute!");
+               return 4;
+       }
+       tmpStr = anAttribute->GetValue();
+       fDCSDelay = tmpStr.Atoi();
+
+       anAttribute = anEntry->GetAttribute("ppMaxMem");
+       if (!anAttribute) {
+               AliError("Can't find ppMaxMem attribute!");
+               return 4;
+       }
+       tmpStr = anAttribute->GetValue();
+       fPPMaxMem = tmpStr.Atoi();
+       
+       anAttribute = anEntry->GetAttribute("monitorHost");
+       if (!anAttribute) {
+               AliError("Can't find monitorHost attribute!");
+               return 4;
+       }
+       fMonitorHost = anAttribute->GetValue();
+       
+       anAttribute = anEntry->GetAttribute("monitorTable");
+       if (!anAttribute) {
+               AliError("Can't find monitorTable attribute!");
+               return 4;
+       }
+       fMonitorTable = anAttribute->GetValue();
+
+       anAttribute = anEntry->GetAttribute("triggerWait"); // MAY
+       if (!anAttribute) {
+               AliWarning(Form("triggerWait not set! default = ", fTriggerWait));
+       }
+       tmpStr = anAttribute->GetValue();
+       fTriggerWait = tmpStr.Atoi();
+       
+       anAttribute = anEntry->GetAttribute("mode");
+       if (!anAttribute) {
+               AliWarning("Run mode not set! Running in test mode.");
+       } else {
+         tmpStr = anAttribute->GetValue();
+         if (tmpStr == "test")
+         {
+           fRunMode = kTest;
+         } else if (tmpStr == "prod") {
+           fRunMode = kProd;
+         } else {
+           AliWarning(Form("Not a valid run mode: %s", tmpStr.Data()));                
+           AliWarning("Valid run modes are \"test\" and \"prod\". Running in test mode.");
+         }
+       }
+
+       anAttribute = anEntry->GetAttribute("keepDCSMap"); // MAY
+        if (!anAttribute)
+       {
+               AliWarning("keepDCSMap flag not set - default is FALSE");
+        } else {
+               TString keepDCSMapStr = anAttribute->GetValue();
+               if (!(keepDCSMapStr == "0" || keepDCSMapStr == "1"))
+               {
+                       AliError("keepDCSMap flag must be 0 or 1!");
+                       return 4;
+               }
+               fKeepDCSMap = (Bool_t) keepDCSMapStr.Atoi();
+       }
+       
+       anAttribute = anEntry->GetAttribute("keepTempFolder"); // MAY
+        if (!anAttribute)
+       {
+               AliWarning("keepTempFolder flag not set - default is FALSE");
+        } else {
+               TString keepTempFolderStr = anAttribute->GetValue();
+               if (!(keepTempFolderStr == "0" || keepTempFolderStr == "1"))
+               {
+                       AliError("keepTempFolder flag must be 0 or 1!");
+                       return 4;
+               }
+               fKeepTempFolder = (Bool_t) keepTempFolderStr.Atoi();
+       }
+       
+
+       anAttribute = anEntry->GetAttribute("shuttleAdmin"); // MAY
+        if (!anAttribute)
+       {
+               AliDebug(2, "Warning! No \"shuttleAdmin\" attribute!");
+        }
+       else
+       {
+               const char* anAdmin;
+               while ((anAdmin = anAttribute->GetValue()))
+               {
+                       fAdmin[kGlobal]->AddLast(new TObjString(anAdmin));
+               }
        }
-       fShuttlelbTable = anAttribute->GetValue();
 
-       anAttribute = anEntry->GetAttribute("RunTypeLogbookTable");
-       if (!anAttribute) {
-               AliError("Can't find RunTypeLogbookTable attribute!");
-               delete aResult; delete anEntry;
-               return;
+       anAttribute = anEntry->GetAttribute("amandaAdmin"); // MAY
+        if (!anAttribute)
+       {
+               AliDebug(2, "Warning! No \"amandaAdmin\" attribute!");
+        }
+       else
+       {
+               const char* anAdmin;
+               while ((anAdmin = anAttribute->GetValue()))
+               {
+                       fAdmin[kAmanda]->AddLast(new TObjString(anAdmin));
+               }
        }
-       fRunTypelbTable = anAttribute->GetValue();
-
-       anAttribute = anEntry->GetAttribute("MaxRetries");
-       if (!anAttribute) {
-               AliError("Can't find MaxRetries attribute!");
-               delete aResult; delete anEntry;
-               return;
+       
+       anAttribute = anEntry->GetAttribute("sendMail"); // MAY
+        if (!anAttribute)
+       {
+               AliWarning("sendMail flag not set - default is FALSE");
+        } else {
+               TString sendMailStr = anAttribute->GetValue();
+               if (!(sendMailStr == "0" || sendMailStr == "1"))
+               {
+                       AliError("sendMail flag must be 0 or 1!");
+                       return 4;
+               }
+               fSendMail = (Bool_t) sendMailStr.Atoi();
        }
-       TString tmpStr = anAttribute->GetValue();
-       fMaxRetries = tmpStr.Atoi();
-
-       anAttribute = anEntry->GetAttribute("PPTimeOut");
+                                               
+       anAttribute = anEntry->GetAttribute("passwdFilePath");
        if (!anAttribute) {
-               AliError("Can't find PPTimeOut attribute!");
-               delete aResult; delete anEntry;
-               return;
+               AliError("Can't find Passwords File Path attribute!");
+               return 4;
        }
-       tmpStr = anAttribute->GetValue();
-       fPPTimeOut = tmpStr.Atoi();
+       fPasswdFilePath = anAttribute->GetValue();
 
-       delete aResult; delete anEntry;
-
-       // FXS configuration (FXS logbook and hosts)
+       return 0;
+}
 
-       for(int iSys=0;iSys<3;iSys++){
-               queryFilter = Form("(system=%s)", AliShuttleInterface::GetSystemName(iSys));
-               aResult = aServer.Search(basedn, LDAP_SCOPE_ONELEVEL, queryFilter.Data());
-               if (!aResult) {
-                       AliError(Form("Can't find configuration for system: %s",
-                                       AliShuttleInterface::GetSystemName(iSys)));
-                       return;
-               }
+//______________________________________________________________________________________________
+UInt_t AliShuttleConfig::SetSysConfig(TList* list)
+{
+       // Set the online FXS configuration (DAQ + DCS + HLT)
 
-               if (aResult->GetCount() != 1 ) {
-                       AliError("Error in FXS configuration!");
-                       delete aResult;
-                       return;
-               }
 
-               anEntry = aResult->GetNext();
+       TLDAPEntry* anEntry = 0;
+       TLDAPAttribute* anAttribute = 0;
+       
+       if (list->GetEntries() != 3) 
+       {
+               AliError(Form("Wrong number of online systems found: %d !", list->GetEntries()));
+               return 1;
+       } 
 
-               anAttribute = anEntry->GetAttribute("DBHost");
+       TIter iter(list);
+       Int_t count = 0;
+       SystemCode iSys=kDAQ;
+       
+       while ((anEntry = dynamic_cast<TLDAPEntry*> (iter.Next())))
+       {
+               anAttribute = anEntry->GetAttribute("system");
+               TString sysName = anAttribute->GetValue();
+               
+               if (sysName == "DAQ") 
+               {
+                       iSys = kDAQ;
+                       count += 1;
+               }
+               else if (sysName == "DCS")
+               {
+                       iSys = kDCS;
+                       count += 10;
+               }
+               else if (sysName == "HLT")
+               {
+                       iSys = kHLT;
+                       count += 100;
+               }
+               
+               anAttribute = anEntry->GetAttribute("dbHost");
                if (!anAttribute) {
-                       AliError(Form ("Can't find DBHost attribute for %s!!",
+                       AliError(Form ("Can't find dbHost attribute for %s!!",
                                                AliShuttleInterface::GetSystemName(iSys)));
-                       delete aResult; delete anEntry;
-                       return;
+                       return 5;
                }
                fFXSdbHost[iSys] = anAttribute->GetValue();
 
-               anAttribute = anEntry->GetAttribute("DBPort"); // MAY
+               anAttribute = anEntry->GetAttribute("dbPort"); // MAY
                if (anAttribute)
                {
                        fFXSdbPort[iSys] = ((TString) anAttribute->GetValue()).Atoi();
@@ -552,52 +1340,39 @@ AliShuttleConfig::AliShuttleConfig(const char* host, Int_t port,
                        fFXSdbPort[iSys] = 3306; // mysql
                }
 
-               anAttribute = anEntry->GetAttribute("DBUser");
+               anAttribute = anEntry->GetAttribute("dbUser");
                if (!anAttribute) {
-                       AliError(Form ("Can't find DBUser attribute for %s!!",
+                       AliError(Form ("Can't find dbUser attribute for %s!!",
                                                AliShuttleInterface::GetSystemName(iSys)));
-                       delete aResult; delete anEntry;
-                       return;
+                       return 5;
                }
                fFXSdbUser[iSys] = anAttribute->GetValue();
 
-               anAttribute = anEntry->GetAttribute("DBPassword");
-               if (!anAttribute) {
-                       AliError(Form ("Can't find DBPassword attribute for %s!!",
-                                               AliShuttleInterface::GetSystemName(iSys)));
-                       delete aResult; delete anEntry;
-                       return;
-               }
-               fFXSdbPass[iSys] = anAttribute->GetValue();
-
-               anAttribute = anEntry->GetAttribute("DBName");
+               anAttribute = anEntry->GetAttribute("dbName");
                if (!anAttribute) {
-                       AliError(Form ("Can't find DBName attribute for %s!!",
+                       AliError(Form ("Can't find dbName attribute for %s!!",
                                                AliShuttleInterface::GetSystemName(iSys)));
-                       delete aResult; delete anEntry;
-                       return;
+                       return 5;
                }
 
                fFXSdbName[iSys] = anAttribute->GetValue();
-               anAttribute = anEntry->GetAttribute("DBTable");
+               anAttribute = anEntry->GetAttribute("dbTable");
                if (!anAttribute) {
-                       AliError(Form ("Can't find DBTable attribute for %s!!",
+                       AliError(Form ("Can't find dbTable attribute for %s!!",
                                                AliShuttleInterface::GetSystemName(iSys)));
-                       delete aResult; delete anEntry;
-                       return;
+                       return 5;
                }
                fFXSdbTable[iSys] = anAttribute->GetValue();
 
-               anAttribute = anEntry->GetAttribute("FSHost");
+               anAttribute = anEntry->GetAttribute("fxsHost");
                if (!anAttribute) {
-                       AliError(Form ("Can't find FSHost attribute for %s!!",
+                       AliError(Form ("Can't find fxsHost attribute for %s!!",
                                                AliShuttleInterface::GetSystemName(iSys)));
-                       delete aResult; delete anEntry;
-                       return;
+                       return 5;
                }
                fFXSHost[iSys] = anAttribute->GetValue();
 
-               anAttribute = anEntry->GetAttribute("FSPort"); // MAY
+               anAttribute = anEntry->GetAttribute("fxsPort"); // MAY
                if (anAttribute)
                {
                        fFXSPort[iSys] = ((TString) anAttribute->GetValue()).Atoi();
@@ -605,173 +1380,185 @@ AliShuttleConfig::AliShuttleConfig(const char* host, Int_t port,
                        fFXSPort[iSys] = 22; // scp port number
                }
 
-               anAttribute = anEntry->GetAttribute("FSUser");
+               anAttribute = anEntry->GetAttribute("fxsUser");
                if (!anAttribute) {
-                       AliError(Form ("Can't find FSUser attribute for %s!!",
+                       AliError(Form ("Can't find fxsUser attribute for %s!!",
                                                AliShuttleInterface::GetSystemName(iSys)));
-                       delete aResult; delete anEntry;
-                       return;
+                       return 5;
                }
                fFXSUser[iSys] = anAttribute->GetValue();
 
-               anAttribute = anEntry->GetAttribute("FSPassword");
+               anAttribute = anEntry->GetAttribute("fxsPasswd");
                if (anAttribute) fFXSPass[iSys] = anAttribute->GetValue();
 
-               delete aResult; delete anEntry;
+               anAttribute = anEntry->GetAttribute("fxsBaseFolder");
+               if (anAttribute) fFXSBaseFolder[iSys] = anAttribute->GetValue();
+       
+               anAttribute = anEntry->GetAttribute("fxsAdmin"); // MAY
+               if (!anAttribute)
+               {
+                       AliDebug(2, "Warning! No \"fxsAdmin\" attribute!");
+               }
+               else
+               {
+                       const char* anAdmin;
+                       while ((anAdmin = anAttribute->GetValue()))
+                       {
+                               fAdmin[iSys]->AddLast(new TObjString(anAdmin));
+                       }
+               }
+       
        }
-
-       fIsValid = kTRUE;
-}
-
-//______________________________________________________________________________________________
-AliShuttleConfig::~AliShuttleConfig()
-{
-// destructor
-
-       fDetectorMap.DeleteAll();
-       fDetectorList.Clear();
-       fProcessedDetectors.Delete();
-}
-
-//______________________________________________________________________________________________
-const TObjArray* AliShuttleConfig::GetDetectors() const
-{
-       //
-       // returns collection of TObjString which contains the name
-       // of every detector which is in the configuration.
-       //
-
-       return &fDetectorList;
-}
-
-//______________________________________________________________________________________________
-Bool_t AliShuttleConfig::HasDetector(const char* detector) const
-{
-       //
-       // checks for paricular detector in the configuration.
-       //
-       return fDetectorMap.GetValue(detector) != NULL;
-}
-
-//______________________________________________________________________________________________
-const char* AliShuttleConfig::GetDCSHost(const char* detector) const
-{
-       //
-       // returns DCS server host used by particular detector
-       //
        
-       AliShuttleConfigHolder* aHolder = (AliShuttleConfigHolder*) fDetectorMap.GetValue(detector);
-       if (!aHolder) {
-               AliError(Form("There isn't configuration for detector: %s",
-                       detector));
-               return NULL;
+       if(count != 111) {
+               AliError(Form("Wrong system configuration! (code = %d)", count));
+               return 6;
        }
-
-       return aHolder->GetDCSHost();
+       
+       return 0;
 }
 
 //______________________________________________________________________________________________
-Int_t AliShuttleConfig::GetDCSPort(const char* detector) const
-{
-       //
-        // returns DCS server port used by particular detector
-        //
-
-
-       AliShuttleConfigHolder* aHolder = (AliShuttleConfigHolder*) fDetectorMap.GetValue(detector);
-        if (!aHolder) {
-                AliError(Form("There isn't configuration for detector: %s",
-                        detector));
-                return 0;
-        }
+UInt_t AliShuttleConfig::SetPasswords(){
+       
+       AliInfo("Setting Passwords");
 
-       return aHolder->GetDCSPort();
-}
+       // Retrieving Passwords for DAQ lb, DAQ/DCS/HLT FXS
 
-//______________________________________________________________________________________________
-const TObjArray* AliShuttleConfig::GetDCSAliases(const char* detector) const
-{
-       //
-       // returns collection of TObjString which represents the set of aliases
-       // which used for data retrieval for particular detector
-       //
+       ifstream *inputfile = new ifstream(fPasswdFilePath.Data());
+       if (!*inputfile) {
+               AliError(Form("Error opening file %s !", fPasswdFilePath.Data()));
+               inputfile->close();
+               delete inputfile;
+               return 1;
+       }
 
-       AliShuttleConfigHolder* aHolder = (AliShuttleConfigHolder*) fDetectorMap.GetValue(detector);
-        if (!aHolder) {
-                AliError(Form("There isn't configuration for detector: %s",
-                        detector));
-                return NULL;
-        }
+       TString line;
+       Int_t nPwd=0;
+       Int_t nPwdFake=0;
+       while (line.ReadLine(*inputfile)) {
+               TObjArray *tokens = line.Tokenize(" \t");
+               TString system = ((TObjString *)tokens->At(0))->String(); 
+               TString password = ((TObjString *)tokens->At(1))->String();
+               if (system.Contains("DAQ_LB")){
+                       fDAQlbPass=password;
+                       nPwd++;
+                       AliDebug(3,Form("DAQ_LB: Password %s for %s found", password.Data(), system.Data()));
+               }
+               else if (system.Contains("DAQ_DB")){
+                       fFXSdbPass[0]=password;
+                       nPwd++;
+                       AliDebug(3,Form("DAQ_DB: Password %s for %s found", password.Data(), system.Data()));
+               }
+               else if (system.Contains("DCS_DB")){
+                       fFXSdbPass[1]=password;
+                       nPwd++;
+                       AliDebug(3,Form("DCS_DB: Password %s for %s found", password.Data(), system.Data()));
+               }
+               else if (system.Contains("HLT_DB")){
+                       fFXSdbPass[2]=password;
+                       nPwd++;
+                       AliDebug(3,Form("HLT_DB: Password %s for %s found", password.Data(), system.Data()));
+               }
+               else {
+                       nPwdFake++;
+                       AliDebug(3,Form("%i fake line(s) found in file %s", nPwdFake, fPasswdFilePath.Data()));
+                       continue;
+               }
+               delete tokens;
+       }
 
-       return aHolder->GetDCSAliases();
-}
+       inputfile->close();
+       delete inputfile;
 
-//______________________________________________________________________________________________
-const TObjArray* AliShuttleConfig::GetDCSDataPoints(const char* detector) const
-{
-       //
-       // returns collection of TObjString which represents the set of aliases
-       // which used for data retrieval for particular detector
-       //
+       if (nPwd!=4){
+               AliError(Form("Wrong file for DAQ Logbook password found %s (some passwors missing), please Check!", fPasswdFilePath.Data()));
+               return 2;
+       }
 
-       AliShuttleConfigHolder* aHolder = (AliShuttleConfigHolder*) fDetectorMap.GetValue(detector);
-        if (!aHolder) {
-                AliError(Form("There isn't configuration for detector: %s",
-                        detector));
-                return NULL;
-        }
+       return 0;
 
-       return aHolder->GetDCSDataPoints();
 }
-
 //______________________________________________________________________________________________
-const TObjArray* AliShuttleConfig::GetResponsibles(const char* detector) const
+UInt_t AliShuttleConfig::SetDetConfig(TList* detList, TList* dcsList)
 {
-       //
-       // returns collection of TObjString which represents the list of mail addresses
-       // of the detector's responsible(s)
-       //
-
-       AliShuttleConfigHolder* aHolder = (AliShuttleConfigHolder*) fDetectorMap.GetValue(detector);
-        if (!aHolder) {
-                AliError(Form("There isn't configuration for detector: %s",
-                        detector));
-                return NULL;
-        }
+       // Set the detector configuration (general settings + DCS amanda server and alias/DP lists)
 
-       return aHolder->GetResponsibles();
-}
+       TLDAPEntry* anEntry = 0;
+       
+       TIter iter(detList);
+       while ((anEntry = dynamic_cast<TLDAPEntry*> (iter.Next())))
+       {
+               
+               AliShuttleDetConfigHolder* detHolder = new AliShuttleDetConfigHolder(anEntry);
 
-//______________________________________________________________________________________________
-Bool_t AliShuttleConfig::HostProcessDetector(const char* detector) const
-{
-       // return TRUE if detector is handled by host or if fProcessAll is TRUE
+               if (!detHolder->IsValid()) {
+                       AliError("Detector configuration error!");
+                       delete detHolder;
+                       return 7;
+               }
 
-       if(fProcessAll) return kTRUE;
-       TIter iter(&fProcessedDetectors);
-       TObjString* detName;
-       while((detName = (TObjString*) iter.Next())){
-               if(detName->String() == detector) return kTRUE;
+               TObjString* detStr = new TObjString(detHolder->GetDetector());
+               
+               // Look for DCS Configuration
+               TIter dcsIter(dcsList);
+               TLDAPEntry *dcsEntry = 0;
+               while ((dcsEntry = dynamic_cast<TLDAPEntry*> (dcsIter.Next())))
+               {
+                       TString dn = dcsEntry->GetDn();
+                       if(dn.Contains(detStr->GetName())) {
+                               AliDebug(2, Form("Found DCS configuration: dn = %s",dn.Data()));
+                               AliShuttleDCSConfigHolder* dcsHolder = new AliShuttleDCSConfigHolder(dcsEntry);
+                               if (!dcsHolder->IsValid()) {
+                                       AliError("DCS configuration error!");
+                                       delete detHolder;
+                                       delete dcsHolder;
+                                       return 7;
+                               }
+                               detHolder->AddDCSConfig(dcsHolder);
+                       }
+               }
+               
+               
+               fDetectorMap.Add(detStr, detHolder);
+               fDetectorList.AddLast(detStr);
        }
-       return kFALSE;
+       
+       return 0;
 }
 
 //______________________________________________________________________________________________
-Bool_t AliShuttleConfig::StrictRunOrder(const char* detector) const
+UInt_t AliShuttleConfig::SetHostConfig(TList* list)
 {
-       // return TRUE if detector wants strict run ordering of stored data
-
-       AliShuttleConfigHolder* aHolder = (AliShuttleConfigHolder*) fDetectorMap.GetValue(detector);
-        if (!aHolder)
+       // Set the Shuttle machines configuration (which detectors processes each machine)
+       
+       TLDAPEntry* anEntry = 0;
+       TLDAPAttribute* anAttribute = 0;
+       
+       fShuttleInstanceHost = gSystem->HostName();
+       
+       TIter iter(list);
+       while ((anEntry = dynamic_cast<TLDAPEntry*> (iter.Next())))
        {
-                AliError(Form("There isn't configuration for detector: %s",
-                        detector));
-                return kTRUE;
-        }
-
-       return aHolder->StrictRunOrder();
+       
+               TString dn(anEntry->GetDn());
+               if (!dn.Contains(Form("shuttleHost=%s", fShuttleInstanceHost.Data()))) continue;
+               
+               if (!fProcessAll)
+               {
+                       anAttribute = anEntry->GetAttribute("detectors");
+                       const char *detName;
+                       while((detName = anAttribute->GetValue())){
+                               TObjString *objDet= new TObjString(detName);
+                               fProcessedDetectors.Add(objDet);
+                       }
+               }
+       }       
+       
+       return 0;
 }
 
+
 //______________________________________________________________________________________________
 void AliShuttleConfig::Print(Option_t* option) const
 {
@@ -783,10 +1570,14 @@ void AliShuttleConfig::Print(Option_t* option) const
 
        TString result;
        result += '\n';
+       
+       TString mode = "test";
+       if (fRunMode == kProd) mode = "production";
 
-       result += "####################################################\n";
-       result += Form(" Shuttle configuration from %s \n", fConfigHost.Data());
-       result += "####################################################\n";
+       result += "########################################################################\n";
+       result += Form(" Shuttle configuration from %s - Run Mode: <%s> \n", 
+                                       fConfigHost.Data(), mode.Data());
+       result += "########################################################################\n";
        result += Form("\nShuttle running on %s \n", fShuttleInstanceHost.Data());
 
        if(fProcessAll) {
@@ -801,7 +1592,35 @@ void AliShuttleConfig::Print(Option_t* option) const
                result += "\n";
        }
 
-       result += Form("PP time out = %d - Max total retries = %d\n\n", fPPTimeOut, fMaxRetries);
+       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, fDCSTimeOut, fPPMaxMem, fMaxRetries, fTriggerWait);
+       result += Form("FLAGS: keepDCSMap = %d - keepTempFolder = %d - SendMail = %d \n", 
+                               fKeepDCSMap, fKeepTempFolder, fSendMail);
+       const TObjArray* shuttleAdmins = GetAdmins(kGlobal);
+       if (shuttleAdmins->GetEntries() != 0)
+       {
+               result += "SHUTTLE administrator(s): ";
+               TIter it(shuttleAdmins);
+               TObjString* anAdmin;
+               while ((anAdmin = (TObjString*) it.Next()))
+               {
+                       result += Form("%s ", anAdmin->String().Data());
+               }
+               result += "\n";
+       }
+       const TObjArray* amandaAdmins = GetAdmins(kAmanda);
+       if (amandaAdmins->GetEntries() != 0)
+       {
+               result += "Amanda server administrator(s): ";
+               TIter it(amandaAdmins);
+               TObjString* anAdmin;
+               while ((anAdmin = (TObjString*) it.Next()))
+               {
+                       result += Form("%s ", anAdmin->String().Data());
+               }
+               result += "\n\n";
+       }
        result += "------------------------------------------------------\n";
 
        result += Form("Logbook Configuration \n\n \tHost: %s:%d; \tUser: %s; ",
@@ -809,11 +1628,11 @@ void AliShuttleConfig::Print(Option_t* option) const
 
 //     result += "Password: ";
 //     result.Append('*', fDAQlbPass.Length());
-       result += Form("\tDB: %s; \tTables: %s, %s, %s",
+       result += Form("\tDB: %s; \tTables: %s, %s, %s\n",
                fDAQlbDB.Data(), fDAQlbTable.Data(), fShuttlelbTable.Data(), fRunTypelbTable.Data());
 
        result += "\n\n";
-
+       
        result += "------------------------------------------------------\n";
        result += "FXS configuration\n\n";
 
@@ -823,21 +1642,45 @@ void AliShuttleConfig::Print(Option_t* option) const
                                                fFXSdbHost[iSys].Data(), fFXSdbPort[iSys], fFXSdbUser[iSys].Data(),
                                                fFXSdbName[iSys].Data(), fFXSdbTable[iSys].Data());
                // result += Form("DB Password:",fFXSdbPass[iSys].Data());
-               result += Form("\tFXS host: %s:%d; \tUser: %s\n\n", fFXSHost[iSys].Data(), fFXSPort[iSys],
+               result += Form("\tFXS host: %s:%d; \tUser: %s\n", fFXSHost[iSys].Data(), fFXSPort[iSys],
                                                fFXSUser[iSys].Data());
                // result += Form("FXS Password:",fFXSPass[iSys].Data());
+               const TObjArray* fxsAdmins = GetAdmins(iSys);
+               if (fxsAdmins->GetEntries() != 0)
+               {
+                       result += "\tAdministrator(s): ";
+                       TIter it(fxsAdmins);
+                       TObjString* anAdmin;
+                       while ((anAdmin = (TObjString*) it.Next()))
+                       {
+                               result += Form("%s ", anAdmin->String().Data());
+                       }
+                       result += "\n\n";
+               }
        }
 
+       result += "------------------------------------------------------\n";
+       result += "MonaLisa configuration\n\n";
+       
+       result += Form("\tHost: %s; \tTable name: %s",
+               fMonitorHost.Data(), fMonitorTable.Data());
+               
+       result += "\n\n";
+               
        TString optStr(option);
 
        result += "------------------------------------------------------\n";
        result += "Detector-specific configuration\n\n";
+       
        TIter iter(fDetectorMap.GetTable());
-       TPair* aPair;
+       TPair* aPair = 0;
+       
        while ((aPair = (TPair*) iter.Next())) {
-               AliShuttleConfigHolder* aHolder = (AliShuttleConfigHolder*) aPair->Value();
-               if (option != 0 && !optStr.Contains(aHolder->GetDetector()) && optStr.CompareTo("uncompact",TString::kIgnoreCase) != 0 )
+               AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) aPair->Value();
+               if (optStr != "" && !optStr.Contains(aHolder->GetDetector()) && 
+                               optStr.CompareTo("uncompact",TString::kIgnoreCase) != 0 )
                                continue;
+               
                result += Form("*** %s *** \n", aHolder->GetDetector());
 
                const TObjArray* responsibles = aHolder->GetResponsibles();
@@ -853,54 +1696,59 @@ void AliShuttleConfig::Print(Option_t* option) const
                        result += "\n";
                }
 
-               result += Form("\tStrict run ordering: %s \n", aHolder->StrictRunOrder() ? "YES" : "NO");
-               if(aHolder->SkipDCSQuery())
+               result += Form("\tStrict run ordering: %s \n\n", aHolder->StrictRunOrder() ? "YES" : "NO");
+               
+               const TObjArray* dcsConfig = aHolder->GetDCSConfig();
+               
+               AliShuttleDCSConfigHolder* dcsHolder = 0;
+               TIter dcsIter(dcsConfig);
+               Int_t count=0;
+               while ((dcsHolder = dynamic_cast<AliShuttleDCSConfigHolder*> (dcsIter.Next())))
                {
-                       result += "\n";
-                       continue;
-               }
-               result += Form("\tAmanda server: %s:%d \n", aHolder->GetDCSHost(), aHolder->GetDCSPort());
+                       result += Form("\tAmanda server [%d]: %s:%d - MultiSplit = %d\n", count,
+                               dcsHolder->GetDCSHost(), dcsHolder->GetDCSPort(), dcsHolder->GetMultiSplit());
 
-               const TObjArray* aliases = 0;
-               if (optStr.Contains("uncompact",TString::kIgnoreCase))
-               {
-                       aliases = aHolder->GetDCSAliases();
-               } else {
-                       aliases = aHolder->GetCompactDCSAliases();
-               }
+                       const TObjArray* aliases = 0;
+                       if (optStr.Contains("uncompact",TString::kIgnoreCase))
+                       {
+                               aliases = dcsHolder->GetDCSAliases();
+                       } else {
+                               aliases = dcsHolder->GetCompactDCSAliases();
+                       }
 
-               if (aliases->GetEntries() != 0)
-               {
-                       result += "\tDCS Aliases: ";
-                       TIter it(aliases);
-                       TObjString* anAlias;
-                       while ((anAlias = (TObjString*) it.Next()))
+                       if (aliases->GetEntries() != 0)
                        {
-                               result += Form("%s ", anAlias->String().Data());
+                               result += Form("\tDCS Aliases [%d]: ", count);
+                               TIter it(aliases);
+                               TObjString* anAlias;
+                               while ((anAlias = (TObjString*) it.Next()))
+                               {
+                                       result += Form("%s ", anAlias->String().Data());
+                               }
+                               result += "\n";
                        }
-                       result += "\n";
-               }
 
-               const TObjArray* dataPoints = 0;
-               if (optStr.Contains("uncompact",TString::kIgnoreCase))
-               {
-                       dataPoints = aHolder->GetDCSDataPoints();
-               } else {
-                       dataPoints = aHolder->GetCompactDCSDataPoints();
-               }
-               if (dataPoints->GetEntries() != 0)
-               {
-                       result += "\tDCS Data Points: ";
-                       TIter it(dataPoints);
-                       TObjString* aDataPoint;
-                       while ((aDataPoint = (TObjString*) it.Next())) {
-                               result += Form("%s ", aDataPoint->String().Data());
+                       const TObjArray* dataPoints = 0;
+                       if (optStr.Contains("uncompact",TString::kIgnoreCase))
+                       {
+                               dataPoints = dcsHolder->GetDCSDataPoints();
+                       } else {
+                               dataPoints = dcsHolder->GetCompactDCSDataPoints();
                        }
+                       if (dataPoints->GetEntries() != 0)
+                       {
+                               result += Form("\tDCS Data Points [%d]: ", count);
+                               TIter it(dataPoints);
+                               TObjString* aDataPoint;
+                               while ((aDataPoint = (TObjString*) it.Next())) {
+                                       result += Form("%s ", aDataPoint->String().Data());
+                               }
                                result += "\n";
+                       }
+                       count++;
+                       result += "\n";
                }
-               result += "\n";
        }
-
        if(!fIsValid) result += "\n\n********** !!!!! Configuration is INVALID !!!!! **********\n";
 
        AliInfo(result);