StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
SetObjectFilter.C
1 //*-- Author : Valery Fine(fine@bnl.gov) 02/12/99
2 // $Id: SetObjectFilter.C,v 1.4 2000/08/10 17:09:30 fine Exp $
3 //___________________________________________________________________
4 void SetObjectFilter()
5 {
6  // This is a pattern to be used by user to create his /her
7  // own custom filter parameters.
8 
9  // - Make your own copy of this macro
10  // - Keep this file open with your favorite editor
11  // - Change it when it is appropriated and
12  // - RELOAD in to the running ROOT session with
13  // .x SetObjectFilter.C
14  // as many time as you want
15 
16  // To get an access to your custom filter one has to cast
17  // the global virtual pointer to his /her custom type
18  // This means the type "StVirtualFilter" must be replaced with the
19  // custom one.
20 
21  //________________________________________________
22  //
23  // You should adjust the type of filter below
24  //________________________________________________
25  //
26  StTrackFilter *localFilter = (StVirtualEventFilter *)trackFilter;
27  //________________________________________________
28  Int_t tr_p[]={39250,39344};
29  Int_t ltr_p = sizeof(tr_p)/sizeof(int);
30  localFilter->SetTrack_P(tr_p,ltr_p);
31 
32  Int_t id_globtrk[]={3975,2485};
33  Int_t lid_globtrk = sizeof(id_globtrk)/sizeof(int);
34  localFilter->SetId_globtrk(id_globtrk,lid_globtrk);
35 
36  Int_t tr_id[]={5489,5491};
37  Int_t ltr_id = sizeof(tr_id)/sizeof(int);
38  localFilter->SetTptID(tr_id,ltr_id);
39  //______________________________________________//
40  // //
41  // Redraw picture with a new filter parameters. //
42  // You should NOT change the line below !!! //
43  //______________________________________________//
44  // //
45  if (dsMaker) dsMaker->ReDraw(); //
46  //______________________________________________//
47 }
48 
49 // $Log: SetObjectFilter.C,v $
50 // Revision 1.4 2000/08/10 17:09:30 fine
51 // Wensheng example has been fixed
52 //
53 // Revision 1.3 1999/12/06 04:46:56 fine
54 // Bug fixes
55 //
56 // Revision 1.2 1999/12/02 20:03:31 fine
57 // Clean up
58 //
59 // Revision 1.1 1999/12/02 18:49:35 fine
60 // two new macro to play with Event Display have been introduced
61 //