08-dec-2006 NvE Memberfunctions SetUT introduced in AliTimestamp to provide convenient
[u/mrichter/AliRoot.git] / SHUTTLE / AliShuttleConfig.h
CommitLineData
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
21class AliShuttleConfig: public TObject {
22public:
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();}
2c15234c 33 const char* GetDAQlbDB() const {return fDAQlbDB.Data();}
34 const char* GetDAQlbTable() const {return fDAQlbTable.Data();}
b948db8d 35
2c15234c 36 const char* GetFXSHost(Int_t system) const {return fFXSHost[system].Data();}
37 const char* GetFXSUser(Int_t system) const {return fFXSUser[system].Data();}
38 const char* GetFXSPass(Int_t system) const {return fFXSPass[system].Data();}
57f50b3c 39
2c15234c 40 const char* GetFXSdbHost(Int_t system) const {return fFXSdbHost[system].Data();}
41 const char* GetFXSdbUser(Int_t system) const {return fFXSdbUser[system].Data();}
42 const char* GetFXSdbPass(Int_t system) const {return fFXSdbPass[system].Data();}
43 const char* GetFXSdbName(Int_t system) const {return fFXSdbName[system].Data();}
44 const char* GetFXSdbTable(Int_t system) const {return fFXSdbTable[system].Data();}
d477ad88 45
2bb7b766 46 Int_t GetMaxRetries() const { return fMaxRetries; }
5164a766 47
cb343cfd 48 Int_t GetPPTimeOut() const { return fPPTimeOut; }
49
50 const TObjArray* GetDetectors() const;
73abe331 51
52 Bool_t HasDetector(const char* detector) const;
b948db8d 53 const char* GetDCSHost(const char* detector) const;
54 Int_t GetDCSPort(const char* detector) const;
55 const TObjArray* GetDCSAliases(const char* detector) const;
2c15234c 56 const TObjArray* GetDCSDataPoints(const char* detector) const;
be48e3ea 57 Bool_t StrictRunOrder(const char* detector) const;
b948db8d 58
59 void SetProcessAll(Bool_t flag=kTRUE) {fProcessAll=flag;}
58bc3020 60 Bool_t ProcessAll() const {return fProcessAll;}
b948db8d 61
62 Bool_t HostProcessDetector(const char* detector) const;
73abe331 63
64 virtual void Print(Option_t* option = NULL) const;
65
66private:
b948db8d 67
58bc3020 68 class AliShuttleConfigHolder: public TObject {
73abe331 69 public:
58bc3020 70 AliShuttleConfigHolder(const TLDAPEntry* entry);
71 ~AliShuttleConfigHolder();
73abe331 72
57f50b3c 73 const char* GetDetector() const {return fDetector.Data();}
74 const char* GetDCSHost() const {return fDCSHost.Data();}
75 Int_t GetDCSPort() const {return fDCSPort;}
2bb7b766 76 const TObjArray* GetDCSAliases() const {return fDCSAliases;}
2c15234c 77 const TObjArray* GetDCSDataPoints() const {return fDCSDataPoints;}
73abe331 78
57f50b3c 79 Bool_t IsValid() const {return fIsValid;}
80 Bool_t SkipDCSQuery() const {return fSkipDCSQuery;}
be48e3ea 81 Bool_t StrictRunOrder() const {return fStrictRunOrder;}
73abe331 82
58bc3020 83 private:
84 TString fDetector; // Detector name
85 TString fDCSHost; // Host name of the DCS server
86 Int_t fDCSPort; // port of the DCS server
2bb7b766 87 TObjArray* fDCSAliases; // List of DCS aliases to be retrieved
2c15234c 88 TObjArray* fDCSDataPoints; // List of DCS data points to be retrieved
58bc3020 89 Bool_t fIsValid; // flag for the validity of the configuration
57f50b3c 90 Bool_t fSkipDCSQuery; // flag - if TRUE (-> DCS config empty) skip DCS archive data query
be48e3ea 91 Bool_t fStrictRunOrder; // flag - if TRUE connect data in a strict run ordering
58bc3020 92
93
94 ClassDef(AliShuttleConfigHolder, 0);
73abe331 95 };
96
97
57f50b3c 98 Bool_t fIsValid; //! flag for the validity of the configuration
99
100 TString fDAQlbHost; //! Host of the DAQ logbook MySQL Server
101 TString fDAQlbUser; //! username of the DAQ logbook MySQL Server
102 TString fDAQlbPass; //! password of the DAQ logbook MySQL Server
2c15234c 103 TString fDAQlbDB; //! DB name of the DAQ logbook MySQL Server
104 TString fDAQlbTable; //! Table name of the DAQ logbook MySQL Server
105
106 TString fFXSHost[3]; //! Host of the [DAQ, DCS, HLT] File eXchange Server
107 TString fFXSUser[3]; //! username of the [DAQ, DCS, HLT] File eXchange Server
108 TString fFXSPass[3]; //! password of the [DAQ, DCS, HLT] File eXchange Server
109
110 TString fFXSdbHost[3]; //! Host of the [DAQ, DCS, HLT] FXS database
111 TString fFXSdbUser[3]; //! username of the [DAQ, DCS, HLT] FXS database
112 TString fFXSdbPass[3]; //! password of the [DAQ, DCS, HLT] FXS database
113 TString fFXSdbName[3]; //! name of the [DAQ, DCS, HLT] FXS database
114 TString fFXSdbTable[3]; //! Table name of the [DAQ, DCS, HLT] FXS database
b948db8d 115
cb343cfd 116 Int_t fMaxRetries; // number of retries of a failed preprocessor
117
118 Int_t fPPTimeOut; // timeout until a preprocessor is canceled
d477ad88 119
be48e3ea 120 TMap fDetectorMap; //! Map of the detector-by-detector configuration
57f50b3c 121 TObjArray fDetectorList; //! List of detectors with valid configuration
b948db8d 122
57f50b3c 123 TString fShuttleInstanceHost; //! Instance of the SHUTTLE
124 TObjArray fProcessedDetectors; //! list of the detector to be processed by this machine
125 Bool_t fProcessAll; //! flag indicating that all detectors will be processed
73abe331 126
127 ClassDef(AliShuttleConfig, 0);
128};
129
130#endif
131