fixed bug for SM 10 and 11
[u/mrichter/AliRoot.git] / SHUTTLE / AliShuttleConfig.h
CommitLineData
73abe331 1#ifndef ALI_SHUTTLE_CONFIG_H
2#define ALI_SHUTTLE_CONFIG_H
3
4/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
6
7/* $Id$ */
8
9//
10// This class keeps the AliShuttle configuration.
11// It reads the configuration for LDAP server.
12//
13
14#include <TObject.h>
15#include <TString.h>
d477ad88 16#include <TObjArray.h>
73abe331 17#include <TMap.h>
18#include <TLDAPServer.h>
19
20class AliShuttleConfig: public TObject {
21public:
b948db8d 22 AliShuttleConfig(const char* host, Int_t port = LDAP_PORT,
23 const char* binddn = 0, const char* password = 0,
24 const char* basedn = "o=alice,dc=cern,dc=ch");
73abe331 25 virtual ~AliShuttleConfig();
26
27 Bool_t IsValid() const {return fIsValid;};
28
b948db8d 29 const char* GetDAQLogBookHost() const {return fDAQLogBookHost.Data();}
30 const char* GetDAQLogBookUser() const {return fDAQLogBookUser.Data();}
31 const char* GetDAQLogBookPassword() const {return fDAQLogBookPassword.Data();}
32
33 const char* GetDAQFSHost() const {return fDAQFSHost.Data();}
d477ad88 34
35 const TObjArray* GetDetectors() const;
73abe331 36
37 Bool_t HasDetector(const char* detector) const;
b948db8d 38 const char* GetDCSHost(const char* detector) const;
39 Int_t GetDCSPort(const char* detector) const;
40 const TObjArray* GetDCSAliases(const char* detector) const;
41 const TObjArray* GetDAQFileIDs(const char* detector) const;
42
43 void SetProcessAll(Bool_t flag=kTRUE) {fProcessAll=flag;}
44 Bool_t ProcessAll() {return fProcessAll;}
45
46 Bool_t HostProcessDetector(const char* detector) const;
73abe331 47
48 virtual void Print(Option_t* option = NULL) const;
49
50private:
b948db8d 51
73abe331 52 class ConfigHolder: public TObject {
53 TString fDetector;
b948db8d 54 TString fDCSHost;
55 Int_t fDCSPort;
56 TObjArray fDCSAliases;
57 TObjArray fDAQFileIDs;
73abe331 58 Bool_t fIsValid;
59
60 public:
61 ConfigHolder(const TLDAPEntry* entry);
62 ~ConfigHolder();
63
64 const char* GetDetector() const {return fDetector.Data();};
b948db8d 65 const char* GetDCSHost() const {return fDCSHost.Data();};
66 Int_t GetDCSPort() const {return fDCSPort;};
67 const TObjArray* GetDCSAliases() const {return &fDCSAliases;};
68 const TObjArray* GetDAQFileIDs() const {return &fDAQFileIDs;};
73abe331 69
70 Bool_t IsValid() const {return fIsValid;};
71
72 ClassDef(ConfigHolder, 0);
73 };
74
75
76 Bool_t fIsValid;
77
b948db8d 78 TString fDAQLogBookHost;
79 TString fDAQLogBookUser;
80 TString fDAQLogBookPassword;
81
82 TString fDAQFSHost;
d477ad88 83
73abe331 84 TMap fDetectorMap;
b948db8d 85 TObjArray fDetectorList;
86
87 TString fShuttleInstanceHost;
88 TObjArray fProcessedDetectors;
89 Bool_t fProcessAll;
73abe331 90
91 ClassDef(AliShuttleConfig, 0);
92};
93
94#endif
95