3 #include "AliRsnEvent.h"
4 #include "AliMultiInputEventHandler.h"
5 #include "AliMixInputEventHandler.h"
6 #include "AliMCEventHandler.h"
8 #include "AliRsnInputHandler.h"
9 ClassImp(AliRsnInputHandler)
11 //_____________________________________________________________________________
12 AliRsnInputHandler::AliRsnInputHandler(const char *name) :
13 AliInputEventHandler(name, name),
18 // Default constructor.
20 AliDebug(AliLog::kDebug + 10, "<-");
21 AliDebug(AliLog::kDebug + 10, "->");
24 //_____________________________________________________________________________
25 AliRsnInputHandler::~AliRsnInputHandler()
30 AliDebug(AliLog::kDebug + 10, "<-");
32 AliDebug(AliLog::kDebug + 10, "->");
35 //_____________________________________________________________________________
36 Bool_t AliRsnInputHandler::Init(Option_t *opt)
39 // Init() is called for all mix input handlers.
41 AliDebug(AliLog::kDebug + 5, Form("<- opt=%s", opt));
43 AliDebug(AliLog::kDebug + 5, Form("->"));
46 //_____________________________________________________________________________
47 Bool_t AliRsnInputHandler::Init(TTree *tree, Option_t *opt)
50 // Init(const char*path) is called for all mix input handlers.
51 // Create event pool if needed
53 AliDebug(AliLog::kDebug + 5, Form("<- %p %s opt=%s", (void *) tree, tree->GetName(), opt));
54 AliDebug(AliLog::kDebug + 5, Form("->"));
57 //_____________________________________________________________________________
58 Bool_t AliRsnInputHandler::Notify()
61 // Notify() is called for all mix input handlers
63 AliDebug(AliLog::kDebug + 5, Form("<-"));
64 AliDebug(AliLog::kDebug + 5, Form("->"));
68 //_____________________________________________________________________________
69 Bool_t AliRsnInputHandler::Notify(const char *path)
72 // Notify(const char*path) is called for all mix input handlers
74 AliDebug(AliLog::kDebug + 5, Form("<- %s", path));
75 AliDebug(AliLog::kDebug + 5, "->");
78 //_____________________________________________________________________________
79 Bool_t AliRsnInputHandler::BeginEvent(Long64_t entry)
82 // BeginEvent(Long64_t entry) is called for all mix input handlers
84 AliDebug(AliLog::kDebug + 5, Form("<- %lld", entry));
88 AliInputEventHandler *ih = 0;
89 AliMultiInputEventHandler *multiIH = dynamic_cast<AliMultiInputEventHandler*>(fParentHandler);
91 ih = multiIH->GetFirstInputEventHandler();
93 if (!fRsnEvent) fRsnEvent = new AliRsnEvent();
94 fRsnEvent->SetRef(ih->GetEvent());
95 fRsnEvent->SetPIDResponse(ih->GetPIDResponse());
96 if (fRsnEvent->GetRefESD()) {
97 AliMCEventHandler *mcH = multiIH->GetFirstMCEventHandler();
98 if (mcH) fRsnEvent->SetRefMC(mcH->MCEvent());
99 } else if (fRsnEvent->GetRefAOD()) {
101 // fRsnEvent->SetRefMC(mcH->MCEvent());
103 if (fParentHandler->ParentHandler()) tmp = "MIX";
105 //fRsnPIDManager.Reset();
107 //fRsnPIDManager.ApplyCuts(fRsnEvent);
108 fRsnSelector.Reset();
109 fRsnSelector.ScanEvent(fRsnEvent);
113 AliDebug(AliLog::kDebug + 5, "->");
117 Bool_t AliRsnInputHandler::GetEntry()
119 AliDebug(AliLog::kDebug + 5, "<-");
120 AliDebug(AliLog::kDebug + 5, "->");
124 //_____________________________________________________________________________
125 Bool_t AliRsnInputHandler::FinishEvent()
128 // FinishEvent() is called for all mix input handlers
130 AliDebug(AliLog::kDebug + 5, Form("<-"));
131 AliDebug(AliLog::kDebug + 5, Form("->"));