From 33c3c91a040995417ea28c5ae034899b77cca3a6 Mon Sep 17 00:00:00 2001 From: fca Date: Mon, 2 Feb 2009 16:24:37 +0000 Subject: [PATCH] Changed AliRunLoader::GetRunLoader() into AliRunLoader::Instance() Moved Run Number from gAlice to AliRunLoader --- ACORDE/AliACORDETrigger.cxx | 2 +- EMCAL/AliEMCALClusterizerv1.cxx | 2 +- EMCAL/AliEMCALDigitizer.cxx | 20 +++---- EMCAL/AliEMCALGeometry.cxx | 2 +- EMCAL/AliEMCALRawUtils.cxx | 4 +- EMCAL/AliEMCALReconstructor.cxx | 2 +- EMCAL/AliEMCALSDigitizer.cxx | 10 ++-- EMCAL/AliEMCALTrigger.cxx | 2 +- EMCAL/Calib/AliEMCALCalibCoefs.cxx | 2 +- EVE/EveDet/AliEveTRDLoaderImp.cxx | 2 +- EVGEN/AliDimuCombinator.cxx | 4 +- EVGEN/AliGenCocktailAfterBurner.cxx | 2 +- EVGEN/AliGenCocktailAfterBurner.h | 2 +- EVGEN/AliGenExtFile.cxx | 2 +- EVGEN/AliGenFLUKAsource.cxx | 4 +- EVGEN/AliGenMUONCocktail.cxx | 2 +- EVGEN/AliGenMUONCocktailpp.cxx | 2 +- EVGEN/AliGenPileup.cxx | 2 +- EVGEN/AliGenReaderTreeK.cxx | 2 +- .../AliHLTMUONDigitPublisherComponent.cxx | 6 +- HLT/TPCLib/tracking-ca/AliTPCtrackerCA.cxx | 2 +- ITS/AliCascadeFindVertices.C | 2 +- ITS/AliITS.cxx | 2 +- ITS/AliITSAnalizeSPDHits.C | 2 +- ITS/AliITSClusterFinder.cxx | 4 +- ITS/AliITSCompareHitsRecPoints.C | 2 +- ITS/AliITSComparisonV2.C | 2 +- ITS/AliITSDigitPlot.C | 2 +- ITS/AliITSDigits2RecPoints.C | 2 +- ITS/AliITSFindClustersV2.C | 2 +- ITS/AliITSFindPrimaryVertex.C | 2 +- ITS/AliITSFindTracksANN.C | 2 +- ITS/AliITSFindTracksSA.C | 2 +- ITS/AliITSGeoPlot.C | 2 +- ITS/AliITSHits2Digits.C | 2 +- ITS/AliITSHits2FastRecPoints.C | 2 +- ITS/AliITSHits2SDigits.C | 2 +- ITS/AliITSL2GConvertPointsV1.C | 2 +- ITS/AliITSL2GConvertPointsV2.C | 2 +- ITS/AliITSNeuralFit.C | 2 +- ITS/AliITSPrintGeom.C | 2 +- ITS/AliITSPrintHits.C | 2 +- ITS/AliITSPrintRecPoints.C | 2 +- ITS/AliITSSDigits2Digits.C | 2 +- ITS/AliITSTrigger.cxx | 2 +- ITS/AliITSVertexer.cxx | 6 +- ITS/AliITSVertexerFast.cxx | 6 +- ITS/AliITSclustererV2.cxx | 8 +-- ITS/AliITSsDigitize.cxx | 2 +- ITS/AliITSspdLayer1Coverage.C | 2 +- ITS/EvaluateSPDEffWithTracklets.C | 2 +- ITS/MakeSDDGeoMap.C | 2 +- ITS/ShowITSHitsRecPoints.C | 4 +- ITS/ShowSPDRecPoints.C | 2 +- ITS/testITSMultReco.C | 2 +- MONITOR/galice.C | 4 +- MONITOR/monitor.C | 4 +- MUON/AliMUONClusterFinderMLEM.cxx | 2 +- MUON/AliMUONClusterFinderPeakCOG.cxx | 2 +- MUON/AliMUONClusterFinderPeakFit.cxx | 2 +- MUON/AliMUONPedestalEventGenerator.cxx | 6 +- MUON/AliMUONSDigitizerV2.cxx | 2 +- MUON/AliMUONTrigger.cxx | 2 +- MUON/AliMUONTriggerGUI.cxx | 2 +- PHOS/AliPHOSAnalyze.cxx | 2 +- PHOS/AliPHOSRaw2Digits.cxx | 4 +- PHOS/AliPHOSRecParticle.cxx | 8 +-- PHOS/AliPHOSTrigger.cxx | 2 +- PMD/AliPMDRecpointRead.C | 2 +- PMD/AliPMDesdmake.C | 2 +- PWG1/AliGenInfoMaker.cxx | 2 +- PWG1/AliRecInfoMaker.cxx | 2 +- PYTHIA6/AliGenPythia.cxx | 4 +- PYTHIA6/AliGenPythiaPlus.cxx | 6 +- STEER/AliCTPRawData.cxx | 2 +- STEER/AliCascadeComparison.C | 2 +- STEER/AliESDComparisonMI.C | 2 +- STEER/AliESDPmdTest.C | 2 +- STEER/AliITSclusterComparison.C | 2 +- STEER/AliKFParticleTest.C | 4 +- STEER/AliMC.cxx | 40 ++++++------- STEER/AliPIDComparison.C | 2 +- STEER/AliRawDataHeaderSim.h | 2 +- STEER/AliReconstruction.cxx | 6 +- STEER/AliReconstruction.h | 5 +- STEER/AliRun.cxx | 11 ++-- STEER/AliRun.h | 3 - STEER/AliRunLoader.cxx | 2 + STEER/AliRunLoader.h | 53 +++++++---------- STEER/AliSimulation.cxx | 58 +++++++++---------- STEER/AliTriggerConfiguration.cxx | 16 ++--- STEER/AliTriggerDetector.cxx | 2 +- STEER/AliV0Comparison.C | 2 +- STEER/AliVertexerTracksTest.C | 6 +- STEER/ReadTrigger.C | 2 +- T0/AliT0RawData.cxx | 2 +- T0/AliT0Trigger.cxx | 2 +- TDPMjet/AliGenDPMjet.cxx | 2 +- THijing/AliGenBeamGasNew.cxx | 2 +- TOF/AliTOF.cxx | 2 +- TOF/AliTOFComparison.C | 4 +- TOF/AliTOFSDigits2Digits.C | 4 +- TOF/AliTOFT0.cxx | 2 +- TOF/AliTOFTrigger.cxx | 2 +- TOF/AliTOFanalyzeDigits.C | 4 +- TOF/AliTOFanalyzeHits.C | 4 +- TOF/AliTOFanalyzeSDigitsV2.C | 4 +- TOF/AliTOFhits2sdigits.C | 4 +- TOF/AliTOFtest.C | 12 ++-- TOF/AliTOFtestDigitizer.C | 4 +- TOF/AliTOFv4T0.cxx | 2 +- TOF/AliTOFv5T0.cxx | 2 +- TOF/AliTOFv6T0.cxx | 2 +- TPC/AliBarrelRec_TPCparam.C | 2 +- TPC/AliTPCFindClusters.C | 2 +- TPC/AliTPCFindTracksMI.C | 2 +- TPC/AliTPCHits2Clusters.C | 2 +- TPC/AliTPCHits2Digits.C | 2 +- TPC/AliTPCHits2SDigits.C | 2 +- TPC/AliTPCSDigits2Digits.C | 2 +- TPC/AliTPCtrackingParamDB.C | 2 +- TRD/AliTRDmcmSim.cxx | 4 +- TRD/Cal/AliTRDCalPIDRefMaker.cxx | 2 +- VZERO/AliVZEROTrigger.cxx | 2 +- ZDC/AliZDC.cxx | 4 +- ZDC/AliZDCTrigger.cxx | 2 +- macros/TestNewIO.C | 2 +- macros/TestVertexerTracks.C | 2 +- macros/display.C | 2 +- macros/g4menu.C | 2 +- 130 files changed, 267 insertions(+), 279 deletions(-) diff --git a/ACORDE/AliACORDETrigger.cxx b/ACORDE/AliACORDETrigger.cxx index 6fe1cd1d741..0bd7d31d7f5 100644 --- a/ACORDE/AliACORDETrigger.cxx +++ b/ACORDE/AliACORDETrigger.cxx @@ -65,7 +65,7 @@ void AliACORDETrigger::Trigger() // 5.- Set the relevant trigger // 1.- Get loaders and pointers - AliRunLoader* runLoader = AliRunLoader::GetRunLoader(); + AliRunLoader* runLoader = AliRunLoader::Instance(); AliACORDELoader* loader = (AliACORDELoader* )runLoader->GetLoader( "ACORDELoader" ); loader->LoadDigits("READ"); diff --git a/EMCAL/AliEMCALClusterizerv1.cxx b/EMCAL/AliEMCALClusterizerv1.cxx index ed4b4ee1a3a..3c60fe6c538 100644 --- a/EMCAL/AliEMCALClusterizerv1.cxx +++ b/EMCAL/AliEMCALClusterizerv1.cxx @@ -344,7 +344,7 @@ void AliEMCALClusterizerv1::Init() // Make all memory allocations which can not be done in default constructor. // Attach the Clusterizer task to the list of EMCAL tasks - AliRunLoader *rl = AliRunLoader::GetRunLoader(); + AliRunLoader *rl = AliRunLoader::Instance(); if (rl->GetAliRun() && rl->GetAliRun()->GetDetector("EMCAL")) fGeom = dynamic_cast(rl->GetAliRun()->GetDetector("EMCAL"))->GetGeometry(); else diff --git a/EMCAL/AliEMCALDigitizer.cxx b/EMCAL/AliEMCALDigitizer.cxx index cf49406c424..e79d100de32 100644 --- a/EMCAL/AliEMCALDigitizer.cxx +++ b/EMCAL/AliEMCALDigitizer.cxx @@ -211,9 +211,9 @@ AliEMCALDigitizer::AliEMCALDigitizer(AliRunDigitizer * rd) AliEMCALDigitizer::~AliEMCALDigitizer() { //dtor - if (AliRunLoader::GetRunLoader()) { + if (AliRunLoader::Instance()) { AliLoader *emcalLoader=0; - if ((emcalLoader = AliRunLoader::GetRunLoader()->GetDetectorLoader("EMCAL"))) + if ((emcalLoader = AliRunLoader::Instance()->GetDetectorLoader("EMCAL"))) emcalLoader->CleanDigitizer(); } else @@ -240,7 +240,7 @@ void AliEMCALDigitizer::Digitize(Int_t event) // static int nEMC=0; //max number of digits possible - AliRunLoader *rl = AliRunLoader::GetRunLoader(); + AliRunLoader *rl = AliRunLoader::Instance(); AliEMCALLoader *emcalLoader = dynamic_cast(rl->GetDetectorLoader("EMCAL")); Int_t readEvent = event ; // fManager is data member from AliDigitizer @@ -518,7 +518,7 @@ void AliEMCALDigitizer::Exec(Option_t *option) if(strstr(option,"tim")) gBenchmark->Start("EMCALDigitizer"); - AliRunLoader *rl = AliRunLoader::GetRunLoader(); + AliRunLoader *rl = AliRunLoader::Instance(); AliEMCALLoader *emcalLoader = dynamic_cast(rl->GetDetectorLoader("EMCAL")); // Post Digitizer to the white board @@ -586,7 +586,7 @@ Bool_t AliEMCALDigitizer::Init() { // Makes all memory allocations fInit = kTRUE ; - AliEMCALLoader *emcalLoader = dynamic_cast(AliRunLoader::GetRunLoader()->GetDetectorLoader("EMCAL")); + AliEMCALLoader *emcalLoader = dynamic_cast(AliRunLoader::Instance()->GetDetectorLoader("EMCAL")); if ( emcalLoader == 0 ) { Fatal("Init", "Could not obtain the AliEMCALLoader"); @@ -673,7 +673,7 @@ void AliEMCALDigitizer::MixWith(TString alirunFileName, TString eventFolderName) return ; } // looking for the file which contains SDigits - AliEMCALLoader *emcalLoader = dynamic_cast(AliRunLoader::GetRunLoader()->GetDetectorLoader("EMCAL")); + AliEMCALLoader *emcalLoader = dynamic_cast(AliRunLoader::Instance()->GetDetectorLoader("EMCAL")); TString fileName( emcalLoader->GetSDigitsFileName() ) ; if ( eventFolderName != AliConfig::GetDefaultEventFolderName()) // only if not the default folder name fileName = fileName.ReplaceAll(".root", "") + "_" + eventFolderName + ".root" ; @@ -735,7 +735,7 @@ void AliEMCALDigitizer::Print(Option_t*)const printf ("Adding SDigits from %s %s\n", fInputFileNames[index].Data(), fileName.Data()) ; } - AliEMCALLoader *emcalLoader = dynamic_cast(AliRunLoader::GetRunLoader()->GetDetectorLoader("EMCAL")); + AliEMCALLoader *emcalLoader = dynamic_cast(AliRunLoader::Instance()->GetDetectorLoader("EMCAL")); printf("\nWriting digits to %s", emcalLoader->GetDigitsFileName().Data()) ; @@ -754,7 +754,7 @@ void AliEMCALDigitizer::PrintDigits(Option_t * option) { //utility method for printing digit information - AliEMCALLoader *emcalLoader = dynamic_cast(AliRunLoader::GetRunLoader()->GetDetectorLoader("EMCAL")); + AliEMCALLoader *emcalLoader = dynamic_cast(AliRunLoader::Instance()->GetDetectorLoader("EMCAL")); TClonesArray * digits = emcalLoader->Digits() ; TClonesArray * sdigits = emcalLoader->SDigits() ; @@ -801,7 +801,7 @@ void AliEMCALDigitizer::Unload() if ((rl = AliRunLoader::GetRunLoader(tempo))) rl->GetDetectorLoader("EMCAL")->UnloadSDigits() ; } - AliEMCALLoader *emcalLoader = dynamic_cast(AliRunLoader::GetRunLoader()->GetDetectorLoader("EMCAL")); + AliEMCALLoader *emcalLoader = dynamic_cast(AliRunLoader::Instance()->GetDetectorLoader("EMCAL")); emcalLoader->UnloadDigits() ; } @@ -817,7 +817,7 @@ void AliEMCALDigitizer::WriteDigits() // and branch "AliEMCALDigitizer", with the same title to keep all the parameters // and names of files, from which digits are made. - AliEMCALLoader *emcalLoader = dynamic_cast(AliRunLoader::GetRunLoader()->GetDetectorLoader("EMCAL")); + AliEMCALLoader *emcalLoader = dynamic_cast(AliRunLoader::Instance()->GetDetectorLoader("EMCAL")); const TClonesArray * digits = emcalLoader->Digits() ; TTree * treeD = emcalLoader->TreeD(); diff --git a/EMCAL/AliEMCALGeometry.cxx b/EMCAL/AliEMCALGeometry.cxx index 01b285c39c4..cd06991853a 100644 --- a/EMCAL/AliEMCALGeometry.cxx +++ b/EMCAL/AliEMCALGeometry.cxx @@ -92,7 +92,7 @@ const Char_t* AliEMCALGeometry::fgDefaultGeometryName = "EMCAL_COMPLE // // MC: If you work with MC data you have to get geometry the next way: // == ============================= -// AliRunLoader *rl = AliRunLoader::GetRunLoader(); +// AliRunLoader *rl = AliRunLoader::Instance(); // AliEMCALGeometry *geom = dynamic_cast(rl->GetAliRun()->GetDetector("EMCAL"))->GetGeometry(); // TGeoManager::Import("geometry.root"); diff --git a/EMCAL/AliEMCALRawUtils.cxx b/EMCAL/AliEMCALRawUtils.cxx index 693821ec2dc..27268b0371b 100644 --- a/EMCAL/AliEMCALRawUtils.cxx +++ b/EMCAL/AliEMCALRawUtils.cxx @@ -106,7 +106,7 @@ AliEMCALRawUtils::AliEMCALRawUtils() //To make sure we match with the geometry in a simulation file, //let's try to get it first. If not, take the default geometry - AliRunLoader *rl = AliRunLoader::GetRunLoader(); + AliRunLoader *rl = AliRunLoader::Instance(); if(!rl) AliError("Cannot find RunLoader!"); if (rl->GetAliRun() && rl->GetAliRun()->GetDetector("EMCAL")) { fGeom = dynamic_cast(rl->GetAliRun()->GetDetector("EMCAL"))->GetGeometry(); @@ -202,7 +202,7 @@ void AliEMCALRawUtils::Digits2Raw() { // convert digits of the current event to raw data - AliRunLoader *rl = AliRunLoader::GetRunLoader(); + AliRunLoader *rl = AliRunLoader::Instance(); AliEMCALLoader *loader = dynamic_cast(rl->GetDetectorLoader("EMCAL")); // get the digits diff --git a/EMCAL/AliEMCALReconstructor.cxx b/EMCAL/AliEMCALReconstructor.cxx index 759a7634f8f..9340c820b83 100644 --- a/EMCAL/AliEMCALReconstructor.cxx +++ b/EMCAL/AliEMCALReconstructor.cxx @@ -74,7 +74,7 @@ AliEMCALReconstructor::AliEMCALReconstructor() //To make sure we match with the geometry in a simulation file, //let's try to get it first. If not, take the default geometry - AliRunLoader *rl = AliRunLoader::GetRunLoader(); + AliRunLoader *rl = AliRunLoader::Instance(); if (rl->GetAliRun() && rl->GetAliRun()->GetDetector("EMCAL")) { fGeom = dynamic_cast(rl->GetAliRun()->GetDetector("EMCAL"))->GetGeometry(); } else { diff --git a/EMCAL/AliEMCALSDigitizer.cxx b/EMCAL/AliEMCALSDigitizer.cxx index 50fcfe5cc23..0d234de9804 100644 --- a/EMCAL/AliEMCALSDigitizer.cxx +++ b/EMCAL/AliEMCALSDigitizer.cxx @@ -135,7 +135,7 @@ AliEMCALSDigitizer::AliEMCALSDigitizer(const AliEMCALSDigitizer & sd) AliEMCALSDigitizer::~AliEMCALSDigitizer() { //dtor AliLoader *emcalLoader=0; - if ((emcalLoader = AliRunLoader::GetRunLoader()->GetDetectorLoader("EMCAL"))) + if ((emcalLoader = AliRunLoader::Instance()->GetDetectorLoader("EMCAL"))) emcalLoader->CleanSDigitizer(); } @@ -150,7 +150,7 @@ void AliEMCALSDigitizer::Init(){ fInit = kTRUE; - AliEMCALLoader *emcalLoader = dynamic_cast(AliRunLoader::GetRunLoader()->GetDetectorLoader("EMCAL")); + AliEMCALLoader *emcalLoader = dynamic_cast(AliRunLoader::Instance()->GetDetectorLoader("EMCAL")); if ( emcalLoader == 0 ) { Fatal("Init", "Could not obtain the AliEMCALLoader"); @@ -227,7 +227,7 @@ void AliEMCALSDigitizer::Exec(Option_t *option) if(strstr(option,"tim")) gBenchmark->Start("EMCALSDigitizer"); - AliRunLoader *rl = AliRunLoader::GetRunLoader(); + AliRunLoader *rl = AliRunLoader::Instance(); AliEMCALLoader *emcalLoader = dynamic_cast(rl->GetDetectorLoader("EMCAL")); //switch off reloading of this task while getting event @@ -427,7 +427,7 @@ void AliEMCALSDigitizer::PrintSDigits(Option_t * option) { //Prints list of digits produced at the current pass of AliEMCALDigitizer - AliEMCALLoader *rl = dynamic_cast(AliRunLoader::GetRunLoader()->GetDetectorLoader("EMCAL")); + AliEMCALLoader *rl = dynamic_cast(AliRunLoader::Instance()->GetDetectorLoader("EMCAL")); const TClonesArray * sdigits = rl->SDigits() ; printf("\n") ; @@ -462,7 +462,7 @@ void AliEMCALSDigitizer::PrintSDigits(Option_t * option) void AliEMCALSDigitizer::Unload() const { // Unload Hits and SDigits from the folder - AliEMCALLoader *rl = dynamic_cast(AliRunLoader::GetRunLoader()->GetDetectorLoader("EMCAL")); + AliEMCALLoader *rl = dynamic_cast(AliRunLoader::Instance()->GetDetectorLoader("EMCAL")); rl->UnloadHits() ; rl->UnloadSDigits() ; } diff --git a/EMCAL/AliEMCALTrigger.cxx b/EMCAL/AliEMCALTrigger.cxx index abef7006b89..36294f4b1e7 100644 --- a/EMCAL/AliEMCALTrigger.cxx +++ b/EMCAL/AliEMCALTrigger.cxx @@ -866,7 +866,7 @@ void AliEMCALTrigger::Trigger() { TH1::AddDirectory(0); //Main Method to select triggers. - AliRunLoader *runLoader = AliRunLoader::GetRunLoader(); + AliRunLoader *runLoader = AliRunLoader::Instance(); AliEMCALLoader *emcalLoader = 0; if(runLoader) { emcalLoader = dynamic_cast(runLoader->GetDetectorLoader("EMCAL")); diff --git a/EMCAL/Calib/AliEMCALCalibCoefs.cxx b/EMCAL/Calib/AliEMCALCalibCoefs.cxx index 74638818b0e..3486c449a8c 100644 --- a/EMCAL/Calib/AliEMCALCalibCoefs.cxx +++ b/EMCAL/Calib/AliEMCALCalibCoefs.cxx @@ -127,7 +127,7 @@ AliEMCALCalibCoefs* AliEMCALCalibCoefs::GetCalibTableFromDb(const char *tn, AliE AliCDBStorage* specificStorage = man->GetSpecificStorage(calibType); AliEMCALCalibData* caldata = (AliEMCALCalibData*) - specificStorage->Get(calibTypeData, gAlice->GetRunNumber())->GetObject(); + specificStorage->Get(calibTypeData, AliRunLoader::Instance()->GetRunNumber())->GetObject(); if(caldata == 0) return 0; AliEMCALGeometry *g = AliEMCALGeometry::GetInstance(); diff --git a/EVE/EveDet/AliEveTRDLoaderImp.cxx b/EVE/EveDet/AliEveTRDLoaderImp.cxx index 4f4555217f8..9049aefb8a5 100644 --- a/EVE/EveDet/AliEveTRDLoaderImp.cxx +++ b/EVE/EveDet/AliEveTRDLoaderImp.cxx @@ -110,7 +110,7 @@ Bool_t AliEveTRDLoaderSim::Open(const char *filename, const char *dir) if(fRunLoader) return kTRUE; - fRunLoader = AliRunLoader::GetRunLoader(); + fRunLoader = AliRunLoader::Instance(); if(!fRunLoader) fRunLoader = AliRunLoader::Open(filename, AliConfig::GetDefaultEventFolderName(),"read"); if(!fRunLoader) return kFALSE; diff --git a/EVGEN/AliDimuCombinator.cxx b/EVGEN/AliDimuCombinator.cxx index 09fcb0c9d14..bbd5152fa0b 100644 --- a/EVGEN/AliDimuCombinator.cxx +++ b/EVGEN/AliDimuCombinator.cxx @@ -37,7 +37,7 @@ ClassImp(AliDimuCombinator) AliDimuCombinator::AliDimuCombinator(): - fNParticle((Int_t) (AliRunLoader::GetRunLoader()->TreeK())->GetEntries()), + fNParticle((Int_t) (AliRunLoader::Instance()->TreeK())->GetEntries()), fImuon1(0), fImuon2(0), fImin1(0), @@ -53,7 +53,7 @@ AliDimuCombinator::AliDimuCombinator(): fEtaMax(10.) { // Constructor - fNParticle = (Int_t) (AliRunLoader::GetRunLoader()->TreeK())->GetEntries(); + fNParticle = (Int_t) (AliRunLoader::Instance()->TreeK())->GetEntries(); } AliDimuCombinator::AliDimuCombinator(const AliDimuCombinator & combinator) diff --git a/EVGEN/AliGenCocktailAfterBurner.cxx b/EVGEN/AliGenCocktailAfterBurner.cxx index eb9179a903b..a82e9500b63 100644 --- a/EVGEN/AliGenCocktailAfterBurner.cxx +++ b/EVGEN/AliGenCocktailAfterBurner.cxx @@ -175,7 +175,7 @@ void AliGenCocktailAfterBurner::Generate() else { //Here we are in the first call of the method fCurrentEvent=0; - Int_t numberOfEvents = AliRunLoader::GetRunLoader()->GetNumberOfEvents(); + Int_t numberOfEvents = AliRunLoader::Instance()->GetNumberOfEvents(); //Create stacks fInternalStacks = new TObjArray(numberOfEvents + fNBgEvents); //Create array of internal stacks fCollisionGeometries = new AliCollisionGeometry*[numberOfEvents + fNBgEvents]; //Create array of collision geometries diff --git a/EVGEN/AliGenCocktailAfterBurner.h b/EVGEN/AliGenCocktailAfterBurner.h index adeb6499143..777bf52e7b5 100644 --- a/EVGEN/AliGenCocktailAfterBurner.h +++ b/EVGEN/AliGenCocktailAfterBurner.h @@ -50,7 +50,7 @@ class AliGenCocktailAfterBurner : public AliGenCocktail AliGenerator* GetCurrentGenerator() const; virtual void SetActiveEventNumber(Int_t actev); Int_t GetActiveEventNumber() const {return fActiveEvent;} - virtual Int_t GetNumberOfEvents() const {return AliRunLoader::GetRunLoader()->GetNumberOfEvents() + fNBgEvents;} + virtual Int_t GetNumberOfEvents() const {return AliRunLoader::Instance()->GetNumberOfEvents() + fNBgEvents;} void SetNBgEvents(Int_t nbg=0){fNBgEvents = nbg;} static TMCProcess IntToMCProcess(Int_t no); diff --git a/EVGEN/AliGenExtFile.cxx b/EVGEN/AliGenExtFile.cxx index d0ae8b91df4..37943937e16 100644 --- a/EVGEN/AliGenExtFile.cxx +++ b/EVGEN/AliGenExtFile.cxx @@ -182,7 +182,7 @@ void AliGenExtFile::Generate() void AliGenExtFile::CdEventFile() { // CD back to the event file - (AliRunLoader::GetRunLoader())->CdGAFile(); + AliRunLoader::Instance()->CdGAFile(); } diff --git a/EVGEN/AliGenFLUKAsource.cxx b/EVGEN/AliGenFLUKAsource.cxx index 236ac1f5707..92ace3eff93 100644 --- a/EVGEN/AliGenFLUKAsource.cxx +++ b/EVGEN/AliGenFLUKAsource.cxx @@ -204,7 +204,7 @@ void AliGenFLUKAsource::Generate() if (gAlice) printf("AliRun object found on file\n"); if (!gAlice) gAlice = new AliRun("gAlice","Alice test program"); } - TTree *fAli=AliRunLoader::GetRunLoader()->TreeK(); + TTree *fAli=AliRunLoader::Instance()->TreeK(); if (fAli) pFile =fAli->GetCurrentFile(); pFile->cd(); printf("Generate - I'm out \n"); @@ -295,7 +295,7 @@ void AliGenFLUKAsource::Generate() if (gAlice) printf("AliRun object found on file\n"); if (!gAlice) gAlice = new AliRun("gAlice","Alice test program"); } - TTree *fAli=AliRunLoader::GetRunLoader()->TreeK(); + TTree *fAli=AliRunLoader::Instance()->TreeK(); if (fAli) pFile =fAli->GetCurrentFile(); pFile->cd(); } diff --git a/EVGEN/AliGenMUONCocktail.cxx b/EVGEN/AliGenMUONCocktail.cxx index e3f65a4ad73..89fe4de562b 100644 --- a/EVGEN/AliGenMUONCocktail.cxx +++ b/EVGEN/AliGenMUONCocktail.cxx @@ -374,7 +374,7 @@ void AliGenMUONCocktail::Generate() Bool_t primordialTrigger = kFALSE; while(!primordialTrigger) { //Reseting stack - AliRunLoader * runloader = AliRunLoader::GetRunLoader(); + AliRunLoader * runloader = AliRunLoader::Instance(); if (runloader) if (runloader->Stack()) runloader->Stack()->Clean(); diff --git a/EVGEN/AliGenMUONCocktailpp.cxx b/EVGEN/AliGenMUONCocktailpp.cxx index 45d0107a9b7..f71a6b1137e 100644 --- a/EVGEN/AliGenMUONCocktailpp.cxx +++ b/EVGEN/AliGenMUONCocktailpp.cxx @@ -347,7 +347,7 @@ void AliGenMUONCocktailpp::Generate() Bool_t primordialTrigger = kFALSE; while(!primordialTrigger) { //Reseting stack - AliRunLoader * runloader = AliRunLoader::GetRunLoader(); + AliRunLoader * runloader = AliRunLoader::Instance(); if (runloader) if (runloader->Stack()) runloader->Stack()->Clean(); diff --git a/EVGEN/AliGenPileup.cxx b/EVGEN/AliGenPileup.cxx index 1d8336dc799..39eca7c45d6 100644 --- a/EVGEN/AliGenPileup.cxx +++ b/EVGEN/AliGenPileup.cxx @@ -208,7 +208,7 @@ void AliGenPileup::Generate() // Loop over the generated collision times, call the generator // and correct the partcile times in the stack - AliStack *stack = AliRunLoader::GetRunLoader()->Stack(); + AliStack *stack = AliRunLoader::Instance()->Stack(); Int_t lastpart=0; entry->SetFirst(lastpart); diff --git a/EVGEN/AliGenReaderTreeK.cxx b/EVGEN/AliGenReaderTreeK.cxx index 09f54ff32ac..5f31a5b7312 100644 --- a/EVGEN/AliGenReaderTreeK.cxx +++ b/EVGEN/AliGenReaderTreeK.cxx @@ -79,7 +79,7 @@ void AliGenReaderTreeK::Init() // Initialization // Connect base file and file to read from - TTree *ali = AliRunLoader::GetRunLoader()->TreeE(); + TTree *ali = AliRunLoader::Instance()->TreeE(); if (ali) { fBaseFile = ali->GetCurrentFile(); } else { diff --git a/HLT/MUON/OfflineInterface/AliHLTMUONDigitPublisherComponent.cxx b/HLT/MUON/OfflineInterface/AliHLTMUONDigitPublisherComponent.cxx index 12a3c58346e..35e3c4d29ef 100644 --- a/HLT/MUON/OfflineInterface/AliHLTMUONDigitPublisherComponent.cxx +++ b/HLT/MUON/OfflineInterface/AliHLTMUONDigitPublisherComponent.cxx @@ -683,7 +683,7 @@ int AliHLTMUONDigitPublisherComponent::GetEvent( } // Make sure we have the correct CTP trigger loaded. - AliRunLoader* runloader = AliRunLoader::GetRunLoader(); + AliRunLoader* runloader = AliRunLoader::Instance(); if (runloader != NULL) { if (runloader->GetTrigger() == NULL) @@ -917,7 +917,7 @@ int AliHLTMUONDigitPublisherComponent::WriteTrackerDDL( AliRawDataHeader* header = reinterpret_cast(outBuffer); // Fill header with default values. *header = AliRawDataHeader(); - AliRunLoader* runloader = AliRunLoader::GetRunLoader(); + AliRunLoader* runloader = AliRunLoader::Instance(); if (runloader != NULL) { if (runloader->GetTrigger() != NULL) @@ -1124,7 +1124,7 @@ int AliHLTMUONDigitPublisherComponent::WriteTriggerDDL( AliRawDataHeader* header = reinterpret_cast(outBuffer); // Fill header with default values. *header = AliRawDataHeader(); - AliRunLoader* runloader = AliRunLoader::GetRunLoader(); + AliRunLoader* runloader = AliRunLoader::Instance(); if (runloader != NULL) { if (runloader->GetTrigger() != NULL) diff --git a/HLT/TPCLib/tracking-ca/AliTPCtrackerCA.cxx b/HLT/TPCLib/tracking-ca/AliTPCtrackerCA.cxx index 36018226241..df58d5e195a 100644 --- a/HLT/TPCLib/tracking-ca/AliTPCtrackerCA.cxx +++ b/HLT/TPCLib/tracking-ca/AliTPCtrackerCA.cxx @@ -154,7 +154,7 @@ Int_t AliTPCtrackerCA::LoadClusters (TTree * fromTree) // load mc tracks while( fDoHLTPerformance ){ if( !gAlice ) break; - AliRunLoader *rl = AliRunLoader::GetRunLoader();//gAlice->GetRunLoader(); + AliRunLoader *rl = AliRunLoader::Instance();//gAlice->GetRunLoader(); if( !rl ) break; rl->LoadKinematics(); AliStack *stack = rl->Stack(); diff --git a/ITS/AliCascadeFindVertices.C b/ITS/AliCascadeFindVertices.C index a1e070accef..6639df8739a 100644 --- a/ITS/AliCascadeFindVertices.C +++ b/ITS/AliCascadeFindVertices.C @@ -15,7 +15,7 @@ Int_t AliCascadeFindVertices(Int_t nev=5) { cerr<<"Looking for cascade vertices...\n"; if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/ITS/AliITS.cxx b/ITS/AliITS.cxx index 2ea56ef68d5..72636bd63b4 100644 --- a/ITS/AliITS.cxx +++ b/ITS/AliITS.cxx @@ -1128,7 +1128,7 @@ Bool_t AliITS::Raw2SDigits(AliRawReader* rawReader) TClonesArray** modA = new TClonesArray*[size]; for (Int_t mod = 0; mod < size; mod++) modA[mod] = new TClonesArray("AliITSpListItem", 10000); - AliLoader* loader = (AliRunLoader::GetRunLoader())->GetLoader("ITSLoader"); + AliLoader* loader = (AliRunLoader::Instance())->GetLoader("ITSLoader"); if (!loader) { Error("Open","Can not get ITS loader from Run Loader"); diff --git a/ITS/AliITSAnalizeSPDHits.C b/ITS/AliITSAnalizeSPDHits.C index 56e229153aa..2a58126cda5 100644 --- a/ITS/AliITSAnalizeSPDHits.C +++ b/ITS/AliITSAnalizeSPDHits.C @@ -8,7 +8,7 @@ void AliITSAnalizeSPDHits(TString hfn="galice.root",Int_t mod=-1, loadlibs(); } else { if(gAlice){ - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/ITS/AliITSClusterFinder.cxx b/ITS/AliITSClusterFinder.cxx index dd557250cca..107adbc9787 100644 --- a/ITS/AliITSClusterFinder.cxx +++ b/ITS/AliITSClusterFinder.cxx @@ -269,7 +269,7 @@ void AliITSClusterFinder::CheckLabels2(Int_t lab[10]) { //------------------------------------------------------------ // Tries to find mother's labels //------------------------------------------------------------ - AliRunLoader *rl = AliRunLoader::GetRunLoader(); + AliRunLoader *rl = AliRunLoader::Instance(); TTree *trK=(TTree*)rl->TreeK(); if(trK){ @@ -343,7 +343,7 @@ void AliITSClusterFinder::CheckLabels2(Int_t lab[10]) { //______________________________________________________________________ void AliITSClusterFinder::AddLabel(Int_t lab[10], Int_t label) { //add label to the cluster - AliRunLoader *rl = AliRunLoader::GetRunLoader(); + AliRunLoader *rl = AliRunLoader::Instance(); TTree *trK=(TTree*)rl->TreeK(); if(trK){ if(label<0) return; // In case of no label just exit diff --git a/ITS/AliITSCompareHitsRecPoints.C b/ITS/AliITSCompareHitsRecPoints.C index 1a6ee3ebc20..a811750b964 100644 --- a/ITS/AliITSCompareHitsRecPoints.C +++ b/ITS/AliITSCompareHitsRecPoints.C @@ -17,7 +17,7 @@ Bool_t AliITSCompareHitsRecPoints(Char_t *rfn="galice.root"){ loadlibs(); } else { if(gAlice){ - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } // end if gAlice diff --git a/ITS/AliITSComparisonV2.C b/ITS/AliITSComparisonV2.C index 7ead3731b9b..34aa7df2777 100644 --- a/ITS/AliITSComparisonV2.C +++ b/ITS/AliITSComparisonV2.C @@ -364,7 +364,7 @@ Int_t AliITSComparisonV2 Int_t GoodTracksITS(const Char_t *dir) { if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice;//if everything was OK here it is already NULL gAlice = 0x0; } diff --git a/ITS/AliITSDigitPlot.C b/ITS/AliITSDigitPlot.C index b8bf5aa3e6b..71d5da2dc45 100644 --- a/ITS/AliITSDigitPlot.C +++ b/ITS/AliITSDigitPlot.C @@ -74,7 +74,7 @@ void AliITSDigitPlot(Int_t istart=0,Int_t iend=-1, gROOT->ProcessLine(".x $(ALICE_ROOT)/macros/loadlibs.C"); } if(gAlice){ - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } // end if gAlice diff --git a/ITS/AliITSDigits2RecPoints.C b/ITS/AliITSDigits2RecPoints.C index 00843df96e4..cebc14af93c 100644 --- a/ITS/AliITSDigits2RecPoints.C +++ b/ITS/AliITSDigits2RecPoints.C @@ -27,7 +27,7 @@ Int_t AliITSDigits2RecPoints(TString filename="galice.root",TString fileRP=""){ if (gClassTable->GetID("AliRun") < 0) { gROOT->ProcessLine(".x $(ALICE_ROOT)/macros/loadlibs.C"); }else if (gAlice){ - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } // end if diff --git a/ITS/AliITSFindClustersV2.C b/ITS/AliITSFindClustersV2.C index a38d3fa7a43..b601b7273d2 100644 --- a/ITS/AliITSFindClustersV2.C +++ b/ITS/AliITSFindClustersV2.C @@ -36,7 +36,7 @@ Int_t AliITSFindClustersV2(char *inputRawData = NULL,TString filename="galice.ro // set opt equal to "SPD" or to "SDD" or to "SSD" do build // rec points for individual subdetectors if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = NULL; } diff --git a/ITS/AliITSFindPrimaryVertex.C b/ITS/AliITSFindPrimaryVertex.C index 14c301f2eea..5e343a2fd18 100644 --- a/ITS/AliITSFindPrimaryVertex.C +++ b/ITS/AliITSFindPrimaryVertex.C @@ -25,7 +25,7 @@ void AliITSFindPrimaryVertex(Int_t evNumber1=0,Int_t NumbofEv=1, const char *fil gROOT->Macro("loadlibs.C"); } else { if(gAlice){ - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/ITS/AliITSFindTracksANN.C b/ITS/AliITSFindTracksANN.C index db2254cc358..bb5a8060752 100644 --- a/ITS/AliITSFindTracksANN.C +++ b/ITS/AliITSFindTracksANN.C @@ -27,7 +27,7 @@ Int_t AliITSFindTracksANN // Remove an already existing Run Loader if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/ITS/AliITSFindTracksSA.C b/ITS/AliITSFindTracksSA.C index 89fc50dc36a..bb1dfb6f412 100644 --- a/ITS/AliITSFindTracksSA.C +++ b/ITS/AliITSFindTracksSA.C @@ -29,7 +29,7 @@ Int_t AliITSFindTracksSA(Int_t evin=0,Int_t nevents=1,char *opt="onlyITS+6/6",co if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/ITS/AliITSGeoPlot.C b/ITS/AliITSGeoPlot.C index 3ceeab904b2..3dd1fca5a8b 100644 --- a/ITS/AliITSGeoPlot.C +++ b/ITS/AliITSGeoPlot.C @@ -101,7 +101,7 @@ Int_t AliITSGeoPlot (Int_t evesel=0, char *opt="All+ClustersV2", TString filenam } else { if(gAlice){ - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/ITS/AliITSHits2Digits.C b/ITS/AliITSHits2Digits.C index ee679571691..ff0b49f9780 100644 --- a/ITS/AliITSHits2Digits.C +++ b/ITS/AliITSHits2Digits.C @@ -22,7 +22,7 @@ Int_t AliITSHits2Digits(TString inFile = "galice.root"){ if (gClassTable->GetID("AliRun") < 0) { gROOT->ProcessLine(".x $(ALICE_ROOT)/macros/loadlibs.C"); }else if (gAlice){ - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/ITS/AliITSHits2FastRecPoints.C b/ITS/AliITSHits2FastRecPoints.C index 27e66572bb1..6b6328a6a3b 100644 --- a/ITS/AliITSHits2FastRecPoints.C +++ b/ITS/AliITSHits2FastRecPoints.C @@ -37,7 +37,7 @@ void AliITSHits2FastRecPoints (Int_t evNumber1=0,Int_t evNumber2=0, TString inFi } else { if(gAlice){ - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/ITS/AliITSHits2SDigits.C b/ITS/AliITSHits2SDigits.C index 14104887b1d..2f53e133a5a 100644 --- a/ITS/AliITSHits2SDigits.C +++ b/ITS/AliITSHits2SDigits.C @@ -22,7 +22,7 @@ Int_t AliITSHits2SDigits(TString filename = "galice.root") if (gClassTable->GetID("AliRun") < 0) { gROOT->ProcessLine(".x $(ALICE_ROOT)/macros/loadlibs.C"); }else if (gAlice){ - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/ITS/AliITSL2GConvertPointsV1.C b/ITS/AliITSL2GConvertPointsV1.C index e715b1ee524..86a6d1c18b7 100644 --- a/ITS/AliITSL2GConvertPointsV1.C +++ b/ITS/AliITSL2GConvertPointsV1.C @@ -15,7 +15,7 @@ Int_t AliITSL2GConvertPoints // Load event files if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/ITS/AliITSL2GConvertPointsV2.C b/ITS/AliITSL2GConvertPointsV2.C index 2beb0d1ca0f..97a16faaca3 100644 --- a/ITS/AliITSL2GConvertPointsV2.C +++ b/ITS/AliITSL2GConvertPointsV2.C @@ -15,7 +15,7 @@ Int_t AliITSL2GConvertPointsV2 // Load event files if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/ITS/AliITSNeuralFit.C b/ITS/AliITSNeuralFit.C index 8f239890086..490ee470309 100644 --- a/ITS/AliITSNeuralFit.C +++ b/ITS/AliITSNeuralFit.C @@ -20,7 +20,7 @@ void AliITSNeuralFit (Int_t field_factor = 1, Bool_t exact_pid = kTRUE, // Remove an already existing Run Loader if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/ITS/AliITSPrintGeom.C b/ITS/AliITSPrintGeom.C index 8ddd9cc180e..d9e16673942 100644 --- a/ITS/AliITSPrintGeom.C +++ b/ITS/AliITSPrintGeom.C @@ -16,7 +16,7 @@ void AliITSPrintGeom(TString hfn="galice.root",Int_t mod=-1){ loadlibs(); }else { if(gAlice){ - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } // end if gAlice diff --git a/ITS/AliITSPrintHits.C b/ITS/AliITSPrintHits.C index ecfe4096b6d..1c4aed14056 100644 --- a/ITS/AliITSPrintHits.C +++ b/ITS/AliITSPrintHits.C @@ -9,7 +9,7 @@ void AliITSPrintHits(TString hfn="galice.root",Int_t mod=-1, } else { if(gAlice){ - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/ITS/AliITSPrintRecPoints.C b/ITS/AliITSPrintRecPoints.C index d29647d0e8b..2ca2c884f98 100644 --- a/ITS/AliITSPrintRecPoints.C +++ b/ITS/AliITSPrintRecPoints.C @@ -35,7 +35,7 @@ void AliITSPrintRecPoints(Int_t outtype=1,TString rfn="galice.root", } else { if(gAlice){ - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/ITS/AliITSSDigits2Digits.C b/ITS/AliITSSDigits2Digits.C index 248d8d60b6c..7ebdb2e4ada 100644 --- a/ITS/AliITSSDigits2Digits.C +++ b/ITS/AliITSSDigits2Digits.C @@ -8,7 +8,7 @@ void AliITSSDigits2Digits(TString inFile= "galice.root", TString outFile = "") TStopwatch timer; if(gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } // end if gAlice diff --git a/ITS/AliITSTrigger.cxx b/ITS/AliITSTrigger.cxx index c792562c9d6..4fca33fcef8 100644 --- a/ITS/AliITSTrigger.cxx +++ b/ITS/AliITSTrigger.cxx @@ -76,7 +76,7 @@ void AliITSTrigger::Trigger() { // ********** Get run loader for the current event ********** - AliRunLoader* runLoader = AliRunLoader::GetRunLoader(); + AliRunLoader* runLoader = AliRunLoader::Instance(); AliITSLoader* loader = (AliITSLoader* )runLoader->GetLoader( "ITSLoader" ); AliITSgeom* geom = loader->GetITSgeom(); diff --git a/ITS/AliITSVertexer.cxx b/ITS/AliITSVertexer.cxx index bdc407151a7..05e8f6ccf99 100644 --- a/ITS/AliITSVertexer.cxx +++ b/ITS/AliITSVertexer.cxx @@ -160,7 +160,7 @@ void AliITSVertexer::SetLaddersOnLayer2(Int_t ladwid){ void AliITSVertexer::Init(TString filename){ // Initialize the vertexer in case of // analysis of an entire file - AliRunLoader *rl = AliRunLoader::GetRunLoader(); + AliRunLoader *rl = AliRunLoader::Instance(); if(!rl){ Fatal("AliITSVertexer","Run Loader not found"); } @@ -174,7 +174,7 @@ void AliITSVertexer::Init(TString filename){ //______________________________________________________________________ void AliITSVertexer::WriteCurrentVertex(){ // Write the current AliVertex object to file fOutFile - AliRunLoader *rl = AliRunLoader::GetRunLoader(); + AliRunLoader *rl = AliRunLoader::Instance(); AliITSLoader* itsLoader = (AliITSLoader*) rl->GetLoader("ITSLoader"); fCurrentVertex->SetName("Vertex"); // const char * name = fCurrentVertex->GetName(); @@ -187,7 +187,7 @@ void AliITSVertexer::WriteCurrentVertex(){ void AliITSVertexer::FindVertices(){ // computes the vertices of the events in the range FirstEvent - LastEvent - AliRunLoader *rl = AliRunLoader::GetRunLoader(); + AliRunLoader *rl = AliRunLoader::Instance(); AliITSLoader* itsloader = (AliITSLoader*) rl->GetLoader("ITSLoader"); itsloader->LoadRecPoints("read"); for(Int_t i=fFirstEvent;i<=fLastEvent;i++){ diff --git a/ITS/AliITSVertexerFast.cxx b/ITS/AliITSVertexerFast.cxx index e48ab3898f2..2e20c39dbde 100644 --- a/ITS/AliITSVertexerFast.cxx +++ b/ITS/AliITSVertexerFast.cxx @@ -40,7 +40,7 @@ fSmear(0) { // Default Constructor fSmear = 0; - AliRunLoader *rl =AliRunLoader::GetRunLoader(); + AliRunLoader *rl =AliRunLoader::Instance(); TTree *trK=(TTree*)rl->TreeK(); if(!trK)AliFatal("This class should be used only with simulated events!!"); rl->LoadHeader(); @@ -54,7 +54,7 @@ fSmear(0) fSmear = new Double_t[3]; for(Int_t i=0;i<3;i++)fSmear[i]=smear[i]; Info("AliITSVertexerFast","Gaussian smaring of the generated vertex. Parameters %f12.5 , %f12.5 , %f12.5 \n",fSmear[0],fSmear[1],fSmear[2]); - AliRunLoader *rl =AliRunLoader::GetRunLoader(); + AliRunLoader *rl =AliRunLoader::Instance(); TTree *trK=(TTree*)rl->TreeK(); if(!trK)AliFatal("This class should be used only with simulated events!!"); rl->LoadHeader(); @@ -75,7 +75,7 @@ AliESDVertex* AliITSVertexerFast::FindVertexForCurrentEvent(TTree *itsClusterTre AliWarning(Form("This class should be used only with simulated events!! Input cluster tree (%p) will not be used!!",itsClusterTree)); fCurrentVertex = 0; - AliRunLoader *rl =AliRunLoader::GetRunLoader(); + AliRunLoader *rl =AliRunLoader::Instance(); TArrayF primaryVertex(3); // true vertex AliHeader* header = rl->GetHeader(); AliGenEventHeader* genEventHeader = header->GenEventHeader(); diff --git a/ITS/AliITSclustererV2.cxx b/ITS/AliITSclustererV2.cxx index 1f7b7e39436..e81800fba27 100644 --- a/ITS/AliITSclustererV2.cxx +++ b/ITS/AliITSclustererV2.cxx @@ -185,7 +185,7 @@ void AliITSclustererV2::Digits2Clusters(AliRawReader* rawReader) { //------------------------------------------------------------ // This function creates ITS clusters from raw data //------------------------------------------------------------ - AliRunLoader* runLoader = AliRunLoader::GetRunLoader(); + AliRunLoader* runLoader = AliRunLoader::Instance(); if (!runLoader) { Error("Digits2Clusters", "no run loader found"); return; @@ -258,7 +258,7 @@ static void CheckLabels(Int_t lab[3]) { //------------------------------------------------------------ // Tries to find mother's labels //------------------------------------------------------------ - AliRunLoader *rl = AliRunLoader::GetRunLoader(); + AliRunLoader *rl = AliRunLoader::Instance(); TTree *trK=(TTree*)rl->TreeK(); if(trK){ @@ -324,7 +324,7 @@ static void CheckLabels2(Int_t lab[10]) { //------------------------------------------------------------ // Tries to find mother's labels //------------------------------------------------------------ - AliRunLoader *rl = AliRunLoader::GetRunLoader(); + AliRunLoader *rl = AliRunLoader::Instance(); TTree *trK=(TTree*)rl->TreeK(); if(trK){ @@ -395,7 +395,7 @@ static void CheckLabels2(Int_t lab[10]) { static void AddLabel(Int_t lab[10], Int_t label) { // add label of the particle in the kine tree which originates this cluster // (used for reconstruction of MC data only, for comparison purposes) - AliRunLoader *rl = AliRunLoader::GetRunLoader(); + AliRunLoader *rl = AliRunLoader::Instance(); TTree *trK=(TTree*)rl->TreeK(); if(trK){ diff --git a/ITS/AliITSsDigitize.cxx b/ITS/AliITSsDigitize.cxx index 6a9e6329800..8bdad8adf95 100644 --- a/ITS/AliITSsDigitize.cxx +++ b/ITS/AliITSsDigitize.cxx @@ -124,7 +124,7 @@ Bool_t AliITSsDigitize::Init(){ fDet[0] = fDet[1] = fDet[2] = kTRUE; fEnt0 = 0; - fEnt = AliRunLoader::GetRunLoader()->GetNumberOfEvents(); + fEnt = AliRunLoader::Instance()->GetNumberOfEvents(); AliLoader* loader = fRunLoader->GetLoader("ITSLoader"); diff --git a/ITS/AliITSspdLayer1Coverage.C b/ITS/AliITSspdLayer1Coverage.C index 0bd7743150e..d02237a95fc 100644 --- a/ITS/AliITSspdLayer1Coverage.C +++ b/ITS/AliITSspdLayer1Coverage.C @@ -8,7 +8,7 @@ void AliITSspdLayer1Coverage(TString hfn="galice.root",Int_t mod=-1, loadlibs(); } else { if(gAlice){ - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/ITS/EvaluateSPDEffWithTracklets.C b/ITS/EvaluateSPDEffWithTracklets.C index 198edac96df..c07f0688e35 100644 --- a/ITS/EvaluateSPDEffWithTracklets.C +++ b/ITS/EvaluateSPDEffWithTracklets.C @@ -66,7 +66,7 @@ void EvaluateSPDEffWithTracklets(Char_t* dir=".", Bool_t mc=kTRUE, Bool_t bckg=k AliRunLoader* runLoader; if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/ITS/MakeSDDGeoMap.C b/ITS/MakeSDDGeoMap.C index 3e64b4afee8..85e94d1855c 100644 --- a/ITS/MakeSDDGeoMap.C +++ b/ITS/MakeSDDGeoMap.C @@ -26,7 +26,7 @@ void MakeSDDGeoMap(){ } else { if(gAlice){ - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/ITS/ShowITSHitsRecPoints.C b/ITS/ShowITSHitsRecPoints.C index 9311aae5ef7..79d2fa668c5 100644 --- a/ITS/ShowITSHitsRecPoints.C +++ b/ITS/ShowITSHitsRecPoints.C @@ -28,7 +28,7 @@ Int_t ShowITSHitsRecPoints(Bool_t align=kFALSE, } else { if(gAlice){ - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } @@ -338,7 +338,7 @@ Int_t ShowITSHitsRecPointsNtuple(Bool_t align=kFALSE, } else { if(gAlice){ - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/ITS/ShowSPDRecPoints.C b/ITS/ShowSPDRecPoints.C index 1c0e90e4871..0b721a2433c 100644 --- a/ITS/ShowSPDRecPoints.C +++ b/ITS/ShowSPDRecPoints.C @@ -203,7 +203,7 @@ void ShowSPDRecPoints(Int_t RunStart, Int_t RunStop){ } else { if (gAlice){ - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/ITS/testITSMultReco.C b/ITS/testITSMultReco.C index c5a2dec5bcc..b4ff7d947a4 100755 --- a/ITS/testITSMultReco.C +++ b/ITS/testITSMultReco.C @@ -27,7 +27,7 @@ // get runloader if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/MONITOR/galice.C b/MONITOR/galice.C index adc0742a416..a158e8e1e0e 100644 --- a/MONITOR/galice.C +++ b/MONITOR/galice.C @@ -1,8 +1,8 @@ // In order to create galice.root follow the steps shown below // // gAlice->Init("galice.C"); -// AliRunLoader::GetRunLoader()->Write(); -// delete AliRunLoader::GetRunLoader(); +// AliRunLoader::Instance()->Write(); +// delete AliRunLoader::Instance(); // diff --git a/MONITOR/monitor.C b/MONITOR/monitor.C index 7a79d10bf3b..01967e9253b 100644 --- a/MONITOR/monitor.C +++ b/MONITOR/monitor.C @@ -26,8 +26,8 @@ void monitor(Bool_t batchMode = kFALSE, // make sure galice.root is there if (!gSystem->Which(".", "galice.root")) { gAlice->InitMC("$ALICE_ROOT/MONITOR/galice.C"); - AliRunLoader::GetRunLoader()->Write(); - delete AliRunLoader::GetRunLoader(); + AliRunLoader::Instance()->Write(); + delete AliRunLoader::Instance(); } // start the monitoring diff --git a/MUON/AliMUONClusterFinderMLEM.cxx b/MUON/AliMUONClusterFinderMLEM.cxx index d72c2b69b27..e49942aa814 100644 --- a/MUON/AliMUONClusterFinderMLEM.cxx +++ b/MUON/AliMUONClusterFinderMLEM.cxx @@ -125,7 +125,7 @@ AliMUONClusterFinderMLEM::Prepare(Int_t detElemId, fSplitter->SetDebug(fDebug); // find out current event number, and reset the cluster number - AliRunLoader *runLoader = AliRunLoader::GetRunLoader(); + AliRunLoader *runLoader = AliRunLoader::Instance(); fEventNumber = runLoader ? runLoader->GetEventNumber() : 0; fClusterNumber = -1; fClusterList.Delete(); diff --git a/MUON/AliMUONClusterFinderPeakCOG.cxx b/MUON/AliMUONClusterFinderPeakCOG.cxx index 0790944bda2..ae50b97ac43 100644 --- a/MUON/AliMUONClusterFinderPeakCOG.cxx +++ b/MUON/AliMUONClusterFinderPeakCOG.cxx @@ -112,7 +112,7 @@ AliMUONClusterFinderPeakCOG::Prepare(Int_t detElemId, TClonesArray* pads[2], fDetElemId = detElemId; // find out current event number, and reset the cluster number - AliRunLoader *runLoader = AliRunLoader::GetRunLoader(); + AliRunLoader *runLoader = AliRunLoader::Instance(); fEventNumber = runLoader ? runLoader->GetEventNumber() : 0; fClusterNumber = -1; fClusterList.Delete(); diff --git a/MUON/AliMUONClusterFinderPeakFit.cxx b/MUON/AliMUONClusterFinderPeakFit.cxx index 7a370a1bfa3..9dcfced9981 100644 --- a/MUON/AliMUONClusterFinderPeakFit.cxx +++ b/MUON/AliMUONClusterFinderPeakFit.cxx @@ -185,7 +185,7 @@ AliMUONClusterFinderPeakFit::Prepare(Int_t detElemId, TClonesArray* pads[2], fDetElemId = detElemId; // find out current event number, and reset the cluster number - AliRunLoader *runLoader = AliRunLoader::GetRunLoader(); + AliRunLoader *runLoader = AliRunLoader::Instance(); fEventNumber = runLoader ? runLoader->GetEventNumber() : 0; fClusterNumber = -1; fClusterList.Delete(); diff --git a/MUON/AliMUONPedestalEventGenerator.cxx b/MUON/AliMUONPedestalEventGenerator.cxx index fabf0891a34..bad184684fd 100644 --- a/MUON/AliMUONPedestalEventGenerator.cxx +++ b/MUON/AliMUONPedestalEventGenerator.cxx @@ -436,10 +436,10 @@ AliRunLoader* AliMUONPedestalEventGenerator::LoadRun(const char* mode) { /// Get access to AliRunLoader object - while (AliRunLoader::GetRunLoader()) + while (AliRunLoader::Instance()) { - AliDebug(1,Form("Deleting AliRunLoader %p",AliRunLoader::GetRunLoader())); - delete AliRunLoader::GetRunLoader(); + AliDebug(1,Form("Deleting AliRunLoader %p",AliRunLoader::Instance())); + delete AliRunLoader::Instance(); } AliRunLoader* runLoader = diff --git a/MUON/AliMUONSDigitizerV2.cxx b/MUON/AliMUONSDigitizerV2.cxx index 015c7c9ecf1..ce0b6be5501 100644 --- a/MUON/AliMUONSDigitizerV2.cxx +++ b/MUON/AliMUONSDigitizerV2.cxx @@ -92,7 +92,7 @@ AliMUONSDigitizerV2::Exec(Option_t*) AliDebug(1,""); - AliRunLoader* runLoader = AliRunLoader::GetRunLoader(); + AliRunLoader* runLoader = AliRunLoader::Instance(); AliLoader* loader = runLoader->GetDetectorLoader("MUON"); loader->LoadHits("READ"); diff --git a/MUON/AliMUONTrigger.cxx b/MUON/AliMUONTrigger.cxx index 55dba3da0a3..5f436b3bc7a 100644 --- a/MUON/AliMUONTrigger.cxx +++ b/MUON/AliMUONTrigger.cxx @@ -82,7 +82,7 @@ void AliMUONTrigger::Trigger() { /// sets the trigger inputs - AliRunLoader* runLoader = AliRunLoader::GetRunLoader(); + AliRunLoader* runLoader = AliRunLoader::Instance(); AliLoader * muonLoader = runLoader->GetDetectorLoader("MUON"); muonLoader->LoadDigits("READ"); diff --git a/MUON/AliMUONTriggerGUI.cxx b/MUON/AliMUONTriggerGUI.cxx index fd50bb215e6..c7f83fd4e83 100644 --- a/MUON/AliMUONTriggerGUI.cxx +++ b/MUON/AliMUONTriggerGUI.cxx @@ -954,7 +954,7 @@ void AliMUONTriggerGUI::DoRunGalApply() fRunLoader->LoadgAlice(); gAlice = fRunLoader->GetAliRun(); - fEventsPerRun = AliRunLoader::GetRunLoader()->GetNumberOfEvents(); + fEventsPerRun = AliRunLoader::Instance()->GetNumberOfEvents(); fLoader = fRunLoader->GetLoader("MUONLoader"); fRunLoader->GetEvent(fEvent); diff --git a/PHOS/AliPHOSAnalyze.cxx b/PHOS/AliPHOSAnalyze.cxx index 01ab5540da9..379459892a7 100644 --- a/PHOS/AliPHOSAnalyze.cxx +++ b/PHOS/AliPHOSAnalyze.cxx @@ -1260,7 +1260,7 @@ void AliPHOSAnalyze::Contamination(){ //print Final Table - maxevent = (Int_t)AliRunLoader::GetRunLoader()->TreeE()->GetEntries() ; + maxevent = (Int_t)AliRunLoader::Instance()->TreeE()->GetEntries() ; TString message ; message = "Resolutions: Analyzed %d event(s)\n" ; diff --git a/PHOS/AliPHOSRaw2Digits.cxx b/PHOS/AliPHOSRaw2Digits.cxx index 80aec59358b..7d09db5fb12 100644 --- a/PHOS/AliPHOSRaw2Digits.cxx +++ b/PHOS/AliPHOSRaw2Digits.cxx @@ -288,7 +288,7 @@ Bool_t AliPHOSRaw2Digits::CloseRootFiles(void ){ printf("writing gAlice \n") ; fHeaderFile->cd() ; gAlice->Write(0,TObject::kOverwrite); - AliRunLoader::GetRunLoader()->TreeE()->Write(0,TObject::kOverwrite); + AliRunLoader::Instance()->TreeE()->Write(0,TObject::kOverwrite); } delete gAlice ; @@ -650,7 +650,7 @@ void AliPHOSRaw2Digits::WriteDigits(void){ //Write header fHeaderFile->cd() ; - AliRunLoader::GetRunLoader()->TreeE()->Fill(); + AliRunLoader::Instance()->TreeE()->Fill(); } //____________________________________________________________________________ void AliPHOSRaw2Digits::Print(const Option_t *)const{ diff --git a/PHOS/AliPHOSRecParticle.cxx b/PHOS/AliPHOSRecParticle.cxx index 3bc56ebbf89..34bc0d47a3d 100644 --- a/PHOS/AliPHOSRecParticle.cxx +++ b/PHOS/AliPHOSRecParticle.cxx @@ -98,7 +98,7 @@ Int_t AliPHOSRecParticle::GetNPrimariesToRecParticles() const { // Get the number of primaries at the origine of the RecParticle Int_t rv = 0 ; - AliRunLoader* rl = AliRunLoader::GetRunLoader() ; + AliRunLoader* rl = AliRunLoader::Instance() ; AliPHOSLoader * phosLoader = dynamic_cast(rl->GetLoader("PHOSLoader")); Int_t emcRPindex = dynamic_cast(phosLoader->TrackSegments()->At(GetPHOSTSIndex()))->GetEmcIndex(); dynamic_cast(phosLoader->EmcRecPoints()->At(emcRPindex))->GetPrimaries(rv) ; @@ -110,7 +110,7 @@ const TParticle * AliPHOSRecParticle::GetPrimary() const { // Get the primary particle at the origine of the RecParticle and // which has deposited the largest energy in SDigits - AliRunLoader* rl = AliRunLoader::GetRunLoader() ; + AliRunLoader* rl = AliRunLoader::Instance() ; AliPHOSLoader * phosLoader = dynamic_cast(rl->GetLoader("PHOSLoader")); rl->GetEvent(rl->GetEventNumber()) ; rl->LoadKinematics("READ"); @@ -165,7 +165,7 @@ Int_t AliPHOSRecParticle::GetPrimaryIndex() const // which the RecParticle is created from - AliRunLoader* rl = AliRunLoader::GetRunLoader() ; + AliRunLoader* rl = AliRunLoader::Instance() ; AliPHOSLoader * phosLoader = dynamic_cast(rl->GetLoader("PHOSLoader")); rl->GetEvent(rl->GetEventNumber()) ; rl->LoadHits("READ"); @@ -275,7 +275,7 @@ const TParticle * AliPHOSRecParticle::GetPrimary(Int_t index) const } else { Int_t dummy ; - AliRunLoader* rl = AliRunLoader::GetRunLoader() ; + AliRunLoader* rl = AliRunLoader::Instance() ; AliPHOSLoader * phosLoader = dynamic_cast(rl->GetLoader("PHOSLoader")); Int_t emcRPindex = dynamic_cast(phosLoader->TrackSegments()->At(GetPHOSTSIndex()))->GetEmcIndex(); diff --git a/PHOS/AliPHOSTrigger.cxx b/PHOS/AliPHOSTrigger.cxx index 2bcbe394c5b..f085d54a810 100644 --- a/PHOS/AliPHOSTrigger.cxx +++ b/PHOS/AliPHOSTrigger.cxx @@ -665,7 +665,7 @@ void AliPHOSTrigger::DoIt() { // does the trigger job - AliRunLoader* rl = AliRunLoader::GetRunLoader() ; + AliRunLoader* rl = AliRunLoader::Instance() ; AliPHOSLoader * phosLoader = dynamic_cast(rl->GetLoader("PHOSLoader")); // Get PHOS Geometry object diff --git a/PMD/AliPMDRecpointRead.C b/PMD/AliPMDRecpointRead.C index 967d389d6b5..8d93a02a39e 100644 --- a/PMD/AliPMDRecpointRead.C +++ b/PMD/AliPMDRecpointRead.C @@ -15,7 +15,7 @@ Int_t AliPMDRecpointRead(Int_t nevent = 1) { if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice;//if everything was OK here it is already NULL gAlice = 0x0; } diff --git a/PMD/AliPMDesdmake.C b/PMD/AliPMDesdmake.C index b66a69c9702..8c22faa9ff1 100644 --- a/PMD/AliPMDesdmake.C +++ b/PMD/AliPMDesdmake.C @@ -12,7 +12,7 @@ Int_t AliPMDesdmake(Int_t nevt = 1) { if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice;//if everything was OK here it is already NULL gAlice = 0x0; } diff --git a/PWG1/AliGenInfoMaker.cxx b/PWG1/AliGenInfoMaker.cxx index 61f2d421296..bb0fed28f8b 100644 --- a/PWG1/AliGenInfoMaker.cxx +++ b/PWG1/AliGenInfoMaker.cxx @@ -146,7 +146,7 @@ AliGenInfoMaker::AliGenInfoMaker(const char * fnGalice, const char* fnRes, // fLoader = AliRunLoader::Open(fnGalice); if (gAlice){ - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } diff --git a/PWG1/AliRecInfoMaker.cxx b/PWG1/AliRecInfoMaker.cxx index 319c5e89dd6..93c93eb165b 100644 --- a/PWG1/AliRecInfoMaker.cxx +++ b/PWG1/AliRecInfoMaker.cxx @@ -296,7 +296,7 @@ AliRecInfoMaker::AliRecInfoMaker(const char* fnGenTracks, // fLoader = AliRunLoader::Open(fnGalice); if (gAlice){ - //delete AliRunLoader::GetRunLoader(); + //delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } diff --git a/PYTHIA6/AliGenPythia.cxx b/PYTHIA6/AliGenPythia.cxx index d587bb7fe00..b68ab23cb15 100644 --- a/PYTHIA6/AliGenPythia.cxx +++ b/PYTHIA6/AliGenPythia.cxx @@ -555,8 +555,8 @@ void AliGenPythia::Generate() } fNpartons = fPythia->GetN(); } else { - printf("Loading Event %d\n",AliRunLoader::GetRunLoader()->GetEventNumber()); - fRL->GetEvent(AliRunLoader::GetRunLoader()->GetEventNumber()); + printf("Loading Event %d\n",AliRunLoader::Instance()->GetEventNumber()); + fRL->GetEvent(AliRunLoader::Instance()->GetEventNumber()); fPythia->SetN(0); LoadEvent(fRL->Stack(), 0 , 1); fPythia->Pyedit(21); diff --git a/PYTHIA6/AliGenPythiaPlus.cxx b/PYTHIA6/AliGenPythiaPlus.cxx index 52531d6b832..35bf65020a3 100644 --- a/PYTHIA6/AliGenPythiaPlus.cxx +++ b/PYTHIA6/AliGenPythiaPlus.cxx @@ -529,8 +529,8 @@ void AliGenPythiaPlus::Generate() } fNpartons = fPythia->GetNumberOfParticles(); } else { - printf("Loading Event %d\n",AliRunLoader::GetRunLoader()->GetEventNumber()); - fRL->GetEvent(AliRunLoader::GetRunLoader()->GetEventNumber()); + printf("Loading Event %d\n",AliRunLoader::Instance()->GetEventNumber()); + fRL->GetEvent(AliRunLoader::Instance()->GetEventNumber()); fPythia->SetNumberOfParticles(0); fPythia->LoadEvent(fRL->Stack(), 0 , 1); fPythia->EditEventList(21); @@ -1012,7 +1012,7 @@ Int_t AliGenPythiaPlus::GenerateMB() if (fStack) { particle = fStack->Particle(nt); } else { - particle = AliRunLoader::GetRunLoader()->Stack()->Particle(nt); + particle = AliRunLoader::Instance()->Stack()->Particle(nt); } // particle->SetFirstDaughter(fPythia->GetK(2, i)); // particle->SetLastDaughter(fPythia->GetK(3, i)); diff --git a/STEER/AliCTPRawData.cxx b/STEER/AliCTPRawData.cxx index d8f3f876730..b7e2f233317 100644 --- a/STEER/AliCTPRawData.cxx +++ b/STEER/AliCTPRawData.cxx @@ -64,7 +64,7 @@ void AliCTPRawData::RawData() ULong64_t l2class = 0; UChar_t l2cluster = 0; AliInfo("Storing the CTP DDL raw data..."); - AliRunLoader *runloader = AliRunLoader::GetRunLoader(); + AliRunLoader *runloader = AliRunLoader::Instance(); if (runloader) { if (!runloader->LoadTrigger()) { AliCentralTrigger *aCTP = runloader->GetTrigger(); diff --git a/STEER/AliCascadeComparison.C b/STEER/AliCascadeComparison.C index fdd1ff48ba6..34429532ddf 100644 --- a/STEER/AliCascadeComparison.C +++ b/STEER/AliCascadeComparison.C @@ -427,7 +427,7 @@ Int_t AliCascadeComparison(Int_t code=3312, const Char_t *dir=".") { Int_t GoodCascades(const Char_t *dir) { if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/STEER/AliESDComparisonMI.C b/STEER/AliESDComparisonMI.C index a03d69d737f..540c2a8c1f9 100644 --- a/STEER/AliESDComparisonMI.C +++ b/STEER/AliESDComparisonMI.C @@ -814,7 +814,7 @@ ESDCmpTr::ESDCmpTr(const char* fnGenTracks, // fLoader = AliRunLoader::Open(fnGalice); if (gAlice){ - //delete AliRunLoader::GetRunLoader(); + //delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } diff --git a/STEER/AliESDPmdTest.C b/STEER/AliESDPmdTest.C index 97902d55126..31b15c71f2b 100644 --- a/STEER/AliESDPmdTest.C +++ b/STEER/AliESDPmdTest.C @@ -16,7 +16,7 @@ Int_t AliESDPmdTest(Int_t nevent = 1) { if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice;//if everything was OK here it is already NULL gAlice = 0x0; } diff --git a/STEER/AliITSclusterComparison.C b/STEER/AliITSclusterComparison.C index a3bca076418..da6a438175a 100644 --- a/STEER/AliITSclusterComparison.C +++ b/STEER/AliITSclusterComparison.C @@ -34,7 +34,7 @@ AliITSClusterErrAnal::AliITSClusterErrAnal(Char_t *chloader ) // //SET Input loaders if (gAlice){ - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } diff --git a/STEER/AliKFParticleTest.C b/STEER/AliKFParticleTest.C index 3f0ffc8d02d..ac02216e0df 100644 --- a/STEER/AliKFParticleTest.C +++ b/STEER/AliKFParticleTest.C @@ -139,7 +139,7 @@ void RunV0( AliESDEvent *event ) cout<<"Event "<Stack(); if( !stack ) return; @@ -307,7 +307,7 @@ Int_t AliKFParticleTest(Int_t n1=0,Int_t n2=1000,char *dire="/d/alice10/sma/my_v cout <<" Opening "<MisalignGeometry(AliRunLoader::GetRunLoader()); + return AliSimulation::Instance()->MisalignGeometry(AliRunLoader::Instance()); } //_______________________________________________________________________ @@ -367,7 +367,7 @@ void AliMC::EnergySummary() Float_t ed, ed2; Int_t kn, i, left, j, id; const Float_t kzero=0; - Int_t ievent=AliRunLoader::GetRunLoader()->GetHeader()->GetEvent()+1; + Int_t ievent=AliRunLoader::Instance()->GetHeader()->GetEvent()+1; // // Energy loss information if(ievent) { @@ -435,7 +435,7 @@ void AliMC::BeginEvent() AliDebug(1, ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); AliDebug(1, ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"); - AliRunLoader *runloader=AliRunLoader::GetRunLoader(); + AliRunLoader *runloader=AliRunLoader::Instance(); /*******************************/ /* Clean after eventual */ @@ -559,7 +559,7 @@ void AliMC::FinishPrimary() // // Called at the end of each primary track // - AliRunLoader *runloader=AliRunLoader::GetRunLoader(); + AliRunLoader *runloader=AliRunLoader::Instance(); // static Int_t count=0; // const Int_t times=10; // This primary is finished, purify stack @@ -590,7 +590,7 @@ void AliMC::RemapHits() { // // Remaps the track labels of the hits - AliRunLoader *runloader=AliRunLoader::GetRunLoader(); + AliRunLoader *runloader=AliRunLoader::Instance(); AliStack* stack = runloader->Stack(); TList* hitLists = GetHitLists(); TIter next(hitLists); @@ -646,7 +646,7 @@ void AliMC::FinishEvent() fSum2Energy[i]+=fEventEnergy[i]*fEventEnergy[i]; } - AliRunLoader *runloader=AliRunLoader::GetRunLoader(); + AliRunLoader *runloader=AliRunLoader::Instance(); AliHeader* header = runloader->GetHeader(); AliStack* stack = runloader->Stack(); @@ -917,7 +917,7 @@ Int_t AliMC::GetCurrentTrackNumber() const { // // Returns current track // - return AliRunLoader::GetRunLoader()->Stack()->GetCurrentTrackNumber(); + return AliRunLoader::Instance()->Stack()->GetCurrentTrackNumber(); } //_______________________________________________________________________ @@ -926,7 +926,7 @@ void AliMC::DumpPart (Int_t i) const // // Dumps particle i in the stack // - AliRunLoader * runloader = AliRunLoader::GetRunLoader(); + AliRunLoader * runloader = AliRunLoader::Instance(); if (runloader->Stack()) runloader->Stack()->DumpPart(i); } @@ -937,7 +937,7 @@ void AliMC::DumpPStack () const // // Dumps the particle stack // - AliRunLoader * runloader = AliRunLoader::GetRunLoader(); + AliRunLoader * runloader = AliRunLoader::Instance(); if (runloader->Stack()) runloader->Stack()->DumpPStack(); } @@ -948,7 +948,7 @@ Int_t AliMC::GetNtrack() const { // Returns number of tracks in stack // Int_t ntracks = -1; - AliRunLoader * runloader = AliRunLoader::GetRunLoader(); + AliRunLoader * runloader = AliRunLoader::Instance(); if (runloader->Stack()) ntracks = runloader->Stack()->GetNtrack(); return ntracks; @@ -961,7 +961,7 @@ Int_t AliMC::GetPrimary(Int_t track) const // return number of primary that has generated track // Int_t nprimary = -999; - AliRunLoader * runloader = AliRunLoader::GetRunLoader(); + AliRunLoader * runloader = AliRunLoader::Instance(); if (runloader->Stack()) nprimary = runloader->Stack()->GetPrimary(track); return nprimary; @@ -972,7 +972,7 @@ TParticle* AliMC::Particle(Int_t i) const { // Returns the i-th particle from the stack taking into account // the remaping done by PurifyKine - AliRunLoader * runloader = AliRunLoader::GetRunLoader(); + AliRunLoader * runloader = AliRunLoader::Instance(); if (runloader) if (runloader->Stack()) return runloader->Stack()->Particle(i); @@ -984,7 +984,7 @@ const TObjArray* AliMC::Particles() const { // // Returns pointer to Particles array // - AliRunLoader * runloader = AliRunLoader::GetRunLoader(); + AliRunLoader * runloader = AliRunLoader::Instance(); if (runloader) if (runloader->Stack()) return runloader->Stack()->Particles(); @@ -998,7 +998,7 @@ void AliMC::PushTrack(Int_t done, Int_t parent, Int_t pdg, const Float_t *pmom, { // Delegate to stack // - AliRunLoader * runloader = AliRunLoader::GetRunLoader(); + AliRunLoader * runloader = AliRunLoader::Instance(); if (runloader) if (runloader->Stack()) runloader->Stack()->PushTrack(done, parent, pdg, pmom, vpos, polar, tof, @@ -1014,7 +1014,7 @@ void AliMC::PushTrack(Int_t done, Int_t parent, Int_t pdg, { // Delegate to stack // - AliRunLoader * runloader = AliRunLoader::GetRunLoader(); + AliRunLoader * runloader = AliRunLoader::Instance(); if (runloader) if (runloader->Stack()) runloader->Stack()->PushTrack(done, parent, pdg, px, py, pz, e, vx, vy, vz, tof, @@ -1026,7 +1026,7 @@ void AliMC::SetHighWaterMark(Int_t nt) const { // // Set high water mark for last track in event - AliRunLoader * runloader = AliRunLoader::GetRunLoader(); + AliRunLoader * runloader = AliRunLoader::Instance(); if (runloader) if (runloader->Stack()) runloader->Stack()->SetHighWaterMark(nt); @@ -1038,7 +1038,7 @@ void AliMC::KeepTrack(Int_t track) const // // Delegate to stack // - AliRunLoader * runloader = AliRunLoader::GetRunLoader(); + AliRunLoader * runloader = AliRunLoader::Instance(); if (runloader) if (runloader->Stack()) runloader->Stack()->KeepTrack(track); @@ -1049,7 +1049,7 @@ void AliMC::FlagTrack(Int_t track) const { // Delegate to stack // - AliRunLoader * runloader = AliRunLoader::GetRunLoader(); + AliRunLoader * runloader = AliRunLoader::Instance(); if (runloader) if (runloader->Stack()) runloader->Stack()->FlagTrack(track); @@ -1061,7 +1061,7 @@ void AliMC::SetCurrentTrack(Int_t track) const // // Set current track number // - AliRunLoader * runloader = AliRunLoader::GetRunLoader(); + AliRunLoader * runloader = AliRunLoader::Instance(); if (runloader) if (runloader->Stack()) runloader->Stack()->SetCurrentTrack(track); @@ -1175,7 +1175,7 @@ void AliMC::ReorderAndExpandTreeTR() // Reorder and expand the temporary track reference tree in order to match the kinematics tree // - AliRunLoader *rl = AliRunLoader::GetRunLoader(); + AliRunLoader *rl = AliRunLoader::Instance(); // // TreeTR AliDebug(1, "fRunLoader->MakeTrackRefsContainer()"); diff --git a/STEER/AliPIDComparison.C b/STEER/AliPIDComparison.C index 9a7325af0fb..60b49969bf2 100644 --- a/STEER/AliPIDComparison.C +++ b/STEER/AliPIDComparison.C @@ -103,7 +103,7 @@ Int_t AliPIDComparison(const Char_t *dir=".") { Char_t fname[100]; if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/STEER/AliRawDataHeaderSim.h b/STEER/AliRawDataHeaderSim.h index debe87f224a..0f47d8a064e 100644 --- a/STEER/AliRawDataHeaderSim.h +++ b/STEER/AliRawDataHeaderSim.h @@ -15,7 +15,7 @@ public: AliRawDataHeaderSim() : AliRawDataHeader() { // Takes the trigger mask and // stores it in the data header - AliRunLoader *runloader = AliRunLoader::GetRunLoader(); + AliRunLoader *runloader = AliRunLoader::Instance(); if (runloader) { if (!runloader->LoadTrigger()) { AliCentralTrigger *aCTP = runloader->GetTrigger(); diff --git a/STEER/AliReconstruction.cxx b/STEER/AliReconstruction.cxx index 7666a3b21b9..05fdd24e328 100644 --- a/STEER/AliReconstruction.cxx +++ b/STEER/AliReconstruction.cxx @@ -786,8 +786,10 @@ void AliReconstruction::SetRecoParam(const char* detector, AliDetectorRecoParam } //_____________________________________________________________________________ -Bool_t AliReconstruction::SetFieldMap(Float_t l3Cur, Float_t diCur, Float_t l3Pol, Float_t diPol, - Float_t beamenergy, Char_t *beamtype,const char *path) { +Bool_t AliReconstruction::SetFieldMap(Float_t l3Cur, Float_t diCur, Float_t l3Pol, + Float_t diPol, Float_t beamenergy, + const Char_t *beamtype, const Char_t *path) +{ //------------------------------------------------ // The magnetic field map, defined externally... // L3 current 30000 A -> 0.5 T diff --git a/STEER/AliReconstruction.h b/STEER/AliReconstruction.h index fd69c785db0..3b3ea784b8b 100644 --- a/STEER/AliReconstruction.h +++ b/STEER/AliReconstruction.h @@ -79,8 +79,9 @@ public: //*** Magnetic field setters void SetUniformFieldTracking(Bool_t flag=kTRUE){fUniformField=flag;} Bool_t SetFieldMap(Float_t l3Current=30000., Float_t diCurrent=6000., - Float_t l3Pol=1., Float_t dipPol=1., Float_t benergy=7000., char* btype="pp", - const char *path="$(ALICE_ROOT)/data/maps/mfchebKGI_sym.root"); + Float_t l3Pol=1., Float_t dipPol=1., Float_t benergy=7000., + const Char_t* btype="pp", + const Char_t* path="$(ALICE_ROOT)/data/maps/mfchebKGI_sym.root"); //*** Global reconstruction flag setters void SetRunVertexFinder(Bool_t flag=kTRUE) {fRunVertexFinder=flag;}; diff --git a/STEER/AliRun.cxx b/STEER/AliRun.cxx index 45c039a0721..fd94a19fcfd 100644 --- a/STEER/AliRun.cxx +++ b/STEER/AliRun.cxx @@ -65,7 +65,7 @@ ClassImp(AliRun) //_______________________________________________________________________ AliRun::AliRun(): - fRun(-1), +// fRun(-1), fEvent(0), fEventNrInRun(-1), fModules(0), @@ -91,7 +91,6 @@ AliRun::AliRun(): //_____________________________________________________________________________ AliRun::AliRun(const char *name, const char *title): TNamed(name,title), - fRun(-1), fEvent(0), fEventNrInRun(-1), fModules(new TObjArray(77)), // Support list for the Detectors @@ -279,7 +278,7 @@ Int_t AliRun::GetEvent(Int_t event) /**** R E L O A D ****/ /*****************************************/ - AliRunLoader::GetRunLoader()->GetEvent(event); + AliRunLoader::Instance()->GetEvent(event); /*****************************************/ /**** P O S T R E L O A D I N G ****/ @@ -293,7 +292,7 @@ Int_t AliRun::GetEvent(Int_t event) detector->SetTreeAddress(); } - return AliRunLoader::GetRunLoader()->GetHeader()->GetNtrack(); + return AliRunLoader::Instance()->GetHeader()->GetNtrack(); } //_______________________________________________________________________ @@ -309,7 +308,7 @@ void AliRun::Hits2Digits(const char *selected) // Convert Hits to sumable digits // - for (Int_t nevent=0; neventTreeE()->GetEntries(); nevent++) { + for (Int_t nevent=0; neventTreeE()->GetEntries(); nevent++) { GetEvent(nevent); Hits2SDigits(selected); SDigits2Digits(selected); @@ -410,7 +409,7 @@ void AliRun::Streamer(TBuffer &R__b) void AliRun::SetGenEventHeader(AliGenEventHeader* header) { - AliRunLoader::GetRunLoader()->GetHeader()->SetGenEventHeader(header); + AliRunLoader::Instance()->GetHeader()->SetGenEventHeader(header); } diff --git a/STEER/AliRun.h b/STEER/AliRun.h index 8071096442c..8d286266180 100644 --- a/STEER/AliRun.h +++ b/STEER/AliRun.h @@ -36,7 +36,6 @@ public: TObjArray *Modules() const {return fModules;} void AddModule(AliModule* mod); Int_t GetEvNumber() const; - Int_t GetRunNumber() const {return fRun;} void SetEventNrInRun(Int_t event) {fEventNrInRun=event;} Int_t GetEventNrInRun() const {return fEventNrInRun;} Int_t GetNdets() const {return fNdets;} @@ -78,11 +77,9 @@ public: virtual void Announce() const; virtual void InitLoaders(); //prepares run (i.e. creates getters) - void SetRunNumber(Int_t run) {fRun=run;} protected: virtual void Tree2Tree(Option_t *option, const char *detector=0); - Int_t fRun; //! Current run number Int_t fEvent; //! Current event number (from 1) Int_t fEventNrInRun; //! Current unique event number in run TObjArray *fModules; // List of Detectors diff --git a/STEER/AliRunLoader.cxx b/STEER/AliRunLoader.cxx index 3bfbf993eea..a5d8a4d8275 100644 --- a/STEER/AliRunLoader.cxx +++ b/STEER/AliRunLoader.cxx @@ -86,6 +86,7 @@ const TString AliRunLoader::fgkDefaultTriggerFileName("Trigger.root"); AliRunLoader::AliRunLoader(): fLoaders(0x0), fEventFolder(0x0), + fRun(-1), fCurrentEvent(0), fGAFile(0x0), fHeader(0x0), @@ -105,6 +106,7 @@ AliRunLoader::AliRunLoader(const char* eventfoldername): TNamed(fgkRunLoaderName,fgkRunLoaderName), fLoaders(new TObjArray()), fEventFolder(0x0), + fRun(-1), fCurrentEvent(0), fGAFile(0x0), fHeader(0x0), diff --git a/STEER/AliRunLoader.h b/STEER/AliRunLoader.h index 3028ca55e9c..0cbe076d5a7 100644 --- a/STEER/AliRunLoader.h +++ b/STEER/AliRunLoader.h @@ -102,6 +102,8 @@ class AliRunLoader: public TNamed TTree* TreeTR() const; //returns the tree from folder; shortcut method AliRun* GetAliRun()const; + Int_t GetRunNumber() const {return fRun;} + void SetRunNumber(Int_t run) {fRun=run;} Int_t WriteHeader(Option_t* opt=""); Int_t WriteTrigger(Option_t* opt=""); @@ -174,7 +176,7 @@ class AliRunLoader: public TNamed /***** Public S T A T I C Stuff *******/ /******************************************/ static AliRunLoader* GetRunLoader(const char* eventfoldername); - static AliRunLoader* GetRunLoader(){return fgRunLoader;} + static AliRunLoader* Instance(){return fgRunLoader;} static AliLoader* GetDetectorLoader(const char* detname, const char* eventfoldername); static TTree* GetTreeH(const char* detname, Bool_t maketree, const char* eventfoldername); static TTree* GetTreeS(const char* detname, Bool_t maketree, const char* eventfoldername); @@ -183,7 +185,6 @@ class AliRunLoader: public TNamed static TTree* GetTreeT(const char* detname, Bool_t maketree, const char* eventfoldername); static TTree* GetTreeP(const char* detname, Bool_t maketree, const char* eventfoldername); -// static AliRunDigitizer* GetRunDigitizer(); // Tasks are supposed to be singletons, that is why following methods are static static TTask* GetRunDigitizer(); // static TTask* GetRunSDigitizer(); // @@ -204,60 +205,46 @@ class AliRunLoader: public TNamed static TString GetGAliceName () {return fgkGAliceName;} protected: - /**********************************************/ - /************ PROTECTED ***************/ - /********* D A T A ************/ - /**********************************************/ + void SetGAliceFile(TFile* gafile);//sets the pointer to gAlice file + Int_t OpenKineFile(Option_t* opt); + Int_t OpenTrackRefsFile(Option_t* opt); - TObjArray *fLoaders; // List of Detectors - TFolder *fEventFolder; //!top folder for this run + Int_t OpenDataFile(const TString& filename,TFile*& file,TDirectory*& dir,Option_t* opt,Int_t cl); + void SetUnixDir(const TString& udirname); + const TString SetFileOffset(const TString& fname);//adds the proper number before .root + void SetDetectorAddresses(); + + TObjArray *fLoaders; // List of Detectors + TFolder *fEventFolder; //!top folder for this run - Int_t fCurrentEvent;//!Number of current event + Int_t fRun; //! Current run number + Int_t fCurrentEvent;//!Number of current event TFile *fGAFile;//! pointer to main file with AliRun and Run Loader -> galice.root AliHeader *fHeader;//! pointer to header AliStack *fStack; //! pointer to stack AliCentralTrigger *fCTrigger; //! pointer to CEntral Trigger Processor - AliDataLoader *fKineDataLoader;// kinematics data loader - AliDataLoader *fTrackRefsDataLoader;//track reference data loader + AliDataLoader *fKineDataLoader;// kinematics data loader + AliDataLoader *fTrackRefsDataLoader;//track reference data loader - Int_t fNEventsPerFile; //defines number of events stored per one file - TString fUnixDirName; //! name of unix path to directory that contains event + Int_t fNEventsPerFile; //defines number of events stored per one file + TString fUnixDirName; //! name of unix path to directory that contains event static const TString fgkDefaultKineFileName;//default file name with kinamatics static const TString fgkDefaultTrackRefsFileName;//default file name with kinamatics static const TString fgkDefaultTriggerFileName;//default file name with trigger - - /*********************************************/ - /************ PROTECTED **************/ - /********* M E T H O D S ***********/ - /*********************************************/ - - void SetGAliceFile(TFile* gafile);//sets the pointer to gAlice file - Int_t OpenKineFile(Option_t* opt); - Int_t OpenTrackRefsFile(Option_t* opt); - - Int_t OpenDataFile(const TString& filename,TFile*& file,TDirectory*& dir,Option_t* opt,Int_t cl); - void SetUnixDir(const TString& udirname); - const TString SetFileOffset(const TString& fname);//adds the proper number before .root - void SetDetectorAddresses(); private: AliRunLoader(const AliRunLoader &r); //Not implemented AliRunLoader & operator = (const AliRunLoader &); //Not implemented - void GetListOfDetectors(const char * namelist,TObjArray& pointerarray) const; - void CleanHeader(){Clean(fgkHeaderContainerName);} void CleanTrigger(){Clean(fgkTriggerContainerName);} void Clean(const TString& name); - Int_t SetEvent(); - static AliRunLoader* fgRunLoader; //pointer to the AliRunLoader instance - -private: + static AliRunLoader* fgRunLoader; //pointer to the AliRunLoader instance static const TString fgkRunLoaderName; //default name of the run loader static const TString fgkHeaderContainerName; //default name of the kinematics container (TREE) name - TreeE diff --git a/STEER/AliSimulation.cxx b/STEER/AliSimulation.cxx index 599776ba9ea..18fe93a9720 100644 --- a/STEER/AliSimulation.cxx +++ b/STEER/AliSimulation.cxx @@ -781,7 +781,7 @@ Bool_t AliSimulation::RunLego(const char *setup, Int_t nc1, Float_t c1min, AliWarning("Run number not initialized!!"); } - AliRunLoader::GetRunLoader()->CdGAFile(); + AliRunLoader::Instance()->CdGAFile(); AliPDG::AddParticlesToPdgDataBase(); @@ -792,11 +792,11 @@ Bool_t AliSimulation::RunLego(const char *setup, Int_t nc1, Float_t c1min, //Must be here because some MCs (G4) adds detectors here and not in Config.C gAlice->InitLoaders(); - AliRunLoader::GetRunLoader()->MakeTree("E"); + AliRunLoader::Instance()->MakeTree("E"); // // Save stuff at the beginning of the file to avoid file corruption - AliRunLoader::GetRunLoader()->CdGAFile(); + AliRunLoader::Instance()->CdGAFile(); gAlice->Write(); //Save current generator @@ -808,7 +808,7 @@ Bool_t AliSimulation::RunLego(const char *setup, Int_t nc1, Float_t c1min, //Run Lego Object - AliRunLoader::GetRunLoader()->SetNumberOfEventsPerFile(nev); + AliRunLoader::Instance()->SetNumberOfEventsPerFile(nev); gMC->ProcessRun(nev); // End of this run, close files @@ -919,12 +919,12 @@ Bool_t AliSimulation::RunSimulation(Int_t nEvents) gInterpreter->ProcessLine(gAlice->GetConfigFunction()); if(AliCDBManager::Instance()->GetRun() >= 0) { - gAlice->SetRunNumber(AliCDBManager::Instance()->GetRun()); + AliRunLoader::Instance()->SetRunNumber(AliCDBManager::Instance()->GetRun()); } else { AliWarning("Run number not initialized!!"); } - AliRunLoader::GetRunLoader()->CdGAFile(); + AliRunLoader::Instance()->CdGAFile(); AliPDG::AddParticlesToPdgDataBase(); @@ -934,13 +934,13 @@ Bool_t AliSimulation::RunSimulation(Int_t nEvents) //Must be here because some MCs (G4) adds detectors here and not in Config.C gAlice->InitLoaders(); - AliRunLoader::GetRunLoader()->MakeTree("E"); - AliRunLoader::GetRunLoader()->LoadKinematics("RECREATE"); - AliRunLoader::GetRunLoader()->LoadTrackRefs("RECREATE"); - AliRunLoader::GetRunLoader()->LoadHits("all","RECREATE"); + AliRunLoader::Instance()->MakeTree("E"); + AliRunLoader::Instance()->LoadKinematics("RECREATE"); + AliRunLoader::Instance()->LoadTrackRefs("RECREATE"); + AliRunLoader::Instance()->LoadHits("all","RECREATE"); // // Save stuff at the beginning of the file to avoid file corruption - AliRunLoader::GetRunLoader()->CdGAFile(); + AliRunLoader::Instance()->CdGAFile(); gAlice->Write(); gAlice->SetEventNrInRun(-1); //important - we start Begin event from increasing current number in run //___________________________________________________________________________________________ @@ -958,7 +958,7 @@ Bool_t AliSimulation::RunSimulation(Int_t nEvents) // Set run number in CDBManager AliInfo(Form("Run number: %d",AliCDBManager::Instance()->GetRun())); - AliRunLoader* runLoader = AliRunLoader::GetRunLoader(); + AliRunLoader* runLoader = AliRunLoader::Instance(); if (!runLoader) { AliError(Form("gAlice has no run loader object. " "Check your config file: %s", fConfigFileName.Data())); @@ -985,7 +985,7 @@ Bool_t AliSimulation::RunSimulation(Int_t nEvents) MisalignGeometry(runLoader); #endif -// AliRunLoader* runLoader = AliRunLoader::GetRunLoader(); +// AliRunLoader* runLoader = AliRunLoader::Instance(); // if (!runLoader) { // AliError(Form("gAlice has no run loader object. " // "Check your config file: %s", fConfigFileName.Data())); @@ -1119,7 +1119,7 @@ Bool_t AliSimulation::RunDigitization(const char* detectors, if (!SetRunNumberFromData()) if (fStopOnError) return kFALSE; SetCDBLock(); - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = NULL; @@ -1563,7 +1563,7 @@ AliRunLoader* AliSimulation::LoadRun(const char* mode) const { // delete existing run loaders, open a new one and load gAlice - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); AliRunLoader* runLoader = AliRunLoader::Open(fGAliceFileName.Data(), AliConfig::GetDefaultEventFolderName(), mode); @@ -1699,7 +1699,7 @@ Bool_t AliSimulation::ConvertRaw2SDigits(const char* rawDirectory, const char* e AliWarning("Run number not initialized!!"); } - AliRunLoader::GetRunLoader()->CdGAFile(); + AliRunLoader::Instance()->CdGAFile(); AliPDG::AddParticlesToPdgDataBase(); @@ -1709,13 +1709,13 @@ Bool_t AliSimulation::ConvertRaw2SDigits(const char* rawDirectory, const char* e //Must be here because some MCs (G4) adds detectors here and not in Config.C gAlice->InitLoaders(); - AliRunLoader::GetRunLoader()->MakeTree("E"); - AliRunLoader::GetRunLoader()->LoadKinematics("RECREATE"); - AliRunLoader::GetRunLoader()->LoadTrackRefs("RECREATE"); - AliRunLoader::GetRunLoader()->LoadHits("all","RECREATE"); + AliRunLoader::Instance()->MakeTree("E"); + AliRunLoader::Instance()->LoadKinematics("RECREATE"); + AliRunLoader::Instance()->LoadTrackRefs("RECREATE"); + AliRunLoader::Instance()->LoadHits("all","RECREATE"); // // Save stuff at the beginning of the file to avoid file corruption - AliRunLoader::GetRunLoader()->CdGAFile(); + AliRunLoader::Instance()->CdGAFile(); gAlice->Write(); // // Initialize CDB @@ -1726,7 +1726,7 @@ Bool_t AliSimulation::ConvertRaw2SDigits(const char* rawDirectory, const char* e Int_t iDet; // // Get the runloader - AliRunLoader* runLoader = AliRunLoader::GetRunLoader(); + AliRunLoader* runLoader = AliRunLoader::Instance(); // // Open esd file if available TFile* esdFile = TFile::Open(esdFileName); @@ -1823,7 +1823,7 @@ void AliSimulation::FinishRun() if(IsLegoRun()) { AliDebug(1, "Finish Lego"); - AliRunLoader::GetRunLoader()->CdGAFile(); + AliRunLoader::Instance()->CdGAFile(); fLego->FinishRun(); } @@ -1835,16 +1835,16 @@ void AliSimulation::FinishRun() detector->FinishRun(); } - AliDebug(1, "AliRunLoader::GetRunLoader()->WriteHeader(OVERWRITE)"); - AliRunLoader::GetRunLoader()->WriteHeader("OVERWRITE"); + AliDebug(1, "AliRunLoader::Instance()->WriteHeader(OVERWRITE)"); + AliRunLoader::Instance()->WriteHeader("OVERWRITE"); // Write AliRun info and all detectors parameters - AliRunLoader::GetRunLoader()->CdGAFile(); + AliRunLoader::Instance()->CdGAFile(); gAlice->Write(0,TObject::kOverwrite);//write AliRun - AliRunLoader::GetRunLoader()->Write(0,TObject::kOverwrite);//write RunLoader itself + AliRunLoader::Instance()->Write(0,TObject::kOverwrite);//write RunLoader itself if(gAlice->GetMCApp()) gAlice->GetMCApp()->FinishRun(); - AliRunLoader::GetRunLoader()->Synchronize(); + AliRunLoader::Instance()->Synchronize(); } //_____________________________________________________________________________ @@ -1983,7 +1983,7 @@ Bool_t AliSimulation::RunQA() // run the QA on summable hits, digits or digits if(!gAlice) return kFALSE; - fQASteer->SetRunLoader(AliRunLoader::GetRunLoader()) ; + fQASteer->SetRunLoader(AliRunLoader::Instance()) ; TString detectorsw("") ; Bool_t rv = kTRUE ; diff --git a/STEER/AliTriggerConfiguration.cxx b/STEER/AliTriggerConfiguration.cxx index 433e26ea371..6bf724ebe53 100755 --- a/STEER/AliTriggerConfiguration.cxx +++ b/STEER/AliTriggerConfiguration.cxx @@ -868,12 +868,12 @@ Bool_t AliTriggerConfiguration::CheckConfiguration( TString& configfile ) gInterpreter->ProcessLine(gAlice->GetConfigFunction()); if(AliCDBManager::Instance()->GetRun() >= 0) { - gAlice->SetRunNumber(AliCDBManager::Instance()->GetRun()); + AliRunLoader::Instance()->SetRunNumber(AliCDBManager::Instance()->GetRun()); } else { AliWarning("Run number not initialized!!"); } - AliRunLoader::GetRunLoader()->CdGAFile(); + AliRunLoader::Instance()->CdGAFile(); AliPDG::AddParticlesToPdgDataBase(); @@ -881,16 +881,16 @@ Bool_t AliTriggerConfiguration::CheckConfiguration( TString& configfile ) //Must be here because some MCs (G4) adds detectors here and not in Config.C gAlice->InitLoaders(); - AliRunLoader::GetRunLoader()->MakeTree("E"); - AliRunLoader::GetRunLoader()->LoadKinematics("RECREATE"); - AliRunLoader::GetRunLoader()->LoadTrackRefs("RECREATE"); - AliRunLoader::GetRunLoader()->LoadHits("all","RECREATE"); + AliRunLoader::Instance()->MakeTree("E"); + AliRunLoader::Instance()->LoadKinematics("RECREATE"); + AliRunLoader::Instance()->LoadTrackRefs("RECREATE"); + AliRunLoader::Instance()->LoadHits("all","RECREATE"); // // Save stuff at the beginning of the file to avoid file corruption - AliRunLoader::GetRunLoader()->CdGAFile(); + AliRunLoader::Instance()->CdGAFile(); gAlice->Write(); - AliRunLoader* runLoader = AliRunLoader::GetRunLoader(); + AliRunLoader* runLoader = AliRunLoader::Instance(); if( !runLoader ) { AliError( Form( "gAlice has no run loader object. " "Check your config file: %s", configfile.Data() ) ); diff --git a/STEER/AliTriggerDetector.cxx b/STEER/AliTriggerDetector.cxx index ab7f2cc611b..d9e255f6c0d 100644 --- a/STEER/AliTriggerDetector.cxx +++ b/STEER/AliTriggerDetector.cxx @@ -149,7 +149,7 @@ void AliTriggerDetector::Trigger() AliWarning( Form( "Triggering dummy detector %s", GetName() ) ); // ********** Get Digits for the current event ********** - AliRunLoader* runLoader = AliRunLoader::GetRunLoader(); + AliRunLoader* runLoader = AliRunLoader::Instance(); AliInfo( Form( "Event %d", runLoader->GetEventNumber() ) ); TString loadername = GetName(); diff --git a/STEER/AliV0Comparison.C b/STEER/AliV0Comparison.C index 575a8b54ed7..79421894ad0 100644 --- a/STEER/AliV0Comparison.C +++ b/STEER/AliV0Comparison.C @@ -392,7 +392,7 @@ Int_t AliV0Comparison(Int_t code=310, const Char_t *dir=".") { Int_t GoodV0s(const Char_t *dir) { if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice;//if everything was OK here it is already NULL gAlice = 0x0; } diff --git a/STEER/AliVertexerTracksTest.C b/STEER/AliVertexerTracksTest.C index 4a9ce984140..ca6fb33be91 100644 --- a/STEER/AliVertexerTracksTest.C +++ b/STEER/AliVertexerTracksTest.C @@ -15,7 +15,7 @@ void AliVertexerTracksTest(TString outname="AliVertexerTracksTest.root", AliGeomManager::LoadGeometry("geometry.root"); if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } @@ -287,7 +287,7 @@ void VertexForOneEvent(Int_t iev=0, //------------------------------------------------------------------------ if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } @@ -1410,7 +1410,7 @@ void SaveFigures(TString name="dummy") { void TestRmTracks(Int_t iev=0) { if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/STEER/ReadTrigger.C b/STEER/ReadTrigger.C index 12c5e8ee355..f9cb7fc285d 100644 --- a/STEER/ReadTrigger.C +++ b/STEER/ReadTrigger.C @@ -4,7 +4,7 @@ ReadTrigger( TString inFile = "galice.root" ) if( gClassTable->GetID( "AliRun" ) < 0 ) { gROOT->ProcessLine( ".x $(ALICE_ROOT)/macros/loadlibs.C" ); } else if( gAlice ) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/T0/AliT0RawData.cxx b/T0/AliT0RawData.cxx index 875c5650801..605328937e9 100644 --- a/T0/AliT0RawData.cxx +++ b/T0/AliT0RawData.cxx @@ -82,7 +82,7 @@ uncertances memset(fBuffer,0,512*sizeof(UInt_t)); //get event number - AliRunLoader *runloader = AliRunLoader::GetRunLoader(); + AliRunLoader *runloader = AliRunLoader::Instance(); if (runloader) { fEventNumber = runloader->GetEventNumber(); } diff --git a/T0/AliT0Trigger.cxx b/T0/AliT0Trigger.cxx index c91adc13b44..4360a30288a 100644 --- a/T0/AliT0Trigger.cxx +++ b/T0/AliT0Trigger.cxx @@ -66,7 +66,7 @@ void AliT0Trigger::Trigger() { // trigger input - AliRunLoader* runLoader = AliRunLoader::GetRunLoader(); + AliRunLoader* runLoader = AliRunLoader::Instance(); AliLoader * fT0Loader = runLoader->GetLoader("T0Loader"); // AliT0digit *fDigits; fT0Loader->LoadDigits("READ"); diff --git a/TDPMjet/AliGenDPMjet.cxx b/TDPMjet/AliGenDPMjet.cxx index a315e3d3f39..1d513ac723c 100644 --- a/TDPMjet/AliGenDPMjet.cxx +++ b/TDPMjet/AliGenDPMjet.cxx @@ -410,7 +410,7 @@ void AliGenDPMjet::AddHeader(AliGenEventHeader* header) if (fContainer) { fContainer->AddHeader(header); } else { - AliRunLoader::GetRunLoader()->GetHeader()->SetGenEventHeader(header); + AliRunLoader::Instance()->GetHeader()->SetGenEventHeader(header); } } diff --git a/THijing/AliGenBeamGasNew.cxx b/THijing/AliGenBeamGasNew.cxx index 2a54a2525f9..3c8560ab1d7 100644 --- a/THijing/AliGenBeamGasNew.cxx +++ b/THijing/AliGenBeamGasNew.cxx @@ -178,7 +178,7 @@ void AliGenBeamGasNew::Generate() fHeader = new AliGenCocktailEventHeader("Beamgas Header"); const TObjArray *partArray = gAlice->GetMCApp()->Particles(); - AliStack *stack = AliRunLoader::GetRunLoader()->Stack(); + AliStack *stack = AliRunLoader::Instance()->Stack(); for (Int_t l = 0; l < numbg; l++) { Vertex(); diff --git a/TOF/AliTOF.cxx b/TOF/AliTOF.cxx index 8d830dfa87c..1e3ca513387 100644 --- a/TOF/AliTOF.cxx +++ b/TOF/AliTOF.cxx @@ -483,7 +483,7 @@ void AliTOF::Init() /* // Save the geometry TDirectory* saveDir = gDirectory; - AliRunLoader::GetRunLoader()->CdGAFile(); + AliRunLoader::Instance()->CdGAFile(); fTOFGeometry->Write("TOFGeometry"); saveDir->cd(); */ diff --git a/TOF/AliTOFComparison.C b/TOF/AliTOFComparison.C index c0f477f7420..65c0583fe60 100644 --- a/TOF/AliTOFComparison.C +++ b/TOF/AliTOFComparison.C @@ -123,7 +123,7 @@ Int_t AliTOFComparison(const Char_t *dir=".") { if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice;//if everything was OK here it is already NULL gAlice = 0x0; } @@ -317,7 +317,7 @@ Int_t AliTOFComparison(const Char_t *dir=".") { Int_t GoodTracksTOF(const Char_t *dir) { if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice;//if everything was OK here it is already NULL gAlice = 0x0; } diff --git a/TOF/AliTOFSDigits2Digits.C b/TOF/AliTOFSDigits2Digits.C index a796b783c0c..b0c15451621 100644 --- a/TOF/AliTOFSDigits2Digits.C +++ b/TOF/AliTOFSDigits2Digits.C @@ -29,7 +29,7 @@ Int_t AliTOFSDigits2Digits(Int_t numberOfEvents = 0) { if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } @@ -210,7 +210,7 @@ Int_t AliTOFSDigits2Digits(Int_t numberOfEvents = 0) { if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } diff --git a/TOF/AliTOFT0.cxx b/TOF/AliTOFT0.cxx index 63f90bd560f..641023bafed 100644 --- a/TOF/AliTOFT0.cxx +++ b/TOF/AliTOFT0.cxx @@ -272,7 +272,7 @@ void AliTOFT0::Exec(Option_t *option) AliInfo("Memorandum: 0 means PION | 1 means KAON | 2 means PROTON") } - if (fNevents == 0) fNevents = (Int_t) AliRunLoader::GetRunLoader()->TreeE()->GetEntries(); + if (fNevents == 0) fNevents = (Int_t) AliRunLoader::Instance()->TreeE()->GetEntries(); for (Int_t ievent = 0; ievent < fNevents; ievent++) { gAlice->GetEvent(ievent); diff --git a/TOF/AliTOFTrigger.cxx b/TOF/AliTOFTrigger.cxx index 80de56b3593..f80e3fcc7ab 100644 --- a/TOF/AliTOFTrigger.cxx +++ b/TOF/AliTOFTrigger.cxx @@ -376,7 +376,7 @@ void AliTOFTrigger::CreateLTMMatrix(){ } } AliRunLoader *rl; - rl = AliRunLoader::GetRunLoader(); + rl = AliRunLoader::Instance(); Int_t ncurrevent = rl->GetEventNumber(); rl->GetEvent(ncurrevent); diff --git a/TOF/AliTOFanalyzeDigits.C b/TOF/AliTOFanalyzeDigits.C index bda0a31f114..ac0f682ace1 100644 --- a/TOF/AliTOFanalyzeDigits.C +++ b/TOF/AliTOFanalyzeDigits.C @@ -35,7 +35,7 @@ Int_t AliTOFanalyzeDigits(Int_t ndump=0, Int_t numberOfEvents=0) if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } @@ -173,7 +173,7 @@ Int_t AliTOFanalyzeDigits(Int_t ndump=0, Int_t numberOfEvents=0) if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } diff --git a/TOF/AliTOFanalyzeHits.C b/TOF/AliTOFanalyzeHits.C index 78f5829b34a..11efca3aebe 100644 --- a/TOF/AliTOFanalyzeHits.C +++ b/TOF/AliTOFanalyzeHits.C @@ -67,7 +67,7 @@ Int_t AliTOFanalyzeHits(Int_t numberOfEvents=0, Bool_t drawing=kFALSE) if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } @@ -337,7 +337,7 @@ Int_t AliTOFanalyzeHits(Int_t numberOfEvents=0, Bool_t drawing=kFALSE) if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } diff --git a/TOF/AliTOFanalyzeSDigitsV2.C b/TOF/AliTOFanalyzeSDigitsV2.C index 326dcb4b99c..1733f2c319e 100644 --- a/TOF/AliTOFanalyzeSDigitsV2.C +++ b/TOF/AliTOFanalyzeSDigitsV2.C @@ -43,7 +43,7 @@ Int_t AliTOFanalyzeSDigitsV2(Int_t ndump=0, Int_t iEvNum=-1, Int_t nEvent=0) if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } @@ -191,7 +191,7 @@ Int_t AliTOFanalyzeSDigitsV2(Int_t ndump=0, Int_t iEvNum=-1, Int_t nEvent=0) if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } diff --git a/TOF/AliTOFhits2sdigits.C b/TOF/AliTOFhits2sdigits.C index 717b741cf1c..8d498658ed4 100644 --- a/TOF/AliTOFhits2sdigits.C +++ b/TOF/AliTOFhits2sdigits.C @@ -36,7 +36,7 @@ void AliTOFhits2sdigits(Int_t evNumber1=-1, Int_t numberOfEvents=0) if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } @@ -65,7 +65,7 @@ void AliTOFhits2sdigits(Int_t evNumber1=-1, Int_t numberOfEvents=0) if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } diff --git a/TOF/AliTOFtest.C b/TOF/AliTOFtest.C index 65272621f4a..d2ca3256bab 100644 --- a/TOF/AliTOFtest.C +++ b/TOF/AliTOFtest.C @@ -25,7 +25,7 @@ Int_t AliTOFtest(Int_t nevents=1) if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } @@ -35,7 +35,7 @@ Int_t AliTOFtest(Int_t nevents=1) if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } @@ -45,7 +45,7 @@ Int_t AliTOFtest(Int_t nevents=1) if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } @@ -55,7 +55,7 @@ Int_t AliTOFtest(Int_t nevents=1) if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } @@ -67,7 +67,7 @@ Int_t AliTOFtest(Int_t nevents=1) if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } @@ -76,7 +76,7 @@ Int_t AliTOFtest(Int_t nevents=1) if (rc=AliTOFanalyzeDigits()) return rc; if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } diff --git a/TOF/AliTOFtestDigitizer.C b/TOF/AliTOFtestDigitizer.C index 5559328c89a..5966e6e89a9 100644 --- a/TOF/AliTOFtestDigitizer.C +++ b/TOF/AliTOFtestDigitizer.C @@ -39,7 +39,7 @@ Int_t AliTOFtestDigitizer(const char* fileNameSignal = "galice.root", // delete the current gAlice object, the one from input file will be used if(gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0x0; } @@ -63,7 +63,7 @@ Int_t AliTOFtestDigitizer(const char* fileNameSignal = "galice.root", if(gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0x0; } diff --git a/TOF/AliTOFv4T0.cxx b/TOF/AliTOFv4T0.cxx index ed357bc030a..ec7304d9cf7 100644 --- a/TOF/AliTOFv4T0.cxx +++ b/TOF/AliTOFv4T0.cxx @@ -113,7 +113,7 @@ AliTOFv4T0::AliTOFv4T0(const char *name, const char *title): // Save the geometry TDirectory* saveDir = gDirectory; - AliRunLoader::GetRunLoader()->CdGAFile(); + AliRunLoader::Instance()->CdGAFile(); fTOFGeometry->Write("TOFgeometry"); saveDir->cd(); diff --git a/TOF/AliTOFv5T0.cxx b/TOF/AliTOFv5T0.cxx index edd14617308..db6208e1de4 100644 --- a/TOF/AliTOFv5T0.cxx +++ b/TOF/AliTOFv5T0.cxx @@ -202,7 +202,7 @@ AliTOFv5T0::AliTOFv5T0(const char *name, const char *title): // Save the geometry TDirectory* saveDir = gDirectory; - AliRunLoader::GetRunLoader()->CdGAFile(); + AliRunLoader::Instance()->CdGAFile(); fTOFGeometry->Write("TOFgeometry"); saveDir->cd(); diff --git a/TOF/AliTOFv6T0.cxx b/TOF/AliTOFv6T0.cxx index 52daf542b2c..5cf2d5e68cd 100644 --- a/TOF/AliTOFv6T0.cxx +++ b/TOF/AliTOFv6T0.cxx @@ -214,7 +214,7 @@ AliTOFv6T0::AliTOFv6T0(const char *name, const char *title): // Save the geometry TDirectory* saveDir = gDirectory; - AliRunLoader::GetRunLoader()->CdGAFile(); + AliRunLoader::Instance()->CdGAFile(); fTOFGeometry->Write("TOFgeometry"); saveDir->cd(); diff --git a/TPC/AliBarrelRec_TPCparam.C b/TPC/AliBarrelRec_TPCparam.C index 6bac15dd72f..30e429c078a 100644 --- a/TPC/AliBarrelRec_TPCparam.C +++ b/TPC/AliBarrelRec_TPCparam.C @@ -20,7 +20,7 @@ void AliBarrelRec_TPCparam(Int_t firstEvent=0,Int_t lastEvent=0) { AliGeomManager::LoadGeometry("geometry.root"); if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/TPC/AliTPCFindClusters.C b/TPC/AliTPCFindClusters.C index 196c9e9350d..eb376c3bce0 100644 --- a/TPC/AliTPCFindClusters.C +++ b/TPC/AliTPCFindClusters.C @@ -21,7 +21,7 @@ extern AliRun *gAlice; Int_t AliTPCFindClusters(Int_t nev=5) { if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice;//if everything was OK here it is already NULL gAlice = 0x0; } diff --git a/TPC/AliTPCFindTracksMI.C b/TPC/AliTPCFindTracksMI.C index 5be0d8bcecc..623333eda3c 100644 --- a/TPC/AliTPCFindTracksMI.C +++ b/TPC/AliTPCFindTracksMI.C @@ -24,7 +24,7 @@ Int_t AliTPCFindTracksMI(Int_t N=-1) { if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } diff --git a/TPC/AliTPCHits2Clusters.C b/TPC/AliTPCHits2Clusters.C index 5ae67edda2e..a4fa591a757 100644 --- a/TPC/AliTPCHits2Clusters.C +++ b/TPC/AliTPCHits2Clusters.C @@ -33,7 +33,7 @@ AliRunLoader* Init(){ // initialization // if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice;//if everything was OK here it is already NULL gAlice = 0x0; } diff --git a/TPC/AliTPCHits2Digits.C b/TPC/AliTPCHits2Digits.C index a0d7b2b0d4d..7957a98baad 100644 --- a/TPC/AliTPCHits2Digits.C +++ b/TPC/AliTPCHits2Digits.C @@ -14,7 +14,7 @@ extern AliRun *gAlice; Int_t AliTPCHits2Digits(Int_t nev=5) { // Connect the Root Galice file containing Geometry, Kine and Hits if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice;//if everything was OK here it is already NULL gAlice = 0x0; } diff --git a/TPC/AliTPCHits2SDigits.C b/TPC/AliTPCHits2SDigits.C index 98acdeaaa50..3601e7eaed2 100644 --- a/TPC/AliTPCHits2SDigits.C +++ b/TPC/AliTPCHits2SDigits.C @@ -22,7 +22,7 @@ Int_t AliTPCHits2SDigits(Int_t nevent=1) //it assures full cleaning of prevous session if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice;//if everything was OK here it is already NULL gAlice = 0x0; } diff --git a/TPC/AliTPCSDigits2Digits.C b/TPC/AliTPCSDigits2Digits.C index d7250824999..528f8c5b634 100644 --- a/TPC/AliTPCSDigits2Digits.C +++ b/TPC/AliTPCSDigits2Digits.C @@ -14,7 +14,7 @@ Int_t AliTPCSDigits2Digits(Int_t nevent=1) if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice;//if everything was OK here it is already NULL gAlice = 0x0; } diff --git a/TPC/AliTPCtrackingParamDB.C b/TPC/AliTPCtrackingParamDB.C index 2211b65decf..dd24a568161 100644 --- a/TPC/AliTPCtrackingParamDB.C +++ b/TPC/AliTPCtrackingParamDB.C @@ -62,7 +62,7 @@ Int_t TPCParamTracks(const Int_t coll,Int_t firstEvent,Int_t lastEvent) { /**** Initialization of the NewIO *******/ if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice=0; } diff --git a/TRD/AliTRDmcmSim.cxx b/TRD/AliTRDmcmSim.cxx index 264efaa6c03..534f82c2331 100644 --- a/TRD/AliTRDmcmSim.cxx +++ b/TRD/AliTRDmcmSim.cxx @@ -2543,7 +2543,7 @@ void AliTRDmcmSim::Tracklet(){ Int_t u = 0; AliTRDdigitsManager *digman = new AliTRDdigitsManager(); - digman->ReadDigits(AliRunLoader::GetRunLoader()->GetLoader("TRDLoader")->TreeD()); + digman->ReadDigits(AliRunLoader::Instance()->GetLoader("TRDLoader")->TreeD()); digman->SetUseDictionaries(kTRUE); AliTRDfeeParam *feeParam = AliTRDfeeParam::Instance(); @@ -2588,7 +2588,7 @@ void AliTRDmcmSim::Tracklet(){ } } - AliDataLoader *dl = AliRunLoader::GetRunLoader()->GetLoader("TRDLoader")->GetDataLoader("tracklets"); + AliDataLoader *dl = AliRunLoader::Instance()->GetLoader("TRDLoader")->GetDataLoader("tracklets"); if (!dl) { AliError("Could not get the tracklets data loader!"); } diff --git a/TRD/Cal/AliTRDCalPIDRefMaker.cxx b/TRD/Cal/AliTRDCalPIDRefMaker.cxx index 7f2260c57d0..bd1408cb7e3 100644 --- a/TRD/Cal/AliTRDCalPIDRefMaker.cxx +++ b/TRD/Cal/AliTRDCalPIDRefMaker.cxx @@ -238,7 +238,7 @@ Bool_t AliTRDCalPIDRefMaker::BuildLQReferences(const Char_t *File, const Char_t // Load MC info fRunLoader->GetEvent(iEvent); - AliStack* stack = AliRunLoader::GetRunLoader()->Stack(); + AliStack* stack = AliRunLoader::Instance()->Stack(); TArrayF vertex(3); fRunLoader->GetHeader()->GenEventHeader()->PrimaryVertex(vertex); diff --git a/VZERO/AliVZEROTrigger.cxx b/VZERO/AliVZEROTrigger.cxx index b0df57f040b..a84380c28f0 100644 --- a/VZERO/AliVZEROTrigger.cxx +++ b/VZERO/AliVZEROTrigger.cxx @@ -69,7 +69,7 @@ void AliVZEROTrigger::Trigger() { // ********** Get run loader for the current event ********** - AliRunLoader* runLoader = AliRunLoader::GetRunLoader(); + AliRunLoader* runLoader = AliRunLoader::Instance(); AliVZEROLoader* loader = (AliVZEROLoader* )runLoader->GetLoader( "VZEROLoader" ); diff --git a/ZDC/AliZDC.cxx b/ZDC/AliZDC.cxx index 010935f4adc..cf11533ec72 100644 --- a/ZDC/AliZDC.cxx +++ b/ZDC/AliZDC.cxx @@ -661,7 +661,7 @@ Bool_t AliZDC::Raw2SDigits(AliRawReader* rawReader) { // Convert ZDC raw data to Sdigits - AliLoader* loader = (AliRunLoader::GetRunLoader())->GetLoader("ZDCLoader"); + AliLoader* loader = (AliRunLoader::Instance())->GetLoader("ZDCLoader"); if(!loader) { AliError("no ZDC loader found"); return kFALSE; @@ -670,7 +670,7 @@ Bool_t AliZDC::Raw2SDigits(AliRawReader* rawReader) // // Event loop Int_t iEvent = 0; while(rawReader->NextEvent()){ - (AliRunLoader::GetRunLoader())->GetEvent(iEvent++); + (AliRunLoader::Instance())->GetEvent(iEvent++); // Create the output digit tree TTree* treeS = loader->TreeS(); if(!treeS){ diff --git a/ZDC/AliZDCTrigger.cxx b/ZDC/AliZDCTrigger.cxx index e7bb7d3748f..d1d6b613b67 100644 --- a/ZDC/AliZDCTrigger.cxx +++ b/ZDC/AliZDCTrigger.cxx @@ -75,7 +75,7 @@ void AliZDCTrigger::Trigger() // Trigger selection // - AliRunLoader *runLoader = AliRunLoader::GetRunLoader(); + AliRunLoader *runLoader = AliRunLoader::Instance(); AliLoader *aZDCLoader = runLoader->GetLoader("ZDCLoader"); diff --git a/macros/TestNewIO.C b/macros/TestNewIO.C index d0583baf636..1d3aada8009 100644 --- a/macros/TestNewIO.C +++ b/macros/TestNewIO.C @@ -61,7 +61,7 @@ Int_t TestNewIO(Int_t n = 5,Char_t SlowOrFast='s') if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice;//if everything was OK here it is already NULL gAlice = 0x0; } diff --git a/macros/TestVertexerTracks.C b/macros/TestVertexerTracks.C index 28d97b0475e..ea21a1684ea 100644 --- a/macros/TestVertexerTracks.C +++ b/macros/TestVertexerTracks.C @@ -16,7 +16,7 @@ void TestVertexerTracks(){ if (gAlice) { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0x0; } diff --git a/macros/display.C b/macros/display.C index df7f659476f..a4be79ab6fe 100644 --- a/macros/display.C +++ b/macros/display.C @@ -10,7 +10,7 @@ void display (const char *filename="galice.root",Int_t nevent=0, Int_t * tracks= gROOT->LoadMacro("loadlibs.C"); loadlibs(); } else { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; gAlice = 0; } diff --git a/macros/g4menu.C b/macros/g4menu.C index e4629a2436a..e55f474dd50 100644 --- a/macros/g4menu.C +++ b/macros/g4menu.C @@ -173,7 +173,7 @@ void GenerateGDML() */ void Quit() { - delete AliRunLoader::GetRunLoader(); + delete AliRunLoader::Instance(); delete gAlice; exit(0); -- 2.39.3