+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Author: The ALICE Off-line Project. *
+ * Contributors are mentioned in the code where appropriate. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/* $Id$ */
+
+#include "AliAnalysisManager.h"
+#include "AliInputEventHandler.h"
+#include "AliMultiInputEventHandler.h"
+#include "AliVEvent.h"
+
#include "AliPHOSClusterSelection.h"
AliPHOSClusterSelection::AliPHOSClusterSelection()
delete objarray;
return flt;
}
+
+
+AliVEvent* AliPHOSClusterSelection::GetCurrentEvent() const
+{
+ // Hackish way of getting the current event.
+ // Its probably not appropriate to call this function outside of
+ // AliAnalysisTaskSE::UserExec
+
+ AliAnalysisManager* analysisManager = dynamic_cast<AliAnalysisManager*>(AliAnalysisManager::GetAnalysisManager());
+ AliInputEventHandler* inputHandler = dynamic_cast<AliInputEventHandler*>(analysisManager->GetInputEventHandler());
+ AliMultiInputEventHandler *multiInputHandler = dynamic_cast<AliMultiInputEventHandler *>(fInputHandler);
+ if (multiInputHandler)
+ inputHandler = dynamic_cast<AliInputEventHandler *>(multiInputHandler->GetFirstInputEventHandler());
+
+ AliVEvent* inputEvent = dynamic_cast<AliVEvent*>(inputHandler->GetEvent());
+ if( ! inputEvent )
+ AliError("Was not able to retrieve event!");
+
+ return inputEvent;
+}