]> git.uio.no Git - u/mrichter/AliRoot.git/blame - SHUTTLE/AliShuttleConfig.h
adding TestShuttle program
[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.
12//
13
14#include <TObject.h>
15#include <TString.h>
d477ad88 16#include <TObjArray.h>
73abe331 17#include <TMap.h>
18#include <TLDAPServer.h>
19
20class AliShuttleConfig: public TObject {
21public:
22 AliShuttleConfig(const char* host, Int_t port = LDAP_PORT,
23 const char* binddn = 0, const char* password = 0,
24 const char* basedn = "dc=alice,dc=cern,dc=ch");
25 virtual ~AliShuttleConfig();
26
27 Bool_t IsValid() const {return fIsValid;};
28
d477ad88 29 const char* GetLogBookURI() const {return fLogBookURI.Data();}
30 const char* GetLogBookUser() const {return fLogBookUser.Data();}
31 const char* GetLogBookPassword() const {return fLogBookPassword.Data();}
32
33 const TObjArray* GetDetectors() const;
73abe331 34
35 Bool_t HasDetector(const char* detector) const;
36 const char* GetHost(const char* detector) const;
37 Int_t GetPort(const char* detector) const;
d477ad88 38 const TObjArray* GetAliases(const char* detector) const;
73abe331 39
40 virtual void Print(Option_t* option = NULL) const;
41
42private:
43
44 class ConfigHolder: public TObject {
45 TString fDetector;
46 TString fHost;
47 Int_t fPort;
d477ad88 48 TObjArray fAliases;
73abe331 49 Bool_t fIsValid;
50
51 public:
52 ConfigHolder(const TLDAPEntry* entry);
53 ~ConfigHolder();
54
55 const char* GetDetector() const {return fDetector.Data();};
56 const char* GetHost() const {return fHost.Data();};
57 Int_t GetPort() const {return fPort;};
d477ad88 58 const TObjArray* GetAliases() const {return &fAliases;};
73abe331 59
60 Bool_t IsValid() const {return fIsValid;};
61
62 ClassDef(ConfigHolder, 0);
63 };
64
65
66 Bool_t fIsValid;
67
d477ad88 68 TString fLogBookURI;
69 TString fLogBookUser;
70 TString fLogBookPassword;
71
73abe331 72 TMap fDetectorMap;
d477ad88 73 TObjArray fDetectorList;
73abe331 74
75 ClassDef(AliShuttleConfig, 0);
76};
77
78#endif
79