10#ifndef ROOFIT_ROOFITCORE_INC_VALUECHECKING_H_
11#define ROOFIT_ROOFITCORE_INC_VALUECHECKING_H_
20class CachingError :
public std::exception {
22 CachingError(
const std::string& newMessage)
24 _messages.push_back(newMessage);
27 CachingError(CachingError&& previous,
const std::string& newMessage) :
28 _messages{std::move(previous._messages)}
30 _messages.push_back(newMessage);
33 const char*
what() const noexcept
override {
34 std::stringstream out;
35 out <<
"**Computation/caching error** in\n";
38 for (
auto it = _messages.rbegin(); it != _messages.rend(); ++it) {
39 std::string message = *it;
40 auto pos = message.find(
'\n', 0);
41 while (pos != std::string::npos) {
42 message.insert(pos+1,
indent);
43 pos = (message.find(
'\n', pos+1));
46 out <<
indent << message <<
"\n";
52 std::string*
ret =
new std::string(out.str());
59 std::vector<std::string> _messages;
66 typename std::enable_if<std::is_base_of<RooAbsArg, T>::value>
::type* =
nullptr >
68 _stream << arg.ClassName() <<
"::" << arg.GetName() <<
" " << &arg <<
" ";
69 arg.printArgs(_stream);
74 typename std::enable_if< ! std::is_base_of<RooAbsArg, T>::value>
::type* =
nullptr >
80 operator std::string()
const {
84 std::ostream& stream() {
89 std::ostringstream _stream;
TBuffer & operator<<(TBuffer &buf, const Tmpl *obj)
static void indent(ostringstream &buf, int indent_level)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type