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