]> git.uio.no Git - u/mrichter/AliRoot.git/blob - SHUTTLE/AliShuttleConfig.h
coding conventions (Alberto)
[u/mrichter/AliRoot.git] / SHUTTLE / AliShuttleConfig.h
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.
12 // For more info see AliShuttleConfig.cxx
13 //
14
15 #include <TObject.h>
16 #include <TString.h>
17 #include <TObjArray.h>
18 #include <TMap.h>
19 #include <TLDAPServer.h>
20
21 class AliShuttleConfig: public TObject {
22 public:
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();
27
28         Bool_t IsValid() const {return fIsValid;};
29
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();}
35
36         const TObjArray* GetDetectors() const;
37
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;
43
44         void SetProcessAll(Bool_t flag=kTRUE) {fProcessAll=flag;}
45         Bool_t ProcessAll() const {return fProcessAll;}
46
47         Bool_t HostProcessDetector(const char* detector) const;
48
49         virtual void Print(Option_t* option = NULL) const;
50
51 private:
52
53         class AliShuttleConfigHolder: public TObject {
54         public:
55                 AliShuttleConfigHolder(const TLDAPEntry* entry);
56                 ~AliShuttleConfigHolder();
57
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;};
63
64                 Bool_t IsValid() const {return fIsValid;};
65
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);
76         };
77
78
79         Bool_t fIsValid;                // flag for the validity of the configuration
80
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
84
85         TString fDAQFSHost;             // Host of the DAQ file system
86
87         TMap fDetectorMap;              // Map of the detector-by-detector configuration
88         TObjArray fDetectorList;        // List of detectors with valid configuration
89
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
93
94         ClassDef(AliShuttleConfig, 0);
95 };
96
97 #endif
98