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