53 Bool_t Watcher::fgDeletePool =
false;
55 TList *Watcher::fgListOfWatchers = 0x0;
57 void Watcher::Register(
Watcher *w, Option_t *opt)
65 if ( fgListOfWatchers == 0x0 ) {
67 fgListOfWatchers =
new TList();
68 fgListOfWatchers->SetOwner(
false);
71 if ( option ==
"-" ) {
72 fgListOfWatchers->Remove(w);
74 if ( fgListOfWatchers->GetSize() == 0 ) {
75 delete fgListOfWatchers;
76 fgListOfWatchers = 0x0;
80 fgListOfWatchers->Add(w);
88 Watcher *result_w = 0x0; TString option = opt;
90 if ( fgListOfWatchers == 0x0 ) {
93 TIter next(fgListOfWatchers,kIterBackward);
95 while ( (obj = next()) ) {
96 if ( option ==
"baseclass" && obj->InheritsFrom(classname) ) {
97 result_w =
dynamic_cast<Watcher *
> (obj);
104 if ( option ==
"class" ) {
105 TString
tmp = obj->IsA()->GetName();
106 if ( tmp == classname ) {
107 result_w =
dynamic_cast<Watcher *
> (obj);
121 fgListOfWatchers->Remove(w);
122 fgListOfWatchers->AddFirst(w);
129 fDeletePool(fgDeletePool),
144 if ( gROOT->GetRootFolder()->FindObject(
"//root/GwWatchers") == 0x0 ) {
145 gROOT->GetRootFolder()->AddFolder(
"GwWatchers",
"Folder containing all the objects created by all watchers");
149 (TFolder *)gROOT->GetRootFolder()->FindObject(
"//root/GwWatchers");
150 fTopFolder = topfolder->AddFolder(
"Watcher",
"Default Watcher");
157 fPoolOfObjects.SetOwner(fDeletePool);
163 Watcher::Watcher(
const char *name,
const char *title, TDirectory *mother_watcher_dir, TDirectory *mother_tag_watcher_dir) :
166 fDeletePool(fgDeletePool),
180 if ( gROOT->GetRootFolder()->FindObject(
"//root/GwWatchers") == 0x0 ) {
181 gROOT->GetRootFolder()->AddFolder(
"GwWatchers",
"Folder containing all the objects created by all watchers");
185 (TFolder *)gROOT->GetRootFolder()->FindObject(
"//root/GwWatchers");
186 fTopFolder = topfolder->AddFolder(name,title);
188 fPoolOfObjects.SetOwner(fDeletePool);
193 SetDirectory(mother_watcher_dir, mother_tag_watcher_dir,
false);
199 fPoolOfObjects.SetOwner(kTRUE);
207 TString subfolder = sub; TFolder *result = topfolder, *current = topfolder;
209 if ( subfolder !=
"" ) {
210 TObjArray *
tmp = subfolder.Tokenize(
"/");
211 for (Int_t i = 0; i < tmp->GetEntries(); i++) {
212 if ( current->FindObject(tmp->At(i)->GetName()) == 0x0 ) {
213 current->AddFolder(tmp->At(i)->GetName(), Form(
"%s of %s",tmp->At(i)->GetName(),GetName()) );
215 result = current = (TFolder *)current->FindObject(tmp->At(i)->GetName());
274 TIter next(f->GetListOfFolders());
275 while ( (obj=next()) ) {
277 if ( searched == obj )
280 if ( obj->InheritsFrom(
"TFolder") ) {
281 if (
GetPathOf((TFolder*)obj,searched,path) ) {
282 path.Prepend( Form(
"%s/",obj->GetName()) );
293 TObject *obj; TFolder *folder; TDirectory *current, *top_dir = 0x0, *tmp_dir = 0x0;
295 if ( mother_dir == 0x0 || f == 0x0 )
303 top_dir = mother_dir->GetDirectory(f->GetName());
304 if ( top_dir == 0x0 ) {
309 tmp_dir = mother_dir->mkdir(f->GetName(),f->GetTitle());
310 if ( tmp_dir == 0x0 )
315 else tmp_dir = top_dir;
319 else current = mother_dir;
321 TIter next(f->GetListOfFolders());
322 while ( (obj=next()) ) {
324 if ( !obj->InheritsFrom(
"TFolder") )
328 folder = (TFolder *)obj; tmp_dir = current->GetDirectory(folder->GetName());
329 if ( tmp_dir == 0x0 ) {
330 tmp_dir = current->mkdir(folder->GetName(),folder->GetTitle());
331 if ( tmp_dir == 0x0 )
335 if ( !
MakeDir(folder,tmp_dir,
false) )
343 void Watcher::DirToDir(TDirectory *from, TDirectory *to, TObjArray &thelist, Bool_t load_objects)
348 TObject *obj; TIter next(&thelist);
350 while ( (obj = next()) ) {
351 ROOT::DirAutoAdd_t func = obj->IsA()->GetDirectoryAutoAdd();
377 ROOT::DirAutoAdd_t func = obj->IsA()->GetDirectoryAutoAdd();
389 if ( ! to->TDirectory::FindObject(obj) ) {
390 ROOT::DirAutoAdd_t func = obj->IsA()->GetDirectoryAutoAdd();
401 TDirectory *obj_dir = 0x0;
404 if ( new_obj == 0x0 || root_dir == 0x0 )
411 path.Prepend( Form(
"%s/",
fTopFolder->GetName()) );
412 obj_dir = root_dir->GetDirectory(path.Data());
414 if ( obj_dir == 0x0 ) {
417 Bool_t def = TH1::AddDirectoryStatus();
418 TH1::AddDirectory(
false);
421 TString obj_name = new_obj->GetName(); TObject *obj_in_file = 0x0; TKey *key_in_file; Int_t cycle = 0;
424 TIter it(obj_dir->GetListOfKeys());
426 while ( (key_in_file = static_cast<TKey *>(it())) ) {
427 if ( obj_name == key_in_file->GetName() && new_obj->InheritsFrom(key_in_file->GetClassName()) )
428 if ( key_in_file->GetCycle() > cycle ) {
429 cycle = key_in_file->GetCycle();
432 obj_in_file = key_in_file->ReadObj();
438 obj_in_file->Copy(*new_obj);
440 TH1::AddDirectory(def);
449 if ( new_obj == 0x0 )
453 fPoolOfObjects.AddLast(new_obj);
463 if ( load_objects ) {
464 if ( mother_watcher_dir )
466 if ( mother_tag && mother_tag != mother_watcher_dir )
471 TIter next_pool(&fPoolOfObjects);
472 while ( (obj = next_pool()) ) {
477 TIter next_pool(&fReference);
478 while ( (obj = next_pool()) ) {
536 TString o = opt; TObject *obj; Bool_t save_tagged =
true; UInt_t bytes = 0u;
543 if ( o.Contains(
"!tag")) {
547 o.ReplaceAll(
"!tag",
""); o.ReplaceAll(
" ",
"");
551 TIter next_pool(&fPoolOfObjects);
552 while ( (obj = next_pool()) ) {
554 TString path =
""; TDirectory *dir = 0x0;
556 path.Prepend( Form(
"%s/",
fTopFolder->GetName()) );
558 bytes += dir->WriteTObject(obj);
563 TIter next_tag(&fReference);
564 while ( (obj = next_tag()) ) {
566 TString path =
""; TDirectory *dir = 0x0;
568 path.Prepend( Form(
"%s/",
fTopFolder->GetName()) );
570 bytes += dir->WriteTObject(obj);
578 Bool_t wildcard =
false;
579 if ( o.Contains(
"*") )
581 TRegexp rexp(Form(
"%s",o.Data()),wildcard);
583 if ( rexp.Status() == TRegexp::kOK ) {
584 TIter next_pool(&fPoolOfObjects);
585 while ( (obj = next_pool()) ) {
587 TString path =
""; TDirectory *dir = 0x0;
589 path.Prepend( Form(
"%s/",
fTopFolder->GetName()) );
591 bytes += dir->WriteTObject(obj);
594 TIter next_tag(&fTagged);
595 while ( (obj = next_tag()) ) {
597 TString path =
""; TDirectory *dir = 0x0;
599 path.Prepend( Form(
"%s/",
fTopFolder->GetName()) );
601 bytes += dir->WriteTObject(obj);
607 TIter loopontask(GetListOfTasks());
609 while ( ((watcher=(
Watcher*)loopontask())) ) {
687 TString o1 = opt1; std::string o2 = opt2;
688 Bool_t wildcard =
false;
689 if ( o1.Contains(
"*") )
691 TRegexp rexp(Form(
"%s",opt1),wildcard);
693 Bool_t is_bin =
false;
694 Int_t binx, biny, binz; Stat_t xmin, xmax, ymin, ymax,
zmin, zmax;
704 std::istringstream decode(o2);
708 decode >> binx >> xmin >> xmax;
712 decode >> biny >> ymin >> ymax;
713 if ( !decode.good() ) {
718 decode >> binz >> zmin >> zmax;
719 if ( !decode.good() ) {
726 if ( o1.Contains(
"pool") )
731 if ( ( o1 ==
"" ) || (rexp.Status() != TRegexp::kOK) ) {
733 rexp =
"AbsolutelyNotAFilter";
738 for (Int_t i = 0; i < fPoolOfObjects.GetEntries(); i++) {
739 TH1 *h = (TH1 *)fPoolOfObjects.At(i);
741 fLog <<
info <<
" Checking " << h->GetName() <<
" " ;
743 TString hname = h->GetName();
745 if ( hname.Contains(rexp) ) {
747 fLog <<
info <<
" ==> Reset " << hname;
751 if ( is_bin && h->GetDimension() == 1 )
752 h->SetBins(binx,xmin,xmax);
753 if ( is_bin && h->GetDimension() == 2 )
754 h->SetBins(binx,xmin,xmax,biny,ymin,ymax);
755 if ( is_bin && h->GetDimension() == 3 )
756 h->SetBins(binx,xmin,xmax,biny,ymin,ymax,binz,zmin,zmax);
762 if ( o1.Contains(
"tag") )
764 for (Int_t i = 0; i < fReference.GetEntries(); i++) {
765 TH1 *h = (TH1 *)fReference.At(i);
767 fLog <<
info <<
" Checking " << h->GetName() <<
" " ;
769 TString hname = h->GetName();
771 if ( hname.Contains(rexp) ) {
776 if ( is_bin && h->GetDimension() == 1 )
777 h->SetBins(binx,xmin,xmax);
778 if ( is_bin && h->GetDimension() == 2 )
779 h->SetBins(binx,xmin,xmax,biny,ymin,ymax);
780 if ( is_bin && h->GetDimension() == 3 )
781 h->SetBins(binx,xmin,xmax,biny,ymin,ymax,binz,zmin,zmax);
794 Bool_t ok =
false; sfp = 0x0;
816 if ( ftype.Contains(type) ) {
822 { ok =
true; sfp = ffind; }
831 if ( trigger == 0x0 )
847 fHasExecuted = kFALSE;
851 TTask *task; TObjLink *lnk = fTasks->FirstLink();
853 task = (TTask *)lnk->GetObject();
867 TTask *task; TObjLink *lnk = GetListOfTasks()->FirstLink();
869 task = (TTask *)lnk->GetObject();
873 if ( !task->IsActive() ) {
904 if ( fTagged.FindObject(o) )
907 TString oname = o->GetName();
911 TObject *oref = o->Clone(oname.Data());
915 if ( oref->InheritsFrom(
"TAttFill") ) {
916 TAttFill *att =
dynamic_cast<TAttFill *
>(oref);
918 att->SetFillColor(kRed);
919 att->SetFillStyle(3004);
922 if ( oref->InheritsFrom(
"TAttLine") ) {
923 TAttLine *att =
dynamic_cast<TAttLine *
>(oref);
925 att->SetLineColor(kRed);
926 att->SetLineStyle(2);
940 fTagged.Add(o); fReference.Add(oref);
945 Double_t valtest_i = 0.0, valtest_t = 0.0; UInt_t nbtest = 0u; TString option(opt);
947 TObject *obj, *objref;
948 for (Int_t i = 0u; i < fTagged.GetEntries(); i++ ) {
950 objref = fReference.At(i);
952 if ( obj->InheritsFrom(
"TH1") ) {
955 TH1 *h_ref = (TH1 *)objref;
957 Double_t h_ref_i = h_ref->Integral();
958 Double_t h_i = h->Integral();
960 if ( h_ref_i > 0.0 && h_i > 0.0 ) {
964 valtest_i = h_ref->KolmogorovTest(h,opt);
965 valtest_t += valtest_i;
967 if ( option.Contains(
"v") )
968 printf(
"KolmogorovTest for %s : %f \n",h->GetName(),valtest_i);
971 h_ref->Scale( h_i / h_ref_i );
981 if ( option.Contains(
"v") )
982 printf(
"KolmogorovTest in WatcherWithTag::TestTag : %f \n",valtest_t);
984 return (valtest_t > 0.01);
989 TObject *obj, *objref;
990 for (Int_t i = 0u; i < fTagged.GetEntries(); i++ ) {
992 objref = fReference.At(i);
994 if ( obj->InheritsFrom(
"TH1") ) {
996 TH1 *h_ref = (TH1 *)objref;
998 h_ref->Reset(); h_ref->Add(h);
1005 if ( fTagged.GetEntries() == 0 )
1011 if ( fTagged.GetEntries() > 1 ) {
1013 Int_t nx = -1, ny = -1;
1015 TRegexp expected(
"tag*x*",
true);
1016 if ( opt.Contains(expected) ) {
1017 Ssiz_t tag = opt.First(
"tag");
1018 Ssiz_t x = opt.First(
"x");
1019 TString val_nx = opt(tag+3,x-tag);
1020 TString val_ny = opt(x+1,2);
1022 if ( val_nx.IsAlnum() && val_ny.IsAlnum() ) {
1028 if ( nx == -1 || ny == -1 ) {
1029 if ( fTagged.GetEntries() == 2 ) {
1034 for (Int_t i = 1u; i < fTagged.GetEntries(); i++ )
1035 if ( i*i > fTagged.GetEntries() ) {
1043 TObject *obj, *objref;
1044 for (Int_t i = 0u; i < fTagged.GetEntries(); i++ ) {
1046 obj = fTagged.At(i);
1047 objref = fReference.At(i);
1052 objref->Draw(
"same");
1059 TString option = o, cname; Bool_t is_ogl = option.Contains(
"OGL", TString::kIgnoreCase);
1061 option.ReplaceAll(
"OGL",
"");
1062 option.ReplaceAll(
" ",
"_");
1069 if ( !option.IsNull() ) {
1076 TCanvas *cnew = 0x0;
1077 TBrowser *br = (TBrowser *)gROOT->GetListOfBrowsers()->At(0);
1078 if ( br && is_ogl ==
false ) {
1081 cmd = Form(
"new TCanvas(\"%s\",\"%s\")",cname.Data(),cname.Data());
1083 br->ExecPlugin(cname.Data(), 0, cmd.Data()) ;
1084 cnew = (TCanvas *)gROOT->GetListOfCanvases()->FindObject(cname.Data());
1086 if ( cnew == 0x0 ) {
1087 gStyle->SetCanvasPreferGL(is_ogl);
1088 cnew =
new TCanvas(cname.Data(),cname.Data(),700,500);
1089 gStyle->SetCanvasPreferGL(
false);
1097 TString option = o, cname;
1099 option.ReplaceAll(
"OGL",
"");
1100 option.ReplaceAll(
" ",
"_");
1104 cname =
fDirectory->GetMotherDir()->GetName();
1107 if ( !option.IsNull() ) {
1113 if ( gROOT->GetListOfCanvases()->FindObject(cname.Data()) )
1130 Watcher(name,title,mother_dir_of_watcher,mother_dir_tag)
1425 WatcherWithTag(
"LoopControl",
"To control the main loop",dir_watchers,dir_tags),
1430 fMotherDirWatcher(dir_watchers),
1431 fMotherDirTag(dir_tags),
1432 fTimer ( new TTimer() ),
1446 fLoopTime = MakeTH1<TH1F>(
"LoopTime",
"Time to execute one loop [ms]",1000,0,0.01);
1450 fTimer->Connect(
"Timeout()",
"Gw::LoopControl",
this,
"AutoSave()");
1455 fTimer->Disconnect(
"Timeout()",
this,
"AutoSave()");
1461 TIter next(fMother->GetListOfTasks());
1463 while ( (task = (TTask *)next()) ) {
1473 void LoopControl::Save(
const Char_t *main_file,
const Char_t *tag_file,
const Char_t *option, Int_t autotime)
1476 TString dir_w_name = main_file, dir_tag_name = tag_file; TDirectory *dir_w = fMotherDirWatcher, *dir_tag = fMotherDirTag;
1477 TString opt_w = option, opt_tag = option;
1479 Bool_t do_delete_w =
false, do_delete_tag =
false; UInt_t bytes = 0u;
1482 if ( dir_w_name !=
"" ) {
1484 if ( dir_w_name ==
"0" ) {
1493 if ( opt_w.Contains(
"ch") ) {
1497 TString
tmp = Form(
"%s%03d.root",main_file,i);
1498 if ( gSystem->AccessPathName(tmp.Data()) ) {
1506 if ( ! dir_w_name.Contains(
".root") )
1507 dir_w_name +=
".root";
1511 if ( dir_w_name != dir_w->GetName() ) {
1513 dir_w =
new TFile(dir_w_name.Data(),
"UPDATE");
1521 if ( dir_tag_name !=
"" ) {
1522 if ( dir_tag_name ==
"+" ) {
1526 if ( dir_tag_name ==
"0" ) {
1531 if ( opt_tag ==
"" )
1535 if ( opt_tag.Contains(
"ch") ) {
1539 TString
tmp = Form(
"%s%03d.root",tag_file,i);
1540 if ( gSystem->AccessPathName(tmp.Data()) ) {
1548 if ( ! dir_tag_name.Contains(
".root") )
1549 dir_tag_name +=
".root";
1553 if ( dir_tag_name != dir_tag->GetName() ) {
1555 dir_tag =
new TFile(dir_tag_name.Data(),
"UPDATE");
1569 Short_t action0 = 1, action1 = 0, action2 = 0, action3 = 0, action4 = 0;
1571 if ( opt_w.Contains(
";(") ) {
1572 action0 = action1 = action3 = 1;
1574 if ( opt_w.Contains(
"(;") ) {
1575 action0 = 0; action1 = action2 = action3 = 1;
1576 if ( opt_w.Contains(
")") ) {
1582 action0 = action1 = action2 = action3 = action4 = 0;
1587 TIter next(fMother->GetListOfTasks());
1589 while ( ((task=(TTask*)next())) ) {
1596 std::cout <<
" Snapshot in " << dir_w->GetName() <<
" and " << dir_tag <<
std::endl ;
1597 std::cout <<
" ==> " << bytes <<
" bytes written " <<
std::endl;
1601 TIter next(fMother->GetListOfTasks());
1603 while ( ((task=(TTask*)next())) ) {
1613 TIter next(fMother->GetListOfTasks());
1615 while ( ((task=(TTask*)next())) ) {
1622 std::cout <<
" Snapshot in " << dir_w->GetName() <<
std::endl;
1623 std::cout <<
" ==> " << bytes <<
" bytes written " <<
std::endl;
1626 fMotherDirWatcher = dir_w ; fMotherDirTag = dir_tag ;
1628 if ( action4 > 0 ) {
1630 TIter next(fMother->GetListOfTasks());
1632 while ( ((task=(TTask*)next())) ) {
1635 watcher->
SetDirectory(fMotherDirWatcher,fMotherDirTag,
false);
1705 if ( do_delete_w ) {
1707 if ( do_delete_tag && dir_w != dir_tag )
1711 if ( do_delete_tag ) {
1717 if ( opt_w.Contains(
"{") && opt_w.Contains(
"}") ) {
1718 if ( opt_w.Index(
"{") < opt_w.Index(
"}") ) {
1720 if ( opt_w.Contains(
":") && (opt_w.Index(
"{")< opt_w.Index(
":")) && (opt_w.Index(
"}") > opt_w.Index(
":")) ) {
1721 opt1 = opt_w(opt_w.Index(
"{")+1,opt_w.Index(
":")-opt_w.Index(
"{")-1);
1722 opt2 = opt_w(opt_w.Index(
":")+1,opt_w.Index(
"}")-opt_w.Index(
":")-1);
1725 opt1 = opt_w(opt_w.Index(
"{")+1,opt_w.Index(
"}")-opt_w.Index(
"{")-1);
1728 std::cout <<
" Zero called with " << opt1 <<
" " << opt2 <<
std::endl ;
1729 Zero(opt1.Data(),opt2.Data());
1734 fLastSaveArg1 = main_file;
1735 fLastSaveArg2 = tag_file;
1736 fLastSaveArg3 = option;
1739 if ( autotime > 0 ) {
1740 fTimer->Start(autotime*1000, kFALSE);
1746 std::cout <<
" AUTOSAVE CALLED IN LoopControl with " << fLastSaveArg1 <<
" " << fLastSaveArg2 <<
" " << fLastSaveArg3 <<
std::endl ;
1748 Save(fLastSaveArg1.Data(), fLastSaveArg2.Data(), fLastSaveArg3.Data(), fLastSaveArg4);
1753 fTimer->Stop(); fLastSaveArg4 = 0;
1756 if ( autotime > 0 ) {
1757 fTimer->Start(autotime*1000, kFALSE);
1759 else { std::cout <<
" AUTOSAVE WITH " << fLastSaveArg1 <<
" " << fLastSaveArg2 <<
" " << fLastSaveArg3 <<
" Stopped " <<
std::endl ; }
1789 fTimeControl.Stop(); Double_t current_time_s = fTimeControl.RealTime();
1800 if ( current_time_s < fDelta ) {
1801 fLoopTime->Fill(-1);
1805 fLoopTime->Fill(current_time_s/1000.);
1807 fTimeControl.Start(kTRUE);
1826 TString opt = option;
1828 if ( opt.Contains(
"l") ) {
1840 gSystem->ProcessEvents();
1843 { fIsLoop =
false; }
1848 Bool_t LoopOnTasks::HandleTimer(TTimer* )
1850 TTask::ExecuteTask(GetTitle());
1858 fTimer->SetObject(
this); SetTitle(option); fTimer->Start(20, kTRUE);
1870 if ( active ==
false && fIsLoop ) {
void Pass()
force fHasExecuted (recursively) to true
printf("******************************************************************** \n")
virtual void Add(TTask *)
add only Watchers to the list of tasks to avoid problems.
void DirToDir(TDirectory *, TDirectory *, TObjArray &, Bool_t load_objects=true)
utilities to add/move/remove objects from one dir to another one
virtual Frame * GetFrame() const
TCanvas * NewCanvas(Option_t *)
It creates a new embedded canvas.
Bool_t GetPathOf(TFolder *f, TObject *searched, TString &path)
in a folder look for the path to an elmement that is not a folder
TDirectory * fTagDirectory
Tagged Objects are in folders. They can be saved/load in/from directory. This is the mother in which ...
virtual void SetActive(Bool_t active=kTRUE)
To set this active/inactive.
virtual void DoCanvas(TCanvas *, Option_t *)
To be overwritten by real implementation if a canvas is produced.
TFolder * GetSubFolder(TFolder *topfolder, const Char_t *sub="")
for a new histogram, it returns the folder it belongs to. It creates sub and all intermediates if req...
virtual void Exec(Option_t *option)
the main loop
Bool_t GetFromTrigger(ADF::DFTrigger *, const char *, ADF::SharedFP *&)
Extract from the trigger and given frame pointer (usefull for other watchers)
virtual SharedFP * GetInputSharedFP(UInt_t which=0u)=0
to get back the Shared pointer that define this trigger
static Watcher * GetLastRegistered(const Char_t *classname, Option_t *opt="baseclass")
to retrieve the last registered watcher of one type.
TObject * AddToPool(TObject *ob)
facility for other watchers: keep a list of all histograms (objects) for global operations ...
TFolder * fTopFolder
Top folder in which ae stored all spectra.
virtual void Zero(Option_t *hname="pool", Option_t *binning="")
watch the current frame ... to be overwritten by the watcher
LogMessage & nline(LogMessage &)
virtual void CleanTasks()
overloaded for efficiency reasons. allocation of TIter is see in Shark (macos) as time consuming ...
void RemoveFromDir(TObject *, TDirectory *)
Base class for a Watcher.
TDirectory * fDirectory
Objects are in folders. They can be saved/load in/from directory. This is the mother in which this wa...
void ShowCanvas(Option_t *option="")
Display some results.
void DrawTag(TCanvas *, Option_t *)
To display tagged histograms and their reference.
virtual UInt_t GetNbInputFrame() const =0
number of input frames that define this trigger
void AutoSave()
Auto save in case of timer set. To stop timer, use SetAutoTime(0)
LogMessage & info(LogMessage &)
manipulator to modify the LogMessage
virtual Bool_t TestTag(Option_t *opt)
Compare the current spectra with the tagged ones using Kolmogorov test.
void SetAutoTime(Int_t autotime=0)
change time to autosave
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 ...
LogMessage & dolog(LogMessage &)
static void SetFirst(Watcher *)
move a watcher on top of the list
WatcherWithTag()
list of tagged histograms
virtual UInt_t Snapshot(Option_t *="*")
change kind of Watcher
virtual void Tag(Option_t *opt="")
Tag the current watcher.
void AddToDir(TObject *, TDirectory *)
void TagOn(TObject *)
Add this histogram to the list of tagged histograms.
Bool_t IsZombie() const
Check if this trigger is in fired state.
virtual void Abort()
Abort looping if started.
Base class for a trigger on a data flow.
ADF::LogMessage & endl(ADF::LogMessage &log)
ADF::DFTrigger * fTrigger
trigger associated to this watcher
To start a loop on tasks.
LoopControl(TTask *, TDirectory *, TDirectory *)
virtual void Exec(Option_t *option)
Display some results.
virtual void DoCanvas(TCanvas *, Option_t *)
To be overwritten by real implementation if a canvas is produced.
virtual void SetProcessMethod(const char *)
To set the current method.
void LoadObject(TObject *new_obj, TDirectory *root_dir)
to specify what kind of watcher
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
virtual ADF::DFTrigger * GetTrigger() const
To know the trigger in which the frame to be watched is embedded.
virtual Bool_t SetTrigger(ADF::DFTrigger *)
To set the Frames (through a trigger) associated to this watcher.
const std::string & GetItemName() const
void Save(const Char_t *main, const Char_t *tag, const Char_t *option, Int_t autotime)
Save the spectra in files.
virtual void ExecuteTask(Option_t *option="l")
virtual void Zero(Option_t *hname="pool", Option_t *binning="")
call Zero for all the watchers
const FactoryItem & GetSignature() const
Signature of that frame.