#include "AliRunLoader.h"
#include "AliITSLoader.h"
#include "AliHeader.h"
+#include "AliCDBManager.h"
+#include "AliCDBStorage.h"
#endif
void GetHitsCoor(TObject *its, Int_t mod, TObjArray & histos, Int_t subd,Bool_t verb);
Int_t GetRecCoor(TObject *ge, TClonesArray *ITSrec, Int_t mod, TH2F *h2, TH1F *h1, Bool_t verb);
Bool_t userec=choice.Contains("Rec");
Bool_t useclustersv2=choice.Contains("ClustersV2");
Int_t retcode=1; //return code
-
if (gClassTable->GetID("AliRun") < 0) {
gInterpreter->ExecuteMacro("loadlibs.C");
}
else {
if(gAlice){
- delete gAlice->GetRunLoader();
+ delete AliRunLoader::Instance();
delete gAlice;
gAlice=0;
}
}
+ // Set OCDB if needed
+ AliCDBManager* man = AliCDBManager::Instance();
+ if (!man->IsDefaultStorageSet()) {
+ printf("Setting a local default storage and run number 0\n");
+ man->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+ man->SetRun(0);
+ }
+ else {
+ printf("Using deafult storage \n");
+ }
// retrives geometry
TString geof(gSystem->DirName(filename));
geof += "/geometry.root";
ITS->FillModules(0,0,nmodules," "," ");
cout<<"ITS modules .... DONE!"<<endl;
- AliITSDetTypeRec* detTypeRec = new AliITSDetTypeRec(ITSloader);
+ AliITSDetTypeRec* detTypeRec = new AliITSDetTypeRec();
+ detTypeRec->SetITSgeom(ITSloader->GetITSgeom());
detTypeRec->SetDefaults();
+
// DIGITS
TTree *TD = ITSloader->TreeD();