18using namespace::ROOT::Experimental;
83REveDigitSet::REveDigitSet(
const char*
n,
const char* t) :
90 fDetIdsAsSecondaryIndices (
kFALSE),
98 fRenderMode (kRM_AsIs),
101 fDisableLighting(
kTRUE),
102 fHistoButtons (
kTRUE),
176void REveDigitSet::UnSelected()
178 fSelectedSet.clear();
179 REveElement::UnSelected();
186void REveDigitSet::UnHighlighted()
188 fHighlightedSet.clear();
189 REveElement::UnHighlighted();
196TString REveDigitSet::GetHighlightTooltip()
198 if (fHighlightedSet.empty()) return "";
200 if (GetAlwaysSecSelect())
204 return (fTooltipCBFoo)(this, *fHighlightedSet.begin());
208 TObject *o = GetId(*fHighlightedSet.begin());
210 return TString(o->GetName());
212 return TString::Format("%s; idx=%d", GetElementName(), *fHighlightedSet.begin());
216 return REveElement::GetHighlightTooltip();
249 if (
v < min) min =
v;
250 if (
v > max) max =
v;
300 x[0] =
r;
x[1] =
g;
x[2] =
b;
x[3] =
a;
309 x[0] = rgba[0];
x[1] = rgba[1];
x[2] = rgba[2];
x[3] = rgba[3];
333void REveDigitSet::Paint(Option_t*)
342void REveDigitSet::DigitSelected(Int_t idx)
344 DigitBase_t *qb = GetDigit(idx);
345 TObject *obj = GetId(idx);
348 (fCallbackFoo)(this, idx, obj);
351 SecSelected(this, idx);
353 printf("REveDigitSet::DigitSelected idx=%d, value=%d, obj=0x%lx\n",
354 idx, qb->fValue, (ULong_t)obj);
364void REveDigitSet::SecSelected(REveDigitSet* qs, Int_t idx)
367 args[0] = (Long_t) qs;
368 args[1] = (Long_t) idx;
370 // 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.