00001 //*-- Author : Valery Fine(fine@bnl.gov) 02/12/99 00002 // $Id: TurnDisplay.C,v 1.8 2000/08/31 21:28:01 fine Exp $ 00003 StEventDisplayMaker *dsMaker = 0; 00004 StVirtualEventFilter *trackFilter; 00005 //___________________________________________________________________ 00006 void TurnDisplay(const Char_t *filterName=0) { 00007 // 00008 // TurnDisplay.C macro: 00009 // 00010 // - Load StEventDisplayMaker 00011 // - Load user-defined filter class if provided 00012 // - defines the tables one wants to be drawn 00013 00014 if (chain->IsA() == StChain::Class() || !chain->GetOption("DISPLAY") ) { 00015 gSystem->Load("St_geom_Maker"); 00016 gSystem->Load("StEventDisplayMaker"); 00017 StMaker *mini = new St_geom_Maker(); 00018 mini->Init(); 00019 dsMaker = new StEventDisplayMaker(); 00020 dsMaker->Init(); 00021 } 00022 dsMaker = (StEventDisplayMaker *) chain->GetMaker("EventDisplay"); 00023 if (dsMaker) { 00024 if (filterName && filterName[0]) { 00025 gSystem->Load(filterName); // Load the user-defined filter 00026 TClass *filterClass = gROOT->GetClass(filterName); 00027 if (filterClass) { 00028 trackFilter = (StVirtualEventFilter *)filterClass->New(); 00029 00030 // Activate some filter channels 00031 dsMaker->SetFilter(trackFilter,StEventDisplayMaker::kTable); 00032 trackFilter->TurnOn(); 00033 00034 trackFilter = (StVirtualEventFilter *)filterClass->New(); 00035 dsMaker->SetFilter(trackFilter,StEventDisplayMaker::kTptTrack); 00036 } 00037 else { 00038 cout << " *** ERROR ***: There is no class filter <" << filterName << ">. The defualt one will be used instead" << endl; 00039 dsMaker->SetTableFlag(); 00040 } 00041 } 00042 else { 00043 dsMaker->SetTableFlag(); 00044 dsMaker->SetTptTrackFlag(); 00045 } 00046 00047 // define "Event" geometry (the objects to be drawn out) 00048 // This is under construction !!!! 00049 //___________________________________________________________________ 00050 // 00051 // User defined area follow: 00052 //___________________________________________________________________ 00053 00054 // "Reference tables" have no (x,y,z) information and can not be drawn 00055 // They should be sorted by the foreign key provided in brackets to be effecient 00056 // No filter channel used. No default action 00057 00058 dsMaker->AddName("dst/dst_dedx(id_track)"); //Add the "reference" tables to the Event Display list 00059 // dsMaker->AddName("g2t_track(ge_pid)"); //Add the "reference" tables to the Event Display list 00060 // dsMaker->AddName("g2t_vertex(id)"); //Add the "reference" tables to the Event Display list 00061 00062 // "Regular" tables: 00063 // contain 3 columns associated with x,y,z and 00064 // foreing key to link all points together 00065 00066 // dsMaker->AddName("g2t_tpc_hit(track_p,x[0]:x[1]:x[2])"); //Add the tables to the Event Display list 00067 // dsMaker->AddName("g2t_svt_hit(track_p,x[0]:x[1]:x[2])"); //Add the tables to the Event Display list 00068 dsMaker->AddName("tphit(id_globtrk,x:y:z)"); //Add the tables to the Event Display list 00069 // dsMaker->AddName("scs_spt(id_globtrk,x[0]:x[1]:x[2])"); //Add the tables to the Event Display list 00070 00071 // extra table to check packed options 00072 // http://www.star.bnl.gov/STAR/html/comp_l/root/html/egr_globtrk_st.html 00073 00074 // dsMaker->AddName("egr_globtrk(id,position[0]:position[1]:charge)"); //Add the tables to the Event Display list 00075 00076 // "Packed" tables: 00077 // contain 1 columns with 2 long numbers associated with packed x,y,z and 00078 // foreing key to link all points together 00079 // http://www.star.bnl.gov/STAR/html/comp_l/root/html/dst_point_st.html 00080 dsMaker->AddName("dst/point(id_track,position[0]:position[1]:charge)"); //Add the tables to the Event Display list 00081 00082 // "Irregular" tables: has no column associated directly with (x,y,z) coordinates 00083 dsMaker->AddName("dst/primtrk"); 00084 dsMaker->AddName("tptrack"); // the table has no column with (x,y,z) coordinates, 00085 // a special method has to be invoked to draw this table 00086 //___________________________________________________________________ 00087 // 00088 // End of the user defined area follow: 00089 //___________________________________________________________________ 00090 if (trackFilter) trackFilter->TurnOn(); 00091 dsMaker->SetDebug(); 00092 dsMaker->TurnOn(); 00093 } 00094 } 00095 //__________________________________________________________________________ 00096 // $Log: TurnDisplay.C,v $ 00097 // Revision 1.8 2000/08/31 21:28:01 fine 00098 // new default to draw dst objects 00099 // 00100 // Revision 1.7 2000/04/18 21:43:14 fine 00101 // make TurnDisplay macro available for doEvents 00102 // 00103 // Revision 1.6 1999/12/27 21:47:06 fine 00104 // St_geom_Maker has been added 00105 // 00106 // Revision 1.5 1999/12/27 20:54:39 fine 00107 // it shows how to active the ttrack points 00108 // 00109 // Revision 1.4 1999/12/19 00:12:34 fine 00110 // some corrections for the packed tables 00111 // 00112 // Revision 1.3 1999/12/06 04:46:56 fine 00113 // Bug fixes 00114 // 00115 // Revision 1.2 1999/12/02 19:56:22 fine 00116 // Clean up 00117 // 00118 // Revision 1.1 1999/12/02 18:49:35 fine 00119 // two new macro to play with Event Display have been introduced 00120 //
1.5.9