void MergeScaled() { TLegend * legend = new TLegend(0.7,0.71,0.98,1.); legend->SetTextSize(0.02); legend->SetFillColor(0); // Have a white background mergeAll("0_MuScleFit.root", 1, 2, legend, "before"); mergeAll("2_MuScleFit.root", 3, 4, legend, "after"); legend->Draw("SAME"); }
int main(int argc, char *argv[]) { if (argc != 2) usage(); hSetDb(argv[1]); errorFileHandle = mustOpen("hapmap2.errors", "w"); nameHash = newHash(18); verbose(1, "building CEU hash...\n"); hashCEU = getHash("hapmapSnpsCEU"); verbose(1, "building CHB hash...\n"); hashCHB = getHash("hapmapSnpsCHB"); verbose(1, "building JPT hash...\n"); hashJPT = getHash("hapmapSnpsJPT"); verbose(1, "building YRI hash...\n"); hashYRI = getHash("hapmapSnpsYRI"); verbose(1, "merging...\n"); mergeAll(); // freeHash(&nameHash); // freeHash(&hashCEU); carefulClose(&errorFileHandle); return 0; }
bool MergeAllParents::apply(VertexID v) { bool change = false; if (v != m_invartask && v != m_outvartask) { set<VertexID> A, B; if (in_degree(v,*m_taskgraph) > 1 && tlevel(v) > maxTlevel(parents(v,*m_taskgraph)) + totalExecCost(parents(v,*m_taskgraph),v) /* && calculateAB(parents(v,*m_taskgraph),v,A,B) > 0 */ ) { calculateAB(parents(v,*m_taskgraph),v,A,B); // Do the merge //cerr << "MergeAllParents, child: "<< getTaskID(v,m_taskgraph) << " ("; //printContainTasks(v,cerr); //cerr << ")" << endl; //cerr << "parents :" ; //ParentsIterator p,p_end; //for (tie(p,p_end)=parents(v,*m_taskgraph); p != p_end; p++) { // cerr << getTaskID(*p,m_taskgraph) << "(" ; // printContainTasks(*p,cerr); // cerr << ") " ; // } //cerr << endl; // cerr << "siblings (A: " ; //printVertexSet(A,cerr); //cerr << endl << "A complement: " ; //printVertexSet(B,cerr); //cerr << endl; mergeAll(parents(v,*m_taskgraph),v,A,B); //cerr << "parent now contains: " ; //printContainTasks(v,cerr); //cerr << endl; change=true; } } return change; }