Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:10:41

0001 // @(#)root/eve7:$Id$
0002 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2018
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 
0013 #ifndef ROOT7_REveTypes
0014 #define ROOT7_REveTypes
0015 
0016 #include "GuiTypes.h" // For Pixel_t only, to be changed.
0017 
0018 #include "TString.h"
0019 
0020 #include <sstream>
0021 #include <cstdint>
0022 #include <iostream>
0023 class TGeoManager;
0024 namespace ROOT {
0025 namespace Experimental {
0026 typedef unsigned int ElementId_t;
0027 
0028 class RLogChannel;
0029 
0030 //==============================================================================
0031 // Exceptions, string functions
0032 //==============================================================================
0033 
0034 bool operator==(const TString &t, const std::string &s);
0035 bool operator==(const std::string &s, const TString &t);
0036 
0037 ////////////////////////////////////////////////////////////////////////////////
0038 /// REveException
0039 /// Exception-type thrown by Eve classes.
0040 ////////////////////////////////////////////////////////////////////////////////
0041 
0042 class REveException : public std::exception {
0043    std::string fWhat;
0044 public:
0045    REveException() = default;
0046    explicit REveException(const std::string &s) : fWhat(s) {}
0047    ~REveException() noexcept override {}
0048    void append(const std::string &s) { fWhat.append(s); }
0049 
0050    const char *what() const noexcept override { return fWhat.c_str(); }
0051 };
0052 
0053 REveException operator+(const REveException &s1, const std::string &s2);
0054 REveException operator+(const REveException &s1, const TString &s2);
0055 REveException operator+(const REveException &s1, const char *s2);
0056 REveException operator+(const REveException &s1, ElementId_t x);
0057 
0058 /// Log channel for Eve diagnostics.
0059 RLogChannel &REveLog();
0060 
0061 } // namespace Experimental
0062 } // namespace ROOT
0063 
0064 #endif