]> git.uio.no Git - u/mrichter/AliRoot.git/blob - SHUTTLE/AliShuttleConfig.cxx
adding number of open runs to monitoring
[u/mrichter/AliRoot.git] / SHUTTLE / AliShuttleConfig.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
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  **************************************************************************/
15
16 /*
17 $Log$
18 Revision 1.26  2007/12/07 19:14:36  acolla
19 in AliShuttleTrigger:
20
21 Added automatic collection of new runs on a regular time basis (settable from the configuration)
22
23 in AliShuttleConfig: new members
24
25 - triggerWait: time to wait for DIM trigger (s) before starting automatic collection of new runs
26 - mode: run mode (test, prod) -> used to build log folder (logs or logs_PROD)
27
28 in AliShuttle:
29
30 - logs now stored in logs/#RUN/DET_#RUN.log
31
32 Revision 1.25  2007/11/26 16:58:37  acolla
33 Monalisa configuration added: host and table name
34
35 Revision 1.24  2007/10/24 10:44:08  acolla
36
37 debug AliInfo removed
38
39 Revision 1.23  2007/09/28 15:27:40  acolla
40
41 AliDCSClient "multiSplit" option added in the DCS configuration
42 in AliDCSMessage: variable MAX_BODY_SIZE set to 500000
43
44 Revision 1.22  2007/09/27 16:53:13  acolla
45 Detectors can have more than one AMANDA server. SHUTTLE queries the servers sequentially,
46 merges the dcs aliases/DPs in one TMap and sends it to the preprocessor.
47
48 Revision 1.21  2007/04/27 07:06:48  jgrosseo
49 GetFileSources returns empty list in case of no files, but successful query
50 No mails sent in testmode
51
52 Revision 1.20  2007/04/04 10:33:36  jgrosseo
53 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.
54 In case of an error with the Grid, the Shuttle will retry the storing later, the preprocessor does not need to be run again.
55
56 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.
57
58 3) New function StoreReferenceFile to _directly_ store a file (without opening it) to the reference storage.
59
60 4) The memory usage of the preprocessor is monitored. If it exceeds 2 GB it is terminated.
61
62 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.
63 If you always need DCS data (like before), you do not need to implement it.
64
65 6) The run type has been added to the monitoring page
66
67 Revision 1.19  2007/02/28 10:41:56  acolla
68 Run type field added in SHUTTLE framework. Run type is read from "run type" logbook and retrieved by
69 AliPreprocessor::GetRunType() function.
70 Added some ldap definition files.
71
72 Revision 1.18  2007/01/23 19:20:03  acolla
73 Removed old ldif files, added TOF, MCH ldif files. Added some options in
74 AliShuttleConfig::Print. Added in Ali Shuttle: SetShuttleTempDir and
75 SetShuttleLogDir
76
77 Revision 1.17  2007/01/18 11:17:47  jgrosseo
78 changing spaces to tabs ;-)
79
80 Revision 1.16  2007/01/18 11:10:35  jgrosseo
81 adding the possibility of defining DCS alias and data points with patterns
82 first pattern introduced: [N..M] to add all names between the two digits, this works also recursively.
83
84 Revision 1.15  2007/01/15 18:27:11  acolla
85 implementation of sending mail to subdetector expert in case the preprocessor fails.
86 shuttle.schema updated with expert's email entry
87
88 Revision 1.13  2006/12/07 08:51:26  jgrosseo
89 update (alberto):
90 table, db names in ldap configuration
91 added GRP preprocessor
92 DCS data can also be retrieved by data point
93
94 Revision 1.12  2006/11/16 16:16:48  jgrosseo
95 introducing strict run ordering flag
96 removed giving preprocessor name to preprocessor, they have to know their name themselves ;-)
97
98 Revision 1.11  2006/11/06 14:23:04  jgrosseo
99 major update (Alberto)
100 o) reading of run parameters from the logbook
101 o) online offline naming conversion
102 o) standalone DCSclient package
103
104 Revision 1.10  2006/10/20 15:22:59  jgrosseo
105 o) Adding time out to the execution of the preprocessors: The Shuttle forks and the parent process monitors the child
106 o) Merging Collect, CollectAll, CollectNew function
107 o) Removing implementation of empty copy constructors (declaration still there!)
108
109 Revision 1.9  2006/10/02 16:38:39  jgrosseo
110 update (alberto):
111 fixed memory leaks
112 storing of objects that failed to be stored to the grid before
113 interfacing of shuttle status table in daq system
114
115 Revision 1.8  2006/08/15 10:50:00  jgrosseo
116 effc++ corrections (alberto)
117
118 Revision 1.7  2006/07/20 09:54:40  jgrosseo
119 introducing status management: The processing per subdetector is divided into several steps,
120 after each step the status is stored on disk. If the system crashes in any of the steps the Shuttle
121 can keep track of the number of failures and skips further processing after a certain threshold is
122 exceeded. These thresholds can be configured in LDAP.
123
124 Revision 1.6  2006/07/19 10:09:55  jgrosseo
125 new configuration, accesst to DAQ FES (Alberto)
126
127 Revision 1.5  2006/07/10 13:01:41  jgrosseo
128 enhanced storing of last sucessfully processed run (alberto)
129
130 Revision 1.4  2006/06/12 09:11:16  jgrosseo
131 coding conventions (Alberto)
132
133 Revision 1.3  2006/06/06 14:26:40  jgrosseo
134 o) removed files that were moved to STEER
135 o) shuttle updated to follow the new interface (Alberto)
136
137 Revision 1.7  2006/05/12 09:07:16  colla
138 12/05/06
139 New configuration complete
140
141 Revision 1.2  2006/03/07 07:52:34  hristov
142 New version (B.Yordanov)
143
144 Revision 1.4  2005/11/19 14:20:31  byordano
145 logbook config added to AliShuttleConfig
146
147 Revision 1.3  2005/11/17 19:24:25  byordano
148 TList changed to TObjArray in AliShuttleConfig
149
150 Revision 1.2  2005/11/17 14:43:23  byordano
151 import to local CVS
152
153 Revision 1.1.1.1  2005/10/28 07:33:58  hristov
154 Initial import as subdirectory in AliRoot
155
156 Revision 1.1.1.1  2005/09/12 22:11:40  byordano
157 SHUTTLE package
158
159 Revision 1.3  2005/08/30 09:13:02  byordano
160 some docs added
161
162 */
163
164
165 //
166 // This class keeps the AliShuttle configuration.
167 // It reads the configuration for LDAP server.
168 // For every child entry in basedn which has schema type 'shuttleConfig'
169 // it creates a detector configuration. This configuration includes:
170 // DCS server host and port and the set of aliases for which data from
171 // will be retrieved (used by AliShuttle).
172 //
173
174
175 #include "AliShuttleConfig.h"
176 #include "AliShuttleInterface.h"
177
178 #include "AliLog.h"
179
180 #include <TSystem.h>
181 #include <TObjString.h>
182 #include <TLDAPResult.h>
183 #include <TLDAPEntry.h>
184 #include <TLDAPAttribute.h>
185
186
187 AliShuttleConfig::AliShuttleDCSConfigHolder::AliShuttleDCSConfigHolder(const TLDAPEntry* entry):
188 fDCSHost(""),
189 fDCSPort(0),
190 fMultiSplit(100),
191 fDCSAliases(0),
192 fDCSDataPoints(0),
193 fDCSAliasesComp(0),
194 fDCSDataPointsComp(0),
195 fIsValid(kFALSE)
196 {
197 // constructor of the shuttle DCS configuration holder
198
199         TLDAPAttribute* anAttribute;
200         fDCSAliases = new TObjArray();
201         fDCSAliases->SetOwner(1);
202         fDCSDataPoints = new TObjArray();
203         fDCSDataPoints->SetOwner(1);
204         fDCSAliasesComp = new TObjArray();
205         fDCSAliasesComp->SetOwner(1);
206         fDCSDataPointsComp = new TObjArray();
207         fDCSDataPointsComp->SetOwner(1);
208
209         
210         anAttribute = entry->GetAttribute("dcsHost"); 
211         if (!anAttribute)
212         {
213                 AliError("Unexpected: no DCS host!");
214                 return;
215         }
216
217         fDCSHost = anAttribute->GetValue();
218
219         anAttribute = entry->GetAttribute("dcsPort");
220         if (!anAttribute)
221         {
222                 AliError("Unexpected: no DCS port!");
223                 return;
224         }
225         TString portStr = anAttribute->GetValue();
226         fDCSPort = portStr.Atoi();
227
228         anAttribute = entry->GetAttribute("multiSplit"); // MAY
229         if (anAttribute)
230         {
231                 TString multiSplitStr = anAttribute->GetValue();
232                 fMultiSplit = multiSplitStr.Atoi();
233                 if(fMultiSplit == 0) {
234                         AliError("MultiSplit must be a positive integer!");
235                         return;
236                 }
237                 
238         }
239         
240         anAttribute = entry->GetAttribute("dcsAlias"); // MAY
241         if (anAttribute)
242         {
243                 const char* anAlias;
244                 while ((anAlias = anAttribute->GetValue()))
245                 {
246                         fDCSAliasesComp->AddLast(new TObjString(anAlias));
247                         ExpandAndAdd(fDCSAliases, anAlias);
248                 }
249         }
250
251         anAttribute = entry->GetAttribute("dcsDP"); // MAY
252         if (anAttribute)
253         {
254                 const char* aDataPoint;
255                 while ((aDataPoint = anAttribute->GetValue()))
256                 {
257                 fDCSDataPointsComp->AddLast(new TObjString(aDataPoint));
258                 ExpandAndAdd(fDCSDataPoints, aDataPoint);
259                 }
260         }
261
262         fIsValid = kTRUE;
263 }
264
265 //______________________________________________________________________________________________
266 void AliShuttleConfig::AliShuttleDCSConfigHolder::ExpandAndAdd(TObjArray* target, const char* entry)
267 {
268         //
269         // adds <entry> to <target> applying expanding of the name
270         // [N..M] creates M-N+1 names with the corresponding digits
271         //
272
273         TString entryStr(entry);
274
275         Int_t begin = entryStr.Index("[");
276         Int_t end = entryStr.Index("]");
277         if (begin != -1 && end != -1 && end > begin)
278         {
279                 TString before(entryStr(0, begin));
280                 TString after(entryStr(end+1, entryStr.Length()));
281
282                 AliDebug(2, Form("Found [] pattern. Splitted input string %s %s", before.Data(), after.Data()));
283
284                 Int_t dotdot = entryStr.Index("..");
285
286                 TString nStr(entryStr(begin+1, dotdot-begin-1));
287                 TString mStr(entryStr(dotdot+2, end-dotdot-2));
288
289                 AliDebug(2, Form("Found [N..M] pattern. %s %s", nStr.Data(), mStr.Data()));
290
291                 if (nStr.IsDigit() && mStr.IsDigit())
292                 {
293                         Int_t n = nStr.Atoi();
294                         Int_t m = mStr.Atoi();
295
296                         Int_t nDigits = nStr.Length();
297                         TString formatStr;
298                         formatStr.Form("%%s%%0%dd%%s", nDigits);
299
300                         AliDebug(2, Form("Format string is %s", formatStr.Data()));
301
302                         for (Int_t current = n; current<=m; ++current)
303                         {
304                                 TString newEntry;
305                                 newEntry.Form(formatStr.Data(), before.Data(), current, after.Data());
306
307                                 AliDebug(2, Form("Calling recursive with %s", newEntry.Data()));
308
309                                 // and go recursive
310                                 ExpandAndAdd(target, newEntry);
311                         }
312
313                         // return here because we processed the entries already recursively.
314                         return;
315                 }
316         }
317
318         AliDebug(2, Form("Adding name %s", entry));
319         target->AddLast(new TObjString(entry));
320 }
321
322 //______________________________________________________________________________________________
323 AliShuttleConfig::AliShuttleDCSConfigHolder::~AliShuttleDCSConfigHolder()
324 {
325 // destructor of the shuttle configuration holder
326
327         delete fDCSAliases;
328         delete fDCSDataPoints;
329         delete fDCSAliasesComp;
330         delete fDCSDataPointsComp;      
331 }
332
333 //______________________________________________________________________________________________
334 AliShuttleConfig::AliShuttleDetConfigHolder::AliShuttleDetConfigHolder(const TLDAPEntry* entry):
335 fDetector(""),
336 fDCSConfig(),
337 fResponsibles(0),
338 fIsValid(kFALSE),
339 fSkipDCSQuery(kFALSE),
340 fStrictRunOrder(kFALSE)
341 {
342 // constructor of the shuttle configuration holder
343
344         TLDAPAttribute* anAttribute;
345         
346         fResponsibles = new TObjArray();
347         fResponsibles->SetOwner(1);
348         fDCSConfig = new TObjArray();
349         fDCSConfig->SetOwner(1);
350
351         anAttribute = entry->GetAttribute("det"); // MUST
352         if (!anAttribute)
353         {
354                 AliError(Form("No \"det\" attribute!"));
355                 return;
356         }
357         fDetector = anAttribute->GetValue();
358
359         anAttribute = entry->GetAttribute("strictRunOrder"); // MAY
360         if (!anAttribute)
361         {
362                 AliWarning(Form("%s did not set strictRunOrder flag - the default is FALSE",
363                                 fDetector.Data()));
364         } else {
365                 TString strictRunStr = anAttribute->GetValue();
366                 if (!(strictRunStr == "0" || strictRunStr == "1"))
367                 {
368                         AliError("strictRunOrder flag must be 0 or 1!");
369                         return;
370                 }
371                 fStrictRunOrder = (Bool_t) strictRunStr.Atoi();
372         }
373
374         anAttribute = entry->GetAttribute("responsible"); // MAY
375         if (!anAttribute)
376         {
377                 AliDebug(2, "Warning! No \"responsible\" attribute!");
378         }
379         else
380         {
381                 const char* aResponsible;
382                 while ((aResponsible = anAttribute->GetValue()))
383                 {
384                         fResponsibles->AddLast(new TObjString(aResponsible));
385                 }
386         }
387
388         fIsValid = kTRUE;
389 }
390
391 //______________________________________________________________________________________________
392 AliShuttleConfig::AliShuttleDetConfigHolder::~AliShuttleDetConfigHolder()
393 {
394 // destructor of the shuttle configuration holder
395
396         delete fResponsibles;
397         delete fDCSConfig;
398 }
399
400 //______________________________________________________________________________________________
401 const char* AliShuttleConfig::AliShuttleDetConfigHolder::GetDCSHost(Int_t iServ) const
402 {
403         //
404         // returns DCS server host 
405         //
406         
407         if (iServ < 0 || iServ >= GetNServers()) return 0;
408         
409         AliShuttleDCSConfigHolder *aHolder = dynamic_cast<AliShuttleDCSConfigHolder *> 
410                                                         (fDCSConfig->At(iServ));
411         
412         return aHolder->GetDCSHost();
413 }
414
415 //______________________________________________________________________________________________
416 Int_t AliShuttleConfig::AliShuttleDetConfigHolder::GetDCSPort(Int_t iServ) const
417 {
418         //
419         // returns DCS server port 
420         //
421         
422         if (iServ < 0 || iServ >= GetNServers()) return 0;
423         
424         AliShuttleDCSConfigHolder *aHolder = dynamic_cast<AliShuttleDCSConfigHolder *> 
425                                                         (fDCSConfig->At(iServ));
426         
427         return aHolder->GetDCSPort();
428 }
429
430 //______________________________________________________________________________________________
431 Int_t AliShuttleConfig::AliShuttleDetConfigHolder::GetMultiSplit(Int_t iServ) const
432 {
433         //
434         // returns DCS "multi split" value
435         //
436         
437         if (iServ < 0 || iServ >= GetNServers()) return 0;
438         
439         AliShuttleDCSConfigHolder *aHolder = dynamic_cast<AliShuttleDCSConfigHolder *> 
440                                                         (fDCSConfig->At(iServ));
441         
442         return aHolder->GetMultiSplit();
443 }
444
445 //______________________________________________________________________________________________
446 const TObjArray* AliShuttleConfig::AliShuttleDetConfigHolder::GetDCSAliases(Int_t iServ) const
447 {
448         //
449         // returns collection of TObjString which represents the set of aliases
450         // which used for data retrieval for particular detector
451         //
452         
453         if (iServ < 0 || iServ >= GetNServers()) return 0;
454         
455         AliShuttleDCSConfigHolder *aHolder = dynamic_cast<AliShuttleDCSConfigHolder *> 
456                                                         (fDCSConfig->At(iServ));
457         
458         return aHolder->GetDCSAliases();
459 }
460
461 //______________________________________________________________________________________________
462 const TObjArray* AliShuttleConfig::AliShuttleDetConfigHolder::GetDCSDataPoints(Int_t iServ) const
463 {
464         //
465         // returns collection of TObjString which represents the set of aliases
466         // which used for data retrieval for particular detector
467         //
468
469         if (iServ < 0 || iServ >= GetNServers()) return 0;
470
471         AliShuttleDCSConfigHolder *aHolder = dynamic_cast<AliShuttleDCSConfigHolder *> 
472                                                         (fDCSConfig->At(iServ));
473         
474         return aHolder->GetDCSDataPoints();
475 }
476
477 //______________________________________________________________________________________________
478 const TObjArray* AliShuttleConfig::AliShuttleDetConfigHolder::GetCompactDCSAliases(Int_t iServ) const
479 {
480         //
481         // returns collection of TObjString which represents the set of aliases
482         // which used for data retrieval for particular detector (Compact style)
483         //
484
485         if (iServ < 0 || iServ >= GetNServers()) return 0;
486
487         AliShuttleDCSConfigHolder *aHolder = dynamic_cast<AliShuttleDCSConfigHolder *> 
488                                                         (fDCSConfig->At(iServ));
489         
490         return aHolder->GetCompactDCSAliases();
491 }
492
493 //______________________________________________________________________________________________
494 const TObjArray* AliShuttleConfig::AliShuttleDetConfigHolder::GetCompactDCSDataPoints(Int_t iServ) const
495 {
496         //
497         // returns collection of TObjString which represents the set of aliases
498         // which used for data retrieval for particular detector (Compact style)
499         //
500
501         if (iServ < 0 || iServ >= GetNServers()) return 0;
502
503         AliShuttleDCSConfigHolder *aHolder = dynamic_cast<AliShuttleDCSConfigHolder *> 
504                                                         (fDCSConfig->At(iServ));
505         
506         return aHolder->GetCompactDCSDataPoints();
507 }
508
509 //______________________________________________________________________________________________
510 void AliShuttleConfig::AliShuttleDetConfigHolder::AddDCSConfig(AliShuttleDCSConfigHolder* holder)
511 {
512         //
513         // adds a DCS configuration set in the array of DCS configurations
514         // 
515         
516         if(!holder) return;
517         fDCSConfig->AddLast(holder);
518 }
519
520 ClassImp(AliShuttleConfig)
521
522 //______________________________________________________________________________________________
523 AliShuttleConfig::AliShuttleConfig(const char* host, Int_t port,
524         const char* binddn, const char* password, const char* basedn):
525         fConfigHost(host), 
526         fDAQlbHost(""), 
527         fDAQlbPort(), 
528         fDAQlbUser(""), 
529         fDAQlbPass(""),
530         fDAQlbDB(""), 
531         fDAQlbTable(""), 
532         fShuttlelbTable(""), 
533         fRunTypelbTable(""),
534         fMaxRetries(0), 
535         fPPTimeOut(0), 
536         fPPMaxMem(0), 
537         fMonitorHost(""), 
538         fMonitorTable(""), 
539         fTriggerWait(3600),
540         fRunMode(kTest),
541         fDetectorMap(), 
542         fDetectorList(),
543         fShuttleInstanceHost(""), 
544         fProcessedDetectors(), 
545         fProcessAll(kFALSE), 
546         fIsValid(kFALSE)
547 {
548         //
549         // host: ldap server host
550         // port: ldap server port
551         // binddn: binddn used for ldap binding (simple bind is used!).
552         // password: password for binddn
553         // basedn: this is basedn whose childeren entries which have
554         //
555
556         fDetectorMap.SetOwner(1);
557         fDetectorList.SetOwner(0); //fDetectorList and fDetectorMap share the same object!
558         fProcessedDetectors.SetOwner();
559
560         TLDAPServer aServer(host, port, binddn, password, 3);
561
562         if (!aServer.IsConnected()) {
563                 AliError(Form("Can't connect to ldap server %s:%d",
564                                 host, port));
565                 return;
566         }
567
568         // reads configuration for the shuttle running on this machine
569         
570         TLDAPResult* aResult = 0;
571         TLDAPEntry* anEntry = 0;
572         
573         TList dcsList;
574         dcsList.SetOwner(1);
575         TList detList;
576         detList.SetOwner(1);
577         TList globalList;
578         globalList.SetOwner(1);
579         TList sysList;
580         sysList.SetOwner(1);
581         TList hostList;
582         hostList.SetOwner(1);
583         
584         aResult = aServer.Search(basedn, LDAP_SCOPE_SUBTREE, 0, 0);
585         
586         if (!aResult) 
587         {
588                 AliError(Form("Can't find configuration with base DN: %s !", basedn));
589                 return;
590         }
591         
592         while ((anEntry = aResult->GetNext())) 
593         {
594                 TString dn = anEntry->GetDn();
595                 
596                 if (dn.BeginsWith("dcsHost=")) 
597                 {
598                         dcsList.Add(anEntry);
599                 } 
600                 else if (dn.BeginsWith("det="))
601                 {
602                         detList.Add(anEntry);
603                 }
604                 else if (dn.BeginsWith("name=globalConfig"))
605                 {
606                         globalList.Add(anEntry);
607                 }
608                 else if (dn.BeginsWith("system="))
609                 {
610                         sysList.Add(anEntry);
611                 }
612                 else if (dn.BeginsWith("shuttleHost="))
613                 {
614                         hostList.Add(anEntry);
615                 }
616                 else 
617                 {
618                         delete anEntry;
619                 }
620         
621         }
622         delete aResult;
623         
624         Int_t result=0;
625         
626         result += SetGlobalConfig(&globalList);
627         result += SetSysConfig(&sysList);
628         result += SetDetConfig(&detList,&dcsList);
629         result += SetHostConfig(&hostList);
630         
631         if(result) 
632         {
633                 AliError("Configuration is INVALID!");
634         }
635         else 
636         {
637                 fIsValid = kTRUE;
638         }
639 }
640
641 //______________________________________________________________________________________________
642 AliShuttleConfig::~AliShuttleConfig()
643 {
644 // destructor
645
646         fDetectorMap.DeleteAll();
647         fDetectorList.Clear();
648         fProcessedDetectors.Delete();
649 }
650
651 //______________________________________________________________________________________________
652 const TObjArray* AliShuttleConfig::GetDetectors() const
653 {
654         //
655         // returns collection of TObjString which contains the name
656         // of every detector which is in the configuration.
657         //
658
659         return &fDetectorList;
660 }
661
662 //______________________________________________________________________________________________
663 Bool_t AliShuttleConfig::HasDetector(const char* detector) const
664 {
665         //
666         // checks for paricular detector in the configuration.
667         //
668         return fDetectorMap.GetValue(detector) != NULL;
669 }
670
671 //______________________________________________________________________________________________
672 Int_t AliShuttleConfig::GetNServers(const char* detector) const
673 {
674         //
675         // returns number of DCS servers for detector
676         //
677         
678         AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
679         if (!aHolder) {
680                 AliError(Form("There isn't configuration for detector: %s",
681                         detector));
682                 return 0;
683         }
684
685         return aHolder->GetNServers();
686 }
687
688
689 //______________________________________________________________________________________________
690 const char* AliShuttleConfig::GetDCSHost(const char* detector, Int_t iServ) const
691 {
692         //
693         // returns i-th DCS server host used by particular detector
694         //
695         
696         AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
697         if (!aHolder) {
698                 AliError(Form("There isn't configuration for detector: %s",
699                         detector));
700                 return NULL;
701         }
702
703         return aHolder->GetDCSHost(iServ);
704 }
705
706 //______________________________________________________________________________________________
707 Int_t AliShuttleConfig::GetDCSPort(const char* detector, Int_t iServ) const
708 {
709         //
710         // returns i-th DCS server port used by particular detector
711         //
712
713
714         AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
715         if (!aHolder) {
716                 AliError(Form("There isn't configuration for detector: %s",
717                         detector));
718                 return 0;
719         }
720
721         return aHolder->GetDCSPort(iServ);
722 }
723
724 //______________________________________________________________________________________________
725 Int_t AliShuttleConfig::GetMultiSplit(const char* detector, Int_t iServ) const
726 {
727         //
728         // returns i-th DCS "multi split" value
729         //
730
731
732         AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
733         if (!aHolder) {
734                 AliError(Form("There isn't configuration for detector: %s",
735                         detector));
736                 return 0;
737         }
738
739         return aHolder->GetMultiSplit(iServ);
740 }
741
742 //______________________________________________________________________________________________
743 const TObjArray* AliShuttleConfig::GetDCSAliases(const char* detector, Int_t iServ) const
744 {
745         //
746         // returns collection of TObjString which represents the i-th set of aliases
747         // which used for data retrieval for particular detector
748         //
749
750         AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
751         if (!aHolder) {
752                 AliError(Form("There isn't configuration for detector: %s",
753                         detector));
754                 return NULL;
755         }
756
757         return aHolder->GetDCSAliases(iServ);
758 }
759
760 //______________________________________________________________________________________________
761 const TObjArray* AliShuttleConfig::GetDCSDataPoints(const char* detector, Int_t iServ) const
762 {
763         //
764         // returns collection of TObjString which represents the set of aliases
765         // which used for data retrieval for particular detector
766         //
767
768         AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
769         if (!aHolder) {
770                 AliError(Form("There isn't configuration for detector: %s",
771                         detector));
772                 return NULL;
773         }
774
775         return aHolder->GetDCSDataPoints(iServ);
776 }
777
778 //______________________________________________________________________________________________
779 const TObjArray* AliShuttleConfig::GetCompactDCSAliases(const char* detector, Int_t iServ) const
780 {
781         //
782         // returns collection of TObjString which represents the i-th set of aliases
783         // which used for data retrieval for particular detector (Compact style)
784         //
785
786         AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
787         if (!aHolder) {
788                 AliError(Form("There isn't configuration for detector: %s",
789                         detector));
790                 return NULL;
791         }
792
793         return aHolder->GetCompactDCSAliases(iServ);
794 }
795
796 //______________________________________________________________________________________________
797 const TObjArray* AliShuttleConfig::GetCompactDCSDataPoints(const char* detector, Int_t iServ) const
798 {
799         //
800         // returns collection of TObjString which represents the set of aliases
801         // which used for data retrieval for particular detector (Compact style)
802         //
803
804         AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
805         if (!aHolder) {
806                 AliError(Form("There isn't configuration for detector: %s",
807                         detector));
808                 return NULL;
809         }
810
811         return aHolder->GetCompactDCSDataPoints(iServ);
812 }
813
814 //______________________________________________________________________________________________
815 const TObjArray* AliShuttleConfig::GetResponsibles(const char* detector) const
816 {
817         //
818         // returns collection of TObjString which represents the list of mail addresses
819         // of the detector's responsible(s)
820         //
821
822         AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
823         if (!aHolder) {
824                 AliError(Form("There isn't configuration for detector: %s",
825                         detector));
826                 return NULL;
827         }
828
829         return aHolder->GetResponsibles();
830 }
831
832 //______________________________________________________________________________________________
833 Bool_t AliShuttleConfig::HostProcessDetector(const char* detector) const
834 {
835         // return TRUE if detector is handled by host or if fProcessAll is TRUE
836
837         if(fProcessAll) return kTRUE;
838         TIter iter(&fProcessedDetectors);
839         TObjString* detName;
840         while((detName = (TObjString*) iter.Next())){
841                 if(detName->String() == detector) return kTRUE;
842         }
843         return kFALSE;
844 }
845
846 //______________________________________________________________________________________________
847 Bool_t AliShuttleConfig::StrictRunOrder(const char* detector) const
848 {
849         // return TRUE if detector wants strict run ordering of stored data
850
851         AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) fDetectorMap.GetValue(detector);
852         if (!aHolder)
853         {
854                 AliError(Form("There isn't configuration for detector: %s",
855                         detector));
856                 return kTRUE;
857         }
858
859         return aHolder->StrictRunOrder();
860 }
861
862 //______________________________________________________________________________________________
863 UInt_t AliShuttleConfig::SetGlobalConfig(TList* list)
864 {
865         // Set the global configuration (DAQ Logbook + preprocessor monitoring settings)
866
867         TLDAPEntry* anEntry = 0;
868         TLDAPAttribute* anAttribute = 0;
869         
870         if (list->GetEntries() == 0) 
871         {
872                 AliError("Global configuration not found!");
873                 return 1;
874         } 
875         else if (list->GetEntries() > 1)
876         {
877                 AliError("More than one global configuration found!");
878                 return 2;
879         }
880         
881         anEntry = dynamic_cast<TLDAPEntry*> (list->At(0));
882         
883         if (!anEntry)
884         {
885                 AliError("Unexpected! Global list does not contain a TLDAPEntry");
886                 return 3;
887         } 
888         
889         
890         anAttribute = anEntry->GetAttribute("daqLbHost");
891         if (!anAttribute) {
892                 AliError("Can't find daqLbHost attribute!");
893                 return 4;
894         }
895         fDAQlbHost = anAttribute->GetValue();
896
897         anAttribute = anEntry->GetAttribute("daqLbPort"); // MAY
898         if (anAttribute)
899         {
900                 fDAQlbPort = ((TString) anAttribute->GetValue()).Atoi();
901         } else {
902                 fDAQlbPort = 3306; // mysql
903         }
904
905         anAttribute = anEntry->GetAttribute("daqLbUser");
906         if (!anAttribute) {
907                 AliError("Can't find daqLbUser attribute!");
908                 return 4;
909         }
910         fDAQlbUser = anAttribute->GetValue();
911
912         anAttribute = anEntry->GetAttribute("daqLbPasswd");
913         if (!anAttribute) {
914                 AliError("Can't find daqLbPasswd attribute!");
915                 return 4;
916         }
917         fDAQlbPass = anAttribute->GetValue();
918
919         anAttribute = anEntry->GetAttribute("daqLbDB");
920         if (!anAttribute) {
921                 AliError("Can't find daqLbDB attribute!");
922                 return 4;
923         }
924         fDAQlbDB = anAttribute->GetValue();
925
926         anAttribute = anEntry->GetAttribute("daqLbTable");
927         if (!anAttribute) {
928                 AliError("Can't find daqLbTable attribute!");
929                 return 4;
930         }
931         fDAQlbTable = anAttribute->GetValue();
932
933         anAttribute = anEntry->GetAttribute("shuttleLbTable");
934         if (!anAttribute) {
935                 AliError("Can't find shuttleLbTable attribute!");
936                 return 4;
937         }
938         fShuttlelbTable = anAttribute->GetValue();
939
940         anAttribute = anEntry->GetAttribute("runTypeLbTable");
941         if (!anAttribute) {
942                 AliError("Can't find runTypeLbTable attribute!");
943                 return 4;
944         }
945         fRunTypelbTable = anAttribute->GetValue();
946
947         anAttribute = anEntry->GetAttribute("ppmaxRetries");
948         if (!anAttribute) {
949                 AliError("Can't find ppmaxRetries attribute!");
950                 return 4;
951         }
952         TString tmpStr = anAttribute->GetValue();
953         fMaxRetries = tmpStr.Atoi();
954
955         anAttribute = anEntry->GetAttribute("ppTimeOut");
956         if (!anAttribute) {
957                 AliError("Can't find ppTimeOut attribute!");
958                 return 4;
959         }
960         tmpStr = anAttribute->GetValue();
961         fPPTimeOut = tmpStr.Atoi();
962
963         anAttribute = anEntry->GetAttribute("ppMaxMem");
964         if (!anAttribute) {
965                 AliError("Can't find ppMaxMem attribute!");
966                 return 4;
967         }
968         tmpStr = anAttribute->GetValue();
969         fPPMaxMem = tmpStr.Atoi();
970         
971         anAttribute = anEntry->GetAttribute("monitorHost");
972         if (!anAttribute) {
973                 AliError("Can't find monitorHost attribute!");
974                 return 4;
975         }
976         fMonitorHost = anAttribute->GetValue();
977         
978         anAttribute = anEntry->GetAttribute("monitorTable");
979         if (!anAttribute) {
980                 AliError("Can't find monitorTable attribute!");
981                 return 4;
982         }
983         fMonitorTable = anAttribute->GetValue();
984
985         anAttribute = anEntry->GetAttribute("triggerWait"); // MAY
986         if (!anAttribute) {
987                 AliWarning(Form("triggerWait not set! default = ", fTriggerWait));
988         }
989         tmpStr = anAttribute->GetValue();
990         fTriggerWait = tmpStr.Atoi();
991         
992         anAttribute = anEntry->GetAttribute("mode");
993         if (!anAttribute) {
994                 AliWarning("Run mode not set! Running in test mode.");
995         } else {
996           tmpStr = anAttribute->GetValue();
997           if (tmpStr == "test")
998           {
999             fRunMode = kTest;
1000           } else if (tmpStr == "prod") {
1001             fRunMode = kProd;
1002           } else {
1003             AliWarning(Form("Not a valid run mode: %s", tmpStr.Data()));                
1004             AliWarning("Valid run modes are \"test\" and \"prod\". Running in test mode.");
1005           }
1006         }
1007                 
1008         return 0;
1009 }
1010
1011 //______________________________________________________________________________________________
1012 UInt_t AliShuttleConfig::SetSysConfig(TList* list)
1013 {
1014         // Set the online FXS configuration (DAQ + DCS + HLT)
1015         
1016         TLDAPEntry* anEntry = 0;
1017         TLDAPAttribute* anAttribute = 0;
1018         
1019         if (list->GetEntries() != 3) 
1020         {
1021                 AliError(Form("Wrong number of online systems found: %d !", list->GetEntries()));
1022                 return 1;
1023         } 
1024
1025         TIter iter(list);
1026         Int_t iSys=0, count = 0;
1027         while ((anEntry = dynamic_cast<TLDAPEntry*> (iter.Next())))
1028         {
1029                 anAttribute = anEntry->GetAttribute("system");
1030                 TString sysName = anAttribute->GetValue();
1031                 
1032                 if (sysName == "DAQ") 
1033                 {
1034                         iSys = 0;
1035                         count += 1;
1036                 }
1037                 else if (sysName == "DCS")
1038                 {
1039                         iSys = 1;
1040                         count += 10;
1041                 }
1042                 else if (sysName == "HLT")
1043                 {
1044                         iSys = 2;
1045                         count += 100;
1046                 }
1047                 
1048                 anAttribute = anEntry->GetAttribute("dbHost");
1049                 if (!anAttribute) {
1050                         AliError(Form ("Can't find dbHost attribute for %s!!",
1051                                                 AliShuttleInterface::GetSystemName(iSys)));
1052                         return 5;
1053                 }
1054                 fFXSdbHost[iSys] = anAttribute->GetValue();
1055
1056                 anAttribute = anEntry->GetAttribute("dbPort"); // MAY
1057                 if (anAttribute)
1058                 {
1059                         fFXSdbPort[iSys] = ((TString) anAttribute->GetValue()).Atoi();
1060                 } else {
1061                         fFXSdbPort[iSys] = 3306; // mysql
1062                 }
1063
1064                 anAttribute = anEntry->GetAttribute("dbUser");
1065                 if (!anAttribute) {
1066                         AliError(Form ("Can't find dbUser attribute for %s!!",
1067                                                 AliShuttleInterface::GetSystemName(iSys)));
1068                         return 5;
1069                 }
1070                 fFXSdbUser[iSys] = anAttribute->GetValue();
1071
1072                 anAttribute = anEntry->GetAttribute("dbPasswd");
1073                 if (!anAttribute) {
1074                         AliError(Form ("Can't find dbPasswd attribute for %s!!",
1075                                                 AliShuttleInterface::GetSystemName(iSys)));
1076                         return 5;
1077                 }
1078                 fFXSdbPass[iSys] = anAttribute->GetValue();
1079
1080                 anAttribute = anEntry->GetAttribute("dbName");
1081                 if (!anAttribute) {
1082                         AliError(Form ("Can't find dbName attribute for %s!!",
1083                                                 AliShuttleInterface::GetSystemName(iSys)));
1084                         return 5;
1085                 }
1086
1087                 fFXSdbName[iSys] = anAttribute->GetValue();
1088                 anAttribute = anEntry->GetAttribute("dbTable");
1089                 if (!anAttribute) {
1090                         AliError(Form ("Can't find dbTable attribute for %s!!",
1091                                                 AliShuttleInterface::GetSystemName(iSys)));
1092                         return 5;
1093                 }
1094                 fFXSdbTable[iSys] = anAttribute->GetValue();
1095
1096                 anAttribute = anEntry->GetAttribute("fxsHost");
1097                 if (!anAttribute) {
1098                         AliError(Form ("Can't find fxsHost attribute for %s!!",
1099                                                 AliShuttleInterface::GetSystemName(iSys)));
1100                         return 5;
1101                 }
1102                 fFXSHost[iSys] = anAttribute->GetValue();
1103
1104                 anAttribute = anEntry->GetAttribute("fxsPort"); // MAY
1105                 if (anAttribute)
1106                 {
1107                         fFXSPort[iSys] = ((TString) anAttribute->GetValue()).Atoi();
1108                 } else {
1109                         fFXSPort[iSys] = 22; // scp port number
1110                 }
1111
1112                 anAttribute = anEntry->GetAttribute("fxsUser");
1113                 if (!anAttribute) {
1114                         AliError(Form ("Can't find fxsUser attribute for %s!!",
1115                                                 AliShuttleInterface::GetSystemName(iSys)));
1116                         return 5;
1117                 }
1118                 fFXSUser[iSys] = anAttribute->GetValue();
1119
1120                 anAttribute = anEntry->GetAttribute("fxsPasswd");
1121                 if (anAttribute) fFXSPass[iSys] = anAttribute->GetValue();
1122         }
1123         
1124         if(count != 111) {
1125                 AliError(Form("Wrong system configuration! (code = %d)", count));
1126                 return 6;
1127         }
1128         
1129         return 0;
1130 }
1131
1132 //______________________________________________________________________________________________
1133 UInt_t AliShuttleConfig::SetDetConfig(TList* detList, TList* dcsList)
1134 {
1135         // Set the detector configuration (general settings + DCS amanda server and alias/DP lists)
1136
1137         TLDAPEntry* anEntry = 0;
1138         
1139         TIter iter(detList);
1140         while ((anEntry = dynamic_cast<TLDAPEntry*> (iter.Next())))
1141         {
1142                 
1143                 AliShuttleDetConfigHolder* detHolder = new AliShuttleDetConfigHolder(anEntry);
1144
1145                 if (!detHolder->IsValid()) {
1146                         AliError("Detector configuration error!");
1147                         delete detHolder;
1148                         return 7;
1149                 }
1150
1151                 TObjString* detStr = new TObjString(detHolder->GetDetector());
1152                 
1153                 // Look for DCS Configuration
1154                 TIter dcsIter(dcsList);
1155                 TLDAPEntry *dcsEntry = 0;
1156                 while ((dcsEntry = dynamic_cast<TLDAPEntry*> (dcsIter.Next())))
1157                 {
1158                         TString dn = dcsEntry->GetDn();
1159                         if(dn.Contains(detStr->GetName())) {
1160                                 AliDebug(2, Form("Found DCS configuration: dn = %s",dn.Data()));
1161                                 AliShuttleDCSConfigHolder* dcsHolder = new AliShuttleDCSConfigHolder(dcsEntry);
1162                                 if (!dcsHolder->IsValid()) {
1163                                         AliError("DCS configuration error!");
1164                                         delete detHolder;
1165                                         delete dcsHolder;
1166                                         return 7;
1167                                 }
1168                                 detHolder->AddDCSConfig(dcsHolder);
1169                         }
1170                 }
1171                 
1172                 
1173                 fDetectorMap.Add(detStr, detHolder);
1174                 fDetectorList.AddLast(detStr);
1175         }
1176         
1177         return 0;
1178 }
1179
1180 //______________________________________________________________________________________________
1181 UInt_t AliShuttleConfig::SetHostConfig(TList* list)
1182 {
1183         // Set the Shuttle machines configuration (which detectors processes each machine)
1184         
1185         TLDAPEntry* anEntry = 0;
1186         TLDAPAttribute* anAttribute = 0;
1187         
1188         fShuttleInstanceHost = gSystem->HostName();
1189         
1190         TIter iter(list);
1191         while ((anEntry = dynamic_cast<TLDAPEntry*> (iter.Next())))
1192         {
1193         
1194                 TString dn(anEntry->GetDn());
1195                 if (!dn.Contains(Form("shuttleHost=%s", fShuttleInstanceHost.Data()))) continue;
1196                 
1197                 if (!fProcessAll)
1198                 {
1199                         anAttribute = anEntry->GetAttribute("detectors");
1200                         const char *detName;
1201                         while((detName = anAttribute->GetValue())){
1202                                 TObjString *objDet= new TObjString(detName);
1203                                 fProcessedDetectors.Add(objDet);
1204                         }
1205                 }
1206         }       
1207         
1208         return 0;
1209 }
1210
1211
1212 //______________________________________________________________________________________________
1213 void AliShuttleConfig::Print(Option_t* option) const
1214 {
1215 // print configuration
1216 // options : "": print configuration for all detectors, aliases and DPs in compacted format
1217 //           "uncompact": print configuration for all detectors, aliases and DPs in uncompacted format
1218 //           "DET": print configuration for DET, aliases and DPs in compacted format
1219 //           "DET, uncompact": print configuration for DET, aliases and DPs in uncompacted format
1220
1221         TString result;
1222         result += '\n';
1223         
1224         TString mode = "test";
1225         if (fRunMode == kProd) mode = "production";
1226
1227         result += "########################################################################\n";
1228         result += Form(" Shuttle configuration from %s - Run Mode: <%s> \n", 
1229                                         fConfigHost.Data(), mode.Data());
1230         result += "########################################################################\n";
1231         result += Form("\nShuttle running on %s \n", fShuttleInstanceHost.Data());
1232
1233         if(fProcessAll) {
1234                 result += Form("All detectors will be processed! \n");
1235         } else {
1236                 result += "Detectors processed by this host: ";
1237                 TIter it(&fProcessedDetectors);
1238                 TObjString* aDet;
1239                 while ((aDet = (TObjString*) it.Next())) {
1240                         result += Form("%s ", aDet->String().Data());
1241                 }
1242                 result += "\n";
1243         }
1244
1245         result += Form("PP time out = %d - max PP mem size = %d KB - max retries = %d "
1246                        "- DIM trigger waiting timeout = %d\n\n", 
1247                                 fPPTimeOut, fPPMaxMem, fMaxRetries, fTriggerWait);
1248         result += "------------------------------------------------------\n";
1249
1250         result += Form("Logbook Configuration \n\n \tHost: %s:%d; \tUser: %s; ",
1251                 fDAQlbHost.Data(), fDAQlbPort, fDAQlbUser.Data());
1252
1253 //      result += "Password: ";
1254 //      result.Append('*', fDAQlbPass.Length());
1255         result += Form("\tDB: %s; \tTables: %s, %s, %s\n",
1256                 fDAQlbDB.Data(), fDAQlbTable.Data(), fShuttlelbTable.Data(), fRunTypelbTable.Data());
1257
1258         result += "\n\n";
1259
1260         result += "------------------------------------------------------\n";
1261         result += "FXS configuration\n\n";
1262
1263         for(int iSys=0;iSys<3;iSys++){
1264                 result += Form("*** %s ***\n", AliShuttleInterface::GetSystemName(iSys));
1265                 result += Form("\tDB  host: %s:%d; \tUser: %s; \tName: %s; \tTable: %s\n",
1266                                                 fFXSdbHost[iSys].Data(), fFXSdbPort[iSys], fFXSdbUser[iSys].Data(),
1267                                                 fFXSdbName[iSys].Data(), fFXSdbTable[iSys].Data());
1268                 // result += Form("DB Password:",fFXSdbPass[iSys].Data());
1269                 result += Form("\tFXS host: %s:%d; \tUser: %s\n\n", fFXSHost[iSys].Data(), fFXSPort[iSys],
1270                                                 fFXSUser[iSys].Data());
1271                 // result += Form("FXS Password:",fFXSPass[iSys].Data());
1272         }
1273
1274         result += "------------------------------------------------------\n";
1275         result += "MonaLisa configuration\n\n";
1276         
1277         result += Form("\tHost: %s; \tTable name: %s",
1278                 fMonitorHost.Data(), fMonitorTable.Data());
1279                 
1280         result += "\n\n";
1281         
1282         TString optStr(option);
1283
1284         result += "------------------------------------------------------\n";
1285         result += "Detector-specific configuration\n\n";
1286         
1287         TIter iter(fDetectorMap.GetTable());
1288         TPair* aPair = 0;
1289         
1290         while ((aPair = (TPair*) iter.Next())) {
1291                 AliShuttleDetConfigHolder* aHolder = (AliShuttleDetConfigHolder*) aPair->Value();
1292                 if (optStr != "" && !optStr.Contains(aHolder->GetDetector()) && 
1293                                 optStr.CompareTo("uncompact",TString::kIgnoreCase) != 0 )
1294                                 continue;
1295                 
1296                 result += Form("*** %s *** \n", aHolder->GetDetector());
1297
1298                 const TObjArray* responsibles = aHolder->GetResponsibles();
1299                 if (responsibles->GetEntries() != 0)
1300                 {
1301                         result += "\tDetector responsible(s): ";
1302                         TIter it(responsibles);
1303                         TObjString* aResponsible;
1304                         while ((aResponsible = (TObjString*) it.Next()))
1305                         {
1306                                 result += Form("%s ", aResponsible->String().Data());
1307                         }
1308                         result += "\n";
1309                 }
1310
1311                 result += Form("\tStrict run ordering: %s \n\n", aHolder->StrictRunOrder() ? "YES" : "NO");
1312                 
1313                 const TObjArray* dcsConfig = aHolder->GetDCSConfig();
1314                 
1315                 AliShuttleDCSConfigHolder* dcsHolder = 0;
1316                 TIter dcsIter(dcsConfig);
1317                 Int_t count=0;
1318                 while ((dcsHolder = dynamic_cast<AliShuttleDCSConfigHolder*> (dcsIter.Next())))
1319                 {
1320                         result += Form("\tAmanda server [%d]: %s:%d - MultiSplit = %d\n", count,
1321                                 dcsHolder->GetDCSHost(), dcsHolder->GetDCSPort(), dcsHolder->GetMultiSplit());
1322
1323                         const TObjArray* aliases = 0;
1324                         if (optStr.Contains("uncompact",TString::kIgnoreCase))
1325                         {
1326                                 aliases = dcsHolder->GetDCSAliases();
1327                         } else {
1328                                 aliases = dcsHolder->GetCompactDCSAliases();
1329                         }
1330
1331                         if (aliases->GetEntries() != 0)
1332                         {
1333                                 result += Form("\tDCS Aliases [%d]: ", count);
1334                                 TIter it(aliases);
1335                                 TObjString* anAlias;
1336                                 while ((anAlias = (TObjString*) it.Next()))
1337                                 {
1338                                         result += Form("%s ", anAlias->String().Data());
1339                                 }
1340                                 result += "\n";
1341                         }
1342
1343                         const TObjArray* dataPoints = 0;
1344                         if (optStr.Contains("uncompact",TString::kIgnoreCase))
1345                         {
1346                                 dataPoints = dcsHolder->GetDCSDataPoints();
1347                         } else {
1348                                 dataPoints = dcsHolder->GetCompactDCSDataPoints();
1349                         }
1350                         if (dataPoints->GetEntries() != 0)
1351                         {
1352                                 result += Form("\tDCS Data Points [%d]: ", count);
1353                                 TIter it(dataPoints);
1354                                 TObjString* aDataPoint;
1355                                 while ((aDataPoint = (TObjString*) it.Next())) {
1356                                         result += Form("%s ", aDataPoint->String().Data());
1357                                 }
1358                                 result += "\n";
1359                         }
1360                         count++;
1361                         result += "\n";
1362                 }
1363         }
1364         if(!fIsValid) result += "\n\n********** !!!!! Configuration is INVALID !!!!! **********\n";
1365
1366         AliInfo(result);
1367 }