18#include <nlohmann/json.hpp>
20using namespace::ROOT::Experimental;
85REveDigitSet::REveDigitSet(
const char*
n,
const char* t) :
92 fDetIdsAsSecondaryIndices (
kFALSE),
100 fRenderMode (kRM_AsIs),
103 fDisableLighting(
kTRUE),
104 fHistoButtons (
kTRUE),
178void REveDigitSet::UnSelected()
180 fSelectedSet.clear();
181 REveElement::UnSelected();
188void REveDigitSet::UnHighlighted()
190 fHighlightedSet.clear();
191 REveElement::UnHighlighted();
198TString REveDigitSet::GetHighlightTooltip()
200 if (fHighlightedSet.empty()) return "";
202 if (GetAlwaysSecSelect())
206 return (fTooltipCBFoo)(this, *fHighlightedSet.begin());
210 TObject *o = GetId(*fHighlightedSet.begin());
212 return TString(o->GetName());
214 return TString::Format("%s; idx=%d", GetElementName(), *fHighlightedSet.begin());
218 return REveElement::GetHighlightTooltip();
251 if (
v < min) min =
v;
252 if (
v > max) max =
v;
302 x[0] =
r;
x[1] =
g;
x[2] =
b;
x[3] =
a;
311 x[0] = rgba[0];
x[1] = rgba[1];
x[2] = rgba[2];
x[3] = rgba[3];
335void REveDigitSet::Paint(Option_t*)
344void REveDigitSet::DigitSelected(Int_t idx)
346 DigitBase_t *qb = GetDigit(idx);
347 TObject *obj = GetId(idx);
350 (fCallbackFoo)(this, idx, obj);
353 SecSelected(this, idx);
355 printf("REveDigitSet::DigitSelected idx=%d, value=%d, obj=0x%lx\n",
356 idx, qb->fValue, (ULong_t)obj);
366void REveDigitSet::SecSelected(REveDigitSet* qs, Int_t idx)
369 args[0] = (Long_t) qs;
370 args[1] = (Long_t) idx;
372 // Emit("SecSelected(REveDigitSet*, Int_t)", args);
void Refit()
Refit the container so that all current data fits into a single chunk.
Int_t NAtoms(Int_t chk) const
Char_t * Chunk(Int_t chk) const
virtual void SetMainColor(Color_t color) override
Override from REveElement, forward to Frame.
std::vector< int > fDigitIds
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Fill core part of JSON representation.
void DigitId(Int_t n)
Set external id for the last added digit.
void SetPalette(REveRGBAPalette *p)
Set REveRGBAPalette pointer.
REveRGBAPalette * AssertPalette()
Make sure the REveRGBAPalette pointer is not null.
Color_t fColor
The last / current idx added to collection.
DigitBase_t * NewDigit()
Function providing highlight tooltips when always-sec-select is active.
void DigitColor(Color_t ci)
Set color for the last digit added.
void SetCurrentDigit(Int_t idx)
Set current digit – the one that will receive calls to DigitValue/Color/Id/UserData() functions.
void ScanMinMaxValues(Int_t &min, Int_t &max)
Iterate over the digits and determine min and max signal values.
void UseSingleColor()
Instruct digit-set to use single color for its digits.
Int_t GetId(Int_t n) const
Set external object reference for digit n.
Bool_t fDetIdsAsSecondaryIndices
void RefitPlex()
Instruct underlying memory allocator to regroup itself into a contiguous memory chunk.
Bool_t GetAntiFlick() const
virtual ~REveDigitSet()
Destructor.
DigitBase_t * GetDigit(Int_t n) const
REveRGBAPalette * fPalette
Int_t fLastIdx
The last / current digit added to collection.
void ReleaseIds()
Protected method.
void DigitValue(Int_t value)
Set signal value for the last digit added.
void SetFrame(REveFrameBox *b)
Set REveFrameBox pointer.
void SetMainColorPtr(Color_t *colptr)
Bool_t fCanEditMainTransparency
virtual Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset)
Write core json.
virtual void InitMainTrans(Bool_t can_edit=kTRUE)
Initialize the main transformation to identity matrix.
virtual void SetMainColor(Color_t color)
Set main color of the element.
void SetFrameColor(Color_t ci)
Set color of the frame.
Color_t * PtrFrameColor()
void SetMinMax(Int_t min, Int_t max)
Set current min/max values.
void SetLimits(Int_t low, Int_t high)
Set low/high limits on signal value.
virtual void IncRefCount(REveElement *re)
Increase reference count and add re to the list of back-references.
virtual void DecRefCount(REveElement *re)
Decrease reference count and remove re from the list of back-references.
virtual void StampBackPtrElements(UChar_t stamps)
Add given stamps to elements in the list of reverse references.
static void ColorFromIdx(Color_t ci, UChar_t col[4], Bool_t alpha=kTRUE)
Fill col with RGBA values corresponding to index ci.
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