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