[Rivet-svn] r3358 - in trunk: . src/Core

blackhole at projects.hepforge.org blackhole at projects.hepforge.org
Wed Sep 14 22:48:16 BST 2011


Author: buckley
Date: Wed Sep 14 22:48:15 2011
New Revision: 3358

Log:
Applying histogram dynamic_cast protection patch from Anton Karneyeu and Alex Grecu. NOT TO BE MERGED INTO THE YODA BRANCH!

Modified:
   trunk/ChangeLog
   trunk/src/Core/AnalysisHandler.cc

Modified: trunk/ChangeLog
==============================================================================
--- trunk/ChangeLog	Wed Sep 14 16:01:27 2011	(r3357)
+++ trunk/ChangeLog	Wed Sep 14 22:48:15 2011	(r3358)
@@ -1,5 +1,8 @@
 2011-09-14  Andy Buckley  <andy at insectnation.org>
 
+	* Applying histogram dynamic_cast protection patch from Anton
+	Karneyeu and Alex Grecu.
+
 	* Adding the ATLAS Z pT measurement at 7 TeV (ATLAS_2011_S9131140)
 	and an MC analysis for VH->bb events (MC_VH2BB).
 

Modified: trunk/src/Core/AnalysisHandler.cc
==============================================================================
--- trunk/src/Core/AnalysisHandler.cc	Wed Sep 14 16:01:27 2011	(r3357)
+++ trunk/src/Core/AnalysisHandler.cc	Wed Sep 14 22:48:15 2011	(r3358)
@@ -266,8 +266,8 @@
 
         // Try to cast to specific histogram types
         const IProfile1D* prof = dynamic_cast<IProfile1D*>(hobj);
-        const IHistogram1D* histo = dynamic_cast<IHistogram1D*>(hobj);
-        const IHistogram2D* histo2 = dynamic_cast<IHistogram2D*>(hobj);
+        const IHistogram1D* histo = (prof) ? 0 : dynamic_cast<IHistogram1D*>(hobj);
+        const IHistogram2D* histo2 = (prof || histo) ? 0 : dynamic_cast<IHistogram2D*>(hobj);
         if (!(histo || histo2 || prof)) {
           MSG_TRACE("Could not find the type of histo for " << path << ": it's probably already a DPS");
           continue;


More information about the Rivet-svn mailing list