StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StVirtualEventFilter.cxx
1 #include "StVirtualEventFilter.h"
2 
4 // //
5 // StVirtualEventFilter virtual base class is to create the variuous //
6 // user-defined filters //
7 // //
8 // $Id: StVirtualEventFilter.cxx,v 1.11 2000/03/24 20:35:21 fine Exp $ //
9 // //
10 // This class defines the intreface to define //
11 // a graphics attribute: //
12 // for example: size and style. The value the Channel methods return //
13 // could be used a color index for grapgics filtering //
14 // //
15 // and a trivial selection as well //
16 // to reply whether the object does satisfy some user //
17 // defined conditions. //
18 // For that the return value = 0 means the event supplied //
19 // did not pass the filter and should not be drawn at all //
20 // //
21 // Channel Parameters //
22 // ------------- ----------------------------- //
23 // 1. StGlobalTrack *globTrack //
24 // 2. StObjArray *hitCollection //
25 // 3. TTableSorter *tableObject,Int_t index //
26 // 4. StVertex *vertexObject //
27 // 5. TTable *tableObject, Int_t rowNumber //
28 // //
29 // User should derive his own class and overload the "Channel" methods //
30 // with the signature those fit his/her current needs //
31 // //
32 // Submit any problem with this code via begin_html <A HREF="http://www.star.bnl.gov/STARAFS/comp/sofi/bugs/send-pr.html"><B><I>"STAR Problem Report Form"</I></B></A> end_html
33 // //
35 
36 ClassImp(StVirtualEventFilter)
37 //_____________________________________________________________________________
38 Int_t StVirtualEventFilter::GetFlag(){ return m_ActiveFlag;}
39 
40 //_____________________________________________________________________________
41 Int_t StVirtualEventFilter::Channel(StGlobalTrack *,Size_t &,Style_t &)
42 {
43  static Int_t colorTrack = kRed;
44  colorTrack++;
45  if (colorTrack > 20) colorTrack = kRed;
46  return GetFlag() ? colorTrack : 0 ;
47 }
48 //_____________________________________________________________________________
49 Int_t StVirtualEventFilter::Channel(const StObjArray *,Size_t &,Style_t &)
50 {return GetFlag()? kYellow : 0 ;}
51 
52 //_____________________________________________________________________________
53 Int_t StVirtualEventFilter::Channel(const TTableSorter *,Int_t index,Size_t &,Style_t &)
54 { return GetFlag()? (kGreen+index)%20 : 0 ;}
55 //_____________________________________________________________________________
56 Int_t StVirtualEventFilter::Channel(const StVertex *,Size_t &,Style_t &)
57 { return GetFlag()? kBlue : 0 ; }
58 
59 //_____________________________________________________________________________
60 Int_t StVirtualEventFilter::Channel(const TTable *,Int_t rowNumber,Size_t &,Style_t &)
61 { return GetFlag()? (kGreen+rowNumber)%20 : 0 ;}
62 
63 //_____________________________________________________________________________
64 // $Log: StVirtualEventFilter.cxx,v $
65 // Revision 1.11 2000/03/24 20:35:21 fine
66 // adjusted to ROOT 2.24. Doesn't work yet. Under development
67 //
68 // Revision 1.10 2000/01/24 21:12:23 fine
69 // new comments
70 //
71 // Revision 1.9 2000/01/24 20:57:22 fine
72 // new comments
73 //
74 // Revision 1.8 2000/01/12 18:07:22 fine
75 // cvs symbols have been added and copyright class introduced
76 //
77 //_____________________________________________________________________________
78 
79 
Definition: TTable.h:48