]>
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 | ||
b948db8d | 30 | const char* GetDAQLogBookHost() const {return fDAQLogBookHost.Data();} |
31 | const char* GetDAQLogBookUser() const {return fDAQLogBookUser.Data();} | |
32 | const char* GetDAQLogBookPassword() const {return fDAQLogBookPassword.Data();} | |
33 | ||
34 | const char* GetDAQFSHost() const {return fDAQFSHost.Data();} | |
d477ad88 | 35 | |
36 | const TObjArray* GetDetectors() const; | |
73abe331 | 37 | |
38 | Bool_t HasDetector(const char* detector) const; | |
b948db8d | 39 | const char* GetDCSHost(const char* detector) const; |
40 | Int_t GetDCSPort(const char* detector) const; | |
41 | const TObjArray* GetDCSAliases(const char* detector) const; | |
42 | const TObjArray* GetDAQFileIDs(const char* detector) const; | |
43 | ||
44 | void SetProcessAll(Bool_t flag=kTRUE) {fProcessAll=flag;} | |
58bc3020 | 45 | Bool_t ProcessAll() const {return fProcessAll;} |
b948db8d | 46 | |
47 | Bool_t HostProcessDetector(const char* detector) const; | |
73abe331 | 48 | |
49 | virtual void Print(Option_t* option = NULL) const; | |
50 | ||
51 | private: | |
b948db8d | 52 | |
58bc3020 | 53 | class AliShuttleConfigHolder: public TObject { |
73abe331 | 54 | public: |
58bc3020 | 55 | AliShuttleConfigHolder(const TLDAPEntry* entry); |
56 | ~AliShuttleConfigHolder(); | |
73abe331 | 57 | |
58 | const char* GetDetector() const {return fDetector.Data();}; | |
b948db8d | 59 | const char* GetDCSHost() const {return fDCSHost.Data();}; |
60 | Int_t GetDCSPort() const {return fDCSPort;}; | |
61 | const TObjArray* GetDCSAliases() const {return &fDCSAliases;}; | |
62 | const TObjArray* GetDAQFileIDs() const {return &fDAQFileIDs;}; | |
73abe331 | 63 | |
64 | Bool_t IsValid() const {return fIsValid;}; | |
65 | ||
58bc3020 | 66 | private: |
67 | TString fDetector; // Detector name | |
68 | TString fDCSHost; // Host name of the DCS server | |
69 | Int_t fDCSPort; // port of the DCS server | |
70 | TObjArray fDCSAliases; // List of DCS aliases to be retrieved | |
71 | TObjArray fDAQFileIDs; // list of IDs of the files to be retrived from DAQ | |
72 | Bool_t fIsValid; // flag for the validity of the configuration | |
73 | ||
74 | ||
75 | ClassDef(AliShuttleConfigHolder, 0); | |
73abe331 | 76 | }; |
77 | ||
78 | ||
58bc3020 | 79 | Bool_t fIsValid; // flag for the validity of the configuration |
73abe331 | 80 | |
58bc3020 | 81 | TString fDAQLogBookHost; // Host of the DAQ logbook MySQL Server |
82 | TString fDAQLogBookUser; // username of the DAQ logbook MySQL Server | |
83 | TString fDAQLogBookPassword; // password of the DAQ logbook MySQL Server | |
b948db8d | 84 | |
58bc3020 | 85 | TString fDAQFSHost; // Host of the DAQ file system |
d477ad88 | 86 | |
58bc3020 | 87 | TMap fDetectorMap; // Map of the detector-by-detector configuration |
88 | TObjArray fDetectorList; // List of detectors with valid configuration | |
b948db8d | 89 | |
58bc3020 | 90 | TString fShuttleInstanceHost; // Instance of the SHUTTLE |
91 | TObjArray fProcessedDetectors; // list of the detector to be processed by this machine | |
92 | Bool_t fProcessAll; // flag indicating that all detectors will be processed | |
73abe331 | 93 | |
94 | ClassDef(AliShuttleConfig, 0); | |
95 | }; | |
96 | ||
97 | #endif | |
98 |