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* GetDAQLogBookHost() const {return fDAQLogBookHost.Data();}
31 const char* GetDAQLogBookUser() const {return fDAQLogBookUser.Data();}
32 const char* GetDAQLogBookPassword() const {return fDAQLogBookPassword.Data();}
34 const char* GetDAQFSHost() const {return fDAQFSHost.Data();}
36 const TObjArray* GetDetectors() const;
38 Bool_t HasDetector(const char* detector) const;
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;
44 void SetProcessAll(Bool_t flag=kTRUE) {fProcessAll=flag;}
45 Bool_t ProcessAll() const {return fProcessAll;}
47 Bool_t HostProcessDetector(const char* detector) const;
49 virtual void Print(Option_t* option = NULL) const;
53 class AliShuttleConfigHolder: public TObject {
55 AliShuttleConfigHolder(const TLDAPEntry* entry);
56 ~AliShuttleConfigHolder();
58 const char* GetDetector() const {return fDetector.Data();};
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;};
64 Bool_t IsValid() const {return fIsValid;};
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
75 ClassDef(AliShuttleConfigHolder, 0);
79 Bool_t fIsValid; // flag for the validity of the configuration
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
85 TString fDAQFSHost; // Host of the DAQ file system
87 TMap fDetectorMap; // Map of the detector-by-detector configuration
88 TObjArray fDetectorList; // List of detectors with valid configuration
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
94 ClassDef(AliShuttleConfig, 0);