StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StVirtualEventFilter.h
1 //*-- Author : Valery Fine(fine@bnl.gov) 11/07/99
2 // $Id: StVirtualEventFilter.h,v 1.10 2000/09/15 15:17:19 fine Exp $
3 //
4 #ifndef STAR_StVirtualEventFilter
5 #define STAR_StVirtualEventFilter
6 
8 // //
9 // StVirtualEventFilter virtual base class //
10 // //
11 // //
12 // 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
13 //
15 
16 // #include "StTypeDefs.h"
17 #include <TObject.h>
18 #include <Gtypes.h>
19 
20 class StObjArray;
21 class StGlobalTrack;
22 class StVertex;
23 
24 class TTableSorter;
25 class TTable;
26 
27 class StVirtualEventFilter : public TObject {
28  protected:
29  Int_t m_ActiveFlag; // Flag whether this filter is on/off
30  ULong_t mOptions; // Bit masks fro the user defined options
31  public:
32  StVirtualEventFilter(Int_t flag=0):m_ActiveFlag(flag){;}
33  virtual ~StVirtualEventFilter(){;}
34  Int_t IsOn() { return GetFlag();}
35  Int_t IsOff(){ return !GetFlag();}
36  virtual Int_t GetFlag();
37  ULong_t GetOptions();
38  Int_t Turn(Int_t flag=1);
39  Int_t TurnOn() { return Turn();}
40  Int_t TurnOff(){ return Turn(0);}
41  Int_t Toggle() { return GetFlag()? TurnOff():TurnOn();}
42  virtual Int_t Channel(StGlobalTrack *globTrack,Size_t &size,Style_t &style);
43  virtual Int_t Channel(const StObjArray *hitCollection,Size_t &size,Style_t &style);
44  virtual Int_t Channel(const TTableSorter *tableObject,Int_t index,Size_t &size,Style_t &style);
45  virtual Int_t Channel(const StVertex *vertexObject,Size_t &size,Style_t &style);
46  virtual Int_t Channel(const TTable *tableObject,Int_t rowNumber,Size_t &size,Style_t &style);
47  virtual Int_t Reset(Int_t reset=0){return reset;}
48  ULong_t SetOptions(ULong_t opt);
49 
50  ClassDef(StVirtualEventFilter,0) // virtual base class for the custom "event" filters (useful for 3D visualization)
51 };
52 
53 inline ULong_t StVirtualEventFilter::GetOptions(){return mOptions;}
54 inline ULong_t StVirtualEventFilter::SetOptions(ULong_t opt){ ULong_t o = GetOptions(); mOptions = opt; return o;}
55 inline Int_t StVirtualEventFilter::Turn(Int_t flag){ Int_t s = GetFlag(); m_ActiveFlag = flag; return s;}
56 
57 // $Log: StVirtualEventFilter.h,v $
58 // Revision 1.10 2000/09/15 15:17:19 fine
59 // new method and data-member to add options introduced
60 //
61 // Revision 1.9 2000/03/24 20:35:21 fine
62 // adjusted to ROOT 2.24. Doesn't work yet. Under development
63 //
64 // Revision 1.8 1999/12/21 18:57:13 fine
65 // compilation warning plus new type for SizeAttribute
66 //
67 // Revision 1.7 1999/12/05 06:34:16 fine
68 // Several const methods for St_TableSorter introduced
69 //
70 // Revision 1.6 1999/12/04 21:59:57 fine
71 // new class comment
72 //
73 // Revision 1.5 1999/12/04 21:56:27 fine
74 // new non-const signature for Channel(St_TableSorter) method
75 //
76 // Revision 1.4 1999/11/24 18:51:22 fine
77 // all StVirtual::Filter have been renamed to Channel
78 //
79 // Revision 1.3 1999/11/10 02:24:37 fine
80 // StVirtualFilter::Reset method has been introduced
81 //
82 
83 #endif
Definition: TTable.h:48