From: masera Date: Fri, 1 Aug 2003 15:16:30 +0000 (+0000) Subject: macro moved to oldmacros directory. It has to be updated X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=2e0141e9371a179b50f2bed0d1f6966459105872;p=u%2Fmrichter%2FAliRoot.git macro moved to oldmacros directory. It has to be updated --- diff --git a/ITS/AliITSh2d.C b/ITS/AliITSh2d.C deleted file mode 100644 index a720521174b..00000000000 --- a/ITS/AliITSh2d.C +++ /dev/null @@ -1,81 +0,0 @@ -#if !defined(__CINT__) || defined(__MAKECINT__) - -#include "iostream.h" -#include "TDatime.h" -#include "TDatime.h" -#include "TFile.h" -#include "TString.h" -#include "../STEER/AliRun.h" -#include "../STEER/AliRunDigitizer.h" -//#include "ITS/AliITSDigitizer.h" -#include "ITS/AliITS.h" -#include "ITS/AliITSDetType.h" -#include "ITS/AliITSresponseSDD.h" -#include "TStopwatch.h" - -Bool_t GaliceITSok(); -TFile* AccessFile(TString inFile="galice.root", TString acctype="R"); -void writeAR(TFile * fin, TFile *fou); -Int_t ChangeITSDefaults(TFile *hitfile,AliITS *ITS,TString opt=""); -void loadlibs(); - -#endif - -//#define DEBUG - -Int_t AliITSh2d(TString hf="galice.root",TString df="",TString opt=""){ - // Produce ITS SDigits from Hits. - - // Dynamically link some shared libs - if (gClassTable->GetID("AliRun") < 0) { - gROOT->LoadMacro("loadlibs.C"); - loadlibs(); - } // end if - gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSstandard.C"); - - TFile *hfp = 0, *dfp = 0; - if(!GaliceITSok()){ - // gAlice not define. Must open a file and read it in. - if(hf.CompareTo(df) == 0 || df.CompareTo("") == 0) { - // Input file = output file - hfp = AccessFile(hf,"U"); // input file open for update. - }else{ // Input file different from output file. - hfp = AccessFile(hf,"R"); // input file open as read only - // open output file and create TreeR on it - dfp = gAlice->InitTreeFile("D",df); - } // end if - } // end if !GALICEITSOK() - AliITS *ITS = (AliITS*)gAlice->GetDetector("ITS"); - - ChangeITSDefaults(hfp,ITS,opt); - // write the AliRun object to the output file if different from input file. - if(dfp) writeAR(hfp,dfp); - - TStopwatch timer; - Int_t evNumber1 = 0; - Int_t evNumber2 = gAlice->GetEventsPerRun(); - timer.Start(); - for(Int_t event = evNumber1; event < evNumber2; event++){ - gAlice->GetEvent(event); - if(!gAlice->TreeD() && dfp == 0){ - cout << "Having to create the Digits Tree." << endl; - gAlice->MakeTree("S"); - } // end if !gAlice->TreeS() - if(dfp) gAlice->MakeTree("D",dfp); - // make branch - ITS->MakeBranch("D"); - ITS->SetTreeAddress(); -#ifdef DEBUG - cout<<"Making ITS Digits for event "<Hits2Digits(); - } // end for event - timer.Stop(); - timer.Print(); - if(dfp!=0){ - cout <<"After Digitization "<LoadMacro("$(ALICE_ROOT)/macros/grun.C"); - if(!opt.Contains("Nogrun")) grun(1,"Config.C"); - if(opt.Contains("SDigit")){ - gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSh2sd.C"); - if(AliITSh2sd(hf,hf,opt)!=0){ - cout << "Error AliITSh2sd failed" << endl; - return 1; - } // end if - gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSsd2d.C"); - if(AliITSsd2d(hf,hf,"",opt)!=0){ - cout << "Error AliITSsd2d failed" << endl; - return 2; - } // end if - }else{ - gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSh2d.C"); - if(AliITSh2d(hf,hf,opt)!=0){ - cout << "Error AliITSh2d failed" << endl; - return 3; - } // end if - } // end if - gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSd2r.C"); - if(AliITSd2r(hf,hf,opt)!=0){ - cout << "Error AliITSd2r failed" << endl; - return 4; - } // end if - return 0; -} diff --git a/ITS/AliITSh2sd.C b/ITS/AliITSh2sd.C deleted file mode 100644 index b72c1ac4a14..00000000000 --- a/ITS/AliITSh2sd.C +++ /dev/null @@ -1,81 +0,0 @@ -#if !defined(__CINT__) || defined(__MAKECINT__) - -#include "iostream.h" -#include "TDatime.h" -#include "TFile.h" -#include "TString.h" -#include "../STEER/AliRun.h" -#include "../STEER/AliRunDigitizer.h" -//#include "AliITSDigitizer.h" -#include "AliITS.h" -#include "AliITSDetType.h" -#include "AliITSresponseSDD.h" -#include "TStopwatch.h" - -Bool_t GaliceITSok(); -TFile* AccessFile(TString inFile="galice.root", TString acctype="R"); -void writeAR(TFile * fin, TFile *fou); -Int_t ChangeITSDefaults(TFile *hitfile,AliITS *ITS,TString opt=""); -void loadlibs(); - -#endif - - -//#define DEBUG - -Int_t AliITSh2sd(TString hf="galice.root",TString sf="",TString opt=""){ - // Produce ITS SDigits from Hits. - - // Dynamically link some shared libs - if (gClassTable->GetID("AliRun") < 0) { - gROOT->LoadMacro("loadlibs.C"); - loadlibs(); - } // end if - gROOT->LoadMacro("$(ALICE_ROOT)/ITS/AliITSstandard.C"); - - TFile *hfp = 0, *sfp = 0; - if(!GaliceITSok()){ - // gAlice not define. Must open a file and read it in. - if(hf.CompareTo(sf) == 0 || sf.CompareTo("") == 0) { - // Input file = output file - hfp = AccessFile(hf,"U"); // input file open for update. - }else{ // Input file different from output file. - hfp = AccessFile(hf,"R"); // input file open as read only - // open output file and create TreeR on it - sfp = gAlice->InitTreeFile("S",sf); - } // end if - } // end if !GALICEITSOK() - AliITS *ITS = (AliITS*) (gAlice->GetDetector("ITS")); - - ChangeITSDefaults(hfp,ITS,opt); - // write the AliRun object to the output file if different from input file. - if(sfp) writeAR(hfp,sfp); - - TStopwatch timer; - Int_t evNumber1 = 0; - Int_t evNumber2 = gAlice->GetEventsPerRun(); - timer.Start(); - for(Int_t event = evNumber1; event < evNumber2; event++){ - gAlice->GetEvent(event); - if(!gAlice->TreeS() && sfp == 0){ - cout << "Having to create the SDigits Tree." << endl; - gAlice->MakeTree("S"); - } // end if !gAlice->TreeS() - if(sfp) gAlice->MakeTree("S",sfp); - // make branch - ITS->MakeBranch("S"); - ITS->SetTreeAddress(); -#ifdef DEBUG - cout<<"Making ITS SDigits for event "<Hits2SDigits(); - } // end for event - timer.Stop(); - timer.Print(); - if(sfp!=0){ - cout << sf << " size =" << sfp->GetSize() << endl; - }else if(hfp!=0){ - cout << hfp << " size =" << hfp->GetSize() << endl; - } // end if sfp!=0 - return 0; -}