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