GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GANILWatchers.C
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (c) IPNL, IN2P3, CNRS *
3  * Contibutor(s) : *
4  * Olivier Stezowski stezow(AT)ipnl.in2p3.fr [2014] *
5  * *
6  * This program is free software; you can redistribute it and/or modify *
7  * it under the terms of the GNU General Public License as published by *
8  * the Free Software Foundation; either version 2 of the License, or *
9  * (at your option) any later version. *
10  * *
11  * This program is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License *
17  * along with this program; if not, write to the *
18  * Free Software Foundation, Inc., *
19  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
20  ***************************************************************************/
21 
22 
23 #include "AgataKeyFactory.h"
24 #include "GANILWatchers.h"
25 
26 #include "MFMBasicFrame.h"
27 #include "MFMBlobFrame.h"
28 #include "MFMExogamFrame.h"
29 #include "MFMEbyedatFrame.h"
30 #include "MFMMergeFrame.h"
31 #include "MFMCoboFrame.h"
32 #include "MFMOscilloFrame.h"
33 #include "DataParameters.h"
34 #include "MError.h"
35 #include "Cobo.h"
36 #include "TPaveStats.h"
37 #include "TPavesText.h"
38 #include "TLegend.h"
39 #include "DataParameters.h"
40 
41 #include "BashColor.h"
42 
43 #include "LoupeOnPad.h"
44 
45 using namespace ADF;
46 
48 fMFMinADFFrame(0x0),
49 fMFMFrame(new MFMCommonFrame()),
50 fEBYFrame(new MFMEbyedatFrame()),
51 fInsideFrame(new MFMCommonFrame()),
52 fMergedFrame(new MFMMergeFrame()),
53 fEGTYPE(kUnknown),
54 fDataParameters(new DataParameters())
55 {
56  // try and load default default actions
57  gActionDefault = "./ACTIONS_agata_vamos.CHC_PAR";
58 
60 }
61 
63 {
64  std::cout << " fMFMinADFFrame " << std::endl;
65  // if ( fMFMinADFFrame ) {
66  // delete fMFMinADFFrame; fMFMinADFFrame = 0x0;
67  // }
68  std::cout << " fMFMFrame " << std::endl;
69  if (fMFMFrame) {
70  delete fMFMFrame; fMFMFrame = 0x0;
71  }
72  std::cout << " fEBYFrame " << std::endl;
73  if (fEBYFrame) {
74  delete fEBYFrame; fEBYFrame = 0x0;
75  }
76  std::cout << " fInsideFrame " << std::endl;
77  if (fInsideFrame) {
78  delete fInsideFrame; fInsideFrame = 0x0;
79  }
80  std::cout << " fMergedFrame " << std::endl;
81  if (fMergedFrame) {
82  delete fMergedFrame; fMergedFrame = 0x0;
83  }
84  std::cout << " fDataParameters " << std::endl;
85  if ( fDataParameters ) {
86  delete fDataParameters; fDataParameters = 0x0;
87  }
88 }
89 
90 Int_t GANILInterface::ReadActionFile(std::string full_name_of_action_file)
91 {
92  if(full_name_of_action_file=="")full_name_of_action_file = gActionDefault;
93 
94  DataParameters *tmp_data_parameter = new DataParameters();
95 
96  Int_t result = tmp_data_parameter->FillFromActionFile(full_name_of_action_file.data());
97  if ( result > 0 ) {
98  if ( fDataParameters ) {
99  delete fDataParameters; fDataParameters = 0x0;
100  }
101  fDataParameters = tmp_data_parameter; fActionCurrent = full_name_of_action_file;
102 
103  cout << " ***** ACTIONS PARAMETER FOR MFM Frames read From " << full_name_of_action_file << std::endl;
104  }
105  else { delete tmp_data_parameter; tmp_data_parameter = 0x0; }
106 
107  //cout << " ***** ACTIONS PARAMETER FOR MFM Frames read From " << << std::endl;
108  //fDataParameters->DumpListPara();
109  //cout << " ***** ACTIONS PARAMETER FOR MFM Frames " << std::endl;
110  //datapar.TestParameters();
111 
112  return result;
113 }
114 
116 {
117  if ( gDebug > 3 )
118  printf("GANILInterface::Exec is called \n");
119 
120  ADF::RawFrame *rframe = 0x0; ADF::AgataKey *key; Char_t *pMFMData = 0x0;
121 
122  if ( fMFMinADFFrame == 0x0 || !fMFMinADFFrame->IsValid() ) {
123  return false;
124  }
125  else {
126  // ADF part
127  rframe =
129  key = dynamic_cast<ADF::AgataKey *> (rframe->GetKey());
130 
131  // MFM part
132 
133  pMFMData = rframe->RawBuffer().Address();
134  fMFMFrame->SetAttributs(pMFMData);
135  }
136 
137  // Now one can inspect MFM Frame to extact whatever is needed
138  UInt_t frame_type;
139  //
140  frame_type = fMFMFrame->GetFrameTypeAttribut();
141  fEGTYPE = kUnknown ;
142  //std::cout << hex << frame_type << " " << hex << MFM_EBY_EN_FRAME_TYPE << std::endl;
143  switch ( frame_type ) {
144  case MFM_COBO_FRAME_TYPE:
145  fEGTYPE = kCobo;
146  break;
147  case MFM_COBOF_FRAME_TYPE:
148  fEGTYPE = kCoboF;
149  break;
150  case MFM_EXO2_FRAME_TYPE:
151  fEGTYPE = kNumexo2;
152  break;
153  case MFM_OSCI_FRAME_TYPE:
154  fEGTYPE = kOscillo;
155  break;
156  case MFM_RAWD_FRAME_TYPE:
157  fEGTYPE = kRaw;
158  break;
159  case MFM_EBY_EN_FRAME_TYPE:
160  fEGTYPE = kEBYEN;
161  fEBYFrame->SetAttributs(fMFMFrame->GetPointHeader());
162  // fEBYFrame->HeaderDisplay();
163  break;
164  case MFM_EBY_TS_FRAME_TYPE:
165  fEGTYPE = kEBYTS;
166  fEBYFrame->SetAttributs(fMFMFrame->GetPointHeader());
167  // fEBYFrame->HeaderDisplay();
168  break;
169  case MFM_EBY_EN_TS_FRAME_TYPE:
170  fEGTYPE = kEBYENTS;
171  fEBYFrame->SetAttributs(fMFMFrame->GetPointHeader());
172  // fEBYFrame->HeaderDisplay();
173  break;
174  case MFM_MERGE_EN_FRAME_TYPE:
175  fEGTYPE = kMergeEN;
176  break;
177  case MFM_MERGE_TS_FRAME_TYPE:
178  fEGTYPE = kMergeTS;
179  break;
180  default:
181  break;
182  }
183  return true;
184 
185  /*
186  if ((type == MFM_MERGE_EN_FRAME_TYPE) or (type
187  == MFM_MERGE_TS_FRAME_TYPE)) {
188  MFMCommonFrame* insideframe = new MFMCommonFrame();
189  MFMMergeFrame * mergeframe = new MFMMergeFrame();
190  mergeframe->SetAttributs(frame->GetPointHeader());
191  int nbinsideframe = 0;
192  nbinsideframe = mergeframe->GetNbItemsAttribut();
193  cout << "-- MFM_MERGE_XX_FRAME_TYPE with Nb of inside frames = "
194  << nbinsideframe << "\n";
195  mergeframe->ResetReadInMem();
196  for (int i = 0; i < nbinsideframe; i++) {
197  mergeframe->ReadInFrame(insideframe);
198  insideframe->HeaderDisplay((char*)"-- Header of Inside Frame --");
199  if (dumpsize>128) dumpsize =128;
200  insideframe->DumpRaw(dumpsize, 0);
201  }
202  }
203  }
204  */
205 }
206 
207 
208 
209 //ClassImp(MFMWatcher);
210 
211 MFMWatcher::MFMWatcher(const char *name, const char *title, TDirectory *sp_dir, TDirectory *tag_dir):
212 Gw::WatcherWithTag(name,title,sp_dir,tag_dir),
214 fFrameType(0x0),
215 fFrameSize(0x0),
216 fParXValue(0x0),
217 fMeanNumberOfValues(0x0),
218 fLabelsDistribution(0x0)
219 {
220  fFrameType = MakeTH1 <TH1I> ("FrameType","Frame type of the MFM frame",kMax-kUnknown,kUnknown,kMax) ;
221  fFrameType->GetXaxis()->SetBinLabel(kUnknown+1,"Unknown");
222  fFrameType->GetXaxis()->SetBinLabel(kCobo+1,"Cobo [0x01]");
223  fFrameType->GetXaxis()->SetBinLabel(kCoboF+1,"CoboF [0x02]");
224  fFrameType->GetXaxis()->SetBinLabel(kNumexo2+1,"Numexo2 [0x10]");
225  fFrameType->GetXaxis()->SetBinLabel(kOscillo+1,"Oscillo [0x11]");
226  fFrameType->GetXaxis()->SetBinLabel(kRaw+1,"Raw [0x12]");
227  fFrameType->GetXaxis()->SetBinLabel(kEBYEN+1,"Ganil Event# [0x20]");
228  fFrameType->GetXaxis()->SetBinLabel(kEBYTS+1,"Ganil TS [0x21]");
229  fFrameType->GetXaxis()->SetBinLabel(kEBYENTS+1,"Ganil Event#+TS [0x22]");
230  fFrameType->GetXaxis()->SetBinLabel(kMergeEN+1,"Merge Event# [0xFF01]");
231  fFrameType->GetXaxis()->SetBinLabel(kMergeTS+1,"Merge TS [0xFF02]");
232  fFrameType->SetStats(false);
233  //
234  fFrameSize = MakeTH1 <TH1I> ("FrameSize","Frame Size Distribution",1000,0,10000) ;
235  //
236  if ( fDataParameters->GetNbParameters() ) {
237 
238  Int_t max_label = 0;
239  for (Int_t i = 0; i < fDataParameters->GetNbParameters(); i++) {
240  if ( fDataParameters->GetParNameFromIndex(i) )
241  max_label = fDataParameters->GetLabel(i);
242  }
243  fParXValue = MakeTH2 <TH2I> ("ParXValue","Values for all Parameters",max_label,0,max_label,2048,0,16384) ;
244  fLabelsDistribution = MakeTH1 <TH1D>("LabelDist","Gives the distribution of labels per MFM frames",max_label,0,max_label);
245  }
246  else {
247  fParXValue = MakeTH2 <TH2I> ("ParXValue","Values for all Parameters",20,0,20,2048,0,16384) ;
248  fLabelsDistribution = MakeTH1 <TH1D>("LabelDist","Gives the distribution of labels in MFM frames",20,0,20);
249  }
250  fParXValue->GetXaxis()->SetTitle("Label");
251  fParXValue->GetYaxis()->SetTitle("Value");
252 
253  fLabelsDistribution->GetXaxis()->SetTitle("Label, see ACTIONS_agata_vamos.CHC_PAR file for meaning");
254  fMeanNumberOfValues = MakeTH1 <TH1D>("NbOfValue","Gives the number of values in MFM frames",500,0,500);
255 
256  gActionDefault = "./ACTIONS_agata_vamos.CHC_PAR";
257 }
258 
260 {
261 }
262 
264 {
265  return Watcher::GetFromTrigger(trigger, "data:ranc0", fMFMinADFFrame);
266 }
267 
268 Int_t MFMWatcher::ReadActionFile(std::string full_name_of_action_file)
269 {
270  Int_t result = 0;
271 
272  if(full_name_of_action_file=="")full_name_of_action_file = gActionDefault;
273 
274  //
275  if ( (result = GANILInterface::ReadActionFile(full_name_of_action_file.data())) > 0 ) {
276  // modify the matrix fParXValues. change x axis if necessary
277  Int_t max_label = 0;
278  for (Int_t i = 0; i < fDataParameters->GetNbParameters(); i++) {
279  if ( fDataParameters->GetParNameFromIndex(i) )
280  max_label = fDataParameters->GetLabel(i);
281  }
282  if ( max_label != fParXValue->GetNbinsX() ) {
283  fParXValue->SetBins(max_label,0,max_label,fParXValue->GetNbinsY(),0,fParXValue->GetNbinsY());
284  fLabelsDistribution->SetBins(max_label,0,max_label);
285  }
286  result = max_label;
287  fParXValue->Reset("ICE");
288  }
289  return result;
290 }
291 
292 void MFMWatcher::DoCanvas(TCanvas *c, Option_t *opt)
293 {
294  TString option = opt;
295  c->Divide(2,2,0.001,0.001);
296 
297  c->cd(1); fFrameSize->Draw();
298  c->cd(2); fMeanNumberOfValues->Draw();
299  c->cd(3); fLabelsDistribution->Draw();
300  c->cd(4); fParXValue->Draw("col");
301 }
302 
303 void MFMWatcher::Exec(Option_t * /*option*/)
304 {
305  // Get underlying MFM Frame should check if Exec ok ... or wait to have throw system ...
306  if ( !GANILInterface::ADF2MFM() ) {
307  SetLastError(1u);
308  return;
309  }
310 
311  // Now one can inspect MFM Frame to extact whatever is needed
312  uint16_t value, label; UInt_t frame_type = fMFMFrame->GetFrameTypeAttribut(); fFrameSize->Fill( fMFMFrame->GetFrameSize() );
313 
314  //std::cout << hex << frame_type << " " << hex << MFM_EBY_EN_FRAME_TYPE << std::endl;
315  switch ( frame_type ) {
316  case MFM_COBO_FRAME_TYPE:
317  break;
318  case MFM_COBOF_FRAME_TYPE:
319  break;
320  case MFM_EXO2_FRAME_TYPE:
321  break;
322  case MFM_OSCI_FRAME_TYPE:
323  break;
324  case MFM_RAWD_FRAME_TYPE:
325  break;
326  case MFM_EBY_EN_FRAME_TYPE:
327  // cout << " Couples of label/value : \n" << (fEBYFrame->DumpData());
328  fMeanNumberOfValues->Fill(fEBYFrame->GetNbItemsAttribut());
329  for (Int_t i = 0; i < fEBYFrame->GetNbItemsAttribut(); i++) {
330  label = 0;
331  value = 0;
332  fEBYFrame->EbyedatGetParameters(i, &label, &value);
333  // Now display value versus label- fParXValue->Fill(fDataParameters->GetIndex(label),value);
334  fParXValue->Fill(label,value);
335  fLabelsDistribution->Fill(label);
336  // cout << i << " Couples of label/value " << label << " " << value ;
337  }
338  break;
339  case MFM_EBY_TS_FRAME_TYPE:
340  // cout << " Couples of label/value : \n" << (fEBYFrame->DumpData());
341  fMeanNumberOfValues->Fill(fEBYFrame->GetNbItemsAttribut());
342  for (Int_t i = 0; i < fEBYFrame->GetNbItemsAttribut(); i++) {
343  label = 0;
344  value = 0;
345  fEBYFrame->EbyedatGetParameters(i, &label, &value);
346  // Now display value versus label- fParXValue->Fill(fDataParameters->GetIndex(label),value);
347  fParXValue->Fill(label,value);
348  fLabelsDistribution->Fill(label);
349  // cout << i << " Couples of label/value " << label << " " << value ;
350  }
351  break;
352  case MFM_EBY_EN_TS_FRAME_TYPE:
353  fMeanNumberOfValues->Fill(fEBYFrame->GetNbItemsAttribut());
354  for (Int_t i = 0; i < fEBYFrame->GetNbItemsAttribut(); i++) {
355  label = 0;
356  value = 0;
357  fEBYFrame->EbyedatGetParameters(i, &label, &value);
358  // Now display value versus label- fParXValue->Fill(fDataParameters->GetIndex(label),value);
359  fParXValue->Fill(label,value);
360  fLabelsDistribution->Fill(label);
361  //cout << i << " Couples of label/value " << label << " " << value ;
362  }
363  // cout << " Couples of label/value : \n" << (fEBYFrame->DumpData());
364  break;
365  case MFM_MERGE_EN_FRAME_TYPE:
366  break;
367  case MFM_MERGE_TS_FRAME_TYPE:
368  break;
369  default:
370  break;
371  }
372  if( fEGTYPE < 0 ){
373  }
374  else { fFrameType->AddBinContent(fEGTYPE+1); }
375 }
376 
377 //ClassImp(RawMFMTree);
378 
379 RawMFMTree::RawMFMTree(const char *name, const char *title, TTree *tree) :
380 Gw::Watcher(name,title),
382 Gw::TTreeBuilder(name,title,tree)
383 {
384  if ( GetTree() ) { // just add the branch for that watcher
385  SetBranches();
386  }
387 }
388 
390 {
391  GetTree()->Branch("NbValues",&fNbValues,"NbValues/I");
392  GetTree()->Branch("Values",fValues,"Values[NbValues]/i");
393  GetTree()->Branch("Labels",fLabels,"Labels[NbValues]/i");
394 }
395 
397 {
398  return Watcher::GetFromTrigger(trigger, "data:ranc0", fMFMinADFFrame);
399 }
400 
401 void RawMFMTree::Exec(Option_t *option)
402 {
403  // Get underlying MFM Frame should check if Exec ok ... or wait to have throw system ...
404  if ( !GANILInterface::ADF2MFM() ) {
405  SetLastError(1u);
406  return;
407  }
408  // Now one can inspect MFM Frame to extact whatever is needed
409  uint16_t value, label; UInt_t frame_type = fMFMFrame->GetFrameTypeAttribut();
410 
411  //std::cout << hex << frame_type << " " << hex << MFM_EBY_EN_FRAME_TYPE << std::endl;
412  switch ( frame_type ) {
413  case MFM_COBO_FRAME_TYPE:
414  break;
415  case MFM_COBOF_FRAME_TYPE:
416  break;
417  case MFM_EXO2_FRAME_TYPE:
418  break;
419  case MFM_OSCI_FRAME_TYPE:
420  break;
421  case MFM_RAWD_FRAME_TYPE:
422  break;
423  case MFM_EBY_EN_FRAME_TYPE:
424  fNbValues = fEBYFrame->GetNbItemsAttribut();
425  // cout << " Couples of label/value : \n" << (fEBYFrame->DumpData());
426  for (Int_t i = 0; i < fEBYFrame->GetNbItemsAttribut(); i++) {
427  label = 0;
428  value = 0;
429  fEBYFrame->EbyedatGetParameters(i, &label, &value);
430  fValues[i] = value;
431  fLabels[i] = label;
432  // cout << i << " Couples of label/value " << label << " " << value ;
433  }
434  break;
435  case MFM_EBY_TS_FRAME_TYPE:
436  // cout << " Couples of label/value : \n" << (fEBYFrame->DumpData());
437  fNbValues = fEBYFrame->GetNbItemsAttribut();
438  for (Int_t i = 0; i < fEBYFrame->GetNbItemsAttribut(); i++) {
439  label = 0;
440  value = 0;
441  fEBYFrame->EbyedatGetParameters(i, &label, &value);
442  fValues[i] = value;
443  fLabels[i] = label;
444  // cout << i << " Couples of label/value " << label << " " << value ;
445  }
446  break;
447  case MFM_EBY_EN_TS_FRAME_TYPE:
448  fNbValues = fEBYFrame->GetNbItemsAttribut();
449  for (Int_t i = 0; i < fEBYFrame->GetNbItemsAttribut(); i++) {
450  label = 0;
451  value = 0;
452  fEBYFrame->EbyedatGetParameters(i, &label, &value);
453  fValues[i] = value;
454  fLabels[i] = label;
455  //cout << i << " Couples of label/value " << label << " " << value ;
456  }
457  // cout << " Couples of label/value : \n" << (fEBYFrame->DumpData());
458  break;
459  case MFM_MERGE_EN_FRAME_TYPE:
460  break;
461  case MFM_MERGE_TS_FRAME_TYPE:
462  break;
463  default:
464  break;
465  }
466 
467  FillTree();
468 }
469 
470 
471 #include "DFAgent.h"
472 #include "AgataKeyFactory.h"
473 #include "MetaWatchers.h"
474 
475 //ClassImp(AGATAVAMOSCoinc);
476 
477 AGATAVAMOSCoinc::AGATAVAMOSCoinc(const char *name, const char *title, TDirectory *sp_dir, TDirectory *tag_dir):
478 Gw::WatcherWithTag(name,title,sp_dir,tag_dir),
480 CanvasVisu(name,title),
481 fPSAFrame(0x0),
482 fEventPSA(0x0),
483 fTimeCorrelation(),
484 fGAGATAxGVAMOS(180),
485 fVTS(3),
486 fT(3),
487 fAGATAE(0),
488 fRawToF(-1,0UL),
489 fLastVTS(0.),
490 fLastCentrum(0.),
491 fNevts(0),
492 fNVTSRev(0),
493 fNCentrumRev(0)
494 {
495  DataPar *par; Int_t is_time = 0;
496 
497  // AGATA
498  par = fDataParameters->FindObject("AGAVA_VTAGL"); // low part of TS
499  if ( par ) {
500  fVTS[0].first = par->Label(); is_time++;
501  }
502  else {
503  fVTS[0].first = -1;
504  }
505  par = fDataParameters->FindObject("AGAVA_VTAGL_UP"); // MID part
506  if ( par ) {
507  fVTS[1].first = par->Label(); is_time++;
508  }
509  else {
510  fVTS[1].first = -1;
511  }
512  par = fDataParameters->FindObject("AGAVA_VTAGH"); // High part
513  if ( par ) {
514  fVTS[2].first = par->Label(); is_time++;
515  }
516  else {
517  fVTS[2].first = -1;
518  }
519  // Centrum
520  par = fDataParameters->FindObject("TIMEML");
521  if ( par ) {
522  fT[0].first = par->Label(); is_time++;
523  }
524  else {
525  fT[0].first = -1;
526  }
527  par = fDataParameters->FindObject("TIMEML_UP");
528  if ( par ) {
529  fT[1].first = par->Label(); is_time++;
530  }
531  else {
532  fT[1].first = -1;
533  }
534  par = fDataParameters->FindObject("TIMEH");
535  if ( par ) {
536  fT[2].first = par->Label(); is_time++;
537  }
538  else {
539  fT[2].first = -1;
540  }
541  par = fDataParameters->FindObject("TMWT1_TMWFP_D");
542  if ( par ) {
543  fRawToF.first = par->Label();
544  }
545  par = fDataParameters->FindObject("MW_05");
546  if ( par ) {
547  fMW05.first = par->Label();
548  fMW05.second = 0;
549  }
550 
551  fFirstVTS = 0;
552  fFirstCentrum = 0;
553 
554  int atctocluster[60];
555  for(int i=0 ; i<60 ; i++)atctocluster[i]=-1;
556  atctocluster[1] = 4;
557  atctocluster[2] = 1;
558  atctocluster[3] = 12;
559  atctocluster[4] = 13;
560  atctocluster[5] = 3;
561  atctocluster[6] = 0;
562  atctocluster[7] = 11;
563  atctocluster[8] = 2;
564 
565  // look is the VAMOS lookup table what AGATA detectors are there
566  std::pair<std::pair<Int_t,Int_t>,Float_t> p;
567 
568  for (Int_t atc = 0; atc < 60; atc++) {
569  par = fDataParameters->FindObject(Form("ATC%d_A",atc));
570  if(par && atctocluster[atc]==-1) cout<<"\E[31;1mWARNING, ATC "<<atc<<" needs to be configure in the DefaultWatchers/GANILWatchers.C file, in the atctocluster tab !!!\E[m"<<endl;
571  if (par && atctocluster[atc]>=0) {
572  p.first.first = par->Label();
573  p.first.second = 3*atctocluster[atc]+0;
574  p.second = 0;
575  fAGATAE.push_back( p ) ;
576  }
577  par = fDataParameters->FindObject(Form("ATC%d_B",atc));
578  if (par && atctocluster[atc]>=0) {
579  p.first.first = par->Label();
580  p.first.second = 3*atctocluster[atc]+1;
581  p.second = 0;
582  fAGATAE.push_back( p );
583  }
584  par = fDataParameters->FindObject(Form("ATC%d_C",atc));
585  if (par && atctocluster[atc]>=0) {
586  p.first.first = par->Label();
587  p.first.second = 3*atctocluster[atc]+2;
588  p.second = 0;
589  fAGATAE.push_back( p );
590  }
591  }
592 
593  if ( is_time == 6 ) {
594  fTimeCorrelation = MakeTH2<TH2F>("T_AGATAxVAMOS","Time Correlation between AGATA and VAMOS",
595  1400,3000,10000,
596  600,-3000,3000);
597  fTimeCorrelation->GetXaxis()->SetTitle("Time of flight [ADC]");
598  fTimeCorrelation->GetYaxis()->SetTitle("Delay VTS-AGATA Timestamp [ns]");
599  }
600 
601  for(int i = 0; i < (int)fGAGATAxGVAMOS.size(); i++ ) {
602  for (size_t vamos = 0; vamos < fAGATAE.size(); vamos++) {
603  if ( fAGATAE[vamos].first.second == i ) {
604  TH2 *h = MakeTH2<TH2F>(Form("CorE_%d_%d",i,fAGATAE[vamos].first.first),"Correlation energy AGATA versus VAMOS",
605  2000,0,2000,
606  2000,0,2000);
607  fGAGATAxGVAMOS[i] = h;
608  //h->GetXaxis()->SetTitle("");
609 
610  // std::cout << "ADD " << Form("CorE_%d_%d",i,fAGATAE[vamos].first.first) << " at slot " << i << std::endl;
611  }
612  }
613  }
614  fCoreCommomVamos = MakeTH1<TH1F>("CoreCommonVamos","Core common spectrum from Vamos side",2000,0,2000);
615  fCoreCommomVamos->GetXaxis()->SetTitle("ADC [VAMOS electronic]");
616  fCoreCommomVamos->GetYaxis()->SetTitle("Counts");
617 
618  fCoreCommomAgata = MakeTH1<TH1F>("CoreCommonAgata","Core common spectrum from Agata side",2000,0,2000);
619  fCoreCommomAgata->GetXaxis()->SetTitle("Energy (keV)");
620  fCoreCommomAgata->GetYaxis()->SetTitle("Counts");
621 
622  fSumSpectraVamos = MakeTH1<TH1F>("SumSpectraVamos","Sum spectra from Vamos side",2000,0,2000);
623  fSumSpectraVamos->GetXaxis()->SetTitle("ADC [VAMOS electronic]");
624  fSumSpectraVamos->GetYaxis()->SetTitle("Counts");
625 
626  fSumSpectraAgata = MakeTH1<TH1F>("SumSpectraAgata","Sum spectra spectrum from Agata side",2000,0,2000);
627  fSumSpectraAgata->GetXaxis()->SetTitle("Energy (keV)");
628  fSumSpectraAgata->GetYaxis()->SetTitle("Counts");
629 
630  fTimeVTS_to_TS = MakeTH1<TH1F>("TimeVTS_to_TS","Delay VTS-AGATA Timestamp",600,-3000,3000);
631  fTimeVTS_to_TS->GetXaxis()->SetTitle("Delay VTS-AGATA Timestamp [ns]");
632  fTimeVTS_to_TS->GetYaxis()->SetTitle("Counts");
633 
634  fTOF = MakeTH1<TH1F>("TOF","Time Of Flight",1400,3000,10000);
635  fTOF->GetXaxis()->SetTitle("Time of flight [ADC]");
636  fTOF->GetYaxis()->SetTitle("Counts");
637 
638  fVTS_Centrum = MakeTH2<TH2F>("VTS-Centrum","VTS Centrum correlation",3600,0,3600,3600,0,3600);
639  fVTS_Centrum->GetXaxis()->SetTitle("VTS");
640  fVTS_Centrum->GetYaxis()->SetTitle("Centrum");
641 
642  fCoreDistri = MakeTH1<TH1F>("CoreDistriIn","Core distribution",180,0,180);
643 
644  fTimeStampSpread = MakeTH1<TH1F>("CentrumTimeStampSpread","CentrumTimeStampSpread (ms)",5000,0,50);
645  fTimeStampSpread->GetXaxis()->SetTitle("Time between two successive centrum timestamps (ms)");
646 }
647 
648 
649 // Trigger requies ancillary and event:data:psa
651 {
652  if ( !Watcher::GetFromTrigger(trigger, "event:data:psa", fEventPSA) )
653  return false;
654  if ( !Watcher::GetFromTrigger(trigger, "data:ranc0", fMFMinADFFrame) )
655  return false;
656 
657  // first extract from the current configuration the definition
658  // of the data:psa frame on the data flow
659  FactoryItem i_asked, k_defined, f_defined;
660 
661  i_asked.SetItem("Agata","data:psa",Version());
662  k_defined = ConfAgent::theGlobalAgent()->GetDFAgent()->WhichKnownKey (i_asked,i_asked);
663  f_defined = ConfAgent::theGlobalAgent()->GetDFAgent()->WhichKnownFrame (i_asked,i_asked);
664 
665  Frame *f = MainFrameFactory::theMainFactory().New(k_defined,f_defined);
666  if ( f ) { // it exists
667  if ( fPSAFrame )
668  { delete fPSAFrame; fPSAFrame = 0x0; }
669 
670  fPSAFrame = f;
671  }
672  else fEventPSA = 0x0;
673 
674  return fEventPSA != 0x0 && fMFMinADFFrame != 0x0 ;
675 }
676 
678 {
679  if ( fEventPSA && fEventPSA->IsValid() ) {
680  fEventPSA->GetFrame()->Scan();
681  return fEventPSA->GetFrame()->GetNbSubFrame();
682  }
683 
684  return 0u;
685 }
686 
688 {
689  // does not exist
690  if ( !(which < GetNbFramePSA()) ) {
691  if ( gDebug > 3 )
692  printf("EventPSAWatcher::GetDataPSA %d %d \n",which,GetNbFramePSA());
693  return 0x0;
694  }
695  // cannot load subframe #i in fPSAFrame
696  if ( !fEventPSA->GetFrame()->LinkSubFrame(which,fPSAFrame) ) {
697  if ( gDebug > 3 )
698  printf("EventPSAWatcher::GetDataPSA cannot LinkSubFrame \n");
699  return 0x0;
700  }
701  // cannot read the data
702  if( fPSAFrame->Read() == 0 ) {
703  if ( gDebug > 3 )
704  printf("EventPSAWatcher::GetDataPSA cannot Read \n");
705  return 0x0;
706  }
707  // return the data interface for that frame
708  return GetDataPointer<PSAInterface>(fPSAFrame);
709 }
710 
712 {
713 }
714 
716 {
717  int PadNbr = 0;
718 
719  TString Name = Form("Coinc_CrystSpectra_%d_%d",PadNbr+1,PadNbr+16);
720  TString Title = "Crystal of the hited crystals in coincidence between agata and vamos";
721 
722  TCanvas *c = CanvasVisu::NewCanvas(Name,Title);
723  new LoupeOnPad(c);
724  SetLoupe(false);
725 
726  c->Divide(4,4,0.001,0.001);
727 
728  double topmarg = 0.0679612;
729  double rightmarg = 0.0121951;
730  double leftmarg = 0.0983588;
731  double bottommarg = 0.11165;
732 
733  c->cd(PadNbr+1);
734  gPad->SetRightMargin(rightmarg);
735  gPad->SetTopMargin(topmarg);
736  gPad->SetLeftMargin(leftmarg);
737  gPad->SetBottomMargin(bottommarg);
738 
739  fCoreDistri->SetBit(TH1::kNoTitle);
740 
741  fCoreDistri->GetXaxis()->SetTitle("Crystal ID");
742  fCoreDistri->GetXaxis()->SetLabelSize(0.05);
743  fCoreDistri->GetXaxis()->SetTitleSize(0.06);
744  fCoreDistri->GetXaxis()->SetTitleOffset(0.85);
745 
746  fCoreDistri->GetYaxis()->SetTitle("Counts");
747  fCoreDistri->GetYaxis()->SetLabelSize(0.05);
748  fCoreDistri->GetYaxis()->SetTitleSize(0.06);
749  fCoreDistri->GetYaxis()->SetTitleOffset(0.90);
750 
751  fCoreDistri->SetLineColor(GetColor(0));
752 
753  fCoreDistri->Draw();
754 
755  gPad->Modified();
756  gPad->Update();
757 
758  TPaveStats *st = (TPaveStats*)fCoreDistri->FindObject("stats");
759  if(st)
760  {
761  st->SetX2NDC(1-rightmarg);
762  st->SetY2NDC(1-topmarg);
763  st->SetX1NDC(0.681013);
764  st->SetY1NDC(0.663962);
765  }
766 
767  PadNbr++;
768 
769  for(int i=0 ; i<(int)fGAGATAxGVAMOS.size() ; i++)
770  {
771  if( fGAGATAxGVAMOS[i] )
772  {
773  if(PadNbr%16==0)
774  {
775  TString Name = Form("Coinc_CrystSpectra_%d_%d",PadNbr+1,PadNbr+16);
776  c = CanvasVisu::NewCanvas(Name,Title);
777  new LoupeOnPad(c);
778  SetLoupe(false);
779  c->Divide(4,4,0.001,0.001);
780  }
781 
782  c->cd(PadNbr%16+1);
783 
784  TH1 *h = (TH1*)fGAGATAxGVAMOS[i];
785  if(h)
786  {
787  gPad->SetRightMargin(rightmarg);
788  gPad->SetTopMargin(topmarg);
789  gPad->SetLeftMargin(leftmarg);
790  gPad->SetBottomMargin(bottommarg);
791 
792  h->SetBit(TH1::kNoTitle);
793 
794  h->GetXaxis()->SetTitle("E AGATA (keV)");
795  h->GetXaxis()->SetLabelSize(0.05);
796  h->GetXaxis()->SetTitleSize(0.06);
797  h->GetXaxis()->SetTitleOffset(0.85);
798 
799  h->GetYaxis()->SetTitle("ADC [VAMOS electronic]");
800  h->GetYaxis()->SetLabelSize(0.05);
801  h->GetYaxis()->SetTitleSize(0.06);
802  h->GetYaxis()->SetTitleOffset(0.90);
803 
804  h->SetLineColor(GetColor(0));
805 
806  h->Draw("col");
807 
808  gPad->Modified();
809  gPad->Update();
810 
811  st = (TPaveStats*)h->FindObject("stats");
812  if(st)
813  {
814  st->SetX2NDC(1-rightmarg);
815  st->SetY2NDC(1-topmarg);
816  st->SetX1NDC(0.681013);
817  st->SetY1NDC(0.663962);
818  }
819 
820  }
821  PadNbr++;
822  }
823  }
824 }
825 
827 {
828  TString Name = "Coinc_Time";
829  TString Title = "Time coincidences between vamos and agata";
830 
831  TCanvas *c = CanvasVisu::NewCanvas(Name,Title);
832 
833  c->Divide(2,2,0.001,0.001);
834 
835  double topmarg = 0.0508798;
836  double rightmarg = 0.00236867;
837  double leftmarg = 0.0820247;
838  double bottommarg = 0.0995025;
839 
841 
842  for(int i=0 ; i<4 ; i++)
843  {
844  c->cd(i+1);
845 
846  gPad->SetRightMargin(rightmarg);
847  gPad->SetTopMargin(topmarg);
848  gPad->SetLeftMargin(leftmarg);
849  gPad->SetBottomMargin(bottommarg);
850 
851  TH1 *htemp = h[i];
852 
853  if(i==1||i==2)
854  {
855  gPad->SetLogz();
856  htemp->Draw("col");
857  }
858  else
859  {
860  htemp->SetLineColor(GetColor(0));
861  htemp->Draw();
862  }
863  if(i==0)gPad->SetLogy();
864 
865  htemp->GetXaxis()->SetTitleSize(0.05);
866  htemp->GetXaxis()->SetLabelSize(0.05);
867  htemp->GetXaxis()->SetTitleOffset(1.);
868 
869  htemp->GetYaxis()->SetTitleSize(0.05);
870  htemp->GetYaxis()->SetLabelSize(0.05);
871  htemp->GetYaxis()->SetTitleOffset(0.89);
872 
873  gPad->Modified();
874  gPad->Update();
875 
876  TPaveStats *st = (TPaveStats*)htemp->FindObject("stats");
877  if(st)
878  {
879  st->SetX2NDC(1-rightmarg);
880  st->SetY2NDC(1-topmarg);
881  }
882 
883  TPaveText *txt = (TPaveText*)gPad->FindObject("title");
884  if(txt)
885  {
886  double width = txt->GetY2NDC()-txt->GetY1NDC();
887  txt->SetY2NDC(1-topmarg);
888  txt->SetY1NDC(txt->GetY2NDC()-width);
889  txt->SetTextSize(0.05);
890  }
891 
892  }
893 
894 }
895 
897 {
898  TString Name = "Coinc_CommonAndSum";
899  TString Title = "Core common and Sum spectra from agata and vamos";
900 
901  TCanvas *c = CanvasVisu::NewCanvas(Name,Title);
902 
903  c->Divide(1,2,0.001,0.001);
904 
905  double topmarg = 0.0657599;
906  double rightmarg = 0.00726832;
907  double leftmarg = 0.0490612;
908  double bottommarg = 0.114119;
909 
911 
912  for(int i=0 ; i<2 ; i++)
913  {
914  c->cd(i+1);
915 
916  gPad->SetRightMargin(rightmarg);
917  gPad->SetTopMargin(topmarg);
918  gPad->SetLeftMargin(leftmarg);
919  gPad->SetBottomMargin(bottommarg);
920 
921  TH1 *htemp1 = h[i][0];
922 
923  htemp1->SetLineColor(GetColor(0));
924  htemp1->SetBit(TH1::kNoTitle);
925  htemp1->Draw();
926  htemp1->SetStats(false);
927 
928  h[i][1]->SetLineColor(GetColor(1));
929  h[i][1]->SetBit(TH1::kNoTitle);
930  h[i][1]->Draw("same");
931  h[i][1]->SetStats(false);
932 
933  htemp1->GetXaxis()->SetTitle("Energy (keV)");
934  htemp1->GetXaxis()->SetTitleSize(0.06);
935  htemp1->GetXaxis()->SetLabelSize(0.06);
936  htemp1->GetXaxis()->SetTitleOffset(0.91);
937 
938  htemp1->GetYaxis()->SetTitle("Counts");
939  htemp1->GetYaxis()->SetTitleSize(0.06);
940  htemp1->GetYaxis()->SetLabelSize(0.06);
941  htemp1->GetYaxis()->SetTitleOffset(0.45);
942 
943  gPad->Modified();
944  gPad->Update();
945 
946  TPaveStats *st = (TPaveStats*)htemp1->FindObject("stats");
947  if(st)
948  {
949  st->SetX2NDC(1-rightmarg);
950  st->SetY2NDC(1-topmarg);
951  }
952 
953  TLegend *leg = new TLegend(0.823664,0.699182,1-rightmarg,1-topmarg,((TString)htemp1->GetTitle()).ReplaceAll(" from Vamos side",""),"NDC");
954  leg->AddEntry(h[i][0],"VAMOS","l");
955  leg->AddEntry(h[i][1],"AGATA","l");
956  leg->Draw();
957  }
958 }
959 
960 void AGATAVAMOSCoinc::Exec(Option_t * /*option*/)
961 {
962  // Get underlying MFM Frame should check if Exec ok ... or wait to have throw system ...
963  if ( !GANILInterface::ADF2MFM() ) {
964  SetLastError(1u);
965  return;
966  }
967 
968  fNevts++;
969 
970  // Check first the AGATA Part
971  std::vector < std::pair<Int_t,Float_t> > agata_e;
972  agata_e.resize(0);
973  UInt_t nb_frames = GetNbFramePSA();
974  for(UInt_t iu = 0u; iu <nb_frames; iu++) {
975  PSAInterface *data = GetDataPSA(iu);
976  agata_e.push_back(std::pair<Int_t,Float_t>(data->GetUID(),data->GetE()));
977  }
978 
979  // Now one can inspect MFM Frame to extact whatever is needed
980  uint16_t value, label;
981  std::pair<Float_t,Float_t> TSC;
982 
983  Float_t isVAMOSE[180];
984  for (Int_t isvamos = 0; isvamos < 180; isvamos++ ) {
985  isVAMOSE[isvamos] = -1;
986  }
987 
988  fRawToF.second = 0;
989  fMW05.second = 0;
990 
991  Int_t fNbValues = fEBYFrame->GetNbItemsAttribut(); Int_t isVTS = 0; Int_t isT = 0; Bool_t is_RawTof = false;
992  for (Int_t i = 0; i < fNbValues; i++) {
993  label = 0;
994  value = 0;
995  fEBYFrame->EbyedatGetParameters(i, &label, &value);
996 
997  if ( label == fRawToF.first ) {
998  fRawToF.second = value;
999  is_RawTof = true;
1000  }
1001 
1002  if ( label == fMW05.first ) {
1003  fMW05.second = value;
1004  }
1005  // std::cout << label << " " << value << std::endl;
1006  //
1007  for (size_t vts = 0; vts < fVTS.size(); vts++)
1008  if ( label == fVTS[vts].first ) {
1009  fVTS[vts].second = value;
1010  isVTS++;
1011  //break;
1012  }
1013  for (size_t t = 0; t < fT.size(); t++)
1014  if ( label == fT[t].first ) {
1015  fT[t].second = value;
1016  isT++;
1017  break;
1018  }
1019 
1020  for(Int_t evamos = 0; evamos < (int)fAGATAE.size(); evamos++ ) {
1021  if ( fAGATAE[evamos].first.first == label ) {
1022  isVAMOSE[ fAGATAE[evamos].first.second ] = value;
1023  break;
1024  }
1025  }
1026  }
1027 
1028  if ( isVTS == 3 && is_RawTof && fTimeCorrelation ) {
1029  ULong64_t fullvts = 0UL;
1030  fullvts = (fVTS[2].second << 32) + (fVTS[1].second<<16) + (fVTS[0].second);
1031  ULong64_t fullt = 0UL;
1032  fullt = (fT[2].second << 32) + (fT[1].second<<16) + (fT[0].second);
1033 
1034  AgataKey * mainkey = dynamic_cast<AgataKey *> (fEventPSA->GetFrame()->GetKey());
1035  ULong64_t agatats = mainkey->GetTimeStamp();
1036 
1037  if(!fFirstVTS && fullvts) fFirstVTS = fullvts;
1038  if(!fFirstCentrum && fullt) fFirstCentrum = fullt;
1039 
1040  double DiffTimeVTS = ((double)fullvts-(double)fFirstVTS)*10*1e-9;
1041  double DiffTimeCentrum = ((double)fullt-(double)fFirstCentrum)*10*1e-9;
1042 
1043  double LastDiffTimeVTS = ((double)fLastVTS-(double)fFirstVTS)*10*1e-9;
1044  double LastDiffTimeCentrum = ((double)fLastCentrum-(double)fFirstCentrum)*10*1e-9;
1045 
1046 
1047  if(fullvts<=fLastVTS)
1048  {
1049  fNVTSRev++;
1050  // fBashColor->SetWarningOut();
1051  // cout<<GetName()<<endl;
1052  // cout<<"This VTS timestamp is lower than the privious one !!!"<<endl;
1053  // cout<<"Last VTS timestamp seen : "<<fLastVTS<<endl;
1054  // cout<<"Current VTS time stamp : "<<fullvts<<endl;
1055  // cout<<"Referenced time stamp : "<<fFirstVTS<<endl;
1056  // fBashColor->ResetColor();
1057  // return;
1058  }
1059  if(fullt<=fLastCentrum)
1060  {
1061  fNCentrumRev++;
1062  // fBashColor->SetWarningOut();
1063  // cout<<GetName()<<endl;
1064  // cout<<"This Centrum timestamp is lower than the privious one !!!"<<endl;
1065  // cout<<"Last Centrum timestamp seen : "<<fLastCentrum<<endl;
1066  // cout<<"Current Centrum time stamp : "<<fullt<<endl;
1067  // cout<<"Referenced time stamp : "<<fFirstCentrum<<endl;
1068  // fBashColor->ResetColor();
1069  // return;
1070  }
1071 
1072  double DeltaTCentrum = ((double)fullt-(double)fLastCentrum)*10*1e-6;
1073 
1074  fTimeStampSpread->Fill(DeltaTCentrum);
1075 
1076  double TVamosToAgata = (Double_t(fullvts) - Double_t(agatats))*10;
1077  fTimeVTS_to_TS->Fill(TVamosToAgata);
1078 
1079  if(fMW05.second)fTOF->Fill(fRawToF.second);
1080 
1081  fVTS_Centrum->Fill(fmod(DiffTimeVTS,3600),fmod(DiffTimeCentrum,3600));
1082 
1083  if(fMW05.second)fTimeCorrelation->Fill(fRawToF.second,TVamosToAgata);
1084 
1085  double SumEVamos = 0.;
1086  double SumEAgata = 0.;
1087  double EVamos = 0.;
1088  double EAgata = 0.;
1089 
1090  int CrystalNbr = 0;
1091 
1092 
1093  for (size_t ii = 0; ii < agata_e.size(); ii++){
1094 
1095  CrystalNbr = agata_e[ii].first;
1096  EVamos = isVAMOSE[CrystalNbr];
1097  EAgata = agata_e[ii].second;
1098 
1099  SumEVamos += EVamos;
1100  SumEAgata += EAgata;
1101 
1102  fCoreDistri->Fill(CrystalNbr);
1103 
1104  TH2 *h = fGAGATAxGVAMOS.at(CrystalNbr);
1105  if ( h == 0x0 ) {
1106  continue;
1107  }
1108  if ( EVamos < 0 )
1109  continue;
1110 
1111  fCoreCommomVamos->Fill(EVamos);
1112  fCoreCommomAgata->Fill(EAgata);
1113  h->Fill(EAgata,EVamos);
1114  }
1115  fSumSpectraVamos->Fill(SumEVamos);
1116  fSumSpectraAgata->Fill(SumEAgata);
1117 
1118  fLastCentrum = fullt;
1119  fLastVTS = fullvts;
1120  }
1121  /*
1122  static ULong64_t T0 = 0, T0_VTS = 0, cycle = 0;
1123  if ( isVTS == 3 && isT == 3 && fTimeCorrelation ) {
1124 
1125  ULong64_t fullvts = 0UL;
1126  fullvts = (fVTS[2].second << 32) + (fVTS[1].second<<16) + (fVTS[0].second);
1127  ULong64_t fullt = 0UL;
1128  fullt = (fT[2].second << 32) + (fT[1].second<<16) + (fT[0].second);
1129 
1130  if ( T0 == 0 ) {
1131  T0 = fullt;
1132  }
1133  if ( T0_VTS == 0 ) {
1134  T0 = fullvts;
1135  }
1136  if ( cycle++ < 10000 )
1137  cycle = 0;
1138  fTimeCorrelation->Fill(fullvts-T0,cycle);
1139  }
1140  */
1141 }
1142 
1143 void AGATAVAMOSCoinc::Print(Option_t * /* option */ ) const
1144 {
1145  std::cout<<std::endl;
1146  int size = 3 + 3 + ((TString)GetName()).Length() + 5 + ((TString)GetTitle()).Length() + 3 + 3;
1147  for(int i=0; i<size ; i++) std::cout<<"*";
1148  std::cout<<std::endl;
1149  std::cout<<"*** "<<GetName()<<" --- "<<GetTitle()<<" ***"<<std::endl;
1150  for(int i=0; i<size ; i++) std::cout<<"*";
1151  std::cout<<std::endl;
1152 
1153  std::cout<<"Number of treated events : "<<fNevts<<std::endl;
1154 
1155  std::cout<<"Number of reversed VTS timestamp : "<<fNVTSRev<<std::endl;
1156  std::cout<<"Number of reversed Centrum timestamp : "<<fNCentrumRev<<std::endl;
1157 
1158 }
1159 
1160 
1161 // ----------
1162 
1163 #ifdef HAS_VAMOS
1164 
1165 //#define DEBUG
1166 #include "LocalDefines.hh"
1167 #include "GWInterface.hh"
1168 
1169 #include "Defines.hh"
1170 #include "Parameters.hh"
1171 #include "Map.hh"
1172 #include "HistoManager.hh"
1173 
1174 #include "Analysis.hh"
1175 
1176 ClassImp(VAMOSWatcher);
1177 
1178 VAMOSWatcher::VAMOSWatcher(const char *name, const char *title, TTree *tree):
1179 // Gw::TTreeWithConditions(name,title,tree),
1180 Gw::Watcher(name,title),
1181 GANILInterface(),
1182 Gw::TTreeBuilder(name,title,tree),
1183 PL(0x0),
1184 M(0x0),
1185 H(0x0),
1186 An(0x0),
1187 LM(0x0),
1188 L(0x0),
1189  fBashColor(new BashColor()),
1190 #ifdef D_ID
1191 Id(0x0),
1192 #endif
1193 #ifdef D_AGATA
1194 LTS(0x0),
1195 #endif
1196 #ifdef D_TMW
1197 TP(0x0),
1198 #endif
1199 fBrhoRef(1.0),
1200 fMode(true),
1201 fCalcMode(false)
1202 {
1203  try {
1204 
1205  if ( GetTree() ) { // just add the branch for that watcher
1206  cout << "Found Tree" << endl ;
1207  }
1208 
1209  }
1210  catch(MErr * Er)
1211  {
1212  Er->Set(WhoamI);
1213  Er->Print();
1214 
1215  fLog << error << " Cannot Init VAMOS Watcher, Set Watcher to Inactive " << dolog;
1216  SetActive(false);
1217  }
1218 }
1219 
1220 /*
1221  void VAMOSWatcher::BuildSpectraByUser()
1222  {
1223  fCentrumTS_AGATATS = MakeTH2<TH2F>("CentrumTS_AGATATS","Correlation Centrum versus AGATA",
1224  2048,0,2048,
1225  2048,0,2048);
1226  }
1227  */
1228 
1229 Bool_t VAMOSWatcher::SetTrigger( ADF::DFTrigger *trigger )
1230 {
1231  return Watcher::GetFromTrigger(trigger, "data:ranc0", fMFMinADFFrame);
1232 }
1233 
1234 void VAMOSWatcher::Clear(Option_t * /* opt */)
1235 {
1236  // clear previous events
1237  if ( An ) {
1238  try {
1239  An->Clear();
1240  }
1241  catch(MErr * Er)
1242  {
1243  Er->Set(WhoamI);
1244  Er->Print();
1245  }
1246  }
1247 }
1248 
1249 void VAMOSWatcher::FillBranches()
1250 {
1251  static Int_t compt = 0;
1252 
1253  try {
1254 
1255 #ifdef TRIG_PAT
1256  UShort_t Pattern =0;
1257 
1258 #ifdef D_AGATA
1259  const short NTrigBranch = 4;
1261  Char_t TrigName[NTrigBranch][20] = {"VAMOS","DC1","AGAVA","DC2","MW"};
1262  UShort_t fTrigLbl[NTrigBranch] = {1,1000,2000,3000,4000};
1263 #endif
1264 
1265  Int_t PatMask =0;
1266  for(UShort_t k=0; k< NTrigBranch;k++)
1267  PatMask |= (1<<k) ;
1268 #endif
1269 
1270  UShort_t Data[2];
1271 
1272  // extract new one from MFM
1273  Int_t size = fEBYFrame->GetNbItemsAttribut();
1274  // if ( compt < 10 )
1275  // cout << "SIZE " << size << endl;
1276  //
1277  for (Int_t i = 0; i < size; i++) {
1278 
1279  fEBYFrame->EbyedatGetParameters(i, &Data[0], &Data[1]);
1280 
1281  // if ( compt < 10 )
1282  // cout << Data[0] << " pattern " << Data[1] << endl;;
1283 
1284  if(Data[0] == 0) {
1285  char Error[256];
1286  sprintf(Error,"LABEL Error : Label 0 found in the data MABEL: %d DATA : %d !",Data[0],Data[1]);
1287  MErr * Er = new MErr(WhoamI,0,0, Error);
1288  throw Er;
1289  }
1290 
1291 #ifdef TRIG_PAT
1292  for(UShort_t j = 0; j< NTrigBranch ; j++) {
1293  if(Data[0] == fTrigLbl[j] && Data[1] > 0)
1294  {
1295  Pattern |= (1<<j) ;
1296  }
1297  }
1298 #endif
1299  // Entry point to Vamos Class
1300  An->Add(Data);
1301  }
1302 
1303 #ifdef TRIG_PAT
1304  //Get Trigger Pattern
1305 
1306  if(Pattern != PatMask)
1307  {
1308  cout << "\n ! Error in Merging " << endl;
1309  for(UShort_t i = 0; i<NTrigBranch ; i++)
1310  cout << TrigName[i] << " : " << ((Pattern>>i) & 1) << " - " ;
1311  cout << Pattern << " -> Expecting : " << PatMask << endl;
1312  cout << endl;
1313  }
1314  Data[0] = 16384;
1315  Data[1] = Pattern;
1316 // cout << Data[0] << " pattern " << Data[1] << endl;;
1317  An->Add(Data);
1318 #endif
1319  ULong64_t MFM_TS = 0;
1320 
1321  MFM_TS = fEBYFrame->GetTimeStamp();
1322  // Store Time Stamp as parameter
1323  Data[0] = 16385;
1324  Data[1] = (UShort_t) (MFM_TS*1.e-5) ; // in mSec
1325 
1326  An->Add(Data);
1327 
1328  Data[0] = 16386;
1329  Data[1] = (UShort_t) (fEBYFrame->GetEventNumber()) ; // in mSec
1330 
1331  An->Add(Data);
1332 
1333  An->Treat();
1334 
1335  // An->FillTree();
1336 
1337 #ifdef D_AGATA
1338 #ifdef WITH_MFM
1339  ULong64_t ATS = LTS->GetTS();
1340  if(ATS != MFM_TS || ATS==0)
1341  cout << " \033[1;31m /!\\ Error : \033[0m Time Stamp Mismatch [MFM : " << MFM_TS << "] - [AGAVA : "<< ATS << "] [Diff = " << MFM_TS-ATS <<"]"<< endl;
1342 #endif
1343 #endif
1344 
1345  // // Example of Retriving Calculated data
1346  // // all the proper methods will be definde / available later.
1347  // cout << " ===== Possible Evt Dump " << NbEvents << " === " << endl;
1348  // if(Ic->IsPresent())
1349  // cout << "IC Cal Value : " << Ic->GetCalAt(0) << endl;
1350  // if(Si->IsPresent())
1351  // cout << "SI Cal Value : " << Si->GetCalAt(0) << endl;
1352 
1353 
1354  // if ( fPM->length() > 0. && fPM->tof()/ns > 100 && fPM->tof()/ns < 300 )
1355  // // if ( fPM->length() > 0. )
1356  // Vel = fPM->velocity()/c_light;
1357  // else
1358  // Vel = Vector3D(0,0,0);
1359 
1360  // gdata->SetPosition(0,0,0);
1361  // gdata->SetDirection(Vel.X(),Vel.Y(),Vel.Z());
1362  // gdata->SetBeta(Vel.rho());
1363 
1364 #ifdef DEBUG
1365  if ( compt < 10 )
1366  An->PrintRaw();
1367 #endif
1368 
1369  if(!fCalcMode)
1370  An->FillHistograms();
1371 
1372  compt++;
1373 
1374  }
1375  catch(MErr * Er)
1376  {
1377  Er->Set(WhoamI);
1378  Er->Print();
1379 
1380  SetLastError(1u);
1381  }
1382 }
1383 
1384 void VAMOSWatcher::RetriveHistograms()
1385 {
1386  ;
1387 }
1388 
1389 void VAMOSWatcher::RetrivePointers()
1390 {
1391  START;
1392 
1393  try {
1394  DetManager *DM = DetManager::getInstance();
1395 
1396 #ifdef D_ID
1397  Id = (Identification*) DM->GetDetector((char *)"Identification");
1398 #endif
1399 
1400 #ifdef D_AGATA
1401  LTS = (TimeStamp*) DM->GetDetector((char *)"LTS");
1402 #endif
1403 #ifdef D_TMW
1404  TP = (TargetPos*) DM->GetDetector((char *)"TP");
1405 #endif
1406  }
1407  catch(MErr * Er)
1408  {
1409  Er->Set(WhoamI);
1410  Er->Print();
1411  }
1412  END;
1413 }
1414 
1415 void VAMOSWatcher::InitVAMOS(UShort_t mode, Option_t *opt, Int_t RunNr, const Char_t* OutDir)
1416 {
1417  try {
1418 
1419  // set managers
1420  LM = LogManager::getInstance();
1421  LM->SetLogFile(Form("%s/Run%4.4d.log",OutDir,RunNr));
1422  //
1423  L = LM->GetFilePtr();
1424  PL = new Parameters(16387);
1425  if(!fCalcMode)
1426  H = new HistoManager();
1427 
1428  if ( GetTree() == 0x0 ) {
1429  std::cout << " Warning empty tree ! " << std::endl;
1430  }
1431 
1432  TFile *tmp = new TFile("tmp_tree_vamos.root","recreate");
1433  // OutTTree = new TTree("RD","Raw Data Tree");
1434 
1435  An = new Analysis(GetTree(),PL,H);
1436 
1437  // SetBrhoRef(fBrhoRef);
1438 
1439 
1440  char actionFilePAR[500];
1441 
1442  An->SetOutTFile( new TFile(opt,"recreate") );
1443  fMode = mode;
1444  Int_t NumberOfParameters = 0;
1445 
1446  if(RunNr > 0)
1447  {
1448  string BasePath = "/agatadisks/" ;
1449  BasePath += Analysis_ExpName.c_str() ;
1450  BasePath += "/";
1451  BasePath += Analysis_ExpName.c_str() ;
1452  BasePath += "/";
1453  string rpath = An->GetDirName(RunNr,BasePath.c_str());
1454  fActionCurrent = BasePath + rpath;
1455  fActionCurrent += "/RCC_conf_files/ACTIONS_" ;
1456  fActionCurrent += Analysis_ExpName.c_str() ;
1457  fActionCurrent += ".CHC_PAR";
1458 
1459  try
1460  {
1461  PL->GetParametersFromActionFile((char *)fActionCurrent.c_str());
1462  }
1463  catch(MErr *Er)
1464  {
1465  // In case File not Found
1466  fActionCurrent.empty();
1467  fActionCurrent = "./ACTIONS_" ;
1468  fActionCurrent += Analysis_ExpName.c_str() ;
1469  fActionCurrent += ".CHC_PAR";
1470  PL->GetParametersFromActionFile((char *)fActionCurrent.c_str());
1471  }
1472 
1473  try
1474  {
1475  Float_t Brho = An->GetBrhoRef(RunNr);
1476  SetBrhoRef(Brho);
1477  }
1478  catch(MErr *Er)
1479  {
1480  fBashColor->SetErrorOut();
1481  Er->Print();
1482  cout << "Brho needs to be define for Run "<< RunNr << " in ./ConfVAMOS/Calibs/ListBrho.dat ==> Exit !" << endl;
1483  fBashColor->ResetColor();
1484  gROOT->ProcessLine(".qqqqqqqqqqqqqqqqqqqqqqqqqqqq");
1485  }
1486  }
1487  else
1488  {
1489  // Read From local Action File
1490  cout << "No RunNr specified, Default Mode " << endl;
1491  cout << "Reading Paramter List from " << fActionCurrent << endl;
1492  cout << "Setting Brho to 1.0 Tm" << endl;
1493  SetBrhoRef(1.0);
1494  }
1495  PL->GetParametersFromActionFile((char *)fActionCurrent.c_str());
1496 
1497  NumberOfParameters = PL->GetNParameters();
1498 
1499 #ifdef TRIG_PAT
1500  PL->Add(16384,"DAQ_PATTERN",13);
1501  NumberOfParameters++;
1502 #endif
1503  PL->Add(16385,"MFM_TS",13);
1504  NumberOfParameters++;
1505  PL->Add(16386,"MFM_EVTNUM",13);
1506  NumberOfParameters++;
1507 
1508  PL->SetNParameters(NumberOfParameters);
1509  // Data operation
1510  An->GetMap()->DataOp(PL);
1511  An->SetUpDetectors(fMode);
1512  DetManager *DM = DetManager::getInstance();
1513 
1514  if(!fCalcMode)
1515  RetriveHistograms();
1516  RetrivePointers();
1517 
1518  }
1519  catch(MErr * Er)
1520  {
1521  Er->Set(WhoamI);
1522  fBashColor->SetErrorOut();
1523  Er->Print();
1524  fLog << error << " Cannot Init VAMOS Watcher, Set Watcher to Inactive ==> Exit" << dolog;
1525  fBashColor->ResetColor();
1526  SetActive(false);
1527  gROOT->ProcessLine(".qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq");
1528  }
1529 }
1530 
1531 Float_t VAMOSWatcher::SetBrhoRef(Float_t brho)
1532 {
1533  Float_t cbrho = fBrhoRef;
1534 
1535  try {
1536  if ( brho > 0. && brho < 2.4) {
1537  fBrhoRef = brho;
1538  if ( An )
1539  An->SetBrhoWatcher(fBrhoRef);
1540  }
1541  else {
1542  cout <<"WRONG Brho !! Switch Watcher as INACTIVE" << endl;
1543  SetActive(false);
1544  }
1545  }
1546  catch(MErr * Er)
1547  {
1548  Er->Set(WhoamI);
1549  Er->Print();
1550  }
1551 
1552  return cbrho;
1553 }
1554 
1555 
1556 VAMOSWatcher::~VAMOSWatcher()
1557 {
1558  START;
1559  try {
1560  An = CleanDelete(An);
1561  PL = CleanDelete(PL);
1562  if(!fCalcMode)
1563  H = CleanDelete(H);
1564  LM->kill();
1565  }
1566  catch(MErr * Er)
1567  {
1568  Er->Set(WhoamI);
1569  Er->Print();
1570  }
1571  END;
1572 }
1573 
1574 
1575 void VAMOSWatcher::DoCanvas(TCanvas *c, Option_t *opt)
1576 {
1577  TString option = opt;
1578  c->Divide(2,2,0.001,0.001);
1579 
1580  TH1 *h = H->FindHistogram((char *)"Eg_vsNr");
1581  c->cd(1);
1582  h->Draw("col");
1583 }
1584 
1585 
1586 void VAMOSWatcher::Exec(Option_t *option)
1587 {
1588  // to get the MFM Frame kEBYEN, kEBYTS, kEBYENTS
1589  // Get underlying MFM Frame should check if Exec ok ... or wait to have throw system ...
1590 
1591  if ( !GANILInterface::ADF2MFM() ) {
1592  SetLastError(1u);
1593  return;
1594  }
1595 
1596  if ( fEGTYPE == kEBYENTS || fEGTYPE == kEBYTS || fEGTYPE == kEBYENTS ) {
1597  Clear();
1598  // cout << " In the loop " << fEGTYPE << endl;
1599  FillBranches();
1600  FillTree();
1601  }
1602 }
1603 
1604 ClassImp(VAMOSVertexBuilder);
1605 
1606 VAMOSVertexBuilder::VAMOSVertexBuilder(const char *name, const char *title):
1607 Gw::WatcherWithTag(name, title,0x0,0x0),
1608 VertexBuilder(),
1609 fVAMOSWatcher(0x0),
1610 fTP(0x0),
1611 fId(0x0)
1612 {
1613  // use to pass the vertex information from this watcher to another watcher
1614  fVertexFrame = MainFrameFactory::theMainFactory().
1615  NewSharedFrame( FactoryItem("Agata","meta:vertex",Version(0,0)), FactoryItem("Agata","meta:vertex",Version(1,1)) );
1616  fIsToBeDeleted = true;
1617 
1618  // data provided by analysis are required ... it could be also the Analysis part which is passed there ...
1619  fVAMOSWatcher = (VAMOSWatcher *)Watcher::GetLastRegistered("VAMOSWatcher","class");
1620  if ( fVAMOSWatcher == 0x0 ) {
1621  fLog << error << " A VAMOSWatcher watcher should be registered before " << nline;
1622  }
1623 #ifdef D_TMW
1624  fTP = fVAMOSWatcher->GetTP();
1625 #endif
1626 #ifdef D_ID
1627  fId = fVAMOSWatcher->GetId();
1628 #endif
1629 
1630 }
1631 
1632 void VAMOSVertexBuilder::Exec(Option_t * /*option*/)
1633 {
1634  if ( fVAMOSWatcher ) {
1635  // cout << " In Vertex" << endl;
1636  // cout << " Pos : \n"
1637  // << " X : " << fTP->GetX()
1638  // << " Y : " << fTP->GetY()
1639  // << " Theta : " << fTP->GetTheta()
1640  // << " Phi : " << fTP->GetPhi()
1641  // << endl;
1642  // fTP->GetTheta();
1643  // fTP->GetX();
1644  // fTP->GetPhi();
1645  // fId->GetBeta()
1646 
1647  Double_t Beta = fId->GetBeta(); // From TMW-FocalPlane
1648  // Double_t Beta = fId->GetBetaTP(); // From TMW
1649  // Beta = 0;
1650  // cout << " In Vertex : " << Beta << endl;
1651 
1652  Double_t Theta = fTP->GetTheta();
1653  Double_t Phi = fTP->GetPhi();
1654  //MW coordinates (Theta in 0xz and Phi between v particle and 0xz) X left y up z forward
1655  Double_t ThetaZ = Theta;
1656  Double_t PhiZ = atan(tan(Phi/1000.)*cos(Theta/1000.))*1000.;
1657  Double_t ThetaL;
1658  Double_t PhiL;
1659  // TVector3 *myVec;
1660  // TVector3 *myVecy;
1661  Double_t XV = sin(ThetaZ/1000.)*cos(PhiZ/1000.);
1662  Double_t YV = sin(PhiZ/1000.);
1663  Double_t ZV = cos(ThetaZ/1000.)*cos(PhiZ/1000.);
1664  Double_t XAgata = -1.*YV;
1665  Double_t YAgata = XV;
1666  Double_t ZAgata = ZV;
1667  Double_t Xt = 0.;
1668  Double_t Yt = 0.;
1669  Double_t Zt = 0.;
1670  // here is the transfert fron VAMOS to GW
1671  SetVertex(Xt,Yt,Zt,XAgata,YAgata,ZAgata,Beta);
1672  // Be Careful with target pos !!!
1673  }
1674 }
1675 #endif
1676 
1677 /*
1678  #ifdef IN_DEV_GRU
1679  #ifdef HAS_GRU
1680 
1681  #include <GAcq.h>
1682  #include <GNetServerRoot.h>
1683  #include <GSpectra.h>
1684 
1685  ClassImp(GRUWatcher);
1686 
1687  GRUWatcher::GRUWatcher(Int_t Port):
1688  TTask("GRUExport","0"),
1689  NetworkRoot(0x0),
1690  SpectraDB(0x0)
1691  {
1692  SpectraDB = new GSpectra(); NetworkRoot = new GNetServerRoot (SpectraDB);
1693  NetworkRoot->SetPort(Port);
1694  SpectraDB ->SetfDefaultHostPort(Port);
1695  SpectraDB ->SetfDefaultHostName((char*)gSystem->HostName());
1696  NetworkRoot->SetVerbose(0);
1697  NetworkRoot->StartGNetServer(false);
1698 
1699  cout << "GRU port opened " << port << endl;
1700  }
1701 
1702  GRUWatcher::~ GRUWatcher()
1703  {
1704 
1705  }
1706  #endif
1707  #endif
1708  */
1709 
1710 
1711 
TH2 * fTimeCorrelation
time correlation AGATA versus VAMOS i.e. Delta[TSAGATA-VTS] versus TimeOfFlight
virtual Bool_t IsValid() const
true if it is a valid pointer
Definition: Frame.h:616
TH2I * fParXValue
ADF::Frame * fPSAFrame
current PSA frame to help decoding one by one
A single value data.
Definition: Data.h:58
virtual Key * GetKey()=0
To get the Key associated to this frame.
virtual Bool_t SetTrigger(ADF::DFTrigger *=0x0)
set trigger in which one can retrieve encapsulated MFM Frame
printf("******************************************************************** \n")
virtual Frame * GetFrame() const
Definition: Frame.h:625
MFMEbyedatFrame * fEBYFrame
used to decode depending of the MFM type
Definition: GANILWatchers.h:67
ULong64_t fFirstCentrum
Interface for any watcher that is a VertexBuilder.
virtual ~MFMWatcher()
Int_t fEGTYPE
To get the EG TYPE.
Definition: GANILWatchers.h:73
Base class for a Frame.
Definition: Frame.h:73
LogMessage & error(LogMessage &)
virtual UInt_t Read()
It reads the content into dedicated structures from the Frame (data part)
Definition: Frame.h:199
MFMCommonFrame * fInsideFrame
Definition: GANILWatchers.h:68
virtual ~GANILInterface()
Definition: GANILWatchers.C:62
virtual Double_t GetE(UInt_t=0u) const =0
to get the energy associated to the core
TH1 * fCoreCommomVamos
All GE.
virtual ~AGATAVAMOSCoinc()
virtual Int_t GetUID() const =0
to get the crystal ID
Interface to AgataKey.
AGATAVAMOSCoinc(const char *, const char *, TDirectory *sp_dir=0x0, TDirectory *tag_dir=0x0)
TH1D * fLabelsDistribution
DataParameters * fDataParameters
use to decode the Raw MFM frame
Definition: GANILWatchers.h:77
virtual Key * GetKey()
To get the Key associated to this frame.
Definition: Frame.h:344
TCanvas * NewCanvas(TString cname, TString ctitle)
Definition: CanvasVisu.C:102
LogMessage & nline(LogMessage &)
virtual void Exec(Option_t *option="")
watch the current frame
std::pair< Int_t, ULong64_t > fMW05
UInt_t value[MaxValue]
Definition: ReadDaqAlone.C:29
Bool_t ADF2MFM()
Move current ADF Frame to MFM.
ADF::SharedFP * fEventPSA
main frame i.e. event:data:psa
virtual ULong64_t GetTimeStamp() const =0
To set the timestamp.
Base class for a Watcher.
Definition: Watchers.h:60
std::vector< std::pair< Int_t, ULong64_t > > fT
ULong64_t fFirstVTS
std::vector< TH2 * > fGAGATAxGVAMOS
correlation Gamma e-energy AGATA versus VAMOS
virtual void SetBranches()
virtual Bool_t SetTrigger(ADF::DFTrigger *=0x0)
set trigger in which one can retrieve encapsulated MFM Frame
header file for GANILWatchers.C
Base class for a Watcher that fill a TTree or some branches of a TTree.
Definition: TTreeWatchers.h:51
LogMessage fLog
Definition: Watchers.h:86
void ShowCoreCommomAndSumSpectra()
Base class for version numbers.
Definition: Version.h:38
LoupOnPad, a class to Loupe on a Pad in a Canvas with many pads in it.
Definition: LoupeOnPad.h:76
MFMCommonFrame * fMFMFrame
always filled
Definition: GANILWatchers.h:64
A RawFrame gives direct access to the underlying buffer.
Definition: Frame.h:557
header file for AgataKeyFactory.cpp
MFMWatcher(const char *, const char *, TDirectory *sp_dir=0x0, TDirectory *tag_dir=0x0)
LogMessage & dolog(LogMessage &)
void ShowCrystalSpectra()
virtual void Exec(Option_t *option="")
watch the current frame
GANILInterce, base class for all GANIL based watchers.
Definition: GANILWatchers.h:49
void SetItem(const Char_t *whichfactory, const Char_t *whichitem, Version itemversion, Short_t factversion=-1, void *ptr=0x0)
to change an item
Definition: FactoryItem.cpp:84
RawMFMTree(const char *name, const char *title, TTree *tree=0x0)
virtual BufferIO & RawBuffer()
This method gives access in reading/writing mode to the underlying data buffer.
Definition: Frame.h:580
Color_t GetColor(int i)
Definition: CanvasVisu.h:49
MFMMergeFrame * fMergedFrame
Definition: GANILWatchers.h:69
header file for DFAgent.cpp
std::vector< std::pair< Int_t, ULong64_t > > fVTS
virtual void FillTree()
Fill the tree if it is the owner of the tree.
virtual Bool_t LinkSubFrame(UInt_t, Frame *)
Attach the sub-frame corresponding to the given subkey # to the Frame given in the second argument...
Definition: Frame.h:251
ClassImp(BaseNucleus)
Base class for a trigger on a data flow.
Definition: Trigger.h:155
ADF::LogMessage & endl(ADF::LogMessage &log)
ADF::PSAInterface * GetDataPSA(UInt_t which)
To get one by one the PSA Frames in one event (It fills fFramePSA). Read has beed called ! ...
virtual void Print(Option_t *option="") const
UInt_t GetNbFramePSA()
number of PSA Frames extracted from the current event
std::string gActionDefault
Default file for ACTIONS.
Definition: GANILWatchers.h:56
virtual UInt_t Scan()
Scan this Frame. If it is a composite frame, it looks for the keys of sub-frames. ...
Definition: Frame.h:219
std::string gActionDefault
Char_t * Address()
for classes that needs it to write directly data into it.
Definition: BufferIO.h:98
virtual void Exec(Option_t *option="")
watch the current frame
virtual UInt_t GetNbSubFrame() const
Returns the number of sub-frames composing this frame. Scan have to be called first.
Definition: Frame.h:228
const Int_t size
Definition: BenchIO.C:24
TH1I * fFrameSize
std::vector< std::pair< std::pair< Int_t, Int_t >, Float_t > > fAGATAE
TH1I * fFrameType
virtual Int_t ReadActionFile(std::string full_name_of_action_file="")
read the file that contains the mapping. It returns the numbers of parameters, otherwise 0 ...
Definition: GANILWatchers.C:90
virtual Int_t ReadActionFile(std::string full_name_of_action_file="")
read the file that contains the mapping. It returns the numbers of parameters, otherwise 0 ...
ADF::SharedFP * fMFMinADFFrame
Pointer to the Ancillary Frame as delivered by the ADF Trigger.
Definition: GANILWatchers.h:60
virtual Bool_t SetTrigger(ADF::DFTrigger *=0x0)
set trigger in which one can retrieve encapsulated MFM Frame
std::string fActionCurrent
Current actions files.
Definition: GANILWatchers.h:79
TH1D * fMeanNumberOfValues
virtual void DoCanvas(TCanvas *c, Option_t *)
To be overwritten by real implementation if a canvas is produced.
Base class that described an item in a Factory.
Definition: FactoryItem.h:52
virtual void SetLoupe(bool loupeon=true)
Definition: CanvasVisu.C:646
std::pair< Int_t, ULong64_t > fRawToF
void SetLastError(Short_t s=0)
TMP : migration to TreeWatcher with Cuts : should be removed.
Definition: Watchers.h:288
TTree * GetTree()
to get the current Tree