GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LNL/MetaWatchers.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2010 by Olivier Stezowski *
3  * stezow(AT)ipnl.in2p3.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
20 
21 #ifndef _MetaWatchers
22 #define _MetaWatchers
23 
24 // Gw and Watcher definition
25 #ifndef Gw_Watchers
26 #include "Watchers.h"
27 #endif
28 
29 // ADF definitions
30 #ifndef ADF_MetaFrame
31 #include "MetaFrame.h"
32 #endif
33 
34 // ROOT definitions
35 #ifndef ROOT_TH2F
36 #include "TH2F.h"
37 #endif
38 #ifndef ROOT_TH3
39 #include "TH3.h"
40 #endif
41 
42 using namespace ADF;
43 using namespace Gw;
44 
46 
53 class VertexBuilder
54 {
55 private:
57  static VertexBuilder *gDefautVertexBuilder;
59  static UShort_t gNbVertexBuilder;
60 
61 private:
62  static VertexBuilder *theDefault();
63 
64 
65 protected:
67  SharedFP *fVertexFrame;
69  Bool_t fIsToBeDeleted;
70 
71 public:
72  VertexBuilder();
73  virtual ~VertexBuilder();
74 
76  static void DestroyGlobals();
77 
79  /*
80  */
81  static VertexBuilder *theCurrentVertexBuilder();
82 
84  virtual void SetVertex(Double_t /* x */ = 0., Double_t /* y */ = 0., Double_t /* z */ = 0.,
85  Double_t /* Dx */ = 0., Double_t /* Dy */ = 0., Double_t /* Dz */ = 1.,
86  Double_t /* beta */ = 0.02) ; //*MENU*
87 
89  virtual VertexInterface *GetVertex() { return GetDataPointer<VertexInterface>(fVertexFrame); }
90 };
91 
93 /*
94  */
95 class GlobalVertex : public WatcherWithTag, public VertexBuilder
96 {
97 public:
98  GlobalVertex(const char *name, const char *title, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0);
99  virtual ~GlobalVertex();
100 
102  virtual void Exec(Option_t * /*option*/ = "")
103  {
104  ;
105  }
106 
107  ClassDef(GlobalVertex,0) // Watcher suitable for vertex that does not depend on event number
108 };
109 
110 
112 
116 class GlobalDC : public WatcherWithTag
117 {
118 private:
119  VertexBuilder *fVertexBuilder;
120 
121 protected:
122  TH1F *fBeta;
123  TH3F *fPosition;
124  TH3F *fExpansion;
125  TH3F *fDirection;
126 
127 protected:
129  virtual void DoCanvas(TCanvas *c, Option_t *);
130 
131 public:
132  GlobalDC(const char *name, const char *title, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0);
133  virtual ~GlobalDC();
134 
136  virtual Bool_t SetTrigger( ADF::DFTrigger */*trigger*/ = 0x0 );
137 
139  virtual void Exec(Option_t *option="");
140 
141  ClassDef(GlobalDC,0) // to display beta value
142 };
143 
144 
145 #endif
146 
virtual VertexInterface * GetVertex()
Get the vertex data interface.
Interface for any watcher that is a VertexBuilder.
Watcher that built the spectra expected for a Vertex.
suitable for a vertex that is not based on event by event basis
A Shared Frame Pointer.
Definition: Frame.h:597
Base class for a trigger on a data flow.
Definition: Trigger.h:155
header file for MetaFrame.cpp
virtual void Exec(Option_t *="")
watch the current frame ... do nothing, does not depend on events