51 fItems.emplace_back(data_ptr, el);
58 static const REveException eh(
"REveDataCollection::SetFilterExpr ");
60 if (!
fItemClass)
throw eh +
"item class has to be set before the filter expression.";
71 gROOT->ProcessLine(
s.str().c_str());
75 catch (
const std::exception &exc)
77 std::cerr <<
"EveDataCollection::SetFilterExpr" << exc.what();
92 ii.fItemPtr->SetFiltered( ! res );
106 j[
"publicFunction"] = nlohmann::json::array();
114 j[
"publicFunction"].push_back(
m);
131 chld->SetMainColor(newv);
132 printf(
" REveDataCollection::SetCollectionColorRGB going to change color for idx %d --------------------\n", idx);
140 printf(
"REveDataCollection::SetCollectionColorRGB color ched to %d ->%d\n", oldv,
GetMainColor());
201 c->ItemChanged(
this);
208 c->ItemChanged(
this);
225 n->FillImpliedSelectedSet(impSelSet);
229 printf(
"REveDataItem::FillImpliedSelectedSet added niece '%s' [%s]\n",
230 n->GetCName(),
n->IsA()->GetName());
249 for (
Int_t i = 0; i< Nit; ++i)
254 printf(
"| %-20s |", item->
GetCName());
260 printf(
" %10s |", clmn->EvalExpr(data).c_str());
273 for (
Int_t i = 0; i < Nit; ++i) {
278 row[chld->GetCName()] = clmn->EvalExpr(data);
293 c->SetPrecision(prec);
316 const char *rtyp =
nullptr;
317 const void *fooptr =
nullptr;
327 s <<
"*((std::function<" << rtyp <<
"(" << icls->GetName() <<
"*)>*)" << std::hex << std::showbase << (size_t)fooptr
328 <<
") = [](" << icls->GetName() <<
"* p){" << icls->GetName() <<
" &i=*p; return (" <<
fExpression.
Data()
333 gROOT->ProcessLine(
s.str().c_str());
335 catch (
const std::exception &exc)
337 std::cerr <<
"REveDataColumn::SetExpressionAndType" << exc.what();
REveElement::List_t fNieces
virtual void SetCollectionColorRGB(UChar_t r, UChar_t g, UChar_t b)
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)
virtual void SetCollectionVisible(bool)
void AddItem(void *data_ptr, const std::string &n, const std::string &t)
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.
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 void SetItemRnrSelf(bool)
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.
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.
const TList * GetListOfAllPublicMethods(Bool_t load=kTRUE)
Returns a list of all public methods of this class and its base classes.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
virtual const char * GetPrototype() const
Returns the prototype of a function as defined by CINT, or 0 in case of error.
Each ROOT class (see TClass) has a linked list of methods.
virtual const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
const char * Data() const
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
static constexpr double s