Int_t ily_start = (ly == -1) ? 0 : ly;
Int_t ily_stop = (ly == -1) ? 6 : ly+1;
- lpRE_i ichmb;
+ List_i ichmb;
ichmb = fChildren.begin();
while(ichmb != fChildren.end()){
(*ichmb)->SetRnrElement(kFALSE);
//________________________________________________________
TRDChamber* TRDLoader::GetChamber(const int d)
{
- lpRE_i ism, istack, ichmb;
+ List_i ism, istack, ichmb;
ism = find_if(fChildren.begin(), fChildren.end(), ID<RenderElement*>(fGeo->GetSector(d)));
if(ism == fChildren.end()) return 0x0;
//________________________________________________________
void TRDLoader::Paint(Option_t *option)
{
- lpRE_i ichmb = fChildren.begin();
+ List_i ichmb = fChildren.begin();
while(ichmb != fChildren.end()){
(dynamic_cast<TRDModule*>(*ichmb))->Paint(option);
ichmb++;
//________________________________________________________
void TRDLoader::Unload()
{
- lpRE_i ichmb = fChildren.begin();
+ List_i ichmb = fChildren.begin();
while(ichmb != fChildren.end()){
(dynamic_cast<TRDModule*>(*ichmb))->Reset();
ichmb++;
//________________________________________________________
void TRDNode::Paint(Option_t* option)
{
- lpRE_i iter = fChildren.begin();
+ List_i iter = fChildren.begin();
while(iter != fChildren.end()){
(dynamic_cast<TRDModule*>(*iter))->Paint(option);
iter++;
//________________________________________________________
void TRDNode::Reset()
{
- lpRE_i iter = fChildren.begin();
+ List_i iter = fChildren.begin();
while(iter != fChildren.end()){
(dynamic_cast<TRDModule*>(*iter))->Reset();
iter++;
{
TGListTree *list = gReve->GetListTree();
TRDNode *node = 0x0;
- lpRE_i iter = fChildren.begin();
+ List_i iter = fChildren.begin();
while(iter != fChildren.end()){
if((node = dynamic_cast<TRDNode*>(*iter))) node->Collapse();
list->CloseItem(FindListTreeItem(list));
{
TGListTree *list = gReve->GetListTree();
TRDNode *node = 0x0;
- lpRE_i iter = fChildren.begin();
+ List_i iter = fChildren.begin();
while(iter != fChildren.end()){
if((node = dynamic_cast<TRDNode*>(*iter))) node->Expand();
list->OpenItem(FindListTreeItem(list));
SetRnrElement(kTRUE);
TRDNode *node = 0x0;
TRDChamber *chmb = 0x0;
- lpRE_i iter = fChildren.begin();
+ List_i iter = fChildren.begin();
while(iter != fChildren.end()){
if((node = dynamic_cast<TRDNode*>(*iter))){
node->SetRnrElement(kTRUE);
SetRnrElement(kFALSE);
TRDNode *node = 0x0;
TRDChamber *chmb = 0x0;
- lpRE_i iter = fChildren.begin();
+ List_i iter = fChildren.begin();
while(iter != fChildren.end()){
if((node = dynamic_cast<TRDNode*>(*iter))){
node->SetRnrElement(kFALSE);
void TRDNode::UpdateLeaves()
{
TRDModule *module;
- lpRE_i iter = fChildren.begin();
+ List_i iter = fChildren.begin();
while(iter != fChildren.end()){
module = dynamic_cast<TRDModule*>(*iter);
if(!module) continue;
{
// Info("UpdateNode()", Form("%s", GetName()));
TRDNode *node = 0x0;
- lpRE_i iter = fChildren.begin();
+ List_i iter = fChildren.begin();
while(iter != fChildren.end()){
if((node = dynamic_cast<TRDNode*>(*iter))) node->UpdateNode();
iter++;
void UpdateLeaves();
void UpdateNode();
- lpRE_i begin(){return fChildren.begin();}
- lpRE_i end(){return fChildren.end();}
+ List_i begin(){return fChildren.begin();}
+ List_i end(){return fChildren.end();}
ClassDef(TRDNode, 1)
};
if(fRnrElement) {
if(fRnrBach) {
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
if((*i)->GetRnrElement()) {
((Cascade*)(*i))->PaintBachelor(option);
}
}
if(fRnrV0Daughters) {
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
if((*i)->GetRnrElement()) {
((Cascade*)(*i))->PaintV0Daughters(option);
}
}
if(fRnrV0path) {
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
if((*i)->GetRnrElement()) {
((Cascade*)(*i))->PaintV0Path(option);
}
}
if(fRnrCasVtx) {
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
if((*i)->GetRnrElement()) {
((Cascade*)(*i))->Paint(option);
}
}
if(fRnrCasPath) {
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
if((*i)->GetRnrElement()) {
((Cascade*)(*i))->PaintCasPath(option);
}
void CascadeList::MakeCascades()
{
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
((Cascade*)(*i))->MakeCascade();
}
gReve->Redraw3D();
fHist2D[i]->Reset();
Cascade* myCas;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myCas = (Cascade*)(*i);
Filter(myCas);
Int_t index;
Cascade* myCas;
- lpRE_i i = fChildren.begin();
+ List_i i = fChildren.begin();
myCas = (Cascade*)(*i);
index = myCas->GetESDIndex();
imin = index;
Bool_t isSelected;
Cascade* myCas;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myCas = (Cascade*)(*i);
val = myCas->GetXiMass();
Bool_t isSelected;
Cascade* myCas;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myCas = (Cascade*)(*i);
val = myCas->GetOmegaMass();
Bool_t isSelected;
Cascade* myCas;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myCas = (Cascade*)(*i);
val = myCas->GetESDIndex();
Bool_t isSelected;
Cascade* myCas;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myCas = (Cascade*)(*i);
val = myCas->GetCasCosPointingAngle();
Bool_t isSelected;
Cascade* myCas;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myCas = (Cascade*)(*i);
val = myCas->GetDCA_v0_Bach();
Bool_t isSelected;
Cascade* myCas;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myCas = (Cascade*)(*i);
val = myCas->GetRadius();
Bool_t isSelected;
Cascade* myCas;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myCas = (Cascade*)(*i);
val = myCas->GetPt();
Bool_t isSelected;
Cascade* myCas;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myCas = (Cascade*)(*i);
val = myCas->GetPseudoRapidity();
Bool_t isSelected;
Cascade* myCas;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myCas = (Cascade*)(*i);
val = myCas->GetNegPt();
Bool_t isSelected;
Cascade* myCas;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myCas = (Cascade*)(*i);
val = myCas->GetNegPseudoRapidity();
Bool_t isSelected;
Cascade* myCas;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myCas = (Cascade*)(*i);
val = myCas->GetPosPt();
Bool_t isSelected;
Cascade* myCas;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myCas = (Cascade*)(*i);
val = myCas->GetPosPseudoRapidity();
Bool_t isSelected;
Cascade* myCas;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myCas = (Cascade*)(*i);
val = myCas->GetBachPt();
Bool_t isSelected;
Cascade* myCas;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myCas = (Cascade*)(*i);
val = myCas->GetBachPseudoRapidity();
if(fNode == node)
UpdateItems();
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
((GeoNodeRnrEl*)(*i))->UpdateNode(node);
}
if(fNode->GetVolume() == volume)
UpdateItems();
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
((GeoNodeRnrEl*)(*i))->UpdateVolume(volume);
}
}
void PointSetArray::SetMarkerColor(Color_t tcolor)
{
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
TAttMarker* m = dynamic_cast<TAttMarker*>((*i)->GetObject());
if(m && m->GetMarkerColor() == fMarkerColor)
m->SetMarkerColor(tcolor);
void PointSetArray::SetMarkerStyle(Style_t mstyle)
{
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
TAttMarker* m = dynamic_cast<TAttMarker*>((*i)->GetObject());
if(m && m->GetMarkerStyle() == fMarkerStyle)
m->SetMarkerStyle(mstyle);
void PointSetArray::SetMarkerSize(Size_t msize)
{
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
TAttMarker* m = dynamic_cast<TAttMarker*>((*i)->GetObject());
if(m && m->GetMarkerSize() == fMarkerSize)
m->SetMarkerSize(msize);
{
static const Exc_t _eh("RenderElement::RenderElement ");
- for(lpRE_i p=fParents.begin(); p!=fParents.end(); ++p) {
+ for(List_i p=fParents.begin(); p!=fParents.end(); ++p) {
RenderElementListBase* l = dynamic_cast<RenderElementListBase*>(*p);
if(l)
l->RemoveElementLocal(this);
void RenderElementListBase::RemoveElements()
{
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
(*i)->RemoveParent(this);
}
fChildren.clear();
if(parent->GetFirstChild() != 0)
return 0;
Int_t n = 0;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
(*i)->AddIntoListTree(ltree, parent);
++n;
}
void RenderElementListBase::EnableListElements()
{
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i)
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
(*i)->SetRnrElement(kTRUE);
}
void RenderElementListBase::DisableListElements()
{
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i)
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i)
(*i)->SetRnrElement(kFALSE);
}
void RenderElementListBase::SetMainColor(Color_t col)
{
Color_t oldcol = GetMainColor();
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
if((*i)->GetMainColor() == oldcol) (*i)->SetMainColor(col);
}
RenderElement::SetMainColor(col);
void RenderElementListBase::PaintElements(Option_t* option)
{
if(fRnrElement) {
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
if((*i)->GetRnrElement())
(*i)->GetObject()->Paint(option);
}
typedef std::set<ListTreeInfo> sLTI_t;
typedef std::set<ListTreeInfo>::iterator sLTI_i;
- typedef std::list<RenderElement*> lpRE_t;
- typedef std::list<RenderElement*>::iterator lpRE_i;
+ typedef std::list<RenderElement*> List_t;
+ typedef std::list<RenderElement*>::iterator List_i;
protected:
// TRef fSource;
Color_t* fMainColorPtr;
sLTI_t fItems;
- lpRE_t fParents;
+ List_t fParents;
Bool_t fDestroyOnZeroRefCnt;
Bool_t fDenyDestroy;
virtual void AddParent(RenderElement* re);
virtual void RemoveParent(RenderElement* re);
+ List_i BeginParents() { return fParents.begin(); }
+ List_i EndParents() { return fParents.end(); }
+ Int_t GetNParents() const { return fParents.size(); }
+
+
Bool_t GetDestroyOnZeroRefCnt() const { return fDestroyOnZeroRefCnt; }
void SetDestroyOnZeroRefCnt(Bool_t d) { fDestroyOnZeroRefCnt = d; }
class RenderElementListBase : public RenderElement
{
protected:
- lpRE_t fChildren;
+ List_t fChildren;
void PaintElements(Option_t* option="");
virtual void DestroyElements();
+ List_i BeginChildren() { return fChildren.begin(); }
+ List_i EndChildren() { return fChildren.end(); }
+ Int_t GetNChildren() const { return fChildren.size(); }
+
virtual Int_t ExpandIntoListTree(TGListTree* ltree, TGListTreeItem* parent);
virtual Int_t DestroyListSubTree(TGListTree* ltree, TGListTreeItem* parent);
if(fRnrElement) {
if(fRnrV0vtx) {
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
if((*i)->GetRnrElement()) {
((V0*)(*i))->Paint(option);
}
}
if(fRnrDaughters) {
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
if((*i)->GetRnrElement()) {
((V0*)(*i))->PaintDaughters(option);
}
}
if(fRnrV0path) {
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
if((*i)->GetRnrElement()) {
((V0*)(*i))->PaintPath(option);
}
//______________________________________________________________________
void V0List::MakeV0s() {
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
((V0*)(*i))->MakeV0();
}
gReve->Redraw3D();
fHist2D[i]->Reset();
V0* myV0;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myV0 = (V0*)(*i);
Filter(myV0);
Int_t index;
V0* myV0;
- lpRE_i i=fChildren.begin();
+ List_i i=fChildren.begin();
myV0 = (V0*)(*i);
index = myV0->GetESDIndex();
imin = index;
Bool_t isSelected;
V0* myV0;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myV0 = (V0*)(*i);
val = myV0->GetPt();
Bool_t isSelected;
V0* myV0;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myV0 = (V0*)(*i);
val = myV0->GetK0mass();
Bool_t isSelected;
V0* myV0;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myV0 = (V0*)(*i);
val = myV0->GetLamMass();
Bool_t isSelected;
V0* myV0;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myV0 = (V0*)(*i);
val = myV0->GetAntiLamMass();
Bool_t isSelected;
V0* myV0;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myV0 = (V0*)(*i);
val = myV0->GetCosPointingAngle();
Bool_t isSelected;
V0* myV0;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myV0 = (V0*)(*i);
val = myV0->GetDaughterDCA();
Bool_t isSelected;
V0* myV0;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myV0 = (V0*)(*i);
val = myV0->GetRadius();
Bool_t isSelected;
V0* myV0;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myV0 = (V0*)(*i);
val = myV0->GetPseudoRapidity();
Bool_t isSelected;
V0* myV0;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myV0 = (V0*)(*i);
val = myV0->GetNegPt();
Bool_t isSelected;
V0* myV0;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myV0 = (V0*)(*i);
val = myV0->GetNegPseudoRapidity();
Bool_t isSelected;
V0* myV0;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myV0 = (V0*)(*i);
val = myV0->GetPosPt();
Bool_t isSelected;
V0* myV0;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myV0 = (V0*)(*i);
val = myV0->GetPosPseudoRapidity();
Bool_t isSelected;
V0* myV0;
- for(lpRE_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
+ for(List_i i=fChildren.begin(); i!=fChildren.end(); ++i) {
myV0 = (V0*)(*i);
val = myV0->GetESDIndex();