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 {
26namespace Experimental {
27typedef unsigned int ElementId_t;
28
29class RLogChannel;
30
31//==============================================================================
32// Exceptions, string functions
33//==============================================================================
34
35bool operator==(const TString &t, const std::string &s);
36bool operator==(const std::string &s, const TString &t);
37
38////////////////////////////////////////////////////////////////////////////////
39/// REveException
40/// Exception-type thrown by Eve classes.
41////////////////////////////////////////////////////////////////////////////////
42
43class REveException : public std::exception {
44 std::string fWhat;
45public:
46 REveException() = default;
47 explicit REveException(std::string_view s) : fWhat(s) {}
48 ~REveException() noexcept override {}
49 void append(std::string_view s) { fWhat.append(s); }
50
51 operator const std::string&() const noexcept { return fWhat; }
52 const std::string &str() const noexcept { return fWhat; }
53 const char *what() const noexcept override { return fWhat.c_str(); }
54};
55
56REveException operator+(const REveException &s1, const std::string &s2);
58REveException operator+(const REveException &s1, const char *s2);
60
61inline std::ostream& operator <<(std::ostream &s, const REveException &e)
62{ s << e.what(); return s; }
63
64/// Log channel for Eve diagnostics.
65RLogChannel &REveLog();
66
67} // namespace Experimental
68} // namespace ROOT
69
70#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:43
const char * what() const noexcept override
Definition REveTypes.hxx:53
REveException(std::string_view s)
Definition REveTypes.hxx:47
~REveException() noexcept override
Definition REveTypes.hxx:48
void append(std::string_view s)
Definition REveTypes.hxx:49
const std::string & str() const noexcept
Definition REveTypes.hxx:52
A log configuration for a channel, e.g.
Definition RLogger.hxx:101
Basic string class.
Definition TString.h:139
Double_t x[n]
Definition legend1.C:17
ELogLevel operator+(ELogLevel severity, int offset)
Definition RLogger.hxx:45
unsigned int ElementId_t
Definition REveTypes.hxx:27
RLogChannel & REveLog()
Log channel for Eve diagnostics.
Definition REveTypes.cxx:51
bool operator==(const RConcurrentHashColl::HashValue &lhs, const RConcurrentHashColl::HashValue &rhs)
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...