52 fItems.emplace_back(data_ptr, el);
59 static const REveException eh(
"REveDataCollection::SetFilterExpr ");
61 if (!
fItemClass)
throw eh +
"item class has to be set before the filter expression.";
72 gROOT->ProcessLine(
s.str().c_str());
76 catch (
const std::exception &exc)
78 std::cerr <<
"EveDataCollection::SetFilterExpr" << exc.what();
93 ii.fItemPtr->SetFiltered( ! res );
109 TString ctor =
c->GetName(), dtor =
"~";
111 int i = ctor.
Last(
':');
120 TIter next(
c->GetListOfMethods());
121 while ((meth = (
TMethod*) next()))
126 if (
m == ctor ||
m == dtor ||
127 m ==
"Class" ||
m ==
"Class_Name" ||
m ==
"Class_Version" ||
m ==
"Dictionary" ||
m ==
"IsA" ||
128 m ==
"DeclFileName" ||
m ==
"ImplFileName" ||
m ==
"DeclFileLine" ||
m ==
"ImplFileLine" ||
129 m ==
"Streamer" ||
m ==
"StreamerNVirtual" ||
m ==
"ShowMembers" ||
130 m ==
"CheckTObjectHashConsistency")
141 if ( !
ms.IsNull())
ms +=
", ";
151 jm[
"c"] =
c->GetName();
156 TIter blnext(
c->GetListOfBases());
167 j[
"fPublicFunctions"] = nlohmann::json::array();
169 pm.FillJSON(
fItemClass, j[
"fPublicFunctions"]);
182 chld->SetMainColor(newv);
251 c->ItemChanged(
this);
258 c->ItemChanged(
this);
276 n->FillImpliedSelectedSet(impSelSet);
280 printf(
"REveDataItem::FillImpliedSelectedSet added niece '%s' [%s]\n",
281 n->GetCName(),
n->IsA()->GetName());
300 for (
Int_t i = 0; i< Nit; ++i)
305 printf(
"| %-20s |", item->
GetCName());
311 printf(
" %10s |", clmn->EvalExpr(data).c_str());
324 for (
Int_t i = 0; i < Nit; ++i) {
329 row[chld->GetCName()] = clmn->
EvalExpr(data);
344 c->SetPrecision(prec);
367 const char *rtyp =
nullptr;
368 const void *fooptr =
nullptr;
378 s <<
"*((std::function<" << rtyp <<
"(" << icls->GetName() <<
"*)>*)" << std::hex << std::showbase << (size_t)fooptr
379 <<
") = [](" << icls->GetName() <<
"* p){" << icls->GetName() <<
" &i=*p; return (" <<
fExpression.
Data()
384 gROOT->ProcessLine(
s.str().c_str());
386 catch (
const std::exception &exc)
388 std::cerr <<
"REveDataColumn::SetExpressionAndType" << exc.what();
char * Form(const char *fmt,...)
REveElement::List_t fNieces
void SetFilterExpr(const TString &filter)
std::vector< ItemInfo_t > fItems
TClass * GetItemClass() const
std::function< void(REveDataCollection *)> _handler_func
REveDataItem * GetDataItem(Int_t i) const
static Color_t fgDefaultColor
std::function< bool(void *)> fFilterFoo
void * GetDataPtr(Int_t i) const
virtual void ItemChanged(REveDataItem *item)
void AddItem(void *data_ptr, const std::string &n, const std::string &t)
Bool_t SetRnrState(Bool_t) override
Set render state of this element and of its children to the same value.
void SetMainColor(Color_t) override
Set main color of the element.
Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset) override
Write core json.
std::function< void(REveDataCollection *, const Ids_t &)> _handler_func_ids
REveDataCollection(const std::string &n="REveDataCollection", const std::string &t="")
std::function< double(void *)> fDoubleFoo
std::string EvalExpr(void *iptr)
std::function< bool(void *)> fBoolFoo
REveDataColumn(const std::string &n="REveDataColumn", const std::string &t="")
std::function< std::string(void *)> fStringFoo
void SetExpressionAndType(const std::string &expr, FieldType_e type)
void SetPrecision(Int_t prec)
virtual void FillImpliedSelectedSet(Set_t &impSelSet) override
Populate set impSelSet with derived / dependant elements.
Bool_t SetRnrSelf(Bool_t) override
Set render state of this element, i.e.
virtual void SetItemColorRGB(UChar_t r, UChar_t g, UChar_t b)
Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset) override
Write core json.
void SetFiltered(Bool_t f)
REveDataItem(const std::string &n="REveDataItem", const std::string &t="")
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)
virtual Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset)
Write core json.
void SetupDefaultColorAndTransparency(Color_t col, Bool_t can_edit_color, Bool_t can_edit_transparency)
Set up element to use built-in main color and set flags allowing editing of main color and transparen...
const char * GetCName() const
virtual void AddElement(REveElement *el)
Add el to the list of children.
virtual Bool_t SetRnrSelf(Bool_t rnr)
Set render state of this element, i.e.
virtual Bool_t SetRnrState(Bool_t rnr)
Set render state of this element and of its children to the same value.
std::set< REveElement * > Set_t
ElementId_t GetElementId() const
virtual void SetMainColor(Color_t color)
Set main color of the element.
virtual Color_t GetMainColor() const
REveException Exception-type thrown by Eve classes.
Each class (see TClass) has a linked list of its base class(es).
TClass * GetClassPointer(Bool_t load=kTRUE)
Get pointer to the base class TClass.
TClass instances represent classes, structs and namespaces in the ROOT type system.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
const char * GetReturnTypeName() const
Get full type description of function return type, e,g.: "class TDirectory*".
Each ROOT method (see TMethod) has a linked list of its arguments.
const char * GetTypeName() const
Get type of method argument, e.g.
Each ROOT class (see TClass) has a linked list of methods.
virtual TList * GetListOfMethodArgs()
Returns methodarg list and additionally updates fDataMember in TMethod by calling FindDataMember();.
virtual const char * GetName() const
Returns name of object.
TString & Replace(Ssiz_t pos, Ssiz_t n, const char *s)
const char * Data() const
Ssiz_t Last(char c) const
Find last occurrence of a character c.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
static constexpr double s
static constexpr double ms
basic_json<> json
default JSON class