Logo ROOT   master
Reference Guide
REveTypes.hxx
Go to the documentation of this file.
1 // @(#)root/eve7:$Id$
2 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2018
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 
13 #ifndef ROOT7_REveTypes
14 #define ROOT7_REveTypes
15 
16 #include "GuiTypes.h" // For Pixel_t only, to be changed.
17 
18 #include "TString.h"
19 
20 class TGeoManager;
21 
22 namespace ROOT {
23 namespace Experimental {
24 
25 typedef unsigned int ElementId_t;
26 
27 
28 //==============================================================================
29 // Exceptions, string functions
30 //==============================================================================
31 
32 bool operator==(const TString &t, const std::string &s);
33 bool operator==(const std::string &s, const TString &t);
34 
35 ////////////////////////////////////////////////////////////////////////////////
36 /// REveException
37 /// Exception-type thrown by Eve classes.
38 ////////////////////////////////////////////////////////////////////////////////
39 
40 class REveException : public std::exception {
41  std::string fWhat;
42 public:
43  REveException() = default;
44  explicit REveException(const std::string &s) : fWhat(s) {}
45  virtual ~REveException() noexcept {}
46  void append(const std::string &s) { fWhat.append(s); }
47 
48  const char *what() const noexcept override { return fWhat.c_str(); }
49 };
50 
51 REveException operator+(const REveException &s1, const std::string &s2);
52 REveException operator+(const REveException &s1, const TString &s2);
53 REveException operator+(const REveException &s1, const char *s2);
54 REveException operator+(const REveException &s1, ElementId_t x);
55 
56 } // namespace Experimental
57 } // namespace ROOT
58 
59 #endif
The manager class for any TGeo geometry.
Definition: TGeoManager.h:42
Returns the available number of logical cores.
Definition: StringConv.hxx:21
void append(const std::string &s)
Definition: REveTypes.hxx:46
Basic string class.
Definition: TString.h:131
bool operator==(const TString &t, const std::string &s)
Definition: REveTypes.cxx:13
const char * what() const noexcept override
Definition: REveTypes.hxx:48
REveException(const std::string &s)
Definition: REveTypes.hxx:44
Double_t x[n]
Definition: legend1.C:17
static constexpr double s
REveException operator+(const REveException &s1, const std::string &s2)
Definition: REveTypes.cxx:21
#define s1(x)
Definition: RSha256.hxx:91
unsigned int ElementId_t
Definition: REveTypes.hxx:25
virtual ~REveException() noexcept
Definition: REveTypes.hxx:45
REveException Exception-type thrown by Eve classes.
Definition: REveTypes.hxx:40