GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GSIWatchers.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 _BaseGSIWatchers
22 #define _BaseGSIWatchers
23 
24 // Gw and Watcher definition
25 #include "TTreeWatchers.h"
26 
28 
31 struct ADF_MBS
32 {
33  Int_t dlen; // Data length + 4 in words
34  Short_t subtype; // Subtype
35  Short_t type; // Type number
36  Short_t trigger; // Trigger number
37  Short_t dummy; // Not used yet
38  Int_t idmbs; // Should be 0x00100000 or 0x0020000
39  Int_t ts_1; // Current timestamp, part 1
40  Int_t ts_2; // current timestamp, part 2
41  Int_t count; // Current event number
42 } ;
43 
45 
48 {
49 protected:
52 protected:
54  // in base class, MakeTH1(const char *folder, const char *histname, Int_t, min, max, Option "F")
55 public:
57  BaseGSIWatcher(const char *, const char *, TTree *);
58  BaseGSIWatcher(const char *, const char *, TTree *, Short_t, Short_t);
59  virtual ~BaseGSIWatcher();
60 
62 
65  virtual Bool_t SetTrigger( ADF::DFTrigger * /*trigger*/ = 0x0 );
66 
68 // virtual void Exec(Option_t *option="");
69 
70  ClassDef(BaseGSIWatcher,0) // Base class for a GSI watcher
71 };
72 
74 
113 {
114 protected:
117 protected:
119  Bool_t fPrintOut;
120 
121 protected:
122  TH1F *fEvent_dlen;
123  TH1F *fEvent_type;
127 
134 
135 protected:
137  virtual void DoCanvas(TCanvas *c, Option_t *);
138 
139 public:
140  MBSWatcher(const char *, const char *, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0);
141  virtual ~MBSWatcher()
142  {;}
143  virtual Bool_t SetTrigger( ADF::DFTrigger * /*trigger*/ = 0x0 );
144 
146  void PrintOut(Bool_t ison = true); // *TOGGLE*
147 
149  virtual void Exec(Option_t *option="");
150 
151  ClassDef(MBSWatcher,0) // Watcher for Raw MBS DATA
152 };
153 
154 #endif
155 
TH1F * fEvent_count
Definition: GSIWatchers.h:126
TH1F * fSubEvent_subcrate
Definition: GSIWatchers.h:132
void PrintOut(Bool_t ison=true)
Switch on/off PrintOut.
Definition: GSIWatchers.C:160
Int_t count
Definition: GSIWatchers.h:41
Int_t idmbs
Definition: GSIWatchers.h:38
virtual void DoCanvas(TCanvas *c, Option_t *)
To be overwritten by real implementation if a canvas is produced.
Definition: GSIWatchers.C:144
virtual ~MBSWatcher()
Definition: GSIWatchers.h:141
TH1F * fSubEvent_dlen
Definition: GSIWatchers.h:128
virtual void Exec(Option_t *option="")
watch the current frame
Definition: GSIWatchers.C:165
ADF::SharedFP * fMBSFrame
Pointer to the Ancillary Frame as delivered by the ADF Trigger.
Definition: GSIWatchers.h:116
TH1F * fEvent_dlen
Definition: GSIWatchers.h:122
Int_t ts_1
Definition: GSIWatchers.h:39
MBSWatcher(const char *, const char *, TDirectory *sp_dir=0x0, TDirectory *tag_dir=0x0)
Definition: GSIWatchers.C:111
Short_t trigger
Definition: GSIWatchers.h:36
helper structure to decode the data content of the additional key following the ADF key ...
Definition: GSIWatchers.h:31
virtual Bool_t SetTrigger(ADF::DFTrigger *=0x0)
Set the trigger attached to this watcher.
Definition: GSIWatchers.C:62
virtual ~BaseGSIWatcher()
Definition: GSIWatchers.C:58
virtual Bool_t SetTrigger(ADF::DFTrigger *=0x0)
To set the Frames (through a trigger) associated to this watcher.
Definition: GSIWatchers.C:155
BaseGSIWatcher()
Make1D a la GO4.
Definition: GSIWatchers.C:39
Short_t dummy
Definition: GSIWatchers.h:37
TH1F * fSubEvent_control
Definition: GSIWatchers.h:131
TH1F * fSubEvent_type
Definition: GSIWatchers.h:129
A Shared Frame Pointer.
Definition: Frame.h:597
Short_t subtype
Definition: GSIWatchers.h:34
TH1F * fEvent_trigger
Definition: GSIWatchers.h:125
TH1F * fEvent_subtype
Definition: GSIWatchers.h:124
ADF::SharedFP * fMBSFrame
MBS data are encapsulated in an ADF Frame.
Definition: GSIWatchers.h:51
Base class for a trigger on a data flow.
Definition: Trigger.h:155
Base for a watcher on an ancillary (raw) frame @ GSI.
Definition: GSIWatchers.h:47
A watcher filling TTree, Spectra under conditions.
Int_t dlen
Definition: GSIWatchers.h:33
TH1F * fEvent_type
Definition: GSIWatchers.h:123
Bool_t fPrintOut
if true, print out information, otherwise just do spectra
Definition: GSIWatchers.h:119
Short_t type
Definition: GSIWatchers.h:35
Int_t ts_2
Definition: GSIWatchers.h:40
TH1F * fSubEvent_subtype
Definition: GSIWatchers.h:130
MBSWatcher, to check the structure of the MBS Frame.
Definition: GSIWatchers.h:112
TH1F * fSubEvent_procid
Definition: GSIWatchers.h:133