GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LNL/CrystalWatchers.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 _CrystalWatchers
22 #define _CrystalWatchers
23 
24 // Gw and Watcher definition
25 #ifndef Gw_Watchers
26 #include "Watchers.h"
27 #endif
28 
29 // ADF definitions
30 #ifndef ADF_CrystalFrame
31 #include "CrystalFrame.h"
32 #endif
33 
34 // ROOT definitions
35 class TH3;
36 class TH2;
37 using namespace ADF;
38 using namespace Gw;
39 
41 
43 class CrystalWatcher : public WatcherWithTag
44 {
45 protected:
46  SharedFP *fFrame;
47 
48 public:
49  CrystalWatcher(const char *name, const char *title) :
50  WatcherWithTag(name,title,0x0,0x0),
51  fFrame(0x0)
52  {;}
53  virtual ~CrystalWatcher()
54  {;}
55 
57 
60  virtual Bool_t SetTrigger( ADF::DFTrigger */*trigger*/ = 0x0 );
61 
62  ClassDef(CrystalWatcher,0) // Trigger on crystal Frame
63 };
64 
66 
74 class ShowSignals : public CrystalWatcher
75 {
76 public:
77  static const Short_t gkNB_SIG = 10; // number of signal kept in memory
78 
79 private:
81  Short_t fCurrentSig;
83  TString fProcessingAlgo;
84 
85 protected:
87  TH2 *fEnergies;
88 
89 protected:
91  TObjArray *fSeg;
92  TObjArray *fCor;
93 
94 protected:
96  Int_t fVMin;
97  Int_t fVMax;
98  Double_t fHMin;
99  Double_t fHMax;
100 
101 protected:
103  TObjArray *fBaseLines;
104  TObjArray *fAmplitudes;
106  std::vector <Double_t> fFromSignal;
107 
109  TH3 *fHThreshold;
110  TH3 *fHOvershoot;
112  std::vector<Int_t > fCoincThreshold;
113  std::vector<Int_t > fCoincOverShoot;
115  TH2 *fCoinc;
117  TH2 *fCoreCoinc;
118 
119 protected:
121  TObjArray fBaseLinesArrows;
122  TObjArray fThresholdArrows;
123  TObjArray fOvershootArrows;
124 
125 protected:
127  virtual void DoCanvas(TCanvas *c, Option_t *);
128 
129 protected:
131  void ProcessSignal(Signal *, TH1 *h = 0x0);
132  // this is done using very basic signal processing
133  void ProcessSignalBasic(Signal *, TH1 *h = 0x0);
134 
135 public:
136  ShowSignals(const char *name = "ShowSignals", const char *title = "Display the signals for one crystal");
137  virtual ~ShowSignals();
138 
140  // virtual char * GetObjectInfo(Int_t px, Int_t py) const;
141 
142  static void SetDefaultArrow(Double_t baseline, Double_t threshold, Double_t overshoot, Double_t pos = 10, Double_t length = 1000 );
143 
145  void ShowLastOnes(); //*MENU*
146 
148  void SetVRange(Int_t min = 0, Int_t max = 10000); //*MENU*
150  void SetHRange(Double_t min = 0, Double_t max = 100); //*MENU*
151 
153  void ShowArrow(Int_t which_sig = 0); //*MENU*
154 
156 
160  // void SetLevel(Double_t baseline, Double_t threshold, Double_t overshoot, UInt_t which_sig = 0); //*MENU*
161 
163  virtual void Exec(Option_t *option="");
164 
165  ClassDef(ShowSignals,0) // to get all the signal of one crystal
166 };
167 
168 
169 #endif
170 
virtual ~CrystalWatcher()
header file for CrystalFrame.cpp
Base class for a Signal.
Definition: Signals.h:39
Base Watcher working for any kind of crystal Frame (Frame interface)
To work on Signals.
A Shared Frame Pointer.
Definition: Frame.h:597
Base class for a trigger on a data flow.
Definition: Trigger.h:155
CrystalWatcher(const char *name, const char *title)