diff --git a/HLTriggerOffline/Egamma/interface/EmDQMReco.h b/HLTriggerOffline/Egamma/interface/EmDQMReco.h index 6a096cc07f8d5..c8f732017ae6d 100644 --- a/HLTriggerOffline/Egamma/interface/EmDQMReco.h +++ b/HLTriggerOffline/Egamma/interface/EmDQMReco.h @@ -52,8 +52,8 @@ class EmDQMReco : public DQMEDAnalyzer { class FourVectorMonitorElements { public: /** @param histogramNameTemplate should be a format string (like used in - * printf(..) or boost::format(..) for the histogram NAME where the first %s - * is replaced with et,eta or phi. + * printf(..) for the histogram NAME where the first %s is replaced with + * et,eta or phi. * * @param histogramTitleTemplate should be a format string (see * histogramNameTemplate) for the histogram TITLE where the first %s is diff --git a/HLTriggerOffline/Egamma/src/EmDQMReco.cc b/HLTriggerOffline/Egamma/src/EmDQMReco.cc index 58d6ce4d605c9..94f6ae952315c 100644 --- a/HLTriggerOffline/Egamma/src/EmDQMReco.cc +++ b/HLTriggerOffline/Egamma/src/EmDQMReco.cc @@ -1,4 +1,17 @@ -//////////////////////////////////////////////////////////////////////////// +#include +#include + +#include + +//////////////////////////////////////////////////////////////////////////////// +// Root include files // +//////////////////////////////////////////////////////////////////////////////// +#include +#include +#include +#include + +//////////////////////////////////////////////////////////////////////////////// // Header file for this // //////////////////////////////////////////////////////////////////////////////// #include "HLTriggerOffline/Egamma/interface/EmDQMReco.h" @@ -6,40 +19,26 @@ //////////////////////////////////////////////////////////////////////////////// // Collaborating Class Header // //////////////////////////////////////////////////////////////////////////////// -#include "DataFormats/EgammaCandidates/interface/Electron.h" -#include "DataFormats/HLTReco/interface/TriggerEventWithRefs.h" -#include "DataFormats/RecoCandidate/interface/RecoEcalCandidate.h" -#include "FWCore/Framework/interface/Frameworkfwd.h" -#include "FWCore/Framework/interface/MakerMacros.h" -#include "FWCore/ParameterSet/interface/ParameterSet.h" -//#include "DataFormats/EgammaCandidates/interface/PhotonFwd.h" -//#include "DataFormats/EgammaCandidates/interface/Photon.h" -#include "DataFormats/L1Trigger/interface/L1EmParticle.h" -#include "DataFormats/L1Trigger/interface/L1EmParticleFwd.h" -//#include "SimDataFormats/HepMCProduct/interface/HepMCProduct.h" #include "DataFormats/Common/interface/AssociationMap.h" -#include "FWCore/MessageLogger/interface/MessageLogger.h" -#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" - #include "DataFormats/Common/interface/Handle.h" #include "DataFormats/Common/interface/RefToBase.h" -#include "FWCore/ServiceRegistry/interface/Service.h" -//#include "PhysicsTools/UtilAlgos/interface/TFileService.h" #include "DataFormats/Common/interface/TriggerResults.h" +#include "DataFormats/EgammaCandidates/interface/Electron.h" #include "DataFormats/HLTReco/interface/TriggerEvent.h" +#include "DataFormats/HLTReco/interface/TriggerEventWithRefs.h" #include "DataFormats/HLTReco/interface/TriggerObject.h" #include "DataFormats/HLTReco/interface/TriggerTypeDefs.h" +#include "DataFormats/L1Trigger/interface/L1EmParticle.h" +#include "DataFormats/L1Trigger/interface/L1EmParticleFwd.h" +#include "DataFormats/RecoCandidate/interface/RecoEcalCandidate.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ServiceRegistry/interface/Service.h" #include "FWCore/Utilities/interface/Exception.h" -#include -//////////////////////////////////////////////////////////////////////////////// -// Root include files // -//////////////////////////////////////////////////////////////////////////////// -#include "TDirectory.h" -#include "TFile.h" -#include "TH1F.h" -#include -#include -#include +#include "SimDataFormats/GeneratorProducts/interface/HepMCProduct.h" + using namespace ROOT::Math::VectorUtil; //---------------------------------------------------------------------- @@ -55,20 +54,20 @@ EmDQMReco::FourVectorMonitorElements::FourVectorMonitorElements(EmDQMReco *_pare std::string histTitle; // et - histName = boost::str(boost::format(histogramNameTemplate) % "et"); - histTitle = boost::str(boost::format(histogramTitleTemplate) % "E_{T}"); + histName = fmt::sprintf(histogramNameTemplate, "et"); + histTitle = fmt::sprintf(histogramTitleTemplate, "E_{T}"); etMonitorElement = iBooker.book1D(histName.c_str(), histTitle.c_str(), parent->plotBins, parent->plotPtMin, parent->plotPtMax); // eta - histName = boost::str(boost::format(histogramNameTemplate) % "eta"); - histTitle = boost::str(boost::format(histogramTitleTemplate) % "#eta"); + histName = fmt::sprintf(histogramNameTemplate, "eta"); + histTitle = fmt::sprintf(histogramTitleTemplate, "#eta"); etaMonitorElement = iBooker.book1D(histName.c_str(), histTitle.c_str(), parent->plotBins, -parent->plotEtaMax, parent->plotEtaMax); // phi - histName = boost::str(boost::format(histogramNameTemplate) % "phi"); - histTitle = boost::str(boost::format(histogramTitleTemplate) % "#phi"); + histName = fmt::sprintf(histogramNameTemplate, "phi"); + histTitle = fmt::sprintf(histogramTitleTemplate, "#phi"); phiMonitorElement = iBooker.book1D(histName.c_str(), histTitle.c_str(), parent->plotBins, -parent->plotPhiMax, parent->plotPhiMax); }