3 #include "AliSelectorRL.h"
6 #include <AliRunLoader.h>
12 // This selector depends on the RunLoader, therefore to use it you have to have the whole AliRoot available
13 // The benefit is that you can use the RunLoader to access everything in the data structure
14 // If you only have the ESD library use AliSelector instead
17 ClassImp(AliSelectorRL)
19 AliSelectorRL::AliSelectorRL() :
24 // Constructor. Initialization of pointers
28 AliSelectorRL::~AliSelectorRL()
34 // histograms are in the output list and deleted when the output
35 // list is deleted by the TSelector dtor
38 Bool_t AliSelectorRL::Notify()
40 // Calls base class Notify
41 // On top of that run loader is closed, because we change the input file
43 if (AliSelector::Notify() == kFALSE)
51 void AliSelectorRL::SlaveTerminate()
55 AliSelector::SlaveTerminate();
60 AliRunLoader* AliSelectorRL::GetAliRunLoader()
62 // Returns AliRun instance corresponding to current ESD active in fChain
63 // Loads galice.root, the file is identified by replacing "AliESDs" to
64 // "galice" in the file path of the ESD file. This is a hack, to be changed!
68 if (!fChain->GetCurrentFile())
71 TString fileName(fChain->GetCurrentFile()->GetName());
72 fileName.ReplaceAll("AliESDs", "galice");
74 fRunLoader = AliRunLoader::Open(fileName);
78 fRunLoader->LoadgAlice();
84 void AliSelectorRL::DeleteRunLoader()
87 // deletes the runloader