GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LNL/EventWatchers.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 _EventWatchers
22 #define _EventWatchers
23 
24 // root
25 #include "TH2F.h"
26 #include "TObjArray.h"
27 
28 // Gw and Watcher definition
29 #include "Watchers.h"
30 
31 // ADF definitions
32 #include "CompositeFrame.h"
33 
34 using namespace ADF;
35 using namespace Gw;
36 
37 
39 
42 class EventWatcher : public WatcherWithTag
43 {
44 protected:
46  SharedFP *fFrame;
48  SharedFP *fPSAFrame;
49 
50 public:
51  EventWatcher(const char *name, const char *title, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0) :
52  WatcherWithTag(name,title,sp_dir,tag_dir),
53  fFrame(0x0),
54  fPSAFrame(0x0)
55  {;}
56  virtual ~EventWatcher()
57  {;}
58 
60 
63  virtual Bool_t SetTrigger( ADF::DFTrigger */*trigger*/ = 0x0 );
64 
65  ClassDef(EventWatcher,0) // Watcher on event:data
66 };
67 
68 
70 
73 class TSCoinc : public EventWatcher
74 {
75 private:
77  ULong64_t fLastTimeStamp;
78 
79 private:
81  TObjArray *fCoinc;
82 private:
84  TH2 *fCoincPerCrystal;
85 
86 protected:
88  virtual void DoCanvas(TCanvas *c, Option_t *);
89 
90 public:
91  TSCoinc(const char *name, const char *title, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0);
92  virtual ~TSCoinc()
93  {;}
94 
96 
98  virtual Bool_t SetTrigger( ADF::DFTrigger */*trigger*/ = 0x0 );
99 
101  virtual void Exec(Option_t *option="");
102 
103  ClassDef(TSCoinc,0) // TimeStamp distribution in a composite frame
104 };
105 
106 #endif
107 
EventWatcher(const char *name, const char *title, TDirectory *sp_dir=0x0, TDirectory *tag_dir=0x0)
virtual ~EventWatcher()
virtual ~TSCoinc()
Base Watcher working for any event:data.
A Shared Frame Pointer.
Definition: Frame.h:597
Gives the distribution of the different timstamps in a composite frame.
Base class for a trigger on a data flow.
Definition: Trigger.h:155