From dacfe1e72e8fb2987474e27a2bf7f83a511cb8d0 Mon Sep 17 00:00:00 2001 From: Chris Jones Date: Thu, 22 May 2014 09:54:03 -0500 Subject: [PATCH 1/2] Move edm::stream::imll::makeGlobal to own file The function was declared in two different headers which caused problems when they were included in the same source file. This moves the functions to just one file. --- .../interface/stream/EDAnalyzerAdaptor.h | 24 +-------- .../interface/stream/ProducingModuleAdaptor.h | 23 +------- .../Framework/interface/stream/makeGlobal.h | 53 +++++++++++++++++++ 3 files changed, 55 insertions(+), 45 deletions(-) create mode 100644 FWCore/Framework/interface/stream/makeGlobal.h diff --git a/FWCore/Framework/interface/stream/EDAnalyzerAdaptor.h b/FWCore/Framework/interface/stream/EDAnalyzerAdaptor.h index 025d5623ca9f2..bf28921138857 100644 --- a/FWCore/Framework/interface/stream/EDAnalyzerAdaptor.h +++ b/FWCore/Framework/interface/stream/EDAnalyzerAdaptor.h @@ -28,6 +28,7 @@ #include "FWCore/Framework/interface/stream/EDAnalyzerAdaptorBase.h" #include "FWCore/Framework/interface/stream/callAbilities.h" #include "FWCore/Framework/interface/stream/dummy_helpers.h" +#include "FWCore/Framework/interface/stream/makeGlobal.h" #include "FWCore/Framework/src/MakeModuleHelper.h" // forward declarations @@ -35,29 +36,6 @@ namespace edm { namespace stream { - namespace impl { - template - std::unique_ptr makeGlobal(edm::ParameterSet const& iPSet, G const*) { - return T::initializeGlobalCache(iPSet); - } - template - dummy_ptr makeGlobal(edm::ParameterSet const& iPSet, void const*) { - return dummy_ptr(); - } - - template< typename T, typename G> - T* makeStreamModule(edm::ParameterSet const& iPSet, - G const* iGlobal) { - return new T(iPSet,iGlobal); - } - - template< typename T> - T* makeStreamModule(edm::ParameterSet const& iPSet, - void const* ) { - return new T(iPSet); - } - } - template struct BaseToAdaptor; template class EDAnalyzerAdaptor; diff --git a/FWCore/Framework/interface/stream/ProducingModuleAdaptor.h b/FWCore/Framework/interface/stream/ProducingModuleAdaptor.h index fc50583bb45fa..019aa4c8cbe45 100644 --- a/FWCore/Framework/interface/stream/ProducingModuleAdaptor.h +++ b/FWCore/Framework/interface/stream/ProducingModuleAdaptor.h @@ -27,32 +27,11 @@ #include "FWCore/Framework/interface/LuminosityBlockPrincipal.h" #include "FWCore/Framework/interface/stream/callAbilities.h" #include "FWCore/Framework/interface/stream/dummy_helpers.h" +#include "FWCore/Framework/interface/stream/makeGlobal.h" // forward declarations namespace edm { namespace stream { - namespace impl { - template - std::unique_ptr makeGlobal(edm::ParameterSet const& iPSet, G const*) { - return T::initializeGlobalCache(iPSet); - } - template - dummy_ptr makeGlobal(edm::ParameterSet const& iPSet, void const*) { - return dummy_ptr(); - } - - template< typename T, typename G> - T* makeStreamModule(edm::ParameterSet const& iPSet, - G const* iGlobal) { - return new T(iPSet,iGlobal); - } - - template< typename T> - T* makeStreamModule(edm::ParameterSet const& iPSet, - void const* ) { - return new T(iPSet); - } - } template class ProducingModuleAdaptor : public B diff --git a/FWCore/Framework/interface/stream/makeGlobal.h b/FWCore/Framework/interface/stream/makeGlobal.h new file mode 100644 index 0000000000000..8768ad1184fec --- /dev/null +++ b/FWCore/Framework/interface/stream/makeGlobal.h @@ -0,0 +1,53 @@ +#ifndef FWCore_Framework_stream_makeGlobal_h +#define FWCore_Framework_stream_makeGlobal_h +// -*- C++ -*- +// +// Package: FWCore/Framework +// Class : makeGlobal +// +/** Helper functions for making stream modules + + Description: [one line class summary] + + Usage: + + +*/ +// +// Original Author: Chris Jones +// Created: Thu, 22 May 2014 13:55:01 GMT +// + +// system include files + +// user include files + +// forward declarations + +namespace edm { + namespace stream { + namespace impl { + template + std::unique_ptr makeGlobal(edm::ParameterSet const& iPSet, G const*) { + return T::initializeGlobalCache(iPSet); + } + template + dummy_ptr makeGlobal(edm::ParameterSet const& iPSet, void const*) { + return dummy_ptr(); + } + + template< typename T, typename G> + T* makeStreamModule(edm::ParameterSet const& iPSet, + G const* iGlobal) { + return new T(iPSet,iGlobal); + } + + template< typename T> + T* makeStreamModule(edm::ParameterSet const& iPSet, + void const* ) { + return new T(iPSet); + } + } + } +} +#endif From 38975f7441df37f232cc75a4448efb0aa878ec01 Mon Sep 17 00:00:00 2001 From: Andreas Pfeiffer Date: Fri, 23 May 2014 15:09:34 +0200 Subject: [PATCH 2/2] add QGLike objects to importer --- CondCore/Utilities/src/CondDBImport.cc | 6 ++++++ CondCore/Utilities/src/CondFormats.h | 1 + 2 files changed, 7 insertions(+) diff --git a/CondCore/Utilities/src/CondDBImport.cc b/CondCore/Utilities/src/CondDBImport.cc index a4d55488ba417..0debc6723c010 100644 --- a/CondCore/Utilities/src/CondDBImport.cc +++ b/CondCore/Utilities/src/CondDBImport.cc @@ -245,6 +245,9 @@ namespace cond { IMPORT_PAYLOAD_CASE( PerformancePayloadFromBinnedTFormula ) IMPORT_PAYLOAD_CASE( PerformanceWorkingPoint ) IMPORT_PAYLOAD_CASE( PhysicsTools::Calibration::HistogramD3D ) + IMPORT_PAYLOAD_CASE( QGLikelihoodCategory ) + IMPORT_PAYLOAD_CASE( QGLikelihoodObject ) + IMPORT_PAYLOAD_CASE( QGLikelihoodSystematicsObject ) IMPORT_PAYLOAD_CASE( RPCEMap ) IMPORT_PAYLOAD_CASE( RPCClusterSize ) IMPORT_PAYLOAD_CASE( RPCStripNoises ) @@ -498,6 +501,9 @@ namespace cond { FETCH_PAYLOAD_CASE( PerformancePayloadFromBinnedTFormula ) FETCH_PAYLOAD_CASE( PerformanceWorkingPoint ) FETCH_PAYLOAD_CASE( PhysicsTools::Calibration::HistogramD3D ) + FETCH_PAYLOAD_CASE( QGLikelihoodCategory ) + FETCH_PAYLOAD_CASE( QGLikelihoodObject ) + FETCH_PAYLOAD_CASE( QGLikelihoodSystematicsObject ) FETCH_PAYLOAD_CASE( RPCEMap ) FETCH_PAYLOAD_CASE( RPCClusterSize ) FETCH_PAYLOAD_CASE( RPCStripNoises ) diff --git a/CondCore/Utilities/src/CondFormats.h b/CondCore/Utilities/src/CondFormats.h index 5a1bc185cd9fd..a8922df8b3ce3 100644 --- a/CondCore/Utilities/src/CondFormats.h +++ b/CondCore/Utilities/src/CondFormats.h @@ -57,6 +57,7 @@ #include "CondFormats/EgammaObjects/interface/GBRForest.h" #include "CondFormats/HcalObjects/interface/HcalElectronicsMap.h" #include "CondFormats/JetMETObjects/interface/JetCorrectorParameters.h" +#include "CondFormats/JetMETObjects/interface/QGLikelihoodObject.h" #include "CondFormats/L1TObjects/interface/L1CaloEcalScale.h" #include "CondFormats/L1TObjects/interface/L1CaloEtScale.h" #include "CondFormats/L1TObjects/interface/L1CaloHcalScale.h"