-//________________________________________________________________________
-void AliAnalysisTaskTOFqa::ConnectInputData(Option_t *)
-{
- // Connect ESD or AOD here
- // Called once
-
- TTree* tree = dynamic_cast<TTree*> (GetInputData(0));
- if (!tree) {
- Printf("ERROR: Could not read chain from input slot 0");
- } else {
- // Disable all branches and enable only the needed ones
- // The next two lines are different when data produced as AliESDEvent is read
- tree->SetBranchStatus("*", kFALSE);
- tree->SetBranchStatus("Tracks.*", kTRUE);
- tree->SetBranchStatus("AliESDTZERO.*", kTRUE);
- AliESDInputHandler *esdH = dynamic_cast<AliESDInputHandler*> (AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());
-
- if (!esdH) {
- Printf("ERROR: Could not get ESDInputHandler");
- } else
- fESD = esdH->GetEvent();
- }
-
-}
-