GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
GANILLoadWatchers.C
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (c) IPNL, IN2P3, CNRS *
3  * Contibutor(s) : *
4  * Jeremie Dudouet dudouet(AT)ipnl.in2p3.fr [2014] *
5  * Olivier Stezowski stezow(AT)ipnl.in2p3.fr [2014] *
6  * *
7  * This program is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation; either version 2 of the License, or *
10  * (at your option) any later version. *
11  * *
12  * This program is distributed in the hope that it will be useful, *
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
15  * GNU General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU General Public License *
18  * along with this program; if not, write to the *
19  * Free Software Foundation, Inc., *
20  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
21  ***************************************************************************/
22 
24 void LoadClass(TString cpp_path);
25 void AddInclude(TString what_directory);
26 void SetBasicMacros(TString what_file, TString what_sub_directory);
27 void BeginLoadWatchers();
28 void PreLoad();
29 void LoadVisuWatchers();
30 void LoadWatchers_AGATA();
33 void LoadSpectraViewer();
34 void EndLoadWatchers();
35 void BuildFolders();
36 void CleanWatchers();
37 void CleanDir(TString Dir);
38 
39 // some globals protected by a namespace
40 namespace __LoadWatchers__ {
41 // used for subdirectories containing campaign related [in Default and Macros]
42 TString CAMPAIGN = "GANIL";
43 
44 // to force compilation / debugging @ the ACLIC level
45 TString CompOpt = "";
46 // just a usefull String
47 TString tmp;
48 // path to agapro
49 TString AGAPRO;
50 // Has GANIL: tested in BeginWatchers, used by other methods
51 Bool_t HAS_GANIL = false; TString MFMDIR(""), VAMOSDIR(""), GRUDIR("");
52 
53 Char_t DefaultW[100]; Char_t MyW[100]; Char_t AncW[100]; Char_t WarningW[100]; Char_t EndColor[100];
54 
55 }
56 using namespace __LoadWatchers__ ;
57 
59 
68 void GANILLoadWatchers(const Char_t *comp_opt = "g", const Char_t *path_to_agapro = "")
69 {
70 // // to modify to Aclic compilation's options + to force re-compilation, g for debugging
71 // CompOpt = comp_opt;
72 
73 // // keep path to agapro to set up WatcherConfig.h so that is knows AGAPRO
74 // AGAPRO = path_to_agapro;
75 
77  PreLoad();
83 
85 }
86 
88 void LoadClass(TString cpp_path)
89 {
90  if(!gSystem->IsFileInIncludePath(cpp_path))
91  {
92  cout<<cpp_path<<" not found, class not loaded."<<endl;
93  return;
94  }
95  else
96  {
97  TString CompileLine = ".L " + cpp_path + Form("+%s",CompOpt.Data());
98  gROOT->ProcessLine(CompileLine.Data());
99  }
100 }
101 
102 // add a directory containing includes
103 void AddInclude(TString what_directory)
104 {
105  if(!what_directory.BeginsWith("/"))
106  {
107  TString CurrentDir = gSystem->pwd();
108  CurrentDir += "/";
109  what_directory.Prepend(CurrentDir);
110  }
111  tmp = what_directory; printf("{Conf} Add %s to the include path \n",tmp.Data());
112  tmp.Prepend(" .include ");
113  gROOT->ProcessLine(tmp.Data());
114 }
115 
117 void SetBasicMacros(TString what_file, TString what_sub_directory)
118 {
119  if ( gSystem->AccessPathName( what_file.Data() ) ) { // does not exist
120  cout << "{Conf} A standard " << what_file << " is installed from " << what_sub_directory << "/" << CAMPAIGN << endl;
121  gSystem->CopyFile(Form("%s/%s/%s",what_sub_directory.Data(),CAMPAIGN.Data(),what_file.Data()),what_file.Data());
122  }
123 
124  if(what_file.EndsWith(".sh"))
125  gSystem->Exec(Form("chmod u+x %s",what_file.Data()));
126 }
127 
128 // called before loading any Watchers
129 void PreLoad()
130 {
131  sprintf(DefaultW," \033[1;34m [*] "); sprintf(MyW," \033[1;32m [+] "); sprintf(WarningW," \033[1;31m [!] "); sprintf(AncW," \033[1;35m [+] "); sprintf(EndColor,"\033[0m");
132 
133  AddInclude("Macros");
134  LoadClass("Macros/WatchersUtilities.C");
135  gROOT->ProcessLine("WatchersUtilities()");
136 
137  LoadClass("Macros/EmulatorControl.C");
138 
140  AddInclude("Macros/Visu/");
141  LoadClass("Macros/Visu/LoupeOnPad.cpp");
142 }
143 
145 {
146  //Visu
147  LoadClass("Macros/Visu/WatchersTools.cpp");
148 }
149 
151 {
152  AddInclude("./Macros/SpectraViewer/");
153 
154  AddInclude("Macros/SpectraViewer/GWRecal");
155  LoadClass("Macros/SpectraViewer/GWRecal/FitSpek.cpp");
156  LoadClass("Macros/SpectraViewer/GWRecal/ReadSpek.cpp");
157  LoadClass("Macros/SpectraViewer/GWRecal/RecalEnergy.cpp");
158 
159  LoadClass("Macros/SpectraViewer/FitSpectra.cpp");
160  LoadClass("Macros/SpectraViewer/FitFunctions.cpp");
161  LoadClass("Macros/SpectraViewer/SpectraViewerWatcher.cpp");
162  LoadClass("Macros/SpectraViewer/BaselineWatcher.cpp");
163  LoadClass("Macros/SpectraViewer/RawAmpWatcher.cpp");
164  LoadClass("Macros/SpectraViewer/SignalWatcher.cpp");
165 
166  LoadClass("Macros/SpectraViewer/SpecViewer.C");
167 }
168 
171 {
172  // ---> GammaWare PART /////////////////////////
173  printf("******************************************************************** \n") ;
174  printf(" Configure/Compile/Load Watcher for the GANIL phase \n") ;
175  printf("******************************************************************** \n") ;
176 
177  // to add to ROOT the Gw path to look for macros
178  TString tmp, macroPATH;
179 
180  macroPATH = gROOT->GetMacroPath(); tmp = Gw::Env::GetPath("MacrosPath");
181  if ( macroPATH.Contains(tmp.Data()) == false ) {
182  printf("{Conf} Add %s to the macros path \n",tmp.Data());
183  tmp += ":";
184  macroPATH.Prepend(tmp.Data()); gROOT->SetMacroPath(macroPATH.Data());
185  }
186 
187  // add GammaWare include path to ROOT for compilation
188  AddInclude(Gw::Env::GetPath("IncludePath"));
189 
190  // load the different Gw libraries needed
191  gSystem->Load("libGWCORE.so");
192  gSystem->Load("libGWADF.so");
193  gSystem->Load("libGWADFE.so");
194  gSystem->Load("libGWTOOLS.so");
195  gSystem->Load("libGWPHYSICS.so");
196 
197  if ( AGAPRO.Contains("/") ) {
198 
199  AGAPRO.Append("/include"); printf("{Conf} Add path to AGAPRO includes [%s] to the include path \n",AGAPRO.Data());
200  AGAPRO.Prepend(" .include ");
201  gROOT->ProcessLine(AGAPRO.Data());
202 
203  gSystem->Load("libAgaProCommon.so");
204  gSystem->Load("libCrystalProducer.so");
205  gSystem->Load("libPreprocessingFilter.so");
206  gSystem->Load("libTrackingFilter.so");
207  }
208 
209  // some includes fro watchers
210  gSystem->MakeDirectory("./MyWatchers");
211  gSystem->MakeDirectory("./Out");
212 
213  AddInclude( Form("DefaultWatchers/%s",CAMPAIGN.Data()) );
214  AddInclude("./MyWatchers");
215  AddInclude("./Macros");
216 
217  // depending on ancillary it set WatchersConfig.h
218  MFMDIR = gSystem->Getenv("MFMLIB"); VAMOSDIR = gSystem->Getenv("VAMOSLIB"); GRUDIR = gSystem->Getenv("GRULIB");
219 
220  std::ofstream fdefs("WatchersConfigNew.h",ios::out | ios::trunc);
221  if ( fdefs.is_open() ) {
222 
223  // AGAPRO Part
224  if ( AGAPRO.Contains("/") ) {
225  fdefs << "#define HAS_AGAPROCONFIG " << std::endl;
226  }
227 
228  // GANIL PART
229  fdefs << "// enable / disable GANIL " << std::endl;
230  if ( MFMDIR != "" && !gSystem->AccessPathName(Form("%s/lib/libMFM.so",MFMDIR.Data())) ) { // GANIL/MFM
231  fdefs << "#define HAS_GANIL " << std::endl; fdefs << "#define WITH_MFM " << std::endl; HAS_GANIL = true;
232 
233  tmp = MFMDIR; tmp+= "/include"; printf("{Conf} Add %s to the include path \n",tmp.Data());
234  tmp.Prepend(" .include ");
235  gROOT->ProcessLine(tmp.Data());
236 
237 
238  if ( VAMOSDIR != ""
239  && !gSystem->AccessPathName(Form("%s/lib/libVamos.so",VAMOSDIR.Data()))
240  && !gSystem->AccessPathName(Form("%s/lib/libGWVamos.so",VAMOSDIR.Data()))
241  // && !gSystem->AccessPathName(Form("%s/lib/libVamos.so",isganil_mfm.Data()))
242  ) {
243  fdefs << "#define HAS_VAMOS " << std::endl;
244 
245  tmp = VAMOSDIR; tmp+= "/include"; printf("{Conf} Add %s to the include path \n",tmp.Data());
246  tmp.Prepend(" .include ");
247  if(VAMOSDIR!=MFMDIR) gROOT->ProcessLine(tmp.Data());
248  }
249  else VAMOSDIR = "";
250 
251  if ( GRUDIR != "" ) {
252  fdefs << "#define HAS_GRU " << std::endl;
253  }
254  else GRUDIR = "";
255  }
256  else MFMDIR = "";
257  }
258  fdefs.close();
259 
260  std::ifstream fich2("WatchersConfig.h");
261  if(!fich2) system("mv WatchersConfigNew.h WatchersConfig.h");
262  else if(system("diff WatchersConfigNew.h WatchersConfig.h")) system("mv WatchersConfigNew.h WatchersConfig.h");
263  else system("rm WatchersConfigNew.h");
264 
265  // basic setup not defined, take the default from Macros/CAMPAIGN
266  SetBasicMacros("SetupWatchers.C","Macros");
267  SetBasicMacros("OnlineWatchersLLP.C","Macros");
268  SetBasicMacros("OnlineWatchersGLP.C","Macros");
269  SetBasicMacros("OfflineWatchers.C","Macros");
270  SetBasicMacros("ADF_to_Tree.C","Macros");
271  //
272  SetBasicMacros("SpyLLP.C","Macros");
273  SetBasicMacros("SpyGLP.C","Macros");
274  SetBasicMacros("RunOffline.C","Macros");
275  SetBasicMacros("RunADFToTree.C","Macros");
276  SetBasicMacros("StartBatch.sh","Macros");
277  SetBasicMacros("StartOfflineWatchers.sh","Macros");
278 }
279 
282 {
283  std::cout << MyW << " User's Watchers " << EndColor << std::endl;
284  std::cout << "|INFO| Place to add personnal Watchers" << std::endl;
285  std::cout << "|INFO| 1 - Put your files (Ex: MyW.h and MyW.C) in the MyWatchers Directory " << std::endl;
286  std::cout << "|INFO| 2 - Add LoadClass(\"MyWatchers/MyW.C\") just under this line is this GANILLoadWatchers.C Macro and re-start" << std::endl;
287  std::cout << MyW << " User's Watchers DONE " << EndColor << std::endl;
288 }
289 
290 // Watchers specific to AGATA
292 {
293  std::cout << DefaultW << " AGATA Default Watchers " << EndColor << std::endl;
294 
295  LoadClass(Form("DefaultWatchers/%s/CanvasVisu.C",CAMPAIGN.Data()));
296  LoadClass(Form("DefaultWatchers/%s/ADFWatchers.C",CAMPAIGN.Data()));
297  LoadClass(Form("DefaultWatchers/%s/KeyWatchers.C",CAMPAIGN.Data()));
298  LoadClass(Form("DefaultWatchers/%s/WatcherClient.C",CAMPAIGN.Data()));
299  LoadClass(Form("DefaultWatchers/%s/MetaWatchers.C",CAMPAIGN.Data()));
300  LoadClass(Form("DefaultWatchers/%s/PSAWatchers.C",CAMPAIGN.Data()));
301  LoadClass(Form("DefaultWatchers/%s/TrackedWatchers.C",CAMPAIGN.Data()));
302  LoadClass(Form("DefaultWatchers/%s/EventPSAWatchers.C",CAMPAIGN.Data()));
303  LoadClass(Form("DefaultWatchers/%s/CrystalWatchers.C",CAMPAIGN.Data()));
304  LoadClass(Form("DefaultWatchers/%s/EventWatchers.C",CAMPAIGN.Data()));
305 
306  // tree
307  LoadClass( Form("DefaultWatchers/%s/ADTree.C",CAMPAIGN.Data()) );
308 
309  std::cout << DefaultW << " AGATA Default Watchers DONE " << EndColor << std::endl;
310 }
311 
312 // Watchers specific to GANIL
314 {
315  std::cout << AncW << " Watchers for ancillaries " << EndColor << std::endl;
316 
317  if ( HAS_GANIL == false ) {
318  std::cout << AncW << " NO Watchers for ancillaries, install first MFM [MANDATORY] VAMOS / GRU ... to get some " << EndColor << std::endl;
319  return;
320  }
321  if ( MFMDIR != "" ) {
322  cout << "[Load] libMFM from " << MFMDIR << endl;
323  gSystem->Load( "libMFM.so" );
324 
325 // tmp = MFMDIR; tmp+= "/include"; printf("{Conf} Add %s to the include path \n",tmp.Data());
326 // tmp.Prepend(" .include ");
327 // gROOT->ProcessLine(tmp.Data());
328  }
329  if ( VAMOSDIR != "" ) {
330  cout << "[Load] libVamos.so and libGWVamos.so from " << VAMOSDIR << endl;
331  gSystem->Load( "libVamos.so" );
332  gSystem->Load( "libGWVamos.so" );
333 
334 // tmp = VAMOSDIR; tmp+= "/include"; printf("{Conf} Add %s to the include path \n",tmp.Data());
335 // tmp.Prepend(" .include ");
336 // gROOT->ProcessLine(tmp.Data());
337 
338  tmp = gSystem->Getenv("ANALYSIS_AGATA");
339  if ( !(tmp == "") ) {
340  printf("{Conf} ANALYSIS_AGATA found to be %s \n",tmp.Data());
341  }
342  else {
343  printf("{Conf} Set ANALYSIS_AGATA to ./ConfVAMOS \n"); gSystem->Setenv("ANALYSIS_AGATA","./ConfVAMOS");
344  }
345  }
346  if ( GRUDIR != "" ) {
347  cout << "- Load libGRU.so from " << GRUDIR.Data() << endl;
348  gSystem->Load( Form("%s/lib/libGRU.so",GRUDIR.Data()) );
349  tmp = GRUDIR; tmp+= "/include"; printf("- Add %s to the include path \n",tmp.Data());
350  tmp.Prepend(" .include ");
351  gROOT->ProcessLine(tmp.Data());
352  }
353 
354  // to be changed in DefaultGANIL
355  LoadClass(Form("DefaultWatchers/%s/GANILWatchers.C",CAMPAIGN.Data()));
356  std::cout << AncW << " Watchers for ancillaries DONE" << EndColor << std::endl;
357 }
358 
359 void CheckConf(TString what_conf)
360 {
361  if ( what_conf == "ADF.conf" ) {
362  //
363  TString adf_path = gSystem->Getenv("ADF_CONF_PATH");
364  //
365  if ( adf_path == "" ) { // the ADF_CONF_PATH is not set, try the current directory. If no ADF.conf file, load a default from server
366  Bool_t ok = false;
367  //
368  if ( !gSystem->AccessPathName("./ADF.conf") ) { // current directory
369  ok = true;
370  }
371  else {
372  // try and downlaod into a temporary directory
373  TString tmp_dir = gSystem->TempDirectory();
374  std::cout << WarningW << "Cannot find ADF.conf ... try and install a default one from internet, make sure it fullfils your needs " << EndColor << std::endl;
375  gSystem->Exec(Form("svn --quiet checkout svn+ssh://anonsvn@anonsvn.in2p3.fr/agata/conf/watchers/ %s",tmp_dir.Data()));
376  if ( gSystem->CopyFile(Form("%s/ADF.conf",tmp_dir.Data()),"./ADF.conf") == 0 )
377  ok = true;
378  }
379  if ( ok ) { // does not exist in the current directory
380  adf_path = gSystem->Getenv("PWD");
381 
382  }
383  }
384  if ( adf_path == "" ) {
385  std::cout << WarningW << " ADF_CONF_PATH not set !" << EndColor << std::endl;
386  }
387  else {
388  gSystem->Setenv("ADF_CONF_PATH",adf_path.Data());
389  printf("\n\t{Conf}\tADF_CONF_PATH has been set to %s \n\n",adf_path.Data());
390  }
391  }
392  if ( what_conf == "CrystalPositionLookUpTable.dat" ) {
393  //
394  Bool_t ok = false;
395  if ( !gSystem->AccessPathName("./CrystalPositionLookUpTable.dat") ) { // current directory
396  ok = true;
397  }
398  else {
399  // try and downlaod into a temporary directory
400  TString tmp_dir = gSystem->TempDirectory();
401  gSystem->Exec(Form("svn --quiet checkout svn+ssh://anonsvn@anonsvn.in2p3.fr/agata/conf/watchers/ %s",tmp_dir.Data()));
402  if ( gSystem->CopyFile(Form("%s/CrystalPositionsLookUpTableGANIL.dat",tmp_dir.Data()),"./CrystalPositionLookUpTable.dat") == 0 ) {
403  std::cout << WarningW << "CrystalPositionLookUpTable.dat was not there ... a default one from internet has been installed, make sure it fullfils your needs! " << EndColor << std::endl;;
404  ok = true;
405  }
406  }
407  if ( !ok ) {
408  std::cout << WarningW << "Mapping of AGATA Ge Crystal, CrystalPositionLookUpTable.dat, not found !" << EndColor << std::endl;
409  }
410  }
411 
412  if ( (what_conf == "TimeChecks.conf") && gSystem->AccessPathName( what_conf.Data() ) ) { // does not exist
413  cout << "{Conf} A standard " << what_conf << " is installed from Conf folder" << endl;
414  gSystem->CopyFile("Conf/TimeChecks.conf",what_conf.Data());
415  }
416 
417 }
418 
420 {
421  // Gives some command that can be run
422  cout << endl << "|INFO| ... informations ... messages ... help ... for Online/Quasi Online Analysis |" << endl;
423  cout << "|INFO|" << endl;
424  cout << "|INFO|\tTo start online (Local Level) Watchers : " << endl;
425  cout << "|INFO|\t.L OnlineWatchersLLP.C+ " << endl;
426  cout << "|INFO|\tOnlineWatchersLLP(0x0,0x0) or OnlineWatchersLLP(new TFile(\"MySpectra.root\",\"UPDATE\"),new TFile(\"MyTagSpectra.root\",\"UPDATE\"))" << endl;
427  cout << "|INFO|\tTo start online (Global Level) Watchers : " << endl;
428  cout << "|INFO|\t.L OnlineWatchersGLP.C+ " << endl;
429  cout << "|INFO|\tOnlineWatchersGLP() or OnlineWatchersGLP(new TFile(\"MySpectra.root\",\"UPDATE\"),new TFile(\"MyTagSpectra.root\",\"UPDATE\"))" << endl;
430  cout << "|INFO|\tThen start the watching from the ROOT Browser " << endl;
431  cout << "|INFO|" << endl;
432  cout << "|INFO|\tTo start offline Watchers : " << endl;
433  cout << "|INFO|\t\t1 - Configure OfflineWatcher.C (it could be a copy of of the one in DefaultWatchers)" << endl;
434  cout << "|INFO|\t\t2 - Compile/Run the Watchers with : " << endl;
435  cout << "|INFO|\t\t.L OfflineWatchers.C+" << endl;
436  cout << "|INFO|\t\tOfflineWatchers() or OfflineWatchers(new TFile(\"MySpectra.root\",\"UPDATE\"))" << endl;
437  cout << "|INFO|" << endl;
438  cout << "|INFO|\tTo start Actor Spectra Watchers : " << endl;
439  cout << "|INFO|\t\t1 - For different files from a run:"<<endl;
440  cout << "|INFO|\t\t Import(TString Incl=\"*\", TString Excl=\"*.samp\", TString DefaultPath=\"\");" <<endl;
441  cout << "|INFO|\t\t ex: Import(\"*\",\"*.samp\",\"\")" << endl;
442  cout << "|INFO|\t\t2 - For a single spectrum file:"<<endl;
443  cout << "|INFO|\t\t ImportFile(TString DefaultPath="", Double_t DefGain=1);" <<endl;
444  cout << "|INFO|\t\t ex: ImportFile(\"Path/Containing/Spectrum/File\",\"Gain if necessary\")" << endl;
445  cout << "|INFO|" << endl;
446  cout << "|INFO| ... informations ... messages ... help ... for Online/Quasi Online Analysis |" << endl;
447 
448  // check whether or not ADF_CONF_PATH has been set !
449  CheckConf("ADF.conf");
450  CheckConf("CrystalPositionLookUpTable.dat");
451  CheckConf("TimeChecks.conf");
452 
453  BuildFolders();
454 
455 }
456 
458 {
459  // start a ROOT TBrowser
460  gROOT->ProcessLine("TFolder *TaskFolder = (TFolder*)gROOT->GetRootFolder()->FindObject(\"Tasks\");");
461  gROOT->ProcessLine("TBrowser *browser = new TBrowser(\"Browser\",TaskFolder,\"Welcome in the wonderful world of Gammaware watchers, have fun !!!\");");
462 
463  gROOT->ProcessLine("TFolder *SpectraViewerFolder = (TFolder*)gROOT->GetRootFolder()->FindObject(\"SpectraViewer\");");
464  gROOT->ProcessLine("if (SpectraViewerFolder) browser->BrowseObject(SpectraViewerFolder);");
465 
466  gROOT->ProcessLine("TFolder *GwWatchersFolder = (TFolder*)gROOT->GetRootFolder()->FindObject(\"GwWatchers\");");
467  gROOT->ProcessLine("if(GwWatchersFolder) browser->BrowseObject(GwWatchersFolder);");
468 
469  gROOT->ProcessLine("gROOT->GetRootFolder()->AddFolder(\"Tools\",\"Tools\");");
470  gROOT->ProcessLine("TFolder *f = (TFolder*)gROOT->GetRootFolder()->FindObject(\"Tools\");");
471 
472  gROOT->ProcessLine("ManipConfig *WManipConfig= new ManipConfig(\"GlobalView\",\"GlobalView\");");
473  gROOT->ProcessLine("f->Add(WManipConfig)");
474 
475  gROOT->ProcessLine("Gw::GSPlayerTUI *SpectrumPlayer = new Gw::GSPlayerTUI(\"SpectrumPlayer\",\"SpectrumPlayer\");");
476  gROOT->ProcessLine("f->Add(SpectrumPlayer);");
477 
478  gROOT->ProcessLine("Collector *theCollector = new Collector(\"SpectraCollector\",\"SpectraCollector\");");
479  gROOT->ProcessLine("f->Add(theCollector);");
480 
481  gROOT->ProcessLine("WatchersRefresh *WRefresh = new WatchersRefresh(\"AutoRefresh\",\"AutoRefresh\");");
482  gROOT->ProcessLine("f->Add(WRefresh);");
483 
484  gROOT->ProcessLine("browser->Add(f);");
485 
486  gROOT->ProcessLine("if ( browser ) browser->Draw();");
487 }
488 
491 {
492  CleanDir(Form("DefaultWatchers/%s",CAMPAIGN.Data()));
493  CleanDir(".");
494  CleanDir("MyWatchers");
495  CleanDir("Macros");
496  CleanDir("Macros/Visu");
497  CleanDir("Macros/SpectraViewer");
498  CleanDir("Macros/SpectraViewer/GWRecal");
499 }
500 
502 void CleanDir(TString Dir)
503 {
504  gSystem->Exec(Form("rm -rf %s/*_C.so %s/*_C.d %s/*.o %s/*_cpp.so %s/*_cpp.d %s/*.pcm",
505  Dir.Data(),Dir.Data(),Dir.Data(),Dir.Data(),Dir.Data(),Dir.Data() ));
506 }
507 
510 {
511  gSystem->Rename("SetupWatchers.C","MyWatchers/SetupWatchers.backup");
512  gSystem->Rename("OnlineWatchersLLP.C","MyWatchers/OnlineWatchersLLP.backup");
513  gSystem->Rename("OnlineWatchersGLP.C","MyWatchers/OnlineWatchersGLP.backup");
514  gSystem->Rename("OfflineWatchers.C","MyWatchers/OfflineWatchers.backup");
515  gSystem->Rename("ADF_To_Tree.C","MyWatchers/ADF_To_Tree.backup");
516 
517  gSystem->Rename("ADF_to_Tree.C","MyWatchers/ADF_to_Tree.backup");
518  gSystem->Rename("SpyLLP.C","MyWatchers/SpyLLP.backup");
519  gSystem->Rename("SpyGLP.C","MyWatchers/SpyGLP.backup");
520  gSystem->Rename("RunOffline.C","MyWatchers/RunOffline.backup");
521  gSystem->Rename("RunADFToTree.C","MyWatchers/RunADFToTree.backup");
522  gSystem->Rename("StartBatch.sh","MyWatchers/StartBatch.sh.backup");
523 }
524 
525 
526 
527 
528 
529 
Char_t EndColor[100]
printf("******************************************************************** \n")
void CheckConf(TString what_conf)
TString macroPATH
void LoadClass(TString cpp_path)
functions defined in this macro
void LoadWatchers_AGATA()
void LoadVisuWatchers()
Char_t WarningW[100]
TString VAMOSDIR("")
TString GRUDIR("")
TString MFMDIR("")
void BuildFolders()
void SetBasicMacros(TString what_file, TString what_sub_directory)
this check if a given file is there or not and install some default if there are not ...
Char_t DefaultW[100]
void EndLoadWatchers()
void LoadSpectraViewer()
void CleanSetup()
clean up setup by moving the corresoponding files
ADF::LogMessage & endl(ADF::LogMessage &log)
void BeginLoadWatchers()
Set Env and Load Gw libraries.
void AddInclude(TString what_directory)
void GANILLoadWatchers(const Char_t *comp_opt="g", const Char_t *path_to_agapro="")
void CleanWatchers()
clean up all created watchers
void LoadWatchers_ANCILLARIES()
void LoadWatchers_MyWatchers()
here is a place to add my personnal watchers
static const char * GetPath(const char *)
to get a particular GW environment variable
Definition: Env.cpp:47
void PreLoad()
void CleanDir(TString Dir)
clean up all created watchers