tasks.C

Go to the documentation of this file.
00001 // Example of TTasks.
00002 // Create a hierarchy of objects derived from TTask in library Mytasks
00003 // Show the tasks in a browser.
00004 // To execute a Task, use the context context menu and select
00005 // the item "ExecuteTask"
00006 // see also other functions in the TTask context menu, such as
00007 //   -setting a breakpoint in one or more tasks
00008 //   -enabling/disabling one task, etc
00009 //Author: Rene Brun
00010       
00011 void tasks()
00012 {
00013    TString dir = gSystem->UnixPathName(gInterpreter->GetCurrentMacroName());
00014    dir.ReplaceAll("tasks.C","");
00015    dir.ReplaceAll("/./","/");
00016    gROOT->LoadMacro(dir +"MyTasks.cxx+");
00017    
00018    TTask *run      = new MyRun("run","Process one run");
00019    TTask *event    = new MyEvent("event","Process one event");
00020    TTask *geomInit = new MyGeomInit("geomInit","Geometry Initialisation");
00021    TTask *matInit  = new MyMaterialInit("matInit","Materials Initialisation");
00022    TTask *tracker  = new MyTracker("tracker","Tracker manager");
00023    TTask *tpc      = new MyRecTPC("tpc","TPC Reconstruction");
00024    TTask *its      = new MyRecITS("its","ITS Reconstruction");
00025    TTask *muon     = new MyRecMUON("muon","MUON Reconstruction");
00026    TTask *phos     = new MyRecPHOS("phos","PHOS Reconstruction");
00027    TTask *rich     = new MyRecRICH("rich","RICH Reconstruction");
00028    TTask *trd      = new MyRecTRD("trd","TRD Reconstruction");
00029    TTask *global   = new MyRecGlobal("global","Global Reconstruction");
00030 
00031    run->Add(geomInit);
00032    run->Add(matInit);
00033    run->Add(event);
00034    event->Add(tracker);
00035    event->Add(global);
00036    tracker->Add(tpc);
00037    tracker->Add(its);
00038    tracker->Add(muon);
00039    tracker->Add(phos);
00040    tracker->Add(rich);
00041    tracker->Add(trd);
00042 
00043    gROOT->GetListOfTasks()->Add(run);
00044    gROOT->GetListOfBrowsables()->Add(run);
00045    new TBrowser;
00046 }

Generated on Tue Jul 5 15:45:10 2011 for ROOT_528-00b_version by  doxygen 1.5.1