00001 #include "StVirtualEventFilter.h" 00002 00004 // // 00005 // StVirtualEventFilter virtual base class is to create the variuous // 00006 // user-defined filters // 00007 // // 00008 // $Id: StVirtualEventFilter.cxx,v 1.11 2000/03/24 20:35:21 fine Exp $ // 00009 // // 00010 // This class defines the intreface to define // 00011 // a graphics attribute: // 00012 // for example: size and style. The value the Channel methods return // 00013 // could be used a color index for grapgics filtering // 00014 // // 00015 // and a trivial selection as well // 00016 // to reply whether the object does satisfy some user // 00017 // defined conditions. // 00018 // For that the return value = 0 means the event supplied // 00019 // did not pass the filter and should not be drawn at all // 00020 // // 00021 // Channel Parameters // 00022 // ------------- ----------------------------- // 00023 // 1. StGlobalTrack *globTrack // 00024 // 2. StObjArray *hitCollection // 00025 // 3. TTableSorter *tableObject,Int_t index // 00026 // 4. StVertex *vertexObject // 00027 // 5. TTable *tableObject, Int_t rowNumber // 00028 // // 00029 // User should derive his own class and overload the "Channel" methods // 00030 // with the signature those fit his/her current needs // 00031 // // 00032 // 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 00033 // // 00035 00036 ClassImp(StVirtualEventFilter) 00037 //_____________________________________________________________________________ 00038 Int_t StVirtualEventFilter::GetFlag(){ return m_ActiveFlag;} 00039 00040 //_____________________________________________________________________________ 00041 Int_t StVirtualEventFilter::Channel(StGlobalTrack *,Size_t &,Style_t &) 00042 { 00043 static Int_t colorTrack = kRed; 00044 colorTrack++; 00045 if (colorTrack > 20) colorTrack = kRed; 00046 return GetFlag() ? colorTrack : 0 ; 00047 } 00048 //_____________________________________________________________________________ 00049 Int_t StVirtualEventFilter::Channel(const StObjArray *,Size_t &,Style_t &) 00050 {return GetFlag()? kYellow : 0 ;} 00051 00052 //_____________________________________________________________________________ 00053 Int_t StVirtualEventFilter::Channel(const TTableSorter *,Int_t index,Size_t &,Style_t &) 00054 { return GetFlag()? (kGreen+index)%20 : 0 ;} 00055 //_____________________________________________________________________________ 00056 Int_t StVirtualEventFilter::Channel(const StVertex *,Size_t &,Style_t &) 00057 { return GetFlag()? kBlue : 0 ; } 00058 00059 //_____________________________________________________________________________ 00060 Int_t StVirtualEventFilter::Channel(const TTable *,Int_t rowNumber,Size_t &,Style_t &) 00061 { return GetFlag()? (kGreen+rowNumber)%20 : 0 ;} 00062 00063 //_____________________________________________________________________________ 00064 // $Log: StVirtualEventFilter.cxx,v $ 00065 // Revision 1.11 2000/03/24 20:35:21 fine 00066 // adjusted to ROOT 2.24. Doesn't work yet. Under development 00067 // 00068 // Revision 1.10 2000/01/24 21:12:23 fine 00069 // new comments 00070 // 00071 // Revision 1.9 2000/01/24 20:57:22 fine 00072 // new comments 00073 // 00074 // Revision 1.8 2000/01/12 18:07:22 fine 00075 // cvs symbols have been added and copyright class introduced 00076 // 00077 //_____________________________________________________________________________ 00078 00079
1.5.9