ROOT logo
#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 "ITS/AliITSDigitizer.h"
#include "ITS/AliITS.h"
#include "ITS/AliITSDetType.h"
#include "ITS/AliITSresponseSDD.h"
#include "TStopwatch.h"

Int_t AliITSh2sd(TString hf="galice.root",TString sf="",TString opt="");
Int_t AliITSh2d(TString hf="galice.root",TString df="",TString opt="");
Int_t AliITSsd2d(TString df="galice.root",TString sf1="galice.root",
                 TString sf2="",TString opt="")
Int_t AliITSd2r(TString df="galice.root",TString rf="",TString opt="");
void grun(Int_t nevent=1, const char *config="Config.C");

#endif
//#define DEBUG


Int_t AliITSh2r(TString hf="galice.root",TString opt=""){
    // Runs grun to create the file galice.root and then runs the 
    // nessesary files to creat recpoints form that file.

    gROOT->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;
}
 AliITSh2r.C:1
 AliITSh2r.C:2
 AliITSh2r.C:3
 AliITSh2r.C:4
 AliITSh2r.C:5
 AliITSh2r.C:6
 AliITSh2r.C:7
 AliITSh2r.C:8
 AliITSh2r.C:9
 AliITSh2r.C:10
 AliITSh2r.C:11
 AliITSh2r.C:12
 AliITSh2r.C:13
 AliITSh2r.C:14
 AliITSh2r.C:15
 AliITSh2r.C:16
 AliITSh2r.C:17
 AliITSh2r.C:18
 AliITSh2r.C:19
 AliITSh2r.C:20
 AliITSh2r.C:21
 AliITSh2r.C:22
 AliITSh2r.C:23
 AliITSh2r.C:24
 AliITSh2r.C:25
 AliITSh2r.C:26
 AliITSh2r.C:27
 AliITSh2r.C:28
 AliITSh2r.C:29
 AliITSh2r.C:30
 AliITSh2r.C:31
 AliITSh2r.C:32
 AliITSh2r.C:33
 AliITSh2r.C:34
 AliITSh2r.C:35
 AliITSh2r.C:36
 AliITSh2r.C:37
 AliITSh2r.C:38
 AliITSh2r.C:39
 AliITSh2r.C:40
 AliITSh2r.C:41
 AliITSh2r.C:42
 AliITSh2r.C:43
 AliITSh2r.C:44
 AliITSh2r.C:45
 AliITSh2r.C:46
 AliITSh2r.C:47
 AliITSh2r.C:48
 AliITSh2r.C:49
 AliITSh2r.C:50
 AliITSh2r.C:51
 AliITSh2r.C:52
 AliITSh2r.C:53
 AliITSh2r.C:54
 AliITSh2r.C:55
 AliITSh2r.C:56
 AliITSh2r.C:57