/*
$Log$
+Revision 1.54 2001/02/07 10:39:05 hristov
+Remove default value for argument
+
Revision 1.53 2001/02/06 11:02:26 hristov
New SetTrack interface added, added check for unfilled particles in FinishEvent (I.Hrivnacova)
fRandom = 0;
fMCQA = 0;
fTransParName = "\0";
- fBaseFileName = "\0";
+ fBaseFileName = ".\0";
fParticleBuffer = 0;
fParticleMap = new TObjArray(10000);
}
fHitLists = new TList();
//
SetTransPar();
- fBaseFileName = "\0";
+ fBaseFileName = ".\0";
fParticleBuffer = 0;
fParticleMap = new TObjArray(10000);
}
return;
}
- OpenBaseFile("recreate");
-
gROOT->LoadMacro(setup);
gInterpreter->ProcessLine(fConfigFunction.Data());
//____________________________________________________________________________
void AliRun::SetBaseFile(char *filename)
{
- fBaseFileName = *filename;
-}
-
-//____________________________________________________________________________
-void AliRun::OpenBaseFile(const char *option)
-{
- if(!strlen(fBaseFileName.Data())) {
- const char *filename;
- if ((filename=gSystem->Getenv("CONFIG_FILE"))) {
- fBaseFileName=filename;
- } else {
- fBaseFileName="galice.root";
- }
- }
- TFile *rootfile = new TFile(fBaseFileName.Data(),option);
- rootfile->SetCompressionLevel(2);
+ fBaseFileName = filename;
}
//____________________________________________________________________________
TBranch *branch = tree->Branch(name,address,size);
if (file) {
+ char * outFile = new char[strlen(gAlice->GetBaseFile())+strlen(file)+2];
+ sprintf(outFile,"%s/%s",gAlice->GetBaseFile(),file);
TDirectory *cwd = gDirectory;
- branch->SetFile(file);
+ branch->SetFile(outFile);
TIter next( branch->GetListOfBranches());
while ((branch=(TBranch*)next())) {
- branch->SetFile(file);
+ branch->SetFile(outFile);
}
if (GetDebug()>1)
printf("* MakeBranch * Diverting Branch %s to file %s\n",name,file);
cwd->cd();
+ delete outFile;
}
}
if (GetDebug()>1)
printf("* MakeBranch * Making Branch %s \n",name);
if (file) {
- branch->SetFile(file);
+ char * outFile = new char[strlen(gAlice->GetBaseFile())+strlen(file)+2];
+ sprintf(outFile,"%s/%s",gAlice->GetBaseFile(),file);
+ branch->SetFile(outFile);
TIter next( branch->GetListOfBranches());
while ((branch=(TBranch*)next())) {
- branch->SetFile(file);
+ branch->SetFile(outFile);
}
if (GetDebug()>1)
printf("* MakeBranch * Diverting Branch %s to file %s\n",name,file);
cwd->cd();
+ delete outFile;
}
}
//_____________________________________________________________________________
// Create the Root Tree with one branch per detector
if (gSystem->Getenv("CONFIG_SPLIT_FILE")) {
- MakeTree("E");
- MakeTree("K","Kine.root");
- MakeTree("H","Hits.root");
- MakeTree("R","Reco.root");
+ MakeTree("E");
+ MakeTree("K","Kine.root");
+ MakeTree("H","Hits.root");
+ MakeTree("R","Reco.root");
} else {
MakeTree("EKHR");
}
AliDetector *GetDetector(const char *name) const;
AliMCQA *GetMCQA() const {return fMCQA;}
Int_t GetModuleID(const char *name) const;
+ virtual const char *GetBaseFile() const
+ {return fBaseFileName.Data();}
virtual Int_t GetEvent(Int_t event);
virtual void SetEvent(Int_t event) {fEvent=event;}
virtual void SetConfigFunction(const char * config="Config();");
virtual void ResetPoints();
virtual void SetTransPar(char *filename="$(ALICE_ROOT)/data/galice.cuts");
virtual void SetBaseFile(char *filename="galice.root");
- virtual void OpenBaseFile(const char *option);
virtual void ReadTransPar();
virtual void ResetStack() {fCurrent=-1;fHgwmk=fNtrack=fLoadPoint=0;fParticles->Clear();}
virtual void RunMC(Int_t nevent=1, const char *setup="Config.C");