Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
REveDataTable.hxx
Go to the documentation of this file.
1// @(#)root/eve7:$Id$
2// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007, 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_REveDataTable
14#define ROOT7_REveDataTable
15
16#include <ROOT/REveElement.hxx>
17
18namespace ROOT {
19namespace Experimental {
20
21class REveDataCollection;
22
24{
25protected:
27
28public:
29 REveDataTable(const std::string& n = "REveDataTable", const std::string& t = "");
30 virtual ~REveDataTable() {}
31
32 void SetCollection(const REveDataCollection *col) { fCollection = col; }
33 const REveDataCollection *GetCollection() const { return fCollection; }
34
35 void PrintTable();
36 virtual Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset);
37
38 void AddNewColumn(const std::string& expr, const std::string& title, int prec = 2);
39};
40
41//==============================================================================
42
44{
45public:
47
48protected:
49public:
51 FieldType_e fType; // can we auto detect this?
53 TClass* fClassType{nullptr};
54
55 std::string fTrue{"*"};
56 std::string fFalse{" "};
57
58 std::function<double(void *)> fDoubleFoo;
59 std::function<bool(void *)> fBoolFoo;
60 std::function<std::string(void *)> fStringFoo;
61
62
63public:
64 REveDataColumn(const std::string& n = "REveDataColumn", const std::string& t = "");
65 virtual ~REveDataColumn() {}
66
67 void SetExpressionAndType(const std::string &expr, FieldType_e type);
68 void SetExpressionAndType(const std::string &expr, FieldType_e type, TClass* c);
69 std::string GetFunctionExpressionString() const;
70 void SetPrecision(Int_t prec);
71
72 std::string EvalExpr(void *iptr) const;
73 bool hasValidExpression() const;
74};
75
76
77} // namespace Experimental
78} // namespace ROOT
79#endif
#define c(i)
Definition RSha256.hxx:101
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
std::function< double(void *)> fDoubleFoo
std::string GetFunctionExpressionString() const
std::function< bool(void *)> fBoolFoo
std::function< std::string(void *)> fStringFoo
std::string EvalExpr(void *iptr) const
void SetExpressionAndType(const std::string &expr, FieldType_e type)
virtual Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset)
Write core json.
const REveDataCollection * GetCollection() const
const REveDataCollection * fCollection
void AddNewColumn(const std::string &expr, const std::string &title, int prec=2)
void SetCollection(const REveDataCollection *col)
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:81
Basic string class.
Definition TString.h:139
const Int_t n
Definition legend1.C:16
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.