Logo ROOT  
Reference Guide
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
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
double
Definition: Converters.cxx:939
#define c(i)
Definition: RSha256.hxx:101
int Int_t
Definition: RtypesCore.h:45
int type
Definition: TGX11.cxx:121
std::function< double(void *)> fDoubleFoo
std::string GetFunctionExpressionString() const
std::function< bool(void *)> fBoolFoo
REveDataColumn(const std::string &n="REveDataColumn", const std::string &t="")
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
REveDataTable(const std::string &n="REveDataTable", const std::string &t="")
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:80
Basic string class.
Definition: TString.h:136
const Int_t n
Definition: legend1.C:16
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
Definition: RExports.h:150
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
basic_json< std::map, std::vector, std::string, bool, std::int64_t, std::uint64_t, double, std::allocator, adl_serializer, std::vector< std::uint8_t > > json
Definition: REveElement.hxx:36