This commit was generated by cvs2svn to compensate for changes in r12269,
[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>
16#include <TList.h>
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
29 const TList* GetDetectors() const;
30
31 Bool_t HasDetector(const char* detector) const;
32 const char* GetHost(const char* detector) const;
33 Int_t GetPort(const char* detector) const;
34 const TList* GetAliases(const char* detector) const;
35
36 virtual void Print(Option_t* option = NULL) const;
37
38private:
39
40 class ConfigHolder: public TObject {
41 TString fDetector;
42 TString fHost;
43 Int_t fPort;
44 TList fAliases;
45 Bool_t fIsValid;
46
47 public:
48 ConfigHolder(const TLDAPEntry* entry);
49 ~ConfigHolder();
50
51 const char* GetDetector() const {return fDetector.Data();};
52 const char* GetHost() const {return fHost.Data();};
53 Int_t GetPort() const {return fPort;};
54 const TList* GetAliases() const {return &fAliases;};
55
56 Bool_t IsValid() const {return fIsValid;};
57
58 ClassDef(ConfigHolder, 0);
59 };
60
61
62 Bool_t fIsValid;
63
64 TMap fDetectorMap;
65 TList fDetectorList;
66
67 ClassDef(AliShuttleConfig, 0);
68};
69
70#endif
71