]>
Commit | Line | Data |
---|---|---|
5a5a1232 | 1 | // $Header$ |
2 | ||
3 | #ifndef REVE_Reve_H | |
4 | #define REVE_Reve_H | |
5 | ||
6 | #include <string> | |
7 | #include <TString.h> | |
8 | ||
9 | inline bool operator==(const TString& t, const std::string& s) | |
10 | { return (s == t.Data()); } | |
11 | ||
12 | inline bool operator==(const std::string& s, const TString& t) | |
13 | { return (s == t.Data()); } | |
14 | ||
15 | class TVirtualPad; | |
16 | class TGeoManager; | |
17 | ||
18 | namespace Reve { | |
19 | ||
20 | class Exc_t : public std::string | |
21 | { | |
22 | public: | |
23 | Exc_t() {} | |
24 | Exc_t(const std::string& s) : std::string(s) {} | |
25 | Exc_t(const char* s) : std::string(s) {} | |
26 | ||
27 | virtual ~Exc_t() {} | |
28 | ||
29 | const char* Data() const { return c_str(); } | |
30 | ||
31 | ClassDef(Reve::Exc_t, 1); | |
32 | }; | |
33 | ||
34 | Exc_t operator+(const Exc_t &s1, const std::string &s2); | |
35 | Exc_t operator+(const Exc_t &s1, const TString &s2); | |
36 | Exc_t operator+(const Exc_t &s1, const char *s2); | |
37 | ||
38 | void WarnCaller(const TString& warning); | |
39 | ||
40 | /**************************************************************************/ | |
41 | /**************************************************************************/ | |
42 | ||
43 | void SetupEnvironment(); | |
44 | ||
45 | void AssertMacro(const Text_t* mac); | |
46 | void Macro(const Text_t* mac); | |
47 | void LoadMacro(const Text_t* mac); | |
48 | ||
49 | /**************************************************************************/ | |
50 | /**************************************************************************/ | |
51 | ||
52 | TVirtualPad* PushPad(TVirtualPad* new_gpad=0, Int_t subpad=0); | |
53 | TVirtualPad* PopPad(Bool_t modify_update_p=false); | |
54 | ||
55 | class PadHolder | |
56 | { | |
57 | private: | |
58 | Bool_t fModifyUpdateP; | |
59 | public: | |
60 | PadHolder(Bool_t modify_update_p, TVirtualPad* new_gpad=0, Int_t subpad=0) : | |
61 | fModifyUpdateP(modify_update_p) | |
62 | { PushPad(new_gpad, subpad); } | |
63 | ||
64 | virtual ~PadHolder() { PopPad(fModifyUpdateP); } | |
65 | ||
66 | ClassDef(PadHolder, 0); | |
67 | }; | |
68 | ||
69 | class GeoManagerHolder | |
70 | { | |
71 | private: | |
72 | TGeoManager* fManager; | |
73 | public: | |
74 | GeoManagerHolder(TGeoManager* new_gmgr=0); | |
75 | virtual ~GeoManagerHolder(); | |
76 | ||
77 | ClassDef(GeoManagerHolder, 0); | |
78 | }; | |
79 | ||
80 | } | |
81 | ||
82 | #endif |