1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
18 Revision 1.18 2007/01/23 19:20:03 acolla
19 Removed old ldif files, added TOF, MCH ldif files. Added some options in
20 AliShuttleConfig::Print. Added in Ali Shuttle: SetShuttleTempDir and
23 Revision 1.17 2007/01/18 11:17:47 jgrosseo
24 changing spaces to tabs ;-)
26 Revision 1.16 2007/01/18 11:10:35 jgrosseo
27 adding the possibility of defining DCS alias and data points with patterns
28 first pattern introduced: [N..M] to add all names between the two digits, this works also recursively.
30 Revision 1.15 2007/01/15 18:27:11 acolla
31 implementation of sending mail to subdetector expert in case the preprocessor fails.
32 shuttle.schema updated with expert's email entry
34 Revision 1.13 2006/12/07 08:51:26 jgrosseo
36 table, db names in ldap configuration
37 added GRP preprocessor
38 DCS data can also be retrieved by data point
40 Revision 1.12 2006/11/16 16:16:48 jgrosseo
41 introducing strict run ordering flag
42 removed giving preprocessor name to preprocessor, they have to know their name themselves ;-)
44 Revision 1.11 2006/11/06 14:23:04 jgrosseo
45 major update (Alberto)
46 o) reading of run parameters from the logbook
47 o) online offline naming conversion
48 o) standalone DCSclient package
50 Revision 1.10 2006/10/20 15:22:59 jgrosseo
51 o) Adding time out to the execution of the preprocessors: The Shuttle forks and the parent process monitors the child
52 o) Merging Collect, CollectAll, CollectNew function
53 o) Removing implementation of empty copy constructors (declaration still there!)
55 Revision 1.9 2006/10/02 16:38:39 jgrosseo
58 storing of objects that failed to be stored to the grid before
59 interfacing of shuttle status table in daq system
61 Revision 1.8 2006/08/15 10:50:00 jgrosseo
62 effc++ corrections (alberto)
64 Revision 1.7 2006/07/20 09:54:40 jgrosseo
65 introducing status management: The processing per subdetector is divided into several steps,
66 after each step the status is stored on disk. If the system crashes in any of the steps the Shuttle
67 can keep track of the number of failures and skips further processing after a certain threshold is
68 exceeded. These thresholds can be configured in LDAP.
70 Revision 1.6 2006/07/19 10:09:55 jgrosseo
71 new configuration, accesst to DAQ FES (Alberto)
73 Revision 1.5 2006/07/10 13:01:41 jgrosseo
74 enhanced storing of last sucessfully processed run (alberto)
76 Revision 1.4 2006/06/12 09:11:16 jgrosseo
77 coding conventions (Alberto)
79 Revision 1.3 2006/06/06 14:26:40 jgrosseo
80 o) removed files that were moved to STEER
81 o) shuttle updated to follow the new interface (Alberto)
83 Revision 1.7 2006/05/12 09:07:16 colla
85 New configuration complete
87 Revision 1.2 2006/03/07 07:52:34 hristov
88 New version (B.Yordanov)
90 Revision 1.4 2005/11/19 14:20:31 byordano
91 logbook config added to AliShuttleConfig
93 Revision 1.3 2005/11/17 19:24:25 byordano
94 TList changed to TObjArray in AliShuttleConfig
96 Revision 1.2 2005/11/17 14:43:23 byordano
99 Revision 1.1.1.1 2005/10/28 07:33:58 hristov
100 Initial import as subdirectory in AliRoot
102 Revision 1.1.1.1 2005/09/12 22:11:40 byordano
105 Revision 1.3 2005/08/30 09:13:02 byordano
112 // This class keeps the AliShuttle configuration.
113 // It reads the configuration for LDAP server.
114 // For every child entry in basedn which has schema type 'shuttleConfig'
115 // it creates a detector configuration. This configuration includes:
116 // DCS server host and port and the set of aliases for which data from
117 // will be retrieved (used by AliShuttle).
121 #include "AliShuttleConfig.h"
122 #include "AliShuttleInterface.h"
127 #include <TObjString.h>
128 #include <TLDAPResult.h>
129 #include <TLDAPEntry.h>
130 #include <TLDAPAttribute.h>
133 AliShuttleConfig::AliShuttleConfigHolder::AliShuttleConfigHolder(const TLDAPEntry* entry):
140 fDCSDataPointsComp(0),
143 fSkipDCSQuery(kFALSE),
144 fStrictRunOrder(kFALSE)
146 // constructor of the shuttle configuration holder
148 TLDAPAttribute* anAttribute;
149 fDCSAliases = new TObjArray();
150 fDCSAliases->SetOwner(1);
151 fDCSDataPoints = new TObjArray();
152 fDCSDataPoints->SetOwner(1);
153 fDCSAliasesComp = new TObjArray();
154 fDCSAliasesComp->SetOwner(1);
155 fDCSDataPointsComp = new TObjArray();
156 fDCSDataPointsComp->SetOwner(1);
157 fResponsibles = new TObjArray();
158 fResponsibles->SetOwner(1);
160 anAttribute = entry->GetAttribute("det"); // MUST
163 AliError(Form("Invalid configuration! No \"det\" attribute!"));
166 fDetector = anAttribute->GetValue();
168 anAttribute = entry->GetAttribute("StrictRunOrder"); // MAY
171 AliWarning(Form("%s did not set StrictRunOrder flag - the default is FALSE",
174 TString strictRunStr = anAttribute->GetValue();
175 if (!(strictRunStr == "0" || strictRunStr == "1"))
177 AliError("Invalid configuration! StrictRunOrder flag must be 0 or 1!");
180 fStrictRunOrder = (Bool_t) strictRunStr.Atoi();
183 anAttribute = entry->GetAttribute("responsible"); // MUST
186 AliError(Form("Invalid configuration! No \"responsible\" attribute!"));
189 const char* aResponsible;
190 while ((aResponsible = anAttribute->GetValue()))
192 fResponsibles->AddLast(new TObjString(aResponsible));
195 anAttribute = entry->GetAttribute("DCSHost"); // MAY
199 Form("%s has not DCS host entry - Shuttle will skip DCS data query!",
202 fSkipDCSQuery = kTRUE;
206 fDCSHost = anAttribute->GetValue();
208 anAttribute = entry->GetAttribute("DCSPort"); // MAY
211 AliError(Form("Invalid configuration! %s has DCS Host but no port number!",
215 TString portStr = anAttribute->GetValue();
216 fDCSPort = portStr.Atoi();
218 anAttribute = entry->GetAttribute("DCSalias"); // MAY
222 while ((anAlias = anAttribute->GetValue()))
224 fDCSAliasesComp->AddLast(new TObjString(anAlias));
225 ExpandAndAdd(fDCSAliases, anAlias);
229 anAttribute = entry->GetAttribute("DCSdatapoint"); // MAY
232 const char* aDataPoint;
233 while ((aDataPoint = anAttribute->GetValue()))
235 fDCSDataPointsComp->AddLast(new TObjString(aDataPoint));
236 ExpandAndAdd(fDCSDataPoints, aDataPoint);
243 //______________________________________________________________________________________________
244 void AliShuttleConfig::AliShuttleConfigHolder::ExpandAndAdd(TObjArray* target, const char* entry)
247 // adds <entry> to <target> applying expanding of the name
248 // [N..M] creates M-N+1 names with the corresponding digits
251 TString entryStr(entry);
253 Int_t begin = entryStr.Index("[");
254 Int_t end = entryStr.Index("]");
255 if (begin != -1 && end != -1 && end > begin)
257 TString before(entryStr(0, begin));
258 TString after(entryStr(end+1, entryStr.Length()));
260 AliDebug(2, Form("Found [] pattern. Splitted input string %s %s", before.Data(), after.Data()));
262 Int_t dotdot = entryStr.Index("..");
264 TString nStr(entryStr(begin+1, dotdot-begin-1));
265 TString mStr(entryStr(dotdot+2, end-dotdot-2));
267 AliDebug(2, Form("Found [N..M] pattern. %s %s", nStr.Data(), mStr.Data()));
269 if (nStr.IsDigit() && mStr.IsDigit())
271 Int_t n = nStr.Atoi();
272 Int_t m = mStr.Atoi();
274 Int_t nDigits = nStr.Length();
276 formatStr.Form("%%s%%0%dd%%s", nDigits);
278 AliDebug(2, Form("Format string is %s", formatStr.Data()));
280 for (Int_t current = n; current<=m; ++current)
283 newEntry.Form(formatStr.Data(), before.Data(), current, after.Data());
285 AliDebug(2, Form("Calling recursive with %s", newEntry.Data()));
288 ExpandAndAdd(target, newEntry);
291 // return here because we processed the entries already recursively.
296 AliDebug(2, Form("Adding name %s", entry));
297 target->AddLast(new TObjString(entry));
300 //______________________________________________________________________________________________
301 AliShuttleConfig::AliShuttleConfigHolder::~AliShuttleConfigHolder()
303 // destructor of the shuttle configuration holder
306 delete fDCSDataPoints;
307 delete fResponsibles;
310 ClassImp(AliShuttleConfig)
312 //______________________________________________________________________________________________
313 AliShuttleConfig::AliShuttleConfig(const char* host, Int_t port,
314 const char* binddn, const char* password, const char* basedn):
315 fIsValid(kFALSE), fConfigHost(host),
316 fDAQlbHost(""), fDAQlbPort(), fDAQlbUser(""), fDAQlbPass(""),
317 fDAQlbDB(""), fDAQlbTable(""), fShuttlelbTable(""), fRunTypelbTable(""),
318 fMaxRetries(0), fPPTimeOut(0), fDetectorMap(), fDetectorList(),
319 fShuttleInstanceHost(""), fProcessedDetectors(), fProcessAll(kFALSE)
322 // host: ldap server host
323 // port: ldap server port
324 // binddn: binddn used for ldap binding (simple bind is used!).
325 // password: password for binddn
326 // basedn: this is basedn whose childeren entries which have
327 // (objectClass=shuttleConfig) will be used as detector configurations.
330 fDetectorMap.SetOwner();
331 fDetectorList.SetOwner(0); //fDetectorList and fDetectorMap share the same object!
332 fProcessedDetectors.SetOwner();
334 TLDAPServer aServer(host, port, binddn, password, 3);
336 if (!aServer.IsConnected()) {
337 AliError(Form("Can't connect to ldap server %s:%d",
342 // reads configuration for the shuttle running on this machine
344 fShuttleInstanceHost = gSystem->HostName();
345 TString queryFilter = Form("(ShuttleHost=%s)", fShuttleInstanceHost.Data());
347 TLDAPResult* aResult = aServer.Search(basedn, LDAP_SCOPE_ONELEVEL, queryFilter.Data());
350 AliError(Form("Can't find configuration with base DN: %s",
355 if (aResult->GetCount() == 0) {
356 AliError(Form("No Shuttle instance for host = %s!",
357 fShuttleInstanceHost.Data()));
358 AliError(Form("All detectors will be processed."));
362 if (aResult->GetCount() > 1) {
363 AliError(Form("More than one Shuttle instance for host %s!",
364 fShuttleInstanceHost.Data()));
369 TLDAPEntry* anEntry = 0;
370 TLDAPAttribute* anAttribute = 0;
373 anEntry = aResult->GetNext();
374 anAttribute = anEntry->GetAttribute("detectors");
376 while((detName = anAttribute->GetValue())){
377 TObjString *objDet= new TObjString(detName);
378 fProcessedDetectors.Add(objDet);
382 delete anEntry; delete aResult;
384 // Detector configuration (DCS Archive DB settings)
386 aResult = aServer.Search(basedn, LDAP_SCOPE_ONELEVEL, "(objectClass=AliShuttleDetector)");
388 AliError(Form("Can't find configuration with base DN: %s", basedn));
393 while ((anEntry = aResult->GetNext())) {
394 AliShuttleConfigHolder* aHolder = new AliShuttleConfigHolder(anEntry);
397 if (!aHolder->IsValid()) {
398 AliError("Detector configuration error!");
404 TObjString* detStr = new TObjString(aHolder->GetDetector());
405 fDetectorMap.Add(detStr, aHolder);
406 fDetectorList.AddLast(detStr);
411 // Global configuration (DAQ logbook)
413 aResult = aServer.Search(basedn, LDAP_SCOPE_ONELEVEL,
414 "(objectClass=AliShuttleGlobalConfig)");
416 AliError(Form("Can't find configuration with base DN: %s",
421 if (aResult->GetCount() == 0) {
422 AliError("Can't find DAQ logbook configuration!");
427 if (aResult->GetCount() > 1) {
428 AliError("More than one DAQ logbook configuration found!");
433 anEntry = aResult->GetNext();
435 anAttribute = anEntry->GetAttribute("DAQLogbookHost");
437 AliError("Can't find DAQLogbookHost attribute!");
438 delete anEntry; delete aResult;
441 fDAQlbHost = anAttribute->GetValue();
443 anAttribute = anEntry->GetAttribute("DAQLogbookPort"); // MAY
446 fDAQlbPort = ((TString) anAttribute->GetValue()).Atoi();
448 fDAQlbPort = 3306; // mysql
451 anAttribute = anEntry->GetAttribute("DAQLogbookUser");
453 AliError("Can't find DAQLogbookUser attribute!");
454 delete aResult; delete anEntry;
457 fDAQlbUser = anAttribute->GetValue();
459 anAttribute = anEntry->GetAttribute("DAQLogbookPassword");
461 AliError("Can't find DAQLogbookPassword attribute!");
462 delete aResult; delete anEntry;
465 fDAQlbPass = anAttribute->GetValue();
467 anAttribute = anEntry->GetAttribute("DAQLogbookDB");
469 AliError("Can't find DAQLogbookDB attribute!");
470 delete aResult; delete anEntry;
473 fDAQlbDB = anAttribute->GetValue();
475 anAttribute = anEntry->GetAttribute("DAQLogbookTable");
477 AliError("Can't find DAQLogbookTable attribute!");
478 delete aResult; delete anEntry;
481 fDAQlbTable = anAttribute->GetValue();
483 anAttribute = anEntry->GetAttribute("ShuttleLogbookTable");
485 AliError("Can't find ShuttleLogbookTable attribute!");
486 delete aResult; delete anEntry;
489 fShuttlelbTable = anAttribute->GetValue();
491 anAttribute = anEntry->GetAttribute("RunTypeLogbookTable");
493 AliError("Can't find RunTypeLogbookTable attribute!");
494 delete aResult; delete anEntry;
497 fRunTypelbTable = anAttribute->GetValue();
499 anAttribute = anEntry->GetAttribute("MaxRetries");
501 AliError("Can't find MaxRetries attribute!");
502 delete aResult; delete anEntry;
505 TString tmpStr = anAttribute->GetValue();
506 fMaxRetries = tmpStr.Atoi();
508 anAttribute = anEntry->GetAttribute("PPTimeOut");
510 AliError("Can't find PPTimeOut attribute!");
511 delete aResult; delete anEntry;
514 tmpStr = anAttribute->GetValue();
515 fPPTimeOut = tmpStr.Atoi();
517 delete aResult; delete anEntry;
519 // FXS configuration (FXS logbook and hosts)
521 for(int iSys=0;iSys<3;iSys++){
522 queryFilter = Form("(system=%s)", AliShuttleInterface::GetSystemName(iSys));
523 aResult = aServer.Search(basedn, LDAP_SCOPE_ONELEVEL, queryFilter.Data());
525 AliError(Form("Can't find configuration for system: %s",
526 AliShuttleInterface::GetSystemName(iSys)));
530 if (aResult->GetCount() != 1 ) {
531 AliError("Error in FXS configuration!");
536 anEntry = aResult->GetNext();
538 anAttribute = anEntry->GetAttribute("DBHost");
540 AliError(Form ("Can't find DBHost attribute for %s!!",
541 AliShuttleInterface::GetSystemName(iSys)));
542 delete aResult; delete anEntry;
545 fFXSdbHost[iSys] = anAttribute->GetValue();
547 anAttribute = anEntry->GetAttribute("DBPort"); // MAY
550 fFXSdbPort[iSys] = ((TString) anAttribute->GetValue()).Atoi();
552 fFXSdbPort[iSys] = 3306; // mysql
555 anAttribute = anEntry->GetAttribute("DBUser");
557 AliError(Form ("Can't find DBUser attribute for %s!!",
558 AliShuttleInterface::GetSystemName(iSys)));
559 delete aResult; delete anEntry;
562 fFXSdbUser[iSys] = anAttribute->GetValue();
564 anAttribute = anEntry->GetAttribute("DBPassword");
566 AliError(Form ("Can't find DBPassword attribute for %s!!",
567 AliShuttleInterface::GetSystemName(iSys)));
568 delete aResult; delete anEntry;
571 fFXSdbPass[iSys] = anAttribute->GetValue();
573 anAttribute = anEntry->GetAttribute("DBName");
575 AliError(Form ("Can't find DBName attribute for %s!!",
576 AliShuttleInterface::GetSystemName(iSys)));
577 delete aResult; delete anEntry;
581 fFXSdbName[iSys] = anAttribute->GetValue();
582 anAttribute = anEntry->GetAttribute("DBTable");
584 AliError(Form ("Can't find DBTable attribute for %s!!",
585 AliShuttleInterface::GetSystemName(iSys)));
586 delete aResult; delete anEntry;
589 fFXSdbTable[iSys] = anAttribute->GetValue();
591 anAttribute = anEntry->GetAttribute("FSHost");
593 AliError(Form ("Can't find FSHost attribute for %s!!",
594 AliShuttleInterface::GetSystemName(iSys)));
595 delete aResult; delete anEntry;
598 fFXSHost[iSys] = anAttribute->GetValue();
600 anAttribute = anEntry->GetAttribute("FSPort"); // MAY
603 fFXSPort[iSys] = ((TString) anAttribute->GetValue()).Atoi();
605 fFXSPort[iSys] = 22; // scp port number
608 anAttribute = anEntry->GetAttribute("FSUser");
610 AliError(Form ("Can't find FSUser attribute for %s!!",
611 AliShuttleInterface::GetSystemName(iSys)));
612 delete aResult; delete anEntry;
615 fFXSUser[iSys] = anAttribute->GetValue();
617 anAttribute = anEntry->GetAttribute("FSPassword");
618 if (anAttribute) fFXSPass[iSys] = anAttribute->GetValue();
620 delete aResult; delete anEntry;
626 //______________________________________________________________________________________________
627 AliShuttleConfig::~AliShuttleConfig()
631 fDetectorMap.DeleteAll();
632 fDetectorList.Clear();
633 fProcessedDetectors.Delete();
636 //______________________________________________________________________________________________
637 const TObjArray* AliShuttleConfig::GetDetectors() const
640 // returns collection of TObjString which contains the name
641 // of every detector which is in the configuration.
644 return &fDetectorList;
647 //______________________________________________________________________________________________
648 Bool_t AliShuttleConfig::HasDetector(const char* detector) const
651 // checks for paricular detector in the configuration.
653 return fDetectorMap.GetValue(detector) != NULL;
656 //______________________________________________________________________________________________
657 const char* AliShuttleConfig::GetDCSHost(const char* detector) const
660 // returns DCS server host used by particular detector
663 AliShuttleConfigHolder* aHolder = (AliShuttleConfigHolder*) fDetectorMap.GetValue(detector);
665 AliError(Form("There isn't configuration for detector: %s",
670 return aHolder->GetDCSHost();
673 //______________________________________________________________________________________________
674 Int_t AliShuttleConfig::GetDCSPort(const char* detector) const
677 // returns DCS server port used by particular detector
681 AliShuttleConfigHolder* aHolder = (AliShuttleConfigHolder*) fDetectorMap.GetValue(detector);
683 AliError(Form("There isn't configuration for detector: %s",
688 return aHolder->GetDCSPort();
691 //______________________________________________________________________________________________
692 const TObjArray* AliShuttleConfig::GetDCSAliases(const char* detector) const
695 // returns collection of TObjString which represents the set of aliases
696 // which used for data retrieval for particular detector
699 AliShuttleConfigHolder* aHolder = (AliShuttleConfigHolder*) fDetectorMap.GetValue(detector);
701 AliError(Form("There isn't configuration for detector: %s",
706 return aHolder->GetDCSAliases();
709 //______________________________________________________________________________________________
710 const TObjArray* AliShuttleConfig::GetDCSDataPoints(const char* detector) const
713 // returns collection of TObjString which represents the set of aliases
714 // which used for data retrieval for particular detector
717 AliShuttleConfigHolder* aHolder = (AliShuttleConfigHolder*) fDetectorMap.GetValue(detector);
719 AliError(Form("There isn't configuration for detector: %s",
724 return aHolder->GetDCSDataPoints();
727 //______________________________________________________________________________________________
728 const TObjArray* AliShuttleConfig::GetResponsibles(const char* detector) const
731 // returns collection of TObjString which represents the list of mail addresses
732 // of the detector's responsible(s)
735 AliShuttleConfigHolder* aHolder = (AliShuttleConfigHolder*) fDetectorMap.GetValue(detector);
737 AliError(Form("There isn't configuration for detector: %s",
742 return aHolder->GetResponsibles();
745 //______________________________________________________________________________________________
746 Bool_t AliShuttleConfig::HostProcessDetector(const char* detector) const
748 // return TRUE if detector is handled by host or if fProcessAll is TRUE
750 if(fProcessAll) return kTRUE;
751 TIter iter(&fProcessedDetectors);
753 while((detName = (TObjString*) iter.Next())){
754 if(detName->String() == detector) return kTRUE;
759 //______________________________________________________________________________________________
760 Bool_t AliShuttleConfig::StrictRunOrder(const char* detector) const
762 // return TRUE if detector wants strict run ordering of stored data
764 AliShuttleConfigHolder* aHolder = (AliShuttleConfigHolder*) fDetectorMap.GetValue(detector);
767 AliError(Form("There isn't configuration for detector: %s",
772 return aHolder->StrictRunOrder();
775 //______________________________________________________________________________________________
776 void AliShuttleConfig::Print(Option_t* option) const
778 // print configuration
779 // options : "": print configuration for all detectors, aliases and DPs in compacted format
780 // "uncompact": print configuration for all detectors, aliases and DPs in uncompacted format
781 // "DET": print configuration for DET, aliases and DPs in compacted format
782 // "DET, uncompact": print configuration for DET, aliases and DPs in uncompacted format
787 result += "####################################################\n";
788 result += Form(" Shuttle configuration from %s \n", fConfigHost.Data());
789 result += "####################################################\n";
790 result += Form("\nShuttle running on %s \n", fShuttleInstanceHost.Data());
793 result += Form("All detectors will be processed! \n");
795 result += "Detectors processed by this host: ";
796 TIter it(&fProcessedDetectors);
798 while ((aDet = (TObjString*) it.Next())) {
799 result += Form("%s ", aDet->String().Data());
804 result += Form("PP time out = %d - Max total retries = %d\n\n", fPPTimeOut, fMaxRetries);
805 result += "------------------------------------------------------\n";
807 result += Form("Logbook Configuration \n\n \tHost: %s:%d; \tUser: %s; ",
808 fDAQlbHost.Data(), fDAQlbPort, fDAQlbUser.Data());
810 // result += "Password: ";
811 // result.Append('*', fDAQlbPass.Length());
812 result += Form("\tDB: %s; \tTables: %s, %s, %s",
813 fDAQlbDB.Data(), fDAQlbTable.Data(), fShuttlelbTable.Data(), fRunTypelbTable.Data());
817 result += "------------------------------------------------------\n";
818 result += "FXS configuration\n\n";
820 for(int iSys=0;iSys<3;iSys++){
821 result += Form("*** %s ***\n", AliShuttleInterface::GetSystemName(iSys));
822 result += Form("\tDB host: %s:%d; \tUser: %s; \tName: %s; \tTable: %s\n",
823 fFXSdbHost[iSys].Data(), fFXSdbPort[iSys], fFXSdbUser[iSys].Data(),
824 fFXSdbName[iSys].Data(), fFXSdbTable[iSys].Data());
825 // result += Form("DB Password:",fFXSdbPass[iSys].Data());
826 result += Form("\tFXS host: %s:%d; \tUser: %s\n\n", fFXSHost[iSys].Data(), fFXSPort[iSys],
827 fFXSUser[iSys].Data());
828 // result += Form("FXS Password:",fFXSPass[iSys].Data());
831 TString optStr(option);
833 result += "------------------------------------------------------\n";
834 result += "Detector-specific configuration\n\n";
835 TIter iter(fDetectorMap.GetTable());
837 while ((aPair = (TPair*) iter.Next())) {
838 AliShuttleConfigHolder* aHolder = (AliShuttleConfigHolder*) aPair->Value();
839 if (option != 0 && !optStr.Contains(aHolder->GetDetector()) && optStr.CompareTo("uncompact",TString::kIgnoreCase) != 0 )
841 result += Form("*** %s *** \n", aHolder->GetDetector());
843 const TObjArray* responsibles = aHolder->GetResponsibles();
844 if (responsibles->GetEntries() != 0)
846 result += "\tDetector responsible(s): ";
847 TIter it(responsibles);
848 TObjString* aResponsible;
849 while ((aResponsible = (TObjString*) it.Next()))
851 result += Form("%s ", aResponsible->String().Data());
856 result += Form("\tStrict run ordering: %s \n", aHolder->StrictRunOrder() ? "YES" : "NO");
857 if(aHolder->SkipDCSQuery())
862 result += Form("\tAmanda server: %s:%d \n", aHolder->GetDCSHost(), aHolder->GetDCSPort());
864 const TObjArray* aliases = 0;
865 if (optStr.Contains("uncompact",TString::kIgnoreCase))
867 aliases = aHolder->GetDCSAliases();
869 aliases = aHolder->GetCompactDCSAliases();
872 if (aliases->GetEntries() != 0)
874 result += "\tDCS Aliases: ";
877 while ((anAlias = (TObjString*) it.Next()))
879 result += Form("%s ", anAlias->String().Data());
884 const TObjArray* dataPoints = 0;
885 if (optStr.Contains("uncompact",TString::kIgnoreCase))
887 dataPoints = aHolder->GetDCSDataPoints();
889 dataPoints = aHolder->GetCompactDCSDataPoints();
891 if (dataPoints->GetEntries() != 0)
893 result += "\tDCS Data Points: ";
894 TIter it(dataPoints);
895 TObjString* aDataPoint;
896 while ((aDataPoint = (TObjString*) it.Next())) {
897 result += Form("%s ", aDataPoint->String().Data());
904 if(!fIsValid) result += "\n\n********** !!!!! Configuration is INVALID !!!!! **********\n";