GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FrameDispatcher.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2011 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 
24 #ifndef Gw_FrameDispatcher
25 #include "FrameDispatcher.h"
26 #endif
27 
28 // root includes
29 #include "TSystem.h"
30 #include "TROOT.h"
31 #include "TClass.h"
32 
33 // ADF include
34 
35 using namespace ADF;
36 using namespace Gw;
37 
38 Short_t FrameDispatcher::gDoTimer = 0;
39 
41 
42 FrameDispatcher::FrameDispatcher() :
43  Watcher("FD","An unamed Frame Dispatcher",0x0,0x0),
45  fListOfTriggers(),
46  fTimeControl(),
47  fWhichBin(0u),
48  fTriggerRate(0x0),
49  fBufferSize(0x0),
50  fRealTime (new TList()),
51  fCPUTime (new TList()),
52  fCurrentValues()
53 {
54  // to force reading a local ADF.conf if it exists
55  UInt_t error_code;
56  NarvalInterface::process_config("./",&error_code);
57 
58  // set stack so that triggers are deleted by fListOfTriggers
59  fListOfTriggers.SetOwner(true);
60 
61  // histograms that shows statistics
62  fTriggerRate = MakeTH1<TH1D>("RateWatchers","Gives the number of time at least one Watcher is called", 10,0,10,"Performances");
63  fBufferSize = MakeTH1<TH1F>("BufferSize","Size of the buffer [MB] treated", kMaxCycle,0,kMaxCycle,"Performances") ;
64 
65  std::pair<Double_t, Double_t> p; fCurrentValues.push_back(p);
66  TH1F* h;
67  h = MakeTH1<TH1F>(Form("%s_RealTime",GetName()),"Real time [ms] to execute the Dispacher", kMaxCycle,0,kMaxCycle,"Performances");
68  fRealTime->Add(h);
69  h = MakeTH1<TH1F>(Form("%s_CPUTime",GetName()),"CPU time [ms] to execute the Dispacher", kMaxCycle,0,kMaxCycle,"Performances");
70  fCPUTime->Add(h);
71 
72  // objects are owned by the pool
73  fRealTime->SetOwner(false); fCPUTime->SetOwner(false);
74 }
75 
76 FrameDispatcher::FrameDispatcher(const char *name, const char *title, TDirectory *mother_watcher_dir, TDirectory *mother_tag_watcher_dir) :
77  Watcher(name,title,mother_watcher_dir,mother_tag_watcher_dir),
79  fListOfTriggers(),
80  fTimeControl(),
81  fWhichBin(0u),
82  fTriggerRate(0x0),
83  fBufferSize(0x0),
84  fRealTime (new TList()),
85  fCPUTime (new TList()),
86  fCurrentValues()
87 {
88  // to force reading a local ADF.conf if it exists
89  UInt_t error_code;
90  NarvalInterface::process_config("./",&error_code);
91 
92  // set stack so that triggers are deleted by fListOfTriggers
93  fListOfTriggers.SetOwner(true);
94 
95  // histograms that shows statistics
96  fTriggerRate = MakeTH1<TH1D>("RateWatchers","Gives the number of time at least one Watcher is called", 10,0,10,"Performances");
97  fBufferSize = MakeTH1<TH1F>("BufferSize","Size of the buffer [MB] treated", kMaxCycle,0,kMaxCycle,"Performances") ;
98 
99  std::pair<Double_t, Double_t> p; fCurrentValues.push_back(p);
100  TH1F* h;
101  h = MakeTH1<TH1F>(Form("%s_RealTime",GetName()),"Real time [ms] to execute the Dispacher", kMaxCycle,0,kMaxCycle,"Performances");
102  fRealTime->Add(h);
103  h = MakeTH1<TH1F>(Form("%s_CPUTime",GetName()),"CPU time [ms] to execute the Dispacher", kMaxCycle,0,kMaxCycle,"Performances");
104  fCPUTime->Add(h);
105 
106  // objects are owned by the pool
107  fRealTime->SetOwner(false); fCPUTime->SetOwner(false);
108 }
109 
111 {
112 // printf("Delete FrameDispatcher::FrameDispatcher \n");
113  // print statistics on the log system
114  Log.ClearMessage();
115 
116  Log.SetProcessMethod("~FrameDispatcher()");
117  GetFrameIO().Print( Log() );
118  Log << dolog;
119 
120  if ( fTrigger )
121  { delete fTrigger; fTrigger = 0x0; }
122  if ( fRealTime )
123  { delete fRealTime; fRealTime = 0x0; }
124  if ( fCPUTime )
125  { delete fCPUTime; fCPUTime = 0x0; }
126 // printf("Delete FrameDispatcher::FrameDispatcher \n");
127 }
128 
130 {
131  if ( trigger && !trigger->IsZombie() ) {
132  fTrigger = trigger;
134  GetFrameIO().SetStatus(BaseFrameIO::kIdle);
135 
136  return true;
137  }
138  return false;
139 }
140 
141 void FrameDispatcher::DoCanvas(TCanvas *c, Option_t *o)
142 {
143  TString option = o;
144 
145  if ( option == "" ) {
146  c->Divide(2,2,0.001,0.001);
147  c->cd(1);
148  fTriggerRate->Draw();
149  c->cd(2);
150  fBufferSize->Draw();
151  c->cd(3);
152  fRealTime->At(0)->Draw();
153  for (Int_t i = 1u; i < fRealTime->GetSize(); i++) {
154  if ( fRealTime->At(i) )
155  fRealTime->At(i)->Draw("same");
156  }
157  c->cd(4);
158  fCPUTime->At(0)->Draw();
159  for (Int_t i = 1u; i < fCPUTime->GetSize(); i++) {
160  fCPUTime->At(i)->Draw("same");
161  }
162  }
163 }
164 
165 void FrameDispatcher::SetDirectory(TDirectory *mother_dir_of_watcher, TDirectory *mother_dir_for_tag, Bool_t load_objects)
166 {
167  Watcher::SetDirectory(mother_dir_of_watcher,mother_dir_for_tag,load_objects);
168 
169  /*
170  if ( MakeDir(fTopFolder,mother_dir_of_watcher,true) ) {
171 
172  Watcher::SetDirectory(mother_dir_of_watcher,mother_dir_for_tag,load_objects);
173  }
174  */
175 
176 
177  return;
178 
179 
180  // now change the directories of the watchers
181  /*
182  TIter loopontask(GetListOfTasks());
183  Watcher *watcher;
184  while ( ((watcher=(Watcher*)loopontask())) ) {
185  TDirectory *w_dir = 0x0, *w_tag_dir= 0x0;
186  if ( fDirectory ) {
187  TDirectory *tmp = fDirectory->GetDirectory(GetName());
188  if ( tmp == 0x0 ) {
189  tmp = fDirectory->mkdir(GetName(),GetTitle());
190  }
191  if ( tmp ) {
192  w_dir = tmp->mkdir(watcher->GetName(),watcher->GetTitle());
193  }
194  }
195  if ( fTagDirectory ) {
196  TDirectory *tmp = fTagDirectory->GetDirectory(GetName());
197  if ( tmp == 0x0 ) {
198  tmp = fTagDirectory->mkdir(GetName(),GetTitle());
199  }
200  if ( tmp ) {
201  w_dir = tmp->mkdir(watcher->GetName(),watcher->GetTitle());
202  }
203  }
204  watcher->SetDirectory(w_dir, w_tag_dir, load_objects);
205  }
206  return;
207  */
208  /*
209  TDirectory *c_dir = fDirectory, *c_tag_dir = fTagDirectory;
210 
211  // check and creates sub-directories with the name of the watcher
212  Watcher::SetDirectory(mother_dir_of_watcher,mother_dir_for_tag,load_objects);
213  if ( c_dir == fDirectory && c_tag_dir == fTagDirectory)
214  return;
215 
216  // now change the directories of the watchers
217  TIter loopontask(GetListOfTasks());
218  Watcher *watcher;
219  while ( ((watcher=(Watcher*)loopontask())) ) {
220  watcher->SetDirectory(fDirectory, fTagDirectory, load_objects);
221  }
222 
223  // for clarity, objects and tagged objects owned by this are stored in a sub-directory FD
224  // so creates it if required and move object
225 
226  if ( fDirectory != 0x0 ) {
227 // TDirectory *tmp = fDirectory->GetDirectory("FD");
228 // if ( tmp == 0x0 ) {
229 // tmp = fDirectory->mkdir("FD","Histograms to control Watcher's executions"); */
230 // if ( tmp )
231 // fDirectory = tmp;
232 // else
233 // fDirectory = 0x0;
234 // }
235 /* else fDirectory = tmp; */
236 
237 // DirToDir(c_dir, fDirectory, GetPoolOfObject(), load_objects);
238 // DirToDir(c_dir, tmp, GetPoolOfObject(), load_objects);
239 
240 // }
241 // if ( fTagDirectory != 0x0 ) {
242  /*
243  TDirectory *tmp = fTagDirectory->GetDirectory("FD");
244  if ( tmp == 0x0 ) {
245  tmp = fTagDirectory->mkdir("FD","Histograms to control Watcher's executions"); */
246 /* if ( tmp )
247  fTagDirectory = tmp;
248  else
249  fTagDirectory = 0x0;
250  }*/
251 /* else fTagDirectory = tmp; */
252 // DirToDir(c_dir, tmp, GetReference(), load_objects);
253 // DirToDir(c_tag_dir, fTagDirectory, GetReference(), load_objects);
254 // }
255  // now change the directory of the objects in the pool
256 // DirToDir(c_tag_dir, fTagDirectory, GetReference(), load_objects);
257 
258 
259 }
260 
261 void FrameDispatcher::Add(TTask *task)
262 {
263  if ( task == 0x0 || fTrigger == 0x0 )
264  return;
265  if ( fTrigger->IsZombie() )
266  return;
267 
268  Watcher *watcher =
269  dynamic_cast<Watcher *>(task);
270  if ( watcher )
271  Add(watcher,fTrigger);
272 }
273 
275 {
276  if ( watch == 0x0 || trig == 0x0 )
277  return;
278  if ( trig->IsZombie() )
279  return;
280 
281  // Add a new watcher, associates the trigger, add to the list of watchers, set the directory and allocate histograms
282  TFolder *topfolder =
283  (TFolder *)gROOT->GetRootFolder()->FindObject("//root/GwWatchers");
284  TFolder *w_folder = (TFolder *)gROOT->GetRootFolder()->FindObjectAny( Form("//root/GwWatchers/%s", watch->GetName() ) );
285  if ( w_folder ) { // shoud aways be true ...
286  topfolder->Remove(w_folder);
287  fTopFolder->Add(w_folder);
288  }
289 
290  if ( fDirectory ) {
291  Bool_t ok_dir = false;
292  if ( fTagDirectory ) {
293  ok_dir = MakeDir(fTopFolder, fDirectory, true);
294  if ( fTagDirectory != fDirectory ) {
295  ok_dir = ok_dir && MakeDir(fTopFolder, fTagDirectory, true);
296  }
297  }
298  if (ok_dir) {
299  watch->SetDirectory(fDirectory->GetDirectory(fTopFolder->GetName()), fTagDirectory->GetDirectory(fTopFolder->GetName()), true);
300  }
301  }
302 
303  watch->SetTrigger(trig);
304  TTask::Add(watch);
305 
306  /*
307  // Add a new watcher, associates the trigger, add to the list of watchers, set the directory and allocate histograms
308 
309  if ( fDirectory ) {
310  if ( fTagDirectory ) {
311  watch->SetDirectory(fDirectory, fTagDirectory);
312  }
313  else {
314  watch->SetDirectory(fDirectory, 0x0);
315  }
316  }
317  else {
318  if ( fTagDirectory ) {
319  watch->SetDirectory(0x0, fTagDirectory);
320  }
321  else {
322  watch->SetDirectory(0x0, 0x0);
323  }
324  }
325  */
326 
327  // now histograms for that watcher
328  TH1F* h;
329  h = MakeTH1<TH1F>(Form("%s_RealTime_%lu",watch->GetName(),fCurrentValues.size()),"Real time [ms] to execute the task", kMaxCycle,0,kMaxCycle,"Performances");
330  fRealTime->Add(h);
331  h = MakeTH1<TH1F>(Form("%s_CPUTime_%lu",watch->GetName(),fCurrentValues.size()),"CPU time [ms] to execute the task", kMaxCycle,0,kMaxCycle,"Performances");
332  fCPUTime->Add (h);
333 
334  std::pair<Double_t, Double_t> p; fCurrentValues.push_back(p);
335 
336  // no need to add it to the list of to be deleted triggers
337  if ( trig == fTrigger )
338  return;
339 
340  // try and find if this trigger is already known.
341  // if not, add it and Register it in FrameIO
342  Bool_t to_add = true;
343 
344  for ( UInt_t i = 0u; i < fListOfTriggers.GetSize(); i++ ) {
345  if ( fListOfTriggers.At(i) == trig )
346  { to_add = false; break; }
347  }
348  if ( to_add ) {
349  //
350  GetFrameIO().Register(trig);
351  GetFrameIO().SetStatus(BaseFrameIO::kIdle);
352 
353  fListOfTriggers.Add(trig);
354  }
355 }
356 
358 {
359  TStopwatch loop_time;
360 
361  if ( block.GetSize() == 0 ) {
362  Log << warning << " Empty block, nothing to dispach " << nline;
363  return 0u;
364  }
365 
366  if ( gDoTimer ) {
367  // init the value for that loop
368  loop_time.Start(true);
369 
370  for (UInt_t i = 0u; i < fCurrentValues.size(); i++ ) {
371  fCurrentValues[i].first = 0.0;
372  fCurrentValues[i].second = 0.0;
373  }
374  }
375  // attach the input/output buffer to the FrameIO system
376  GetFrameIO().Attach(&block,0x0);
377 
378  if ( gDebug )
379  printf("FrameDispatcher::ProcessBlock \n");
380 
381  // start the processing
382  UInt_t error_code = 0u; UInt_t size_input_i, size_input_j;
383  while ( GetFrameIO().Notify(false) ) { // the trigger has just fired
384 
385  fTriggerRate->Fill(0);
386 
387  if ( gDebug )
388  Log << info << "Dispacher called " << GetName() << nline;
389 
390  // if this task is no more active, break the processing
391  if ( ! IsActive() )
392  break;
393 
394  // call Read for all InputFrames so that it it done just once
395  if ( fTrigger->IsFired() ) {
396  size_input_i = fTrigger->GetNbInputFrame();
397  for (UInt_t i = 0u; i < size_input_i; i++) {
398  if ( fTrigger->IsIndividualFired(i) )
399  fTrigger->GetInputFrame(i)->Read();
400  }
401  }
402  size_input_i = fListOfTriggers.GetSize();
403  for (UInt_t i = 0; i < size_input_i ; i++ ) {
404  if ( fListOfTriggers.At(i)->IsFired() ) {
405  size_input_j = fListOfTriggers.At(i)->GetNbInputFrame(); // +1 to Test try catch speed !
406  for (UInt_t j = 0u; j < size_input_j ; j++)
407  if ( fListOfTriggers.At(i)->IsIndividualFired(j) )
408  fListOfTriggers.At(i)->GetInputFrame(j)->Read();
409  }
410  }
411 
412  // All subtasks ready to be treated
413  CleanTasks();
414 
415  TTask *task; TObjLink *lnk = GetListOfTasks()->FirstLink();
416  UInt_t slot = 1u;
417  //
418  while (lnk) {
419  task = (TTask *)lnk->GetObject();
420  if ( !task->IsActive() ) {
421  lnk = lnk->Next();
422  continue;
423  }
424  Watcher *watcher =
425  dynamic_cast<Watcher *>(task);
426  if ( watcher ) {
427  // the trigger has fired... so tell the task should not be executed
428  if ( watcher->GetTrigger()->IsFired() ) {
429 
430  if ( gDoTimer > 0 ) {
431  fTimeControl.Start(kTRUE);
432  }
433  watcher->Exec("");
434  if ( gDoTimer > 0 ) {
435  fTimeControl.Stop();
436 
437  fCurrentValues[slot].first += fTimeControl.RealTime();
438  fCurrentValues[slot].second += fTimeControl.CpuTime();
439  }
440  fTriggerRate->Fill(slot);
441 
442  watcher->Pass();
443  }
444  else {
445  watcher->Pass();
446  }
447  slot++;
448  }
449  lnk = lnk->Next();
450  }
452  /*
453  TIter loopontask(GetListOfTasks());
454  TTask *task;
455  UInt_t slot = 1u;
456  while ( ((task=(TTask*)loopontask())) ) {
457  if ( !task->IsActive() )
458  continue;
459  Watcher *watcher =
460  dynamic_cast<Watcher *>(task);
461  if ( watcher ) {
462  // the trigger has fired... so tell the task should not be executed
463  if ( watcher->GetTrigger()->IsFired() ) {
464 
465  if ( gDoTimer > 0 ) {
466  fTimeControl.Start(kTRUE);
467  }
468  watcher->Exec("");
469  if ( gDoTimer > 0 ) {
470  fTimeControl.Stop();
471 
472  fCurrentValues[slot].first += fTimeControl.RealTime();
473  fCurrentValues[slot].second += fTimeControl.CpuTime();
474 
475  fTriggerRate->Fill(slot);
476  }
477 
478  watcher->Pass();
479  }
480  else { watcher->Pass(); }
481  slot++;
482  }
483  }
484  */
486  }
487 
488  GetFrameIO().Detach(&block,0x0);
489 
490  // to avoid being stack in an infinite loop
491  if ( !gROOT->IsBatch() ) {
492  gSystem->DispatchOneEvent(true);
493  gSystem->ProcessEvents();
494  }
495 
496  // now fill the different histograms
497  fBufferSize->Fill(fWhichBin, block.GetSize()/Float_t(aMByte));
498 
499 
500  if ( gDoTimer > 0 ) {
501  TH1 *hr, *hc;
502  for (UInt_t i = 0u; i < fCurrentValues.size(); i++ ) {
503 
504  if ( i == 0u )
505  continue;
506 
507  hr = (TH1 *)(fRealTime->At(i));
508  hc = (TH1 *)(fCPUTime->At(i));
509 
510  hr->Fill(fWhichBin, 1000*fCurrentValues[i].first );
511  hc->Fill(fWhichBin, 1000*fCurrentValues[i].second );
512  }
513  loop_time.Stop();
514 
515  hr = (TH1 *)(fRealTime->At(0));
516  hc = (TH1 *)(fCPUTime->At(0));
517 
518  hr->Fill(fWhichBin, 1000*loop_time.RealTime() );
519  hc->Fill(fWhichBin, 1000*loop_time.CpuTime() );
520  }
521 
522  if ( fWhichBin == kMaxCycle )
523  fWhichBin = 0u;
524  else
525  fWhichBin++;
526 
527  return error_code;
528 }
529 
530 void FrameDispatcher::Zero(Option_t *opt1, Option_t *opt2)
531 {
532  // call Zero for all watchers
533  TIter next(GetListOfTasks());
534  TTask *task;
535  //
536  while ( (task = (TTask *)next()) ) {
537  Watcher *w = dynamic_cast<Watcher *> (task);
538  if ( w ) {
539  w->Zero(opt1,opt2);
540  }
541  }
542  Watcher::Zero(opt1,opt2);
543 }
544 
545 // void FrameDispatcher::ExecuteTasks(Option_t*/* option*/)
546 // {
547 // // Execute all the subtasks of a task.
548 //
549 // TIter next(fTasks);
550 // TTask *task;
551 // while((task=(TTask*)next())) {
552 // if (fgBreakPoint) return;
553 // if (!task->IsActive()) continue;
554 // if (task->fHasExecuted) {
555 // task->ExecuteTasks(option);
556 // continue;
557 // }
558 // if (task->fBreakin == 1) {
559 // printf("Break at entry of task: %s\n",task->GetName());
560 // fgBreakPoint = this;
561 // task->fBreakin++;
562 // return;
563 // }
564 //
565 // if (gDebug > 1) {
566 // TROOT::IndentLevel();
567 // cout<<"Execute task:"<<task->GetName()<<" : "<<task->GetTitle()<<endl;
568 // TROOT::IncreaseDirLevel();
569 // }
570 // task->Exec(option);
571 // task->fHasExecuted = kTRUE;
572 // task->ExecuteTasks(option);
573 // if (gDebug > 1) TROOT::DecreaseDirLevel();
574 // if (task->fBreakout == 1) {
575 // printf("Break at exit of task: %s\n",task->GetName());
576 // fgBreakPoint = this;
577 // task->fBreakout++;
578 // return;
579 // }
580 // }
581 // }
582 
583 
584 
void Pass()
force fHasExecuted (recursively) to true
Definition: Watchers.cpp:862
printf("******************************************************************** \n")
virtual Long64_t GetSize(UInt_t=0u) const
size of the current block
Definition: FrameBlock.h:141
void SetOwner(Bool_t own=false)
Definition: PtrStack.h:87
virtual void DoCanvas(TCanvas *c, Option_t *)
To be overwritten by real implementation if a canvas is produced.
TDirectory * fTagDirectory
Tagged Objects are in folders. They can be saved/load in/from directory. This is the mother in which ...
Definition: Watchers.h:107
virtual UInt_t Read()
It reads the content into dedicated structures from the Frame (data part)
Definition: Frame.h:199
LogMessage & warning(LogMessage &)
virtual UInt_t ProcessBlock(ADF::FrameBlock &)
look for a Frame using the Trigger and dispatch it to sustasks
ClassImp(FrameDispatcher)
A Block of Frames.
Definition: FrameBlock.h:43
TFolder * fTopFolder
Top folder in which ae stored all spectra.
Definition: Watchers.h:109
Process a buffer, trigg and dispachs the work to sub-watchers.
virtual void Zero(Option_t *hname="pool", Option_t *binning="")
watch the current frame ... to be overwritten by the watcher
Definition: Watchers.cpp:617
LogMessage & nline(LogMessage &)
virtual void CleanTasks()
overloaded for efficiency reasons. allocation of TIter is see in Shark (macos) as time consuming ...
Definition: Watchers.cpp:841
TStopwatch fTimeControl
Histograms that displays some statistics.
virtual Bool_t SetTrigger(ADF::DFTrigger *)
This is the default trigger for any added watcher.
Base class for a Watcher.
Definition: Watchers.h:60
TDirectory * fDirectory
Objects are in folders. They can be saved/load in/from directory. This is the mother in which this wa...
Definition: Watchers.h:105
virtual UInt_t GetNbInputFrame() const =0
number of input frames that define this trigger
Watcher_T * Add(const Char_t *name, const Char_t *title, ADF::DFTrigger *t=0x0)
allocate a new watcher so that it creates corectly its directory under the dispatcher directory ...
virtual Bool_t Register(DFTrigger *)
To register a trigger.
Definition: FrameIO.cpp:368
const UInt_t aMByte
Definition: BaseBuffer.h:36
LogMessage & info(LogMessage &)
manipulator to modify the LogMessage
virtual void Detach(FrameBlock *in, FrameBlock *out)
Definition: FrameIO.cpp:741
void SetStatus(EStatus stat)
Definition: FrameIO.h:110
virtual void SetProcessMethod(const char *)
To set the current method.
Bool_t MakeDir(TFolder *f, TDirectory *mother_dir, Bool_t do_top=true)
in order to save/load, the structure of the top folders should exists in the root dir ...
Definition: Watchers.cpp:291
virtual Frame * GetInputFrame(UInt_t which=0u)=0
to get back the frames that define this trigger
It defines the interface needed to be a consumer.
S GetSize() const
to get the current position in the stack
Definition: PtrStack.h:110
void Add(T *t)
Add a new pointer on the stack.
Definition: PtrStack.h:97
LogMessage & dolog(LogMessage &)
virtual void ClearMessage()
To clear the current message.
Bool_t IsFired() const
Check if this trigger is in fired state.
Definition: Trigger.h:110
Bool_t IsZombie() const
Check if this trigger is in fired state.
Definition: Trigger.h:114
virtual void Zero(Option_t *hname="pool", Option_t *binning="")
call Zero for all the watchers
Base class for a trigger on a data flow.
Definition: Trigger.h:155
ADF::DFTrigger * fTrigger
trigger associated to this watcher
Definition: Watchers.h:117
T * At(S which) const
Definition: PtrStack.h:90
virtual void Print(std::ostream &out=std::cout) const
Print some informations (statistics)
Definition: FrameIO.cpp:571
virtual void Attach(FrameBlock *in, FrameBlock *out)
Attach a block to this. Rewind called if DoRewind set to true (Default)
Definition: FrameIO.cpp:724
virtual void SetDirectory(TDirectory *mother_dir_of_watcher, TDirectory *mother_dir_tag, Bool_t load_objects=true)
to change the directory in which watcher's objects are stored
Definition: Watchers.cpp:458
virtual ADF::DFTrigger * GetTrigger() const
To know the trigger in which the frame to be watched is embedded.
Definition: Watchers.h:360
virtual Bool_t SetTrigger(ADF::DFTrigger *)
To set the Frames (through a trigger) associated to this watcher.
Definition: Watchers.cpp:829
LogMessage Log
to send messages to the log server
virtual Bool_t IsIndividualFired(UInt_t which=0u) const =0
fine tuning of the trigger current conditions
virtual void SetDirectory(TDirectory *mother_dir_of_watcher, TDirectory *mother_dir_for_tag, Bool_t load_objects=true)
change directories and Load objects if required