Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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 "RtypesCore.h"
17
18#include <string>
19#include <ostream>
20
21typedef ULong_t Pixel_t; // from GuiTypes.h
22
23class TString;
24
25namespace ROOT {
26class RLogChannel;
27namespace Experimental {
28typedef unsigned int ElementId_t;
29
30//==============================================================================
31// Exceptions, string functions
32//==============================================================================
33
34bool operator==(const TString &t, const std::string &s);
35bool operator==(const std::string &s, const TString &t);
36
37////////////////////////////////////////////////////////////////////////////////
38/// REveException
39/// Exception-type thrown by Eve classes.
40////////////////////////////////////////////////////////////////////////////////
41
42class REveException : public std::exception {
43 std::string fWhat;
44public:
45 REveException() = default;
46 explicit REveException(std::string_view s) : fWhat(s) {}
48 void append(std::string_view s) { fWhat.append(s); }
49
50 operator const std::string&() const noexcept { return fWhat; }
51 const std::string &str() const noexcept { return fWhat; }
52 const char *what() const noexcept override { return fWhat.c_str(); }
53};
54
55REveException operator+(const REveException &s1, const std::string &s2);
57REveException operator+(const REveException &s1, const char *s2);
59
60inline std::ostream& operator <<(std::ostream &s, const REveException &e)
61{ s << e.what(); return s; }
62
63/// Log channel for Eve diagnostics.
65
66} // namespace Experimental
67} // namespace ROOT
68
69#endif
ULong_t Pixel_t
Definition REveTypes.hxx:21
#define s1(x)
Definition RSha256.hxx:91
#define e(i)
Definition RSha256.hxx:103
unsigned long ULong_t
Definition RtypesCore.h:55
Exception class thrown by Eve classes and macros.
REveException Exception-type thrown by Eve classes.
Definition REveTypes.hxx:42
const char * what() const noexcept override
Definition REveTypes.hxx:52
REveException(std::string_view s)
Definition REveTypes.hxx:46
~REveException() noexcept override
Definition REveTypes.hxx:47
void append(std::string_view s)
Definition REveTypes.hxx:48
const std::string & str() const noexcept
Definition REveTypes.hxx:51
A log configuration for a channel, e.g.
Definition RLogger.hxx:98
Basic string class.
Definition TString.h:139
Double_t x[n]
Definition legend1.C:17
ROOT::RLogChannel & REveLog()
Log channel for Eve diagnostics.
Definition REveTypes.cxx:51
unsigned int ElementId_t
Definition REveTypes.hxx:28
REveException operator+(const REveException &s1, const std::string &s2)
Definition REveTypes.cxx:39
bool operator==(const RConcurrentHashColl::HashValue &lhs, const RConcurrentHashColl::HashValue &rhs)
std::ostream & operator<<(std::ostream &os, const RConcurrentHashColl::HashValue &h)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...