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
54 std::string fTrue{"*"};
55 std::string fFalse{" "};
56
57 std::function<double(void *)> fDoubleFoo;
58 std::function<bool(void *)> fBoolFoo;
59 std::function<std::string(void *)> fStringFoo;
60
61public:
62 REveDataColumn(const std::string& n = "REveDataColumn", const std::string& t = "");
63 virtual ~REveDataColumn() {}
64
65 void SetExpressionAndType(const std::string &expr, FieldType_e type);
66 void SetExpressionAndType(const std::string &expr, FieldType_e type, TClass* c);
67 void SetPrecision(Int_t prec);
68
69 std::string EvalExpr(void *iptr) const;
70};
71
72
73} // namespace Experimental
74} // namespace ROOT
75#endif
double
#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::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:80
Basic string class.
Definition TString.h:136
const Int_t n
Definition legend1.C:16
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...