1 #ifndef ALI_SHUTTLE_CONFIG_H
2 #define ALI_SHUTTLE_CONFIG_H
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 // This class keeps the AliShuttle configuration.
11 // It reads the configuration for LDAP server.
12 // For more info see AliShuttleConfig.cxx
17 #include <TObjArray.h>
19 #include <TLDAPServer.h>
21 class AliShuttleConfig: public TObject {
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();
28 Bool_t IsValid() const {return fIsValid;};
30 const char* GetDAQlbHost() const {return fDAQlbHost.Data();}
31 UInt_t GetDAQlbPort() const {return fDAQlbPort;}
32 const char* GetDAQlbUser() const {return fDAQlbUser.Data();}
33 const char* GetDAQlbPass() const {return fDAQlbPass.Data();}
34 const char* GetDAQlbDB() const {return fDAQlbDB.Data();}
35 const char* GetDAQlbTable() const {return fDAQlbTable.Data();}
37 const char* GetFXSHost(Int_t system) const {return fFXSHost[system].Data();}
38 UInt_t GetFXSPort(Int_t system) const {return fFXSPort[system];}
39 const char* GetFXSUser(Int_t system) const {return fFXSUser[system].Data();}
40 const char* GetFXSPass(Int_t system) const {return fFXSPass[system].Data();}
42 const char* GetFXSdbHost(Int_t system) const {return fFXSdbHost[system].Data();}
43 UInt_t GetFXSdbPort(Int_t system) const {return fFXSdbPort[system];}
44 const char* GetFXSdbUser(Int_t system) const {return fFXSdbUser[system].Data();}
45 const char* GetFXSdbPass(Int_t system) const {return fFXSdbPass[system].Data();}
46 const char* GetFXSdbName(Int_t system) const {return fFXSdbName[system].Data();}
47 const char* GetFXSdbTable(Int_t system) const {return fFXSdbTable[system].Data();}
49 Int_t GetMaxRetries() const { return fMaxRetries; }
51 Int_t GetPPTimeOut() const { return fPPTimeOut; }
53 const TObjArray* GetDetectors() const;
55 Bool_t HasDetector(const char* detector) const;
56 const char* GetDCSHost(const char* detector) const;
57 Int_t GetDCSPort(const char* detector) const;
58 const TObjArray* GetDCSAliases(const char* detector) const;
59 const TObjArray* GetDCSDataPoints(const char* detector) const;
60 Bool_t StrictRunOrder(const char* detector) const;
62 void SetProcessAll(Bool_t flag=kTRUE) {fProcessAll=flag;}
63 Bool_t ProcessAll() const {return fProcessAll;}
65 Bool_t HostProcessDetector(const char* detector) const;
67 virtual void Print(Option_t* option = NULL) const;
71 class AliShuttleConfigHolder: public TObject {
73 AliShuttleConfigHolder(const TLDAPEntry* entry);
74 ~AliShuttleConfigHolder();
76 const char* GetDetector() const {return fDetector.Data();}
77 const char* GetDCSHost() const {return fDCSHost.Data();}
78 Int_t GetDCSPort() const {return fDCSPort;}
79 const TObjArray* GetDCSAliases() const {return fDCSAliases;}
80 const TObjArray* GetDCSDataPoints() const {return fDCSDataPoints;}
82 Bool_t IsValid() const {return fIsValid;}
83 Bool_t SkipDCSQuery() const {return fSkipDCSQuery;}
84 Bool_t StrictRunOrder() const {return fStrictRunOrder;}
87 TString fDetector; // Detector name
88 TString fDCSHost; // Host name of the DCS server
89 Int_t fDCSPort; // port of the DCS server
90 TObjArray* fDCSAliases; // List of DCS aliases to be retrieved
91 TObjArray* fDCSDataPoints; // List of DCS data points to be retrieved
92 Bool_t fIsValid; // flag for the validity of the configuration
93 Bool_t fSkipDCSQuery; // flag - if TRUE (-> DCS config empty) skip DCS archive data query
94 Bool_t fStrictRunOrder; // flag - if TRUE connect data in a strict run ordering
97 ClassDef(AliShuttleConfigHolder, 0);
101 Bool_t fIsValid; //! flag for the validity of the configuration
103 TString fDAQlbHost; //! Host of the DAQ logbook MySQL Server
104 UInt_t fDAQlbPort; //! port of the DAQ logbook MySQL Server
105 TString fDAQlbUser; //! username of the DAQ logbook MySQL Server
106 TString fDAQlbPass; //! password of the DAQ logbook MySQL Server
107 TString fDAQlbDB; //! DB name of the DAQ logbook MySQL Server
108 TString fDAQlbTable; //! Table name of the DAQ logbook MySQL Server
110 TString fFXSHost[3]; //! Host of the [DAQ, DCS, HLT] File eXchange Server
111 UInt_t fFXSPort[3]; //! Port of the [DAQ, DCS, HLT] File eXchange Server
112 TString fFXSUser[3]; //! username of the [DAQ, DCS, HLT] File eXchange Server
113 TString fFXSPass[3]; //! password of the [DAQ, DCS, HLT] File eXchange Server
115 TString fFXSdbHost[3]; //! Host of the [DAQ, DCS, HLT] FXS database
116 UInt_t fFXSdbPort[3]; //! Port of the [DAQ, DCS, HLT] FXS database
117 TString fFXSdbUser[3]; //! username of the [DAQ, DCS, HLT] FXS database
118 TString fFXSdbPass[3]; //! password of the [DAQ, DCS, HLT] FXS database
119 TString fFXSdbName[3]; //! name of the [DAQ, DCS, HLT] FXS database
120 TString fFXSdbTable[3]; //! Table name of the [DAQ, DCS, HLT] FXS database
122 Int_t fMaxRetries; // number of retries of a failed preprocessor
124 Int_t fPPTimeOut; // timeout until a preprocessor is canceled
126 TMap fDetectorMap; //! Map of the detector-by-detector configuration
127 TObjArray fDetectorList; //! List of detectors with valid configuration
129 TString fShuttleInstanceHost; //! Instance of the SHUTTLE
130 TObjArray fProcessedDetectors; //! list of the detector to be processed by this machine
131 Bool_t fProcessAll; //! flag indicating that all detectors will be processed
133 ClassDef(AliShuttleConfig, 0);