/** * Add distributions from other experiments to stacks * * @param name Name of current bin * @param i Index of current bin * @param sNN Center of mass energy * @param allALICE Stack of ALICE data * @param allCMS Stack of CMS data * @param alice Possible ALICE result on return * @param cms Possible CMS result on return */ void Other2Stack(const TString& name, Int_t i, UShort_t sNN, TMultiGraph* allALICE, TMultiGraph* allCMS, TGraph*& alice, TGraph*& cms) { if (!allALICE && !allCMS) return; TString tmp(name); tmp.ReplaceAll("p", "+"); tmp.ReplaceAll("m", "-"); tmp.ReplaceAll("_", " "); tmp.ReplaceAll("d", "."); TObjArray* tokens = tmp.Tokenize(" "); if (!tokens || tokens->GetEntriesFast() < 2) { Error("Other2Stack", "Failed to decode eta range from %s", name.Data()); if (tokens) tokens->Delete(); return; } Double_t eta1 = static_cast<TObjString*>(tokens->At(0))->String().Atof(); Double_t eta2 = static_cast<TObjString*>(tokens->At(1))->String().Atof(); tokens->Delete(); if (TMath::Abs(eta2+eta1) > 1e-3) { // Not symmetric bin // Info("Other2Stack", "bin [%f,%f] is not symmetric (%f)", // eta1, eta2, TMath::Abs(eta2-eta1)); return; } Double_t aEta = TMath::Abs(eta1); Int_t open, closed; Double_t factor; Float_t size; BinAttributes(i, open, closed, size, factor); if (allALICE) { TGraphAsymmErrors* g = GetOther(1, aEta, sNN, factor); if (g) { g->SetMarkerStyle(closed); g->SetMarkerColor(kColorALICE); g->SetMarkerSize(size); allALICE->Add(g, "p same"); alice = g; } } if (allCMS) { TGraphAsymmErrors* g = GetOther(0, aEta, sNN, factor); if (g) { g->SetMarkerStyle(closed); g->SetMarkerColor(kColorCMS); g->SetMarkerSize(size); allCMS->Add(g, "p same"); cms = g; } } }
void CComparableListing::RefreshComparison() { if (!m_pComparisonManager) return; if (!IsComparing()) return; if (!CanStartComparison() || !GetOther() || !GetOther()->CanStartComparison()) { return; } m_pComparisonManager->CompareListings(); }
void CLocalListView::FinishComparison() { SetItemCount(m_indexMapping.size()); ComparisonRestoreSelections(); RefreshListOnly(); CComparableListing* pOther = GetOther(); if (!pOther) return; pOther->ScrollTopItem(GetTopItem()); }
// // This makes from the begin and endnode one node (argument begin_or_end_node) // The references to this link in the node will also be deleted // After doing that, link link can be deleted or be recycled. // void KBoolLink::MergeNodes(Node *const begin_or_end_node) { // assert(beginnode && endnode); // assert ((begin_or_end_node == beginnode)||(begin_or_end_node == endnode)); m_beginnode->RemoveLink(this); m_endnode->RemoveLink(this); if (m_endnode != m_beginnode) { // only if beginnode and endnode are different nodes begin_or_end_node->Merge(GetOther(begin_or_end_node)); } m_endnode = NULL; m_beginnode=NULL; }