GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RancLegnaroWatchers.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 _RancLegnaroWatchers
22 #define _RancLegnaroWatchers
23 
24 #include <vector>
25 
26 //ROOT includes
27 #include "TH2F.h"
28 
29 // Gw and Watcher definition
30 #include "Watchers.h"
31 #include "MetaWatchers.h"
32 
34 
55 {
56 public:
57  static const UShort_t gMaxSlots = 6u ; // up to 6 slots
58  static const UShort_t gMaxChannels = 32u ; // each one with 32 channels
59 
60  static const UShort_t gExtraSize = 10u ; // extra space at the end of the array ... in principle 6 is enough
61 
62 private:
63  Short_t fWhichRanc;
64 
65 protected:
67 
68 protected:
69  // true length of the array of floats
70  UInt_t lenrawBuf;
71  // used to get the data
73  // in case ranc0 read first
75 
76 public:
77  RancLegnaroWatcher(const char *, const char *, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0);
78  virtual ~RancLegnaroWatcher();
79 
81 
84  virtual Bool_t SetTrigger( ADF::DFTrigger */*trigger*/ = 0x0 );
85 
87  virtual void Exec(Option_t *option="");
88 
89  ClassDef(RancLegnaroWatcher,0) // Watcher on Raw Ancillary Frame as defined in Legnaro
90 };
91 
92 
94 
102 {
103 protected:
104  TH1F *fLength; // just to check it is read correctly from the buffer
105  TH2F *fAllSlots; //
106 
107 private:
109  std::vector < std::pair < std::pair<UShort_t,UShort_t> , TH2F * > > fListAdded;
110 
111 protected:
113  virtual void DoCanvas(TCanvas *c, Option_t *);
114 
115 public:
116  DisplayRancLegnaro(const char *, const char *, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0);
118  {;}
119 
121  void AddMatrix(UShort_t ch1, UShort_t ch2, UShort_t DeltaCh1 = 1, UShort_t DeltaCh2 = 1,
122  Int_t binx = 512, Double_t xmin = 0, Double_t xmax = 4096, Int_t biny = 512, Double_t ymin = 0, Double_t ymax = 4096); //*MENU*
123 
125  virtual void Exec(Option_t *option="");
126 
127  ClassDef(DisplayRancLegnaro,0) // Display the content of the ranc0 and ranc1 frame
128 };
129 
131 
136 /*
137 class ReadAncVertex : public RancLegnaroWatcher, public VertexBuilder
138 {
139 public:
140  ReadAncVertex(const char *name, const char *title, TDirectory *sp_dir = 0x0, TDirectory *tag_dir = 0x0);
141  virtual ~ReadAncVertex()
142  {;}
143 
145  virtual void Exec(Option_t *option="");
146 
147  ClassDef(ReadAncVertex,0) // read from the ancillary frame the vertexframe
148 };
149  */
150 
151 
152 #endif
153 
static const UShort_t gMaxSlots
Base for a watcher on an ancillary (raw) frame.
virtual Bool_t SetTrigger(ADF::DFTrigger *=0x0)
Set the trigger attached to this watcher.
To Display the content of raw ancillary frames ranc0 and ranc1 as defined @ Legnaro.
DisplayRancLegnaro(const char *, const char *, TDirectory *sp_dir=0x0, TDirectory *tag_dir=0x0)
static const UShort_t gExtraSize
static const UShort_t gMaxChannels
UInt_t rawBufI[gMaxSlots *gMaxChannels+gExtraSize]
A Shared Frame Pointer.
Definition: Frame.h:597
ADF::SharedFP * fFrame
Float_t rawBuf[gMaxSlots *gMaxChannels+gExtraSize]
Base class for a trigger on a data flow.
Definition: Trigger.h:155
virtual void Exec(Option_t *option="")
watch the current frame
virtual void Exec(Option_t *option="")
watch the current frame
virtual void DoCanvas(TCanvas *c, Option_t *)
To be overwritten by real implementation if a canvas is produced.
RancLegnaroWatcher(const char *, const char *, TDirectory *sp_dir=0x0, TDirectory *tag_dir=0x0)
void AddMatrix(UShort_t ch1, UShort_t ch2, UShort_t DeltaCh1=1, UShort_t DeltaCh2=1, Int_t binx=512, Double_t xmin=0, Double_t xmax=4096, Int_t biny=512, Double_t ymin=0, Double_t ymax=4096)
Add a matrix between two elements.