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