1 #include "AliSelectorRL.h"
5 #include <AliRunLoader.h>
7 ClassImp(AliSelectorRL)
9 AliSelectorRL::AliSelectorRL() :
14 // Constructor. Initialization of pointers
18 AliSelectorRL::~AliSelectorRL()
24 // histograms are in the output list and deleted when the output
25 // list is deleted by the TSelector dtor
28 Bool_t AliSelectorRL::Notify()
30 // Calls base class Notify
31 // On top of that run loader is closed, because we change the input file
33 if (AliSelector::Notify() == kFALSE)
41 void AliSelectorRL::SlaveTerminate()
45 AliSelector::SlaveTerminate();
50 AliRun* AliSelectorRL::GetAliRun()
52 // Returns AliRun instance corresponding to current ESD active in fChain
53 // Loads galice.root, the file is identified by replacing "AliESDs" to
54 // "galice" in the file path of the ESD file. This is a hack, to be changed!
58 if (!fChain->GetCurrentFile())
61 TString fileName(fChain->GetCurrentFile()->GetName());
62 fileName.ReplaceAll("AliESDs", "galice");
64 fRunLoader = AliRunLoader::Open(fileName);
68 fRunLoader->LoadgAlice();
71 return fRunLoader->GetAliRun();
74 void AliSelectorRL::DeleteRunLoader()
77 // deletes the runloader