CMS 3D CMS Logo

Classes | Functions
EcalTrigPrimProducer.cc File Reference
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/Framework/interface/stream/EDProducer.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/EDGetToken.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
#include "DataFormats/Provenance/interface/ParameterSetID.h"
#include "DataFormats/Provenance/interface/ProductID.h"
#include "DataFormats/Provenance/interface/Provenance.h"
#include "CondFormats/DataRecord/interface/EcalTPGCrystalStatusRcd.h"
#include "CondFormats/DataRecord/interface/EcalTPGFineGrainEBGroupRcd.h"
#include "CondFormats/DataRecord/interface/EcalTPGFineGrainEBIdMapRcd.h"
#include "CondFormats/DataRecord/interface/EcalTPGFineGrainStripEERcd.h"
#include "CondFormats/DataRecord/interface/EcalTPGFineGrainTowerEERcd.h"
#include "CondFormats/DataRecord/interface/EcalTPGLinearizationConstRcd.h"
#include "CondFormats/DataRecord/interface/EcalTPGLutGroupRcd.h"
#include "CondFormats/DataRecord/interface/EcalTPGLutIdMapRcd.h"
#include "CondFormats/DataRecord/interface/EcalTPGPedestalsRcd.h"
#include "CondFormats/DataRecord/interface/EcalTPGSlidingWindowRcd.h"
#include "CondFormats/DataRecord/interface/EcalTPGSpikeRcd.h"
#include "CondFormats/DataRecord/interface/EcalTPGStripStatusRcd.h"
#include "CondFormats/DataRecord/interface/EcalTPGTowerStatusRcd.h"
#include "CondFormats/DataRecord/interface/EcalTPGWeightGroupRcd.h"
#include "CondFormats/DataRecord/interface/EcalTPGWeightIdMapRcd.h"
#include "CondFormats/DataRecord/interface/EcalTPGOddWeightGroupRcd.h"
#include "CondFormats/DataRecord/interface/EcalTPGOddWeightIdMapRcd.h"
#include "CondFormats/DataRecord/interface/EcalTPGTPModeRcd.h"
#include "CondFormats/EcalObjects/interface/EcalTPGCrystalStatus.h"
#include "CondFormats/EcalObjects/interface/EcalTPGFineGrainEBGroup.h"
#include "CondFormats/EcalObjects/interface/EcalTPGFineGrainEBIdMap.h"
#include "CondFormats/EcalObjects/interface/EcalTPGFineGrainStripEE.h"
#include "CondFormats/EcalObjects/interface/EcalTPGFineGrainTowerEE.h"
#include "CondFormats/EcalObjects/interface/EcalTPGLinearizationConst.h"
#include "CondFormats/EcalObjects/interface/EcalTPGLutGroup.h"
#include "CondFormats/EcalObjects/interface/EcalTPGLutIdMap.h"
#include "CondFormats/EcalObjects/interface/EcalTPGPedestals.h"
#include "CondFormats/EcalObjects/interface/EcalTPGSlidingWindow.h"
#include "CondFormats/EcalObjects/interface/EcalTPGSpike.h"
#include "CondFormats/EcalObjects/interface/EcalTPGStripStatus.h"
#include "CondFormats/EcalObjects/interface/EcalTPGTowerStatus.h"
#include "CondFormats/EcalObjects/interface/EcalTPGWeightGroup.h"
#include "CondFormats/EcalObjects/interface/EcalTPGWeightIdMap.h"
#include "CondFormats/EcalObjects/interface/EcalTPGOddWeightGroup.h"
#include "CondFormats/EcalObjects/interface/EcalTPGOddWeightIdMap.h"
#include "CondFormats/EcalObjects/interface/EcalTPGTPMode.h"
#include "Geometry/EcalMapping/interface/EcalMappingRcd.h"
#include "Geometry/Records/interface/CaloGeometryRecord.h"
#include <memory>
#include "SimCalorimetry/EcalTrigPrimAlgos/interface/EcalTrigPrimFunctionalAlgo.h"

Go to the source code of this file.

Classes

class  EcalTrigPrimProducer
 

Functions

static int findBinOfMaximum (bool iFillFromHistory, int iPSetValue, edm::ProcessHistory const &iHistory)
 
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker< edm::ParameterSetDescriptionFiller< EcalTrigPrimProducer > > s_filler__LINE__ ("EcalTrigPrimProducer")
 
static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< EcalTrigPrimProducer > > s_maker__LINE__ ("EcalTrigPrimProducer")
 

Function Documentation

◆ findBinOfMaximum()

static int findBinOfMaximum ( bool  iFillFromHistory,
int  iPSetValue,
edm::ProcessHistory const &  iHistory 
)
static

Definition at line 181 of file EcalTrigPrimProducer.cc.

181  {
182  // get binOfMax
183  // try first in cfg, then in ProcessHistory
184  // =6 is default (1-10 possible values)
185  int binOfMaximum = 0; // starts at 1!
186  if (not iFillFromHistory) {
187  binOfMaximum = iPSetValue;
188  edm::LogInfo("EcalTPG") << "EcalTrigPrimProducer is using binOfMaximum found in cfg file : " << binOfMaximum;
189  }
190 
191  // search backwards in history looking for the particular module
192  const std::string kModuleName{"ecalUnsuppressedDigis"};
193  for (auto it = iHistory.rbegin(), itEnd = iHistory.rend(); it != itEnd; ++it) {
194  auto const &topLevelPSet = getParameterSet(it->parameterSetID());
195  if (topLevelPSet.exists(kModuleName)) {
196  int psetBinOfMax = topLevelPSet.getParameter<edm::ParameterSet>(kModuleName).getParameter<int>("binOfMaximum");
197 
198  if (not iFillFromHistory) {
199  if (psetBinOfMax != binOfMaximum)
200  edm::LogWarning("EcalTPG") << "binofMaximum given in configuration (=" << binOfMaximum
201  << ") is different from the one found in ProductRegistration(=" << psetBinOfMax
202  << ")!!!";
203  } else {
204  binOfMaximum = psetBinOfMax;
205  edm::LogInfo("EcalTPG") << "EcalTrigPrimProducer is using binOfMaximum "
206  "found in ProductRegistry : "
207  << binOfMaximum;
208  }
209  break;
210  }
211  }
212  if (binOfMaximum == 0) {
213  binOfMaximum = 6;
214  edm::LogWarning("EcalTPG") << "Could not find product registry of EBDigiCollection (label "
215  "ecalUnsuppressedDigis), had to set the following parameters by "
216  "Hand: binOfMaximum="
217  << binOfMaximum;
218  }
219  return binOfMaximum;
220 }

References ecalEBTriggerPrimitiveDigis_cfi::binOfMaximum, edm::getParameterSet(), edm::ProcessHistory::rbegin(), edm::ProcessHistory::rend(), AlCaHLTBitMon_QueryRunRegistry::string, and topLevelPSet().

Referenced by EcalTrigPrimProducer::beginRun().

◆ s_filler__LINE__()

static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller< EcalTrigPrimProducer > > s_filler__LINE__ ( "EcalTrigPrimProducer"  )
static

◆ s_maker__LINE__()

static const edm::MakerPluginFactory ::PMaker< edm::WorkerMaker< EcalTrigPrimProducer > > s_maker__LINE__ ( "EcalTrigPrimProducer"  )
static
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
edm::ParameterSet
Definition: ParameterSet.h:47
topLevelPSet
static std::string topLevelPSet(std::string const &iName, edm::ParameterSet const &iProcessConfig, std::string const &iProcessName)
Definition: EdmProvDump.cc:266
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ecalEBTriggerPrimitiveDigis_cfi.binOfMaximum
binOfMaximum
Definition: ecalEBTriggerPrimitiveDigis_cfi.py:9
edm::getParameterSet
ParameterSet const & getParameterSet(ParameterSetID const &id)
Definition: ParameterSet.cc:862