]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - SHUTTLE/AliShuttleConfig.cxx
Update configuration for SHUTTLE: production mode
[u/mrichter/AliRoot.git] / SHUTTLE / AliShuttleConfig.cxx
index 4416030a54c153a7bc68c5b2b9f0e00ab1f7dc8d..46dfae951a040e3d63e94614d1aa4d4054cb0fab 100644 (file)
 
 /*
 $Log$
+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
+SetShuttleLogDir
+
+Revision 1.17  2007/01/18 11:17:47  jgrosseo
+changing spaces to tabs ;-)
+
+Revision 1.16  2007/01/18 11:10:35  jgrosseo
+adding the possibility of defining DCS alias and data points with patterns
+first pattern introduced: [N..M] to add all names between the two digits, this works also recursively.
+
+Revision 1.15  2007/01/15 18:27:11  acolla
+implementation of sending mail to subdetector expert in case the preprocessor fails.
+shuttle.schema updated with expert's email entry
+
+Revision 1.13  2006/12/07 08:51:26  jgrosseo
+update (alberto):
+table, db names in ldap configuration
+added GRP preprocessor
+DCS data can also be retrieved by data point
+
+Revision 1.12  2006/11/16 16:16:48  jgrosseo
+introducing strict run ordering flag
+removed giving preprocessor name to preprocessor, they have to know their name themselves ;-)
+
+Revision 1.11  2006/11/06 14:23:04  jgrosseo
+major update (Alberto)
+o) reading of run parameters from the logbook
+o) online offline naming conversion
+o) standalone DCSclient package
+
+Revision 1.10  2006/10/20 15:22:59  jgrosseo
+o) Adding time out to the execution of the preprocessors: The Shuttle forks and the parent process monitors the child
+o) Merging Collect, CollectAll, CollectNew function
+o) Removing implementation of empty copy constructors (declaration still there!)
+
+Revision 1.9  2006/10/02 16:38:39  jgrosseo
+update (alberto):
+fixed memory leaks
+storing of objects that failed to be stored to the grid before
+interfacing of shuttle status table in daq system
+
+Revision 1.8  2006/08/15 10:50:00  jgrosseo
+effc++ corrections (alberto)
+
+Revision 1.7  2006/07/20 09:54:40  jgrosseo
+introducing status management: The processing per subdetector is divided into several steps,
+after each step the status is stored on disk. If the system crashes in any of the steps the Shuttle
+can keep track of the number of failures and skips further processing after a certain threshold is
+exceeded. These thresholds can be configured in LDAP.
+
+Revision 1.6  2006/07/19 10:09:55  jgrosseo
+new configuration, accesst to DAQ FES (Alberto)
+
 Revision 1.5  2006/07/10 13:01:41  jgrosseo
 enhanced storing of last sucessfully processed run (alberto)
 
@@ -75,275 +167,456 @@ some docs added
 #include <TLDAPAttribute.h>
 
 
-AliShuttleConfig::AliShuttleConfigHolder::AliShuttleConfigHolder(const TLDAPEntry* entry):
-fDetector(""),
+AliShuttleConfig::AliShuttleDCSConfigHolder::AliShuttleDCSConfigHolder(const TLDAPEntry* entry):
 fDCSHost(""),
 fDCSPort(0),
-fDCSAliases(),
-fIsValid(kFALSE),
-fSkipDCSQuery(kFALSE)
+fMultiSplit(100),
+fDCSAliases(0),
+fDCSDataPoints(0),
+fDCSAliasesComp(0),
+fDCSDataPointsComp(0),
+fIsValid(kFALSE)
 {
-// constructor of the shuttle configuration holder
+// constructor of the shuttle DCS configuration holder
 
        TLDAPAttribute* anAttribute;
+       fDCSAliases = new TObjArray();
+       fDCSAliases->SetOwner(1);
+       fDCSDataPoints = new TObjArray();
+       fDCSDataPoints->SetOwner(1);
+       fDCSAliasesComp = new TObjArray();
+       fDCSAliasesComp->SetOwner(1);
+       fDCSDataPointsComp = new TObjArray();
+       fDCSDataPointsComp->SetOwner(1);
 
-       anAttribute = entry->GetAttribute("det"); // MUST
-       fDetector = anAttribute->GetValue();
-
-       anAttribute = entry->GetAttribute("DCSHost"); // MAY
-       if (!anAttribute) {
-               AliWarning(
-                       Form("%s has not DCS host entry - Shuttle will skip DCS data query!",
-                               fDetector.Data()));
-               fIsValid = kTRUE;
-               fSkipDCSQuery = kTRUE;
+       
+       anAttribute = entry->GetAttribute("dcsHost"); 
+       if (!anAttribute)
+       {
+               AliError("Unexpected: no DCS host!");
                return;
        }
 
        fDCSHost = anAttribute->GetValue();
 
-       anAttribute = entry->GetAttribute("DCSPort"); // MAY
-        if (!anAttribute) {
-               AliError(Form("Invalid configuration! %s has DCS Host but no port number!",
-                               fDetector.Data()));
+       anAttribute = entry->GetAttribute("dcsPort");
+        if (!anAttribute)
+       {
+               AliError("Unexpected: no DCS port!");
                return;
         }
        TString portStr = anAttribute->GetValue();
        fDCSPort = portStr.Atoi();
 
-       anAttribute = entry->GetAttribute("DCSAlias"); // MAY
-        if (!anAttribute) {
-               AliError(Form("Invalid configuration! %s has DCS host settings but no DCSAlias entries!",
-                               fDetector.Data()));
-               return;
+       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;
+               while ((anAlias = anAttribute->GetValue()))
+               {
+                       fDCSAliasesComp->AddLast(new TObjString(anAlias));
+                       ExpandAndAdd(fDCSAliases, anAlias);
+               }
        }
 
-       const char* anAlias;
-       while ((anAlias = anAttribute->GetValue())) {
-               fDCSAliases.AddLast(new TObjString(anAlias));
+       anAttribute = entry->GetAttribute("dcsDP"); // MAY
+        if (anAttribute)
+       {
+               const char* aDataPoint;
+               while ((aDataPoint = anAttribute->GetValue()))
+               {
+               fDCSDataPointsComp->AddLast(new TObjString(aDataPoint));
+               ExpandAndAdd(fDCSDataPoints, aDataPoint);
+               }
        }
 
        fIsValid = kTRUE;
-
-
 }
 
 //______________________________________________________________________________________________
-AliShuttleConfig::AliShuttleConfigHolder::~AliShuttleConfigHolder()
+void AliShuttleConfig::AliShuttleDCSConfigHolder::ExpandAndAdd(TObjArray* target, const char* entry)
 {
-// destructor of the shuttle configuration holder
+       //
+       // adds <entry> to <target> applying expanding of the name
+       // [N..M] creates M-N+1 names with the corresponding digits
+       //
 
-       fDCSAliases.Delete();
-}
+       TString entryStr(entry);
 
-ClassImp(AliShuttleConfig)
+       Int_t begin = entryStr.Index("[");
+       Int_t end = entryStr.Index("]");
+       if (begin != -1 && end != -1 && end > begin)
+       {
+               TString before(entryStr(0, begin));
+               TString after(entryStr(end+1, entryStr.Length()));
 
-//______________________________________________________________________________________________
-AliShuttleConfig::AliShuttleConfig(const char* host, Int_t port,
-       const char* binddn, const char* password, const char* basedn):
-       fIsValid(kFALSE),
-       fProcessAll(kFALSE)
-{
-       //
-       // host: ldap server host
-       // port: ldap server 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.
-       //
+               AliDebug(2, Form("Found [] pattern. Splitted input string %s %s", before.Data(), after.Data()));
 
-       TLDAPServer aServer(host, port, binddn, password, 3);
+               Int_t dotdot = entryStr.Index("..");
 
-       if (!aServer.IsConnected()) {
-               AliError(Form("Can't connect to ldap server %s:%d", 
-                               host, port));
-               return;
-       }
+               TString nStr(entryStr(begin+1, dotdot-begin-1));
+               TString mStr(entryStr(dotdot+2, end-dotdot-2));
 
-       // reads configuration for the shuttle running on this machine
-       
-       fShuttleInstanceHost = gSystem->HostName();
-       TString queryFilter = "(ShuttleHost=";
-       queryFilter += fShuttleInstanceHost;
-       queryFilter += ")";     
-       
-       TLDAPResult* aResult = aServer.Search(basedn, LDAP_SCOPE_ONELEVEL,
-                       queryFilter.Data());
+               AliDebug(2, Form("Found [N..M] pattern. %s %s", nStr.Data(), mStr.Data()));
 
-       if (!aResult) {
-               AliError(Form("Can't find configuration with base DN: %s",
-                               basedn));
-               return;
-       }
+               if (nStr.IsDigit() && mStr.IsDigit())
+               {
+                       Int_t n = nStr.Atoi();
+                       Int_t m = mStr.Atoi();
 
-       if (aResult->GetCount() == 0) {
-               AliError(Form("No Shuttle instance for host = %s!",
-                                       fShuttleInstanceHost.Data()));
-               AliError(Form("All detectors will be processed."));
-               fProcessAll=kTRUE;
-       }
+                       Int_t nDigits = nStr.Length();
+                       TString formatStr;
+                       formatStr.Form("%%s%%0%dd%%s", nDigits);
 
-       if (aResult->GetCount() > 1) {
-               AliError(Form("More than one Shuttle instance for host %s!",
-                                       fShuttleInstanceHost.Data()));
-               return;
-       }
+                       AliDebug(2, Form("Format string is %s", formatStr.Data()));
 
-       TLDAPEntry* anEntry;
-       TLDAPAttribute* anAttribute;
+                       for (Int_t current = n; current<=m; ++current)
+                       {
+                               TString newEntry;
+                               newEntry.Form(formatStr.Data(), before.Data(), current, after.Data());
+
+                               AliDebug(2, Form("Calling recursive with %s", newEntry.Data()));
+
+                               // and go recursive
+                               ExpandAndAdd(target, newEntry);
+                       }
 
-       if(!fProcessAll){
-               anEntry = aResult->GetNext();
-               anAttribute = anEntry->GetAttribute("detectors");
-               const char *detName;
-               while((detName = anAttribute->GetValue())){
-                       TObjString *objDet= new TObjString(detName);
-                       fProcessedDetectors.Add(objDet);
+                       // return here because we processed the entries already recursively.
+                       return;
                }
        }
 
-       // Detector configuration (DCS Archive DB settings)
+       AliDebug(2, Form("Adding name %s", entry));
+       target->AddLast(new TObjString(entry));
+}
 
-       aResult = aServer.Search(basedn, LDAP_SCOPE_ONELEVEL,
-                       "(objectClass=AliShuttleDetector)");
-       if (!aResult) {
-               AliError(Form("Can't find configuration with base DN: %s",
-                               basedn));
-               return;
-       }
+//______________________________________________________________________________________________
+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);
 
-       while ((anEntry = aResult->GetNext())) {
-               AliShuttleConfigHolder* aHolder = new AliShuttleConfigHolder(anEntry);
-               delete anEntry;
+       anAttribute = entry->GetAttribute("det"); // MUST
+        if (!anAttribute)
+       {
+               AliError(Form("No \"det\" attribute!"));
+               return;
+        }
+       fDetector = anAttribute->GetValue();
 
-               if (!aHolder->IsValid()) {
-                       AliError("Detector configuration error!");
-                       delete aHolder;
+       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();
+       }
 
-               TObjString* detStr = new TObjString(aHolder->GetDetector());
-               fDetectorMap.Add(detStr, aHolder);
-               fDetectorList.AddLast(detStr);
+       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));
+               }
        }
 
-       delete aResult;
+       fIsValid = kTRUE;
+}
 
-       // Global configuration (DAQ logbook)
+//______________________________________________________________________________________________
+AliShuttleConfig::AliShuttleDetConfigHolder::~AliShuttleDetConfigHolder()
+{
+// destructor of the shuttle configuration holder
 
-       aResult = aServer.Search(basedn, LDAP_SCOPE_ONELEVEL,
-                       "(objectClass=AliShuttleGlobalConfig)");
-       if (!aResult) {
-               AliError(Form("Can't find configuration with base DN: %s",
-                               basedn));
-               return;
-       }
+       delete fResponsibles;
+       delete fDCSConfig;
+}
 
-       if (aResult->GetCount() == 0) {
-               AliError("Can't find DAQ logbook configuration!");
-               return;
-       }
+//______________________________________________________________________________________________
+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();
+}
 
-       if (aResult->GetCount() > 1) {
-               AliError("More than one DAQ logbook configuration found!");
-               return;
-       }
+//______________________________________________________________________________________________
+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();
+}
 
-       anEntry = aResult->GetNext();
+//______________________________________________________________________________________________
+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();
+}
 
-       anAttribute = anEntry->GetAttribute("DAQLogbookHost");
-       if (!anAttribute) {
-               AliError("Can't find DAQLogbookHost attribute!");
-               return;
-       }
-       fDAQlbHost = anAttribute->GetValue();
+//______________________________________________________________________________________________
+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();
+}
 
-       anAttribute = anEntry->GetAttribute("DAQLogbookUser");
-       if (!anAttribute) {
-               AliError("Can't find DAQLogbookUser attribute!");
-               return;
-       }
-       fDAQlbUser = anAttribute->GetValue();
+//______________________________________________________________________________________________
+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
+       //
 
-       anAttribute = anEntry->GetAttribute("DAQLogbookPassword");
-       if (!anAttribute) {
-               AliError("Can't find DAQLogbookPassword attribute!");
-               return;
-       }
-       fDAQlbPass = anAttribute->GetValue();
+       if (iServ < 0 || iServ >= GetNServers()) return 0;
 
-       delete anEntry;
-       delete aResult;
+       AliShuttleDCSConfigHolder *aHolder = dynamic_cast<AliShuttleDCSConfigHolder *> 
+                                                       (fDCSConfig->At(iServ));
+       
+       return aHolder->GetDCSDataPoints();
+}
 
-       // FES configuration (FES logbook and hosts)
+//______________________________________________________________________________________________
+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;
 
-       for(int iSys=0;iSys<3;iSys++){
-               queryFilter = Form("(system=%s)", AliShuttleInterface::fkSystemNames[iSys]);
-               aResult = aServer.Search(basedn, LDAP_SCOPE_ONELEVEL, queryFilter.Data());
-               if (!aResult) {
-                       AliError(Form("Can't find configuration for system: %s",
-                                       AliShuttleInterface::fkSystemNames[iSys]));
-                       return;
-               }
+       AliShuttleDCSConfigHolder *aHolder = dynamic_cast<AliShuttleDCSConfigHolder *> 
+                                                       (fDCSConfig->At(iServ));
+       
+       return aHolder->GetCompactDCSAliases();
+}
 
-               if (aResult->GetCount() != 1 ) {
-                       AliError("Error in FES configuration!");
-                       return;
-               }
+//______________________________________________________________________________________________
+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)
+       //
 
-               anEntry = aResult->GetNext();
+       if (iServ < 0 || iServ >= GetNServers()) return 0;
 
-               anAttribute = anEntry->GetAttribute("LogbookHost");
-               if (!anAttribute) {
-                       AliError(Form ("Can't find LogbookHost attribute for %s!!",
-                                               AliShuttleInterface::fkSystemNames[iSys]));
-                       return;
-               }
-               fFESlbHost[iSys] = anAttribute->GetValue();
+       AliShuttleDCSConfigHolder *aHolder = dynamic_cast<AliShuttleDCSConfigHolder *> 
+                                                       (fDCSConfig->At(iServ));
+       
+       return aHolder->GetCompactDCSDataPoints();
+}
 
-               anAttribute = anEntry->GetAttribute("LogbookUser");
-               if (!anAttribute) {
-                       AliError(Form ("Can't find LogbookUser attribute for %s!!",
-                                               AliShuttleInterface::fkSystemNames[iSys]));
-                       return;
-               }
-               fFESlbUser[iSys] = anAttribute->GetValue();
+//______________________________________________________________________________________________
+void AliShuttleConfig::AliShuttleDetConfigHolder::AddDCSConfig(AliShuttleDCSConfigHolder* holder)
+{
+       //
+       // adds a DCS configuration set in the array of DCS configurations
+       // 
+       
+       if(!holder) return;
+       fDCSConfig->AddLast(holder);
+}
 
-               anAttribute = anEntry->GetAttribute("LogbookPassword");
-               if (!anAttribute) {
-                       AliError(Form ("Can't find LogbookPassword attribute for %s!!",
-                                               AliShuttleInterface::fkSystemNames[iSys]));
-                       return;
-               }
-               fFESlbPass[iSys] = anAttribute->GetValue();
+ClassImp(AliShuttleConfig)
 
-               anAttribute = anEntry->GetAttribute("FSHost");
-               if (!anAttribute) {
-                       AliError(Form ("Can't find FSHost attribute for %s!!",
-                                               AliShuttleInterface::fkSystemNames[iSys]));
-                       return;
-               }
-               fFESHost[iSys] = anAttribute->GetValue();
+//______________________________________________________________________________________________
+AliShuttleConfig::AliShuttleConfig(const char* host, Int_t port,
+       const char* binddn, const char* password, const char* basedn):
+       fConfigHost(host), 
+       fDAQlbHost(""), 
+       fDAQlbPort(), 
+       fDAQlbUser(""), 
+       fDAQlbPass(""),
+       fDAQlbDB(""), 
+       fDAQlbTable(""), 
+       fShuttlelbTable(""), 
+       fRunTypelbTable(""),
+       fMaxRetries(0), 
+       fPPTimeOut(0), 
+       fPPMaxMem(0), 
+       fMonitorHost(""), 
+       fMonitorTable(""), 
+       fDetectorMap(), 
+       fDetectorList(),
+       fShuttleInstanceHost(""), 
+       fProcessedDetectors(), 
+       fProcessAll(kFALSE), 
+       fIsValid(kFALSE)
+{
+       //
+       // host: ldap server host
+       // port: ldap server port
+       // binddn: binddn used for ldap binding (simple bind is used!).
+       // password: password for binddn
+       // basedn: this is basedn whose childeren entries which have
+       //
 
-               anAttribute = anEntry->GetAttribute("FSUser");
-               if (!anAttribute) {
-                       AliError(Form ("Can't find FSUser attribute for %s!!",
-                                               AliShuttleInterface::fkSystemNames[iSys]));
-                       return;
-               }
-               fFESUser[iSys] = anAttribute->GetValue();
+       fDetectorMap.SetOwner(1);
+       fDetectorList.SetOwner(0); //fDetectorList and fDetectorMap share the same object!
+       fProcessedDetectors.SetOwner();
 
-               anAttribute = anEntry->GetAttribute("FSPassword");
-               if (anAttribute) fFESPass[iSys] = anAttribute->GetValue();
+       TLDAPServer aServer(host, port, binddn, password, 3);
 
-               delete anEntry;
-               delete aResult;
+       if (!aServer.IsConnected()) {
+               AliError(Form("Can't connect to ldap server %s:%d",
+                               host, port));
+               return;
        }
 
-       fIsValid = kTRUE;
+       // reads configuration for the shuttle running on this machine
+       
+       TLDAPResult* aResult = 0;
+       TLDAPEntry* anEntry = 0;
+       
+       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())) 
+       {
+               TString dn = anEntry->GetDn();
+               
+               if (dn.BeginsWith("dcsHost=")) 
+               {
+                       dcsList.Add(anEntry);
+               } 
+               else if (dn.BeginsWith("det="))
+               {
+                       detList.Add(anEntry);
+               }
+               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 += SetDetConfig(&detList,&dcsList);
+       result += SetHostConfig(&hostList);
+       
+       if(result) 
+       {
+               AliError("Configuration is INVALID!");
+       }
+       else 
+       {
+               fIsValid = kTRUE;
+       }
 }
 
 //______________________________________________________________________________________________
@@ -352,6 +625,8 @@ AliShuttleConfig::~AliShuttleConfig()
 // destructor
 
        fDetectorMap.DeleteAll();
+       fDetectorList.Clear();
+       fProcessedDetectors.Delete();
 }
 
 //______________________________________________________________________________________________
@@ -375,56 +650,164 @@ Bool_t AliShuttleConfig::HasDetector(const char* detector) const
 }
 
 //______________________________________________________________________________________________
-const char* AliShuttleConfig::GetDCSHost(const char* detector) const
+Int_t AliShuttleConfig::GetNServers(const char* detector) const
 {
        //
-       // returns DCS server host used by particular detector
+       // returns number of DCS servers for detector
        //
        
-       AliShuttleConfigHolder* aHolder = (AliShuttleConfigHolder*) fDetectorMap.GetValue(detector);
+       AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
+       if (!aHolder) {
+               AliError(Form("There isn't configuration for detector: %s",
+                       detector));
+               return 0;
+       }
+
+       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;
        }
 
-       return aHolder->GetDCSHost();
+       return aHolder->GetDCSHost(iServ);
 }
 
 //______________________________________________________________________________________________
-Int_t AliShuttleConfig::GetDCSPort(const char* detector) const
+Int_t AliShuttleConfig::GetDCSPort(const char* detector, Int_t iServ) const
 {
        //
-        // returns DCS server port used by particular detector
+        // returns i-th DCS server port used by particular detector
         //
 
 
-       AliShuttleConfigHolder* aHolder = (AliShuttleConfigHolder*) fDetectorMap.GetValue(detector);
+       AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
         if (!aHolder) {
                 AliError(Form("There isn't configuration for detector: %s",
                         detector));
                 return 0;
         }
 
-       return aHolder->GetDCSPort();
+       return aHolder->GetDCSPort(iServ);
 }
 
 //______________________________________________________________________________________________
-const TObjArray* AliShuttleConfig::GetDCSAliases(const char* detector) const
+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
        //
 
-       AliShuttleConfigHolder* aHolder = (AliShuttleConfigHolder*) fDetectorMap.GetValue(detector);
+       AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
         if (!aHolder) {
                 AliError(Form("There isn't configuration for detector: %s",
                         detector));
                 return NULL;
         }
 
-       return aHolder->GetDCSAliases();
+       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();
 }
 
 //______________________________________________________________________________________________
@@ -442,17 +825,369 @@ Bool_t AliShuttleConfig::HostProcessDetector(const char* detector) const
 }
 
 //______________________________________________________________________________________________
-void AliShuttleConfig::Print(Option_t* /*option*/) const
+Bool_t AliShuttleConfig::StrictRunOrder(const char* detector) const
 {
-// print configuration
+       // 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)
+
+       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("daqLbHost");
+       if (!anAttribute) {
+               AliError("Can't find daqLbHost attribute!");
+               return 4;
+       }
+       fDAQlbHost = anAttribute->GetValue();
+
+       anAttribute = anEntry->GetAttribute("daqLbPort"); // MAY
+       if (anAttribute)
+       {
+               fDAQlbPort = ((TString) anAttribute->GetValue()).Atoi();
+       } else {
+               fDAQlbPort = 3306; // mysql
+       }
+
+       anAttribute = anEntry->GetAttribute("daqLbUser");
+       if (!anAttribute) {
+               AliError("Can't find daqLbUser attribute!");
+               return 4;
+       }
+       fDAQlbUser = anAttribute->GetValue();
+
+       anAttribute = anEntry->GetAttribute("daqLbPasswd");
+       if (!anAttribute) {
+               AliError("Can't find daqLbPasswd attribute!");
+               return 4;
+       }
+       fDAQlbPass = anAttribute->GetValue();
+
+       anAttribute = anEntry->GetAttribute("daqLbDB");
+       if (!anAttribute) {
+               AliError("Can't find daqLbDB attribute!");
+               return 4;
+       }
+       fDAQlbDB = anAttribute->GetValue();
+
+       anAttribute = anEntry->GetAttribute("daqLbTable");
+       if (!anAttribute) {
+               AliError("Can't find daqLbTable attribute!");
+               return 4;
+       }
+       fDAQlbTable = anAttribute->GetValue();
+
+       anAttribute = anEntry->GetAttribute("shuttleLbTable");
+       if (!anAttribute) {
+               AliError("Can't find shuttleLbTable attribute!");
+               return 4;
+       }
+       fShuttlelbTable = anAttribute->GetValue();
+
+       anAttribute = anEntry->GetAttribute("runTypeLbTable");
+       if (!anAttribute) {
+               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("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();
+       
+       return 0;
+       
+       
+}
+
+//______________________________________________________________________________________________
+UInt_t AliShuttleConfig::SetSysConfig(TList* list)
+{
+       // Set the online FXS configuration (DAQ + DCS + HLT)
+       
+       TLDAPEntry* anEntry = 0;
+       TLDAPAttribute* anAttribute = 0;
+       
+       if (list->GetEntries() != 3) 
+       {
+               AliError(Form("Wrong number of online systems found: %d !", list->GetEntries()));
+               return 1;
+       } 
+
+       TIter iter(list);
+       Int_t iSys=0, count = 0;
+       while ((anEntry = dynamic_cast<TLDAPEntry*> (iter.Next())))
+       {
+               anAttribute = anEntry->GetAttribute("system");
+               TString sysName = anAttribute->GetValue();
+               
+               if (sysName == "DAQ") 
+               {
+                       iSys = 0;
+                       count += 1;
+               }
+               else if (sysName == "DCS")
+               {
+                       iSys = 1;
+                       count += 10;
+               }
+               else if (sysName == "HLT")
+               {
+                       iSys = 2;
+                       count += 100;
+               }
+               
+               anAttribute = anEntry->GetAttribute("dbHost");
+               if (!anAttribute) {
+                       AliError(Form ("Can't find dbHost attribute for %s!!",
+                                               AliShuttleInterface::GetSystemName(iSys)));
+                       return 5;
+               }
+               fFXSdbHost[iSys] = anAttribute->GetValue();
+
+               anAttribute = anEntry->GetAttribute("dbPort"); // MAY
+               if (anAttribute)
+               {
+                       fFXSdbPort[iSys] = ((TString) anAttribute->GetValue()).Atoi();
+               } else {
+                       fFXSdbPort[iSys] = 3306; // mysql
+               }
+
+               anAttribute = anEntry->GetAttribute("dbUser");
+               if (!anAttribute) {
+                       AliError(Form ("Can't find dbUser attribute for %s!!",
+                                               AliShuttleInterface::GetSystemName(iSys)));
+                       return 5;
+               }
+               fFXSdbUser[iSys] = anAttribute->GetValue();
+
+               anAttribute = anEntry->GetAttribute("dbPasswd");
+               if (!anAttribute) {
+                       AliError(Form ("Can't find dbPasswd attribute for %s!!",
+                                               AliShuttleInterface::GetSystemName(iSys)));
+                       return 5;
+               }
+               fFXSdbPass[iSys] = anAttribute->GetValue();
+
+               anAttribute = anEntry->GetAttribute("dbName");
+               if (!anAttribute) {
+                       AliError(Form ("Can't find dbName attribute for %s!!",
+                                               AliShuttleInterface::GetSystemName(iSys)));
+                       return 5;
+               }
+
+               fFXSdbName[iSys] = anAttribute->GetValue();
+               anAttribute = anEntry->GetAttribute("dbTable");
+               if (!anAttribute) {
+                       AliError(Form ("Can't find dbTable attribute for %s!!",
+                                               AliShuttleInterface::GetSystemName(iSys)));
+                       return 5;
+               }
+               fFXSdbTable[iSys] = anAttribute->GetValue();
+
+               anAttribute = anEntry->GetAttribute("fxsHost");
+               if (!anAttribute) {
+                       AliError(Form ("Can't find fxsHost attribute for %s!!",
+                                               AliShuttleInterface::GetSystemName(iSys)));
+                       return 5;
+               }
+               fFXSHost[iSys] = anAttribute->GetValue();
+
+               anAttribute = anEntry->GetAttribute("fxsPort"); // MAY
+               if (anAttribute)
+               {
+                       fFXSPort[iSys] = ((TString) anAttribute->GetValue()).Atoi();
+               } else {
+                       fFXSPort[iSys] = 22; // scp port number
+               }
+
+               anAttribute = anEntry->GetAttribute("fxsUser");
+               if (!anAttribute) {
+                       AliError(Form ("Can't find fxsUser attribute for %s!!",
+                                               AliShuttleInterface::GetSystemName(iSys)));
+                       return 5;
+               }
+               fFXSUser[iSys] = anAttribute->GetValue();
+
+               anAttribute = anEntry->GetAttribute("fxsPasswd");
+               if (anAttribute) fFXSPass[iSys] = anAttribute->GetValue();
+       }
+       
+       if(count != 111) {
+               AliError(Form("Wrong system configuration! (code = %d)", count));
+               return 6;
+       }
+       
+       return 0;
+}
+
+//______________________________________________________________________________________________
+UInt_t AliShuttleConfig::SetDetConfig(TList* detList, TList* dcsList)
+{
+       // Set the detector configuration (general settings + DCS amanda server and alias/DP lists)
+
+       TLDAPEntry* anEntry = 0;
+       
+       TIter iter(detList);
+       while ((anEntry = dynamic_cast<TLDAPEntry*> (iter.Next())))
+       {
+               
+               AliShuttleDetConfigHolder* detHolder = new AliShuttleDetConfigHolder(anEntry);
+
+               if (!detHolder->IsValid()) {
+                       AliError("Detector configuration error!");
+                       delete detHolder;
+                       return 7;
+               }
+
+               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 0;
+}
+
+//______________________________________________________________________________________________
+UInt_t AliShuttleConfig::SetHostConfig(TList* list)
+{
+       // 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())))
+       {
+       
+               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
+{
+// print configuration
+// options : "": print configuration for all detectors, aliases and DPs in compacted format
+//          "uncompact": print configuration for all detectors, aliases and DPs in uncompacted format
+//          "DET": print configuration for DET, aliases and DPs in compacted format
+//          "DET, uncompact": print configuration for DET, aliases and DPs in uncompacted format
+
        TString result;
        result += '\n';
 
-       result += Form("\nShuttle running on %s \n\n", fShuttleInstanceHost.Data());
+       result += "####################################################\n";
+       result += Form(" Shuttle configuration from %s \n", fConfigHost.Data());
+       result += "####################################################\n";
+       result += Form("\nShuttle running on %s \n", fShuttleInstanceHost.Data());
 
        if(fProcessAll) {
-               result += Form("All detectors will be processed! \n\n");
+               result += Form("All detectors will be processed! \n");
        } else {
                result += "Detectors processed by this host: ";
                TIter it(&fProcessedDetectors);
@@ -460,45 +1195,127 @@ void AliShuttleConfig::Print(Option_t* /*option*/) const
                while ((aDet = (TObjString*) it.Next())) {
                        result += Form("%s ", aDet->String().Data());
                }
-               result += "\n\n";
+               result += "\n";
        }
 
-       result += Form("DAQ Logbook Configuration \n \tHost: %s - User: %s - ",
-               fDAQlbHost.Data(), fDAQlbUser.Data());
+       result += Form("PP time out = %d - max PP mem size = %d KB - max retries = %d\n\n", 
+                               fPPTimeOut, fPPMaxMem, fMaxRetries);
+       result += "------------------------------------------------------\n";
+
+       result += Form("Logbook Configuration \n\n \tHost: %s:%d; \tUser: %s; ",
+               fDAQlbHost.Data(), fDAQlbPort, fDAQlbUser.Data());
+
+//     result += "Password: ";
+//     result.Append('*', fDAQlbPass.Length());
+       result += Form("\tDB: %s; \tTables: %s, %s, %s\n",
+               fDAQlbDB.Data(), fDAQlbTable.Data(), fShuttlelbTable.Data(), fRunTypelbTable.Data());
 
-       result += "Password: ";
-       result.Append('*', fDAQlbPass.Length());
        result += "\n\n";
 
+       result += "------------------------------------------------------\n";
+       result += "FXS configuration\n\n";
+
        for(int iSys=0;iSys<3;iSys++){
-               result += Form("FES Configuration for %s system\n", AliShuttleInterface::fkSystemNames[iSys]);
-               result += Form("\tLogbook host: \t%s - \tUser: %s\n",
-                                               fFESlbHost[iSys].Data(), fFESlbUser[iSys].Data());
-               // result += Form("Logbook Password:",fFESlbPass[iSys].Data());
-               result += Form("\tFES host: \t%s - \tUser: %s\n\n", fFESHost[iSys].Data(), fFESUser[iSys].Data());
-               // result += Form("FES Password:",fFESPass[iSys].Data());
+               result += Form("*** %s ***\n", AliShuttleInterface::GetSystemName(iSys));
+               result += Form("\tDB  host: %s:%d; \tUser: %s; \tName: %s; \tTable: %s\n",
+                                               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],
+                                               fFXSUser[iSys].Data());
+               // result += Form("FXS Password:",fFXSPass[iSys].Data());
        }
 
+       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(aHolder->SkipDCSQuery()) continue;
-               result += Form("DCS archive DB configuration for *** %s *** \n", aHolder->GetDetector());
-               result += Form("\tAmanda server: %s:%d \n", aHolder->GetDCSHost(), aHolder->GetDCSPort());
-
-               result += "\tDCS Aliases: ";
-               const TObjArray* aliases = aHolder->GetDCSAliases();
-               TIter it(aliases);
-               TObjString* anAlias;
-               while ((anAlias = (TObjString*) it.Next())) {
-                       result += Form("%s ", anAlias->String().Data());
+               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();
+               if (responsibles->GetEntries() != 0)
+               {
+                       result += "\tDetector responsible(s): ";
+                       TIter it(responsibles);
+                       TObjString* aResponsible;
+                       while ((aResponsible = (TObjString*) it.Next()))
+                       {
+                               result += Form("%s ", aResponsible->String().Data());
+                       }
+                       result += "\n";
                }
 
-               result += "\n\n";
-
+               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 += 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 = dcsHolder->GetDCSAliases();
+                       } else {
+                               aliases = dcsHolder->GetCompactDCSAliases();
+                       }
+
+                       if (aliases->GetEntries() != 0)
+                       {
+                               result += Form("\tDCS Aliases [%d]: ", count);
+                               TIter it(aliases);
+                               TObjString* anAlias;
+                               while ((anAlias = (TObjString*) it.Next()))
+                               {
+                                       result += Form("%s ", anAlias->String().Data());
+                               }
+                               result += "\n";
+                       }
+
+                       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";
+               }
        }
-
        if(!fIsValid) result += "\n\n********** !!!!! Configuration is INVALID !!!!! **********\n";
 
        AliInfo(result);