Logo ROOT  
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
ROOT::Experimental::REveException::REveException
REveException()=default
ROOT::Experimental::REveException::REveException
REveException(const std::string &s)
Definition: REveTypes.hxx:44
ROOT::Experimental::ElementId_t
unsigned int ElementId_t
Definition: REveTypes.hxx:25
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:162
x
Double_t x[n]
Definition: legend1.C:17
TString
Basic string class.
Definition: TString.h:136
TString.h
ROOT::Experimental::REveException::append
void append(const std::string &s)
Definition: REveTypes.hxx:46
ROOT::Experimental::REveException::fWhat
std::string fWhat
Definition: REveTypes.hxx:41
GuiTypes.h
ROOT::Experimental::REveException
REveException Exception-type thrown by Eve classes.
Definition: REveTypes.hxx:40
s1
#define s1(x)
Definition: RSha256.hxx:91
ROOT::Experimental::REveException::what
const char * what() const noexcept override
Definition: REveTypes.hxx:48
ROOT::Experimental::REveException::~REveException
virtual ~REveException() noexcept
Definition: REveTypes.hxx:45
ROOT::Experimental::operator==
bool operator==(const TString &t, const std::string &s)
Definition: REveTypes.cxx:24
TGeoManager
The manager class for any TGeo geometry.
Definition: TGeoManager.h:45
ROOT
VSD Structures.
Definition: StringConv.hxx:21
ROOT::Experimental::operator+
REveException operator+(const REveException &s1, const std::string &s2)
Definition: REveTypes.cxx:32