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