]>
Commit | Line | Data |
---|---|---|
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 | // For more info see AliShuttleConfig.cxx | |
13 | // | |
14 | ||
15 | #include <TObject.h> | |
16 | #include <TString.h> | |
17 | #include <TObjArray.h> | |
18 | #include <TMap.h> | |
19 | #include <TLDAPServer.h> | |
20 | ||
21 | class AliShuttleConfig: public TObject { | |
22 | public: | |
23 | AliShuttleConfig(const char* host, Int_t port = LDAP_PORT, | |
24 | const char* binddn = 0, const char* password = 0, | |
25 | const char* basedn = "o=alice,dc=cern,dc=ch"); | |
26 | virtual ~AliShuttleConfig(); | |
27 | ||
28 | Bool_t IsValid() const {return fIsValid;}; | |
29 | ||
30 | const char* GetDAQlbHost() const {return fDAQlbHost.Data();} | |
31 | const char* GetDAQlbUser() const {return fDAQlbUser.Data();} | |
32 | const char* GetDAQlbPass() const {return fDAQlbPass.Data();} | |
33 | ||
34 | const char* GetFESHost(Int_t system) const {return fFESHost[system].Data();} | |
35 | const char* GetFESUser(Int_t system) const {return fFESUser[system].Data();} | |
36 | const char* GetFESPass(Int_t system) const {return fFESPass[system].Data();} | |
37 | ||
38 | const char* GetFESlbHost(Int_t system) const {return fFESlbHost[system].Data();} | |
39 | const char* GetFESlbUser(Int_t system) const {return fFESlbUser[system].Data();} | |
40 | const char* GetFESlbPass(Int_t system) const {return fFESlbPass[system].Data();} | |
41 | ||
42 | Int_t GetMaxPPRetries() const { return fMaxPPRetries; } | |
43 | Int_t GetMaxRetries() const { return fMaxRetries; } | |
44 | ||
45 | const TObjArray* GetDetectors() const; | |
46 | ||
47 | Bool_t HasDetector(const char* detector) const; | |
48 | const char* GetDCSHost(const char* detector) const; | |
49 | Int_t GetDCSPort(const char* detector) const; | |
50 | const TObjArray* GetDCSAliases(const char* detector) const; | |
51 | ||
52 | void SetProcessAll(Bool_t flag=kTRUE) {fProcessAll=flag;} | |
53 | Bool_t ProcessAll() const {return fProcessAll;} | |
54 | ||
55 | Bool_t HostProcessDetector(const char* detector) const; | |
56 | ||
57 | virtual void Print(Option_t* option = NULL) const; | |
58 | ||
59 | private: | |
60 | ||
61 | class AliShuttleConfigHolder: public TObject { | |
62 | public: | |
63 | AliShuttleConfigHolder(const TLDAPEntry* entry); | |
64 | ~AliShuttleConfigHolder(); | |
65 | ||
66 | const char* GetDetector() const {return fDetector.Data();} | |
67 | const char* GetDCSHost() const {return fDCSHost.Data();} | |
68 | Int_t GetDCSPort() const {return fDCSPort;} | |
69 | const TObjArray* GetDCSAliases() const {return fDCSAliases;} | |
70 | ||
71 | Bool_t IsValid() const {return fIsValid;} | |
72 | Bool_t SkipDCSQuery() const {return fSkipDCSQuery;} | |
73 | ||
74 | private: | |
75 | TString fDetector; // Detector name | |
76 | TString fDCSHost; // Host name of the DCS server | |
77 | Int_t fDCSPort; // port of the DCS server | |
78 | TObjArray* fDCSAliases; // List of DCS aliases to be retrieved | |
79 | Bool_t fIsValid; // flag for the validity of the configuration | |
80 | Bool_t fSkipDCSQuery; // flag - if TRUE (-> DCS config empty) skip DCS archive data query | |
81 | ||
82 | ||
83 | ClassDef(AliShuttleConfigHolder, 0); | |
84 | }; | |
85 | ||
86 | ||
87 | Bool_t fIsValid; //! flag for the validity of the configuration | |
88 | ||
89 | TString fDAQlbHost; //! Host of the DAQ logbook MySQL Server | |
90 | TString fDAQlbUser; //! username of the DAQ logbook MySQL Server | |
91 | TString fDAQlbPass; //! password of the DAQ logbook MySQL Server | |
92 | ||
93 | TString fFESHost[3]; //! Host of the [DAQ, DCS, HLT] File Exchange Server | |
94 | TString fFESUser[3]; //! username of the [DAQ, DCS, HLT] File Exchange Server | |
95 | TString fFESPass[3]; //! password of the [DAQ, DCS, HLT] File Exchange Server | |
96 | ||
97 | TString fFESlbHost[3]; //! Host of the [DAQ, DCS, HLT] FES logbook | |
98 | TString fFESlbUser[3]; //! username of the [DAQ, DCS, HLT] FES logbook | |
99 | TString fFESlbPass[3]; //! password of the [DAQ, DCS, HLT] FES logbook | |
100 | ||
101 | Int_t fMaxPPRetries; // number of retries of a crashed preprocessor | |
102 | Int_t fMaxRetries; // number of retries for all other failures | |
103 | ||
104 | TMap fDetectorMap; //! Map of the detector-by-detector configuration | |
105 | TObjArray fDetectorList; //! List of detectors with valid configuration | |
106 | ||
107 | TString fShuttleInstanceHost; //! Instance of the SHUTTLE | |
108 | TObjArray fProcessedDetectors; //! list of the detector to be processed by this machine | |
109 | Bool_t fProcessAll; //! flag indicating that all detectors will be processed | |
110 | ||
111 | ClassDef(AliShuttleConfig, 0); | |
112 | }; | |
113 | ||
114 | #endif | |
115 |