]>
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 | ||
57c1a579 | 30 | const char* GetConfigHost() const {return fConfigHost.Data();} |
31 | ||
57f50b3c | 32 | const char* GetDAQlbHost() const {return fDAQlbHost.Data();} |
fc5a4708 | 33 | UInt_t GetDAQlbPort() const {return fDAQlbPort;} |
57f50b3c | 34 | const char* GetDAQlbUser() const {return fDAQlbUser.Data();} |
35 | const char* GetDAQlbPass() const {return fDAQlbPass.Data();} | |
2c15234c | 36 | const char* GetDAQlbDB() const {return fDAQlbDB.Data();} |
37 | const char* GetDAQlbTable() const {return fDAQlbTable.Data();} | |
441b0e9c | 38 | const char* GetShuttlelbTable() const {return fShuttlelbTable.Data();} |
39 | const char* GetRunTypelbTable() const {return fRunTypelbTable.Data();} | |
b948db8d | 40 | |
2c15234c | 41 | const char* GetFXSHost(Int_t system) const {return fFXSHost[system].Data();} |
fc5a4708 | 42 | UInt_t GetFXSPort(Int_t system) const {return fFXSPort[system];} |
2c15234c | 43 | const char* GetFXSUser(Int_t system) const {return fFXSUser[system].Data();} |
44 | const char* GetFXSPass(Int_t system) const {return fFXSPass[system].Data();} | |
57f50b3c | 45 | |
2c15234c | 46 | const char* GetFXSdbHost(Int_t system) const {return fFXSdbHost[system].Data();} |
fc5a4708 | 47 | UInt_t GetFXSdbPort(Int_t system) const {return fFXSdbPort[system];} |
2c15234c | 48 | const char* GetFXSdbUser(Int_t system) const {return fFXSdbUser[system].Data();} |
49 | const char* GetFXSdbPass(Int_t system) const {return fFXSdbPass[system].Data();} | |
50 | const char* GetFXSdbName(Int_t system) const {return fFXSdbName[system].Data();} | |
51 | const char* GetFXSdbTable(Int_t system) const {return fFXSdbTable[system].Data();} | |
d477ad88 | 52 | |
2bb7b766 | 53 | Int_t GetMaxRetries() const { return fMaxRetries; } |
5164a766 | 54 | |
cb343cfd | 55 | Int_t GetPPTimeOut() const { return fPPTimeOut; } |
56 | ||
36c99a6a | 57 | const TObjArray* GetDetectors() const; |
73abe331 | 58 | |
59 | Bool_t HasDetector(const char* detector) const; | |
b948db8d | 60 | const char* GetDCSHost(const char* detector) const; |
61 | Int_t GetDCSPort(const char* detector) const; | |
62 | const TObjArray* GetDCSAliases(const char* detector) const; | |
2c15234c | 63 | const TObjArray* GetDCSDataPoints(const char* detector) const; |
36c99a6a | 64 | const TObjArray* GetCompactDCSAliases(const char* detector) const; |
65 | const TObjArray* GetCompactDCSDataPoints(const char* detector) const; | |
57c1a579 | 66 | const TObjArray* GetResponsibles(const char* detector) const; |
be48e3ea | 67 | Bool_t StrictRunOrder(const char* detector) const; |
b948db8d | 68 | |
69 | void SetProcessAll(Bool_t flag=kTRUE) {fProcessAll=flag;} | |
58bc3020 | 70 | Bool_t ProcessAll() const {return fProcessAll;} |
b948db8d | 71 | |
72 | Bool_t HostProcessDetector(const char* detector) const; | |
73abe331 | 73 | |
74 | virtual void Print(Option_t* option = NULL) const; | |
75 | ||
76 | private: | |
b948db8d | 77 | |
58bc3020 | 78 | class AliShuttleConfigHolder: public TObject { |
73abe331 | 79 | public: |
58bc3020 | 80 | AliShuttleConfigHolder(const TLDAPEntry* entry); |
81 | ~AliShuttleConfigHolder(); | |
73abe331 | 82 | |
57f50b3c | 83 | const char* GetDetector() const {return fDetector.Data();} |
84 | const char* GetDCSHost() const {return fDCSHost.Data();} | |
85 | Int_t GetDCSPort() const {return fDCSPort;} | |
2bb7b766 | 86 | const TObjArray* GetDCSAliases() const {return fDCSAliases;} |
2c15234c | 87 | const TObjArray* GetDCSDataPoints() const {return fDCSDataPoints;} |
36c99a6a | 88 | const TObjArray* GetCompactDCSAliases() const {return fDCSAliasesComp;} |
89 | const TObjArray* GetCompactDCSDataPoints() const {return fDCSDataPointsComp;} | |
57c1a579 | 90 | const TObjArray* GetResponsibles() const {return fResponsibles;} |
73abe331 | 91 | |
57f50b3c | 92 | Bool_t IsValid() const {return fIsValid;} |
93 | Bool_t SkipDCSQuery() const {return fSkipDCSQuery;} | |
be48e3ea | 94 | Bool_t StrictRunOrder() const {return fStrictRunOrder;} |
73abe331 | 95 | |
f59d2f8f | 96 | void ExpandAndAdd(TObjArray* target, const char* entry); |
40150741 | 97 | |
58bc3020 | 98 | private: |
99 | TString fDetector; // Detector name | |
100 | TString fDCSHost; // Host name of the DCS server | |
101 | Int_t fDCSPort; // port of the DCS server | |
2bb7b766 | 102 | TObjArray* fDCSAliases; // List of DCS aliases to be retrieved |
2c15234c | 103 | TObjArray* fDCSDataPoints; // List of DCS data points to be retrieved |
36c99a6a | 104 | TObjArray* fDCSAliasesComp; // Compact list of DCS aliases to be printed |
105 | TObjArray* fDCSDataPointsComp; // Compact list of DCS data points to be printed | |
57c1a579 | 106 | TObjArray* fResponsibles; // List of email addresses of the detector's responsible(s) |
58bc3020 | 107 | Bool_t fIsValid; // flag for the validity of the configuration |
57f50b3c | 108 | Bool_t fSkipDCSQuery; // flag - if TRUE (-> DCS config empty) skip DCS archive data query |
be48e3ea | 109 | Bool_t fStrictRunOrder; // flag - if TRUE connect data in a strict run ordering |
58bc3020 | 110 | |
111 | ||
112 | ClassDef(AliShuttleConfigHolder, 0); | |
73abe331 | 113 | }; |
114 | ||
115 | ||
57f50b3c | 116 | Bool_t fIsValid; //! flag for the validity of the configuration |
117 | ||
57c1a579 | 118 | TString fConfigHost; //! Host of the Shuttle configuration LDAP server |
119 | ||
57f50b3c | 120 | TString fDAQlbHost; //! Host of the DAQ logbook MySQL Server |
fc5a4708 | 121 | UInt_t fDAQlbPort; //! port of the DAQ logbook MySQL Server |
57f50b3c | 122 | TString fDAQlbUser; //! username of the DAQ logbook MySQL Server |
123 | TString fDAQlbPass; //! password of the DAQ logbook MySQL Server | |
2c15234c | 124 | TString fDAQlbDB; //! DB name of the DAQ logbook MySQL Server |
441b0e9c | 125 | TString fDAQlbTable; //! Table name of the DAQ logbook |
126 | TString fShuttlelbTable; //! Table name of the Shuttle logbook | |
127 | TString fRunTypelbTable; //! Table name of the Run typr logbook | |
2c15234c | 128 | |
129 | TString fFXSHost[3]; //! Host of the [DAQ, DCS, HLT] File eXchange Server | |
fc5a4708 | 130 | UInt_t fFXSPort[3]; //! Port of the [DAQ, DCS, HLT] File eXchange Server |
2c15234c | 131 | TString fFXSUser[3]; //! username of the [DAQ, DCS, HLT] File eXchange Server |
132 | TString fFXSPass[3]; //! password of the [DAQ, DCS, HLT] File eXchange Server | |
133 | ||
134 | TString fFXSdbHost[3]; //! Host of the [DAQ, DCS, HLT] FXS database | |
fc5a4708 | 135 | UInt_t fFXSdbPort[3]; //! Port of the [DAQ, DCS, HLT] FXS database |
2c15234c | 136 | TString fFXSdbUser[3]; //! username of the [DAQ, DCS, HLT] FXS database |
137 | TString fFXSdbPass[3]; //! password of the [DAQ, DCS, HLT] FXS database | |
138 | TString fFXSdbName[3]; //! name of the [DAQ, DCS, HLT] FXS database | |
139 | TString fFXSdbTable[3]; //! Table name of the [DAQ, DCS, HLT] FXS database | |
b948db8d | 140 | |
cb343cfd | 141 | Int_t fMaxRetries; // number of retries of a failed preprocessor |
142 | ||
143 | Int_t fPPTimeOut; // timeout until a preprocessor is canceled | |
d477ad88 | 144 | |
be48e3ea | 145 | TMap fDetectorMap; //! Map of the detector-by-detector configuration |
57f50b3c | 146 | TObjArray fDetectorList; //! List of detectors with valid configuration |
b948db8d | 147 | |
57f50b3c | 148 | TString fShuttleInstanceHost; //! Instance of the SHUTTLE |
149 | TObjArray fProcessedDetectors; //! list of the detector to be processed by this machine | |
150 | Bool_t fProcessAll; //! flag indicating that all detectors will be processed | |
73abe331 | 151 | |
152 | ClassDef(AliShuttleConfig, 0); | |
153 | }; | |
154 | ||
155 | #endif | |
156 |