Commit eb87f91e authored by Ewelina Maria Lobodzinska's avatar Ewelina Maria Lobodzinska Committed by Graeme Stewart
Browse files

correct CMakeLists (Rivet_i-02-05-00-01)

        * Tagging as Rivet_i-02-05-00-01

        * change version number in CMakeList.txt

2016-08-19  Andy Buckley  <andy.buckley@cern.ch>

	* Tagging as Rivet_i-02-05-00

	* Change dynamic_pointer_cast from the Boost to C++11 std version, for Rivet 2.5.0.

	* Tagging as Rivet_i-02-04-01


Former-commit-id: ebe59066
parent 88ea86e9
......@@ -14,6 +14,15 @@ atlas_depends_on_subdirs( PUBLIC
Generators/GeneratorObjects
Tools/PathResolver )
# Set the version of Rivet to use:
set( RIVET_VERSION 2.5.1 )
set( RIVET_ROOT
${LCG_RELEASE_DIR}/MCGenerators/rivet/${RIVET_VERSION}/${ATLAS_PLATFORM} )
set( YODA_VERSION 1.6.3 )
set( YODA_ROOT
${LCG_RELEASE_DIR}/MCGenerators/yoda/${YODA_VERSION}/${ATLAS_PLATFORM} )
# External dependencies:
find_package( Boost COMPONENTS filesystem thread system )
find_package( FastJet )
......
package Rivet_i
author James Monk <jmonk@cern.ch>
author Andy Buckley <andy.buckley@cern.ch>
......
......@@ -26,6 +26,7 @@
#include "YODA/ROOTCnv.h"
/// @todo Eliminate Boost?
#include <boost/algorithm/string.hpp>
#include "boost/foreach.hpp"
#ifndef foreach
......@@ -33,6 +34,7 @@
#endif
#include <cstdlib>
#include <memory>
using namespace std;
......@@ -225,13 +227,13 @@ StatusCode Rivet_i::finalize() {
const string basename = ao->path().substr(ao->path().rfind("/")+1); // There should always be >= 1 slash
// Convert YODA histos to heap-allocated ROOT objects and register
/// @todo Counter
/// @todo Convert Counter... as what?
if (ao->type() == "Histo1D") {
TH1* h = (TH1*) YODA::toTH1D(*boost::dynamic_pointer_cast<YODA::Histo1D>(ao)).Clone(basename.c_str());
TH1* h = (TH1*) YODA::toTH1D(*dynamic_pointer_cast<YODA::Histo1D>(ao)).Clone(basename.c_str());
CHECK(m_histSvc->regHist(m_stream + path, h));
ATH_MSG_INFO("TH1D " + path + " created from YODA::Histo1D");
} else if (ao->type() == "Histo2D") {
TH2* h = (TH2*) YODA::toTH2D(*boost::dynamic_pointer_cast<YODA::Histo2D>(ao)).Clone(basename.c_str());
TH2* h = (TH2*) YODA::toTH2D(*dynamic_pointer_cast<YODA::Histo2D>(ao)).Clone(basename.c_str());
CHECK(m_histSvc->regHist(m_stream + path, h));
ATH_MSG_INFO("TH2 " + path + " created from YODA::Histo2D");
// } else if (ao->type() == "Profile2D") {
......@@ -239,7 +241,7 @@ StatusCode Rivet_i::finalize() {
// CHECK(m_histSvc->regHist(m_stream + path, h));
// ATH_MSG_INFO("TProfile2D " + path + " created from YODA::Profile2D");
} else if (ao->type() == "Profile1D") {
TH1* h = (TH1*) YODA::toTProfile(*boost::dynamic_pointer_cast<YODA::Profile1D>(ao)).Clone(basename.c_str());
TH1* h = (TH1*) YODA::toTProfile(*dynamic_pointer_cast<YODA::Profile1D>(ao)).Clone(basename.c_str());
CHECK(m_histSvc->regHist(m_stream + path, h));
ATH_MSG_INFO("TProfile " + path + " created from YODA::Profile1D");
// } else if (ao->type() == "Scatter1D") {
......@@ -247,7 +249,7 @@ StatusCode Rivet_i::finalize() {
// CHECK(m_histSvc->regGraph(m_stream + path, g));
// ATH_MSG_INFO("TGraph " + path + " created from YODA::Scatter2D");
} else if (ao->type() == "Scatter2D") {
TGraph* g = (TGraph*) YODA::toTGraph(*boost::dynamic_pointer_cast<YODA::Scatter2D>(ao)).Clone(basename.c_str());
TGraph* g = (TGraph*) YODA::toTGraph(*dynamic_pointer_cast<YODA::Scatter2D>(ao)).Clone(basename.c_str());
CHECK(m_histSvc->regGraph(m_stream + path, g));
ATH_MSG_INFO("TGraph " + path + " created from YODA::Scatter2D");
// } else if (ao->type() == "Scatter3D") {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment