29 for (
auto &
compound : p->m_elements->RefChildren())
43 collComp->
fUsed =
false;
45 (spbIt)->second->map.clear();
67 c->CSCImplySelectAllChildren();
72 c->SetMainTransparency(
Collection()->GetMainTransparency());
74 if (propagate_color_to_all_children)
76 c->CSCApplyMainColorToAllChildren();
77 c->CSCApplyMainTransparencyToAllChildren();
81 c->CSCApplyMainColorToMatchingChildren();
82 c->CSCApplyMainTransparencyToMatchingChildren();
104 auto pmIt = spb->
map.find(idx);
105 if (pmIt != spb->
map.end()) {
106 itemHolder = pmIt->second;
120 std::cerr <<
"REveDataSimpleProxyBuilder::GetHolder can't reuse product\n";
122 if (testIdx != (
int)spb->
map.size()) {
123 std::cout <<
"REveDataSimpleProxyBuilder::GetHolder number of used products do not match product size\n";
129 std::cout <<
"REveDataSimpleProxyBuilder::GetHolder total number of products do not match product size\n";
134 spb->
map.emplace(idx, itemHolder);
135 itemHolder->
fUsed =
true;
150 for (
int index = 0; index <
size; ++index)
166 for (
int index = 0; index <
size; ++index)
169 if (di->GetRnrSelf() && !di->GetFiltered())
183 for (
auto &it: p->RefChildren())
190 applyColorAttrToChildren(
c);
197 for (
auto itemIdx : iIds) {
203 std::cerr <<
"REveDataSimpleProxyBuilder::ModelChanges product not found!\n";
206 auto spb = sit->second;
208 auto hmit = spb->map.find(itemIdx);
209 if (hmit != spb->map.end())
210 holder = hmit->second;
212 bool createHolder = visible && !holder;
222 applyColorAttrToChildren(holder);
228 applyColorAttrToChildren(holder);
239 bool returnValue =
false;
258 auto it = spb->map.find(s);
259 if (it != spb->map.end()) {
261 it->second->FillImpliedSelectedSet(impSet);
289 static const REveException eh(
"REveCollectionCompound::GetSelectionMaster()");
297 std::size_t found =
fName.find_last_of(
" ");
298 if (found == std::string::npos)
302 std::string idss =
fName.substr(found + 1);
303 int idx = stoi(idss);
306 }
catch (std::exception&
e) {
307 R__LOG_ERROR(
REveLog()) <<
"REveCollectionCompound::GetSelectionMaster " <<
e.what() << std::endl;
#define R__LOG_ERROR(...)
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
REveDataCollection * fCollection
REveCollectionCompound(REveDataCollection *c)
virtual ~REveCollectionCompound()
virtual REveElement * GetSelectionMaster() override
Returns the master element - that is:
void SetMainColor(Color_t color) override
SetMainColor for the compound.
REveDataItemList * GetItemList()
void * GetDataPtr(Int_t i) const
const REveDataItem * GetDataItem(Int_t i) const
Bool_t GetRnrSelf() const
Color_t GetMainColor() const
Bool_t GetVisible() const
Bool_t GetFiltered() const
std::vector< Product * > m_products
virtual void LocalModelChanges(int idx, REveElement *el, const REveViewContext *ctx)
virtual REveElement * CreateProduct(const std::string &viewType, const REveViewContext *)
virtual void CleanLocal()
REveDataCollection * Collection() const
virtual bool HaveSingleProduct() const
virtual REveElement * CreateProduct(const std::string &viewType, const REveViewContext *) override
void FillImpliedSelected(REveElement::Set_t &impSet, Product *p) override
virtual void BuildItem(const void *data, int index, REveElement *iCollectionHolder, const REveViewContext *)=0
REveCompound * GetHolder(REveElement *product, int idx)
void BuildProduct(const REveDataCollection *iCollection, REveElement *product, const REveViewContext *) override
bool VisibilityModelChanges(int idx, REveElement *, const std::string &viewType, const REveViewContext *) override
std::map< REveElement *, SPBProduct * > fProductMap
REveDataSimpleProxyBuilder()
virtual void BuildItemViewType(const void *data, int index, REveElement *iCollectionHolder, const std::string &viewType, const REveViewContext *)=0
virtual ~REveDataSimpleProxyBuilder()
void ModelChanges(const REveDataCollection::Ids_t &iIds, Product *p) override
REveCollectionCompound * CreateCompound(bool set_color=true, bool propagate_color_to_all_children=false)
void BuildProductViewType(const REveDataCollection *iCollection, REveElement *product, const std::string &viewType, const REveViewContext *) override
virtual void AddElement(REveElement *el)
Add el to the list of children.
virtual Bool_t GetRnrSelf() const
virtual Bool_t SetRnrChildren(Bool_t rnr)
Set render state of this element's children, i.e.
virtual void DestroyElements()
Destroy all children of this element.
virtual Bool_t SetRnrSelf(Bool_t rnr)
Set render state of this element, i.e.
void SetSelectionMaster(REveElement *el)
Int_t NumChildren() const
std::set< REveElement * > Set_t
virtual void SetMainColor(Color_t color)
Set main color of the element.
virtual Color_t GetMainColor() const
void SetName(const std::string &name)
Set name of an element.
virtual void ProjectChild(REveElement *el, Bool_t same_depth=kTRUE)
If this is a projectable, loop over all projected replicas and add the projected image of child 'el' ...
REveException Exception-type thrown by Eve classes.
Bool_t IsAcceptingChanges() const
SelectionSet_t & RefSelectedSet()
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
RLogChannel & REveLog()
Log channel for Eve diagnostics.
const REveViewContext * m_viewContext
REveCompound * m_elements
std::map< int, REveCollectionCompound * > map