CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
EcalTrigPrimProducer Class Reference
Inheritance diagram for EcalTrigPrimProducer:
edm::stream::EDProducer<>

Public Member Functions

void beginRun (const edm::Run &run, const edm::EventSetup &es) override
 
 EcalTrigPrimProducer (const edm::ParameterSet &conf)
 
void endRun (const edm::Run &, const edm::EventSetup &) override
 
void produce (edm::Event &e, const edm::EventSetup &c) override
 
 ~EcalTrigPrimProducer () override
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 

Private Member Functions

unsigned long long getRecords (edm::EventSetup const &setup)
 

Private Attributes

std::unique_ptr< EcalTrigPrimFunctionalAlgoalgo_
 
bool barrelOnly_
 
int binOfMaximum_
 
unsigned long long cacheID_
 
bool debug_
 
bool famos_
 
bool fillBinOfMaximumFromHistory_
 
bool tcpFormat_
 
edm::EDGetTokenT< EBDigiCollectiontokenEB_
 
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcdtokenEcalMapping_
 
edm::ESGetToken< EcalTPGCrystalStatus, EcalTPGCrystalStatusRcdtokenEcalTPGCrystalStatus_
 
edm::ESGetToken< EcalTPGFineGrainEBGroup, EcalTPGFineGrainEBGroupRcdtokenEcalTPGFineGrainEBGroup_
 
edm::ESGetToken< EcalTPGFineGrainEBIdMap, EcalTPGFineGrainEBIdMapRcdtokenEcalTPGFineGrainEBIdMap_
 
edm::ESGetToken< EcalTPGFineGrainStripEE, EcalTPGFineGrainStripEERcdtokenEcalTPGFineGrainStripEE_
 
edm::ESGetToken< EcalTPGFineGrainTowerEE, EcalTPGFineGrainTowerEERcdtokenEcalTPGFineGrainTowerEE_
 
edm::ESGetToken< EcalTPGLinearizationConst, EcalTPGLinearizationConstRcdtokenEcalTPGLinearization_
 
edm::ESGetToken< EcalTPGLutGroup, EcalTPGLutGroupRcdtokenEcalTPGLutGroup_
 
edm::ESGetToken< EcalTPGLutIdMap, EcalTPGLutIdMapRcdtokenEcalTPGLutIdMap_
 
edm::ESGetToken< EcalTPGOddWeightGroup, EcalTPGOddWeightGroupRcdtokenEcalTPGOddWeightGroup_
 
edm::ESGetToken< EcalTPGOddWeightIdMap, EcalTPGOddWeightIdMapRcdtokenEcalTPGOddWeightIdMap_
 
edm::ESGetToken< EcalTPGPedestals, EcalTPGPedestalsRcdtokenEcalTPGPedestals_
 
edm::ESGetToken< EcalTPGSlidingWindow, EcalTPGSlidingWindowRcdtokenEcalTPGSlidingWindow_
 
edm::ESGetToken< EcalTPGSpike, EcalTPGSpikeRcdtokenEcalTPGSpike_
 
edm::ESGetToken< EcalTPGStripStatus, EcalTPGStripStatusRcdtokenEcalTPGStripStatus_
 
edm::ESGetToken< EcalTPGTowerStatus, EcalTPGTowerStatusRcdtokenEcalTPGTowerStatus_
 
edm::ESGetToken< EcalTPGTPMode, EcalTPGTPModeRcdtokenEcalTPGTPMode_
 
edm::ESGetToken< EcalTPGWeightGroup, EcalTPGWeightGroupRcdtokenEcalTPGWeightGroup_
 
edm::ESGetToken< EcalTPGWeightIdMap, EcalTPGWeightIdMapRcdtokenEcalTPGWeightIdMap_
 
edm::EDGetTokenT< EEDigiCollectiontokenEE_
 
edm::ESGetToken< CaloSubdetectorGeometry, EcalEndcapGeometryRecordtokenEndcapGeom_
 
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecordtokenETTMap_
 
bool tpInfoPrintout_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 

Detailed Description

EcalTrigPrimProducer produces a EcalTrigPrimDigiCollection The barrel code does a detailed simulation The code for the endcap is simulated in a rough way, due to missing strip geometry

Author
Ursula Berthon, Stephanie Baffioni, LLR Palaiseau
Version
1st Version may 2006
2nd Version jul 2006

Definition at line 77 of file EcalTrigPrimProducer.cc.

Constructor & Destructor Documentation

◆ EcalTrigPrimProducer()

EcalTrigPrimProducer::EcalTrigPrimProducer ( const edm::ParameterSet conf)
explicit

Definition at line 139 of file EcalTrigPrimProducer.cc.

References barrelOnly_, tcpFormat_, tokenEndcapGeom_, and tokenETTMap_.

140  : barrelOnly_(iConfig.getParameter<bool>("BarrelOnly")),
141  tcpFormat_(iConfig.getParameter<bool>("TcpOutput")),
142  debug_(iConfig.getParameter<bool>("Debug")),
143  famos_(iConfig.getParameter<bool>("Famos")),
144  tpInfoPrintout_(iConfig.getParameter<bool>("TPinfoPrintout")),
145  tokenEB_(consumes<EBDigiCollection>(
146  edm::InputTag(iConfig.getParameter<std::string>("Label"), iConfig.getParameter<std::string>("InstanceEB")))),
147  tokenEE_(consumes<EEDigiCollection>(
148  edm::InputTag(iConfig.getParameter<std::string>("Label"), iConfig.getParameter<std::string>("InstanceEE")))),
149  tokenEcalMapping_(esConsumes<edm::Transition::BeginRun>()),
168  binOfMaximum_(iConfig.getParameter<int>("binOfMaximum")),
170  cacheID_(0) {
171  // register your products
172  produces<EcalTrigPrimDigiCollection>();
173  if (tcpFormat_)
174  produces<EcalTrigPrimDigiCollection>("formatTCP");
175  if (not barrelOnly_) {
176  tokenEndcapGeom_ = esConsumes<edm::Transition::BeginRun>(edm::ESInputTag("", "EcalEndcap"));
177  tokenETTMap_ = esConsumes<edm::Transition::BeginRun>();
178  }
179 }
edm::ESGetToken< EcalTPGSlidingWindow, EcalTPGSlidingWindowRcd > tokenEcalTPGSlidingWindow_
edm::ESGetToken< EcalTPGFineGrainStripEE, EcalTPGFineGrainStripEERcd > tokenEcalTPGFineGrainStripEE_
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
edm::ESGetToken< EcalTPGLutIdMap, EcalTPGLutIdMapRcd > tokenEcalTPGLutIdMap_
edm::ESGetToken< EcalTPGTowerStatus, EcalTPGTowerStatusRcd > tokenEcalTPGTowerStatus_
edm::ESGetToken< EcalTPGFineGrainTowerEE, EcalTPGFineGrainTowerEERcd > tokenEcalTPGFineGrainTowerEE_
edm::ESGetToken< EcalTPGCrystalStatus, EcalTPGCrystalStatusRcd > tokenEcalTPGCrystalStatus_
edm::ESGetToken< EcalTPGOddWeightGroup, EcalTPGOddWeightGroupRcd > tokenEcalTPGOddWeightGroup_
unsigned long long cacheID_
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > tokenEcalMapping_
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecord > tokenETTMap_
edm::ESGetToken< EcalTPGWeightIdMap, EcalTPGWeightIdMapRcd > tokenEcalTPGWeightIdMap_
edm::EDGetTokenT< EBDigiCollection > tokenEB_
edm::ESGetToken< EcalTPGStripStatus, EcalTPGStripStatusRcd > tokenEcalTPGStripStatus_
edm::ESGetToken< EcalTPGLinearizationConst, EcalTPGLinearizationConstRcd > tokenEcalTPGLinearization_
edm::ESGetToken< EcalTPGPedestals, EcalTPGPedestalsRcd > tokenEcalTPGPedestals_
edm::ESGetToken< EcalTPGTPMode, EcalTPGTPModeRcd > tokenEcalTPGTPMode_
edm::ESGetToken< EcalTPGFineGrainEBIdMap, EcalTPGFineGrainEBIdMapRcd > tokenEcalTPGFineGrainEBIdMap_
edm::ESGetToken< CaloSubdetectorGeometry, EcalEndcapGeometryRecord > tokenEndcapGeom_
edm::ESGetToken< EcalTPGOddWeightIdMap, EcalTPGOddWeightIdMapRcd > tokenEcalTPGOddWeightIdMap_
edm::EDGetTokenT< EEDigiCollection > tokenEE_
edm::ESGetToken< EcalTPGLutGroup, EcalTPGLutGroupRcd > tokenEcalTPGLutGroup_
edm::ESGetToken< EcalTPGSpike, EcalTPGSpikeRcd > tokenEcalTPGSpike_
edm::ESGetToken< EcalTPGWeightGroup, EcalTPGWeightGroupRcd > tokenEcalTPGWeightGroup_
edm::ESGetToken< EcalTPGFineGrainEBGroup, EcalTPGFineGrainEBGroupRcd > tokenEcalTPGFineGrainEBGroup_

◆ ~EcalTrigPrimProducer()

EcalTrigPrimProducer::~EcalTrigPrimProducer ( )
override

Definition at line 298 of file EcalTrigPrimProducer.cc.

298 {}

Member Function Documentation

◆ beginRun()

void EcalTrigPrimProducer::beginRun ( const edm::Run run,
const edm::EventSetup es 
)
override

Definition at line 222 of file EcalTrigPrimProducer.cc.

References algo_, barrelOnly_, binOfMaximum_, debug_, famos_, fillBinOfMaximumFromHistory_, findBinOfMaximum(), writedatasetfile::run, singleTopDQM_cfi::setup, tcpFormat_, tokenEcalMapping_, tokenEndcapGeom_, tokenETTMap_, and tpInfoPrintout_.

222  {
223  // ProcessHistory is guaranteed to be constant for an entire Run
225 
226  auto const &ecalmapping = setup.getData(tokenEcalMapping_);
227  if (barrelOnly_) {
228  algo_ = std::make_unique<EcalTrigPrimFunctionalAlgo>(
230  } else {
231  auto const &endcapGeometry = setup.getData(tokenEndcapGeom_);
232  auto const &eTTmap = setup.getData(tokenETTMap_);
233  algo_ = std::make_unique<EcalTrigPrimFunctionalAlgo>(
234  &eTTmap, &endcapGeometry, &ecalmapping, binOfMaximum_, tcpFormat_, debug_, famos_, tpInfoPrintout_);
235  }
236 }
static int findBinOfMaximum(bool iFillFromHistory, int iPSetValue, edm::ProcessHistory const &iHistory)
std::unique_ptr< EcalTrigPrimFunctionalAlgo > algo_
const edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcd > tokenEcalMapping_
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecord > tokenETTMap_
edm::ESGetToken< CaloSubdetectorGeometry, EcalEndcapGeometryRecord > tokenEndcapGeom_

◆ endRun()

void EcalTrigPrimProducer::endRun ( const edm::Run run,
const edm::EventSetup setup 
)
override

Definition at line 238 of file EcalTrigPrimProducer.cc.

References algo_, and cacheID_.

238  {
239  algo_.reset();
240  cacheID_ = 0;
241 }
std::unique_ptr< EcalTrigPrimFunctionalAlgo > algo_
unsigned long long cacheID_

◆ fillDescriptions()

void EcalTrigPrimProducer::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 389 of file EcalTrigPrimProducer.cc.

References edm::ConfigurationDescriptions::addDefault(), submitPVResolutionJobs::desc, kComment, and AlCaHLTBitMon_QueryRunRegistry::string.

389  {
391  desc.add<bool>("BarrelOnly", false);
392  desc.add<bool>("TcpOutput", false);
393  desc.add<bool>("Debug", false);
394  desc.add<bool>("Famos", false);
395  desc.add<std::string>("Label", "simEcalUnsuppressedDigis");
396  desc.add<std::string>("InstanceEB", "");
397  desc.add<std::string>("InstanceEE", "");
398  const std::string kComment(
399  "A value of -1 will make the module lookup the value of 'binOfMaximum' "
400  "from the module 'ecalUnsuppressedDigis' from the process history. "
401  "Allowed values are -1 and from 1-10.");
402  // The code before the existence of fillDescriptions did something special if
403  // 'binOfMaximum' was missing. This replicates that behavior.
404  desc.add<int>("binOfMaximum", -1)->setComment(kComment);
405  desc.add<bool>("TPinfoPrintout", false);
406  descriptions.addDefault(desc);
407 }
void addDefault(ParameterSetDescription const &psetDescription)
static const char *const kComment

◆ getRecords()

unsigned long long EcalTrigPrimProducer::getRecords ( edm::EventSetup const &  setup)
private

Definition at line 243 of file EcalTrigPrimProducer.cc.

References algo_, singleTopDQM_cfi::setup, tokenEcalTPGCrystalStatus_, tokenEcalTPGFineGrainEBGroup_, tokenEcalTPGFineGrainEBIdMap_, tokenEcalTPGFineGrainStripEE_, tokenEcalTPGFineGrainTowerEE_, tokenEcalTPGLinearization_, tokenEcalTPGLutGroup_, tokenEcalTPGLutIdMap_, tokenEcalTPGOddWeightGroup_, tokenEcalTPGOddWeightIdMap_, tokenEcalTPGPedestals_, tokenEcalTPGSlidingWindow_, tokenEcalTPGSpike_, tokenEcalTPGStripStatus_, tokenEcalTPGTowerStatus_, tokenEcalTPGTPMode_, tokenEcalTPGWeightGroup_, and tokenEcalTPGWeightIdMap_.

Referenced by produce().

243  {
244  // get Eventsetup records
245 
246  // for EcalFenixStrip...
247  // get parameter records for xtals
248  const EcalTPGLinearizationConst *ecaltpLin = &setup.getData(tokenEcalTPGLinearization_);
249  const EcalTPGPedestals *ecaltpPed = &setup.getData(tokenEcalTPGPedestals_);
250  const EcalTPGCrystalStatus *ecaltpgBadX = &setup.getData(tokenEcalTPGCrystalStatus_);
251 
252  // for strips
253  const EcalTPGSlidingWindow *ecaltpgSlidW = &setup.getData(tokenEcalTPGSlidingWindow_);
254  const EcalTPGWeightIdMap *ecaltpgWeightMap = &setup.getData(tokenEcalTPGWeightIdMap_);
255  const EcalTPGWeightGroup *ecaltpgWeightGroup = &setup.getData(tokenEcalTPGWeightGroup_);
256  const EcalTPGOddWeightIdMap *ecaltpgOddWeightMap = &setup.getData(tokenEcalTPGOddWeightIdMap_);
257  const EcalTPGOddWeightGroup *ecaltpgOddWeightGroup = &setup.getData(tokenEcalTPGOddWeightGroup_);
258  const EcalTPGFineGrainStripEE *ecaltpgFgStripEE = &setup.getData(tokenEcalTPGFineGrainStripEE_);
259  const EcalTPGStripStatus *ecaltpgStripStatus = &setup.getData(tokenEcalTPGStripStatus_);
260  const EcalTPGTPMode *ecaltpgTPMode = &setup.getData(tokenEcalTPGTPMode_);
261 
262  algo_->setPointers(ecaltpLin,
263  ecaltpPed,
264  ecaltpgSlidW,
265  ecaltpgWeightMap,
266  ecaltpgWeightGroup,
267  ecaltpgOddWeightMap,
268  ecaltpgOddWeightGroup,
269  ecaltpgFgStripEE,
270  ecaltpgBadX,
271  ecaltpgStripStatus,
272  ecaltpgTPMode);
273 
274  // .. and for EcalFenixTcp
275  // get parameter records for towers
276  const EcalTPGFineGrainEBGroup *ecaltpgFgEBGroup = &setup.getData(tokenEcalTPGFineGrainEBGroup_);
277  const EcalTPGLutGroup *ecaltpgLutGroup = &setup.getData(tokenEcalTPGLutGroup_);
278  const EcalTPGLutIdMap *ecaltpgLut = &setup.getData(tokenEcalTPGLutIdMap_);
279  const EcalTPGFineGrainEBIdMap *ecaltpgFineGrainEB = &setup.getData(tokenEcalTPGFineGrainEBIdMap_);
280  const EcalTPGFineGrainTowerEE *ecaltpgFineGrainTowerEE = &setup.getData(tokenEcalTPGFineGrainTowerEE_);
281  const EcalTPGTowerStatus *ecaltpgBadTT = &setup.getData(tokenEcalTPGTowerStatus_);
282  const EcalTPGSpike *ecaltpgSpike = &setup.getData(tokenEcalTPGSpike_);
283 
284  algo_->setPointers2(ecaltpgFgEBGroup,
285  ecaltpgLutGroup,
286  ecaltpgLut,
287  ecaltpgFineGrainEB,
288  ecaltpgFineGrainTowerEE,
289  ecaltpgBadTT,
290  ecaltpgSpike,
291  ecaltpgTPMode);
292 
293  // we will suppose that everything is to be updated if the
294  // EcalTPGLinearizationConstRcd has changed
295  return setup.get<EcalTPGLinearizationConstRcd>().cacheIdentifier();
296 }
edm::ESGetToken< EcalTPGSlidingWindow, EcalTPGSlidingWindowRcd > tokenEcalTPGSlidingWindow_
edm::ESGetToken< EcalTPGFineGrainStripEE, EcalTPGFineGrainStripEERcd > tokenEcalTPGFineGrainStripEE_
edm::ESGetToken< EcalTPGLutIdMap, EcalTPGLutIdMapRcd > tokenEcalTPGLutIdMap_
edm::ESGetToken< EcalTPGTowerStatus, EcalTPGTowerStatusRcd > tokenEcalTPGTowerStatus_
edm::ESGetToken< EcalTPGFineGrainTowerEE, EcalTPGFineGrainTowerEERcd > tokenEcalTPGFineGrainTowerEE_
edm::ESGetToken< EcalTPGCrystalStatus, EcalTPGCrystalStatusRcd > tokenEcalTPGCrystalStatus_
edm::ESGetToken< EcalTPGOddWeightGroup, EcalTPGOddWeightGroupRcd > tokenEcalTPGOddWeightGroup_
std::unique_ptr< EcalTrigPrimFunctionalAlgo > algo_
edm::ESGetToken< EcalTPGWeightIdMap, EcalTPGWeightIdMapRcd > tokenEcalTPGWeightIdMap_
edm::ESGetToken< EcalTPGStripStatus, EcalTPGStripStatusRcd > tokenEcalTPGStripStatus_
edm::ESGetToken< EcalTPGLinearizationConst, EcalTPGLinearizationConstRcd > tokenEcalTPGLinearization_
edm::ESGetToken< EcalTPGPedestals, EcalTPGPedestalsRcd > tokenEcalTPGPedestals_
edm::ESGetToken< EcalTPGTPMode, EcalTPGTPModeRcd > tokenEcalTPGTPMode_
edm::ESGetToken< EcalTPGFineGrainEBIdMap, EcalTPGFineGrainEBIdMapRcd > tokenEcalTPGFineGrainEBIdMap_
edm::ESGetToken< EcalTPGOddWeightIdMap, EcalTPGOddWeightIdMapRcd > tokenEcalTPGOddWeightIdMap_
edm::ESGetToken< EcalTPGLutGroup, EcalTPGLutGroupRcd > tokenEcalTPGLutGroup_
edm::ESGetToken< EcalTPGSpike, EcalTPGSpikeRcd > tokenEcalTPGSpike_
edm::ESGetToken< EcalTPGWeightGroup, EcalTPGWeightGroupRcd > tokenEcalTPGWeightGroup_
edm::ESGetToken< EcalTPGFineGrainEBGroup, EcalTPGFineGrainEBGroupRcd > tokenEcalTPGFineGrainEBGroup_

◆ produce()

void EcalTrigPrimProducer::produce ( edm::Event e,
const edm::EventSetup c 
)
override

Definition at line 301 of file EcalTrigPrimProducer.cc.

References algo_, Reference_intrackfit_cff::barrel, barrelOnly_, cacheID_, edm::eventsetup::EventSetupRecord::cacheIdentifier(), MillePedeFileConverter_cfg::e, SimL1EmulatorDM_cff::eeDigis, makeMuonMisalignmentScenario::endcap, Exception, edm::EventSetup::get(), getRecords(), mps_fire::i, SummaryClient_cfi::labels, LogDebug, eostools::move(), print(), edm::Handle< T >::product(), edm::DataFrameContainer::size(), tcpFormat_, tokenEB_, and tokenEE_.

301  {
302  // update constants if necessary
304  cacheID_ = this->getRecords(iSetup);
305 
306  // get input collections
307 
310  bool barrel = true;
311  bool endcap = true;
312  if (barrelOnly_)
313  endcap = false;
314 
315  if (!e.getByToken(tokenEB_, ebDigis)) {
316  barrel = false;
318  labelsForToken(tokenEB_, labels);
319  edm::LogWarning("EcalTPG") << " Couldnt find Barrel dataframes with producer " << labels.module << " and label "
320  << labels.productInstance << "!!!";
321  }
322  if (!barrelOnly_) {
323  if (!e.getByToken(tokenEE_, eeDigis)) {
324  endcap = false;
326  labelsForToken(tokenEE_, labels);
327  edm::LogWarning("EcalTPG") << " Couldnt find Endcap dataframes with producer " << labels.module << " and label "
328  << labels.productInstance << "!!!";
329  }
330  }
331  if (!barrel && !endcap) {
333  labelsForToken(tokenEB_, labels);
334  throw cms::Exception(" ProductNotFound") << "No EBDataFrames(EEDataFrames) with producer " << labels.module
335  << " and label " << labels.productInstance << " found in input!!\n";
336  }
337 
338  if (!barrelOnly_)
339  LogDebug("EcalTPG") << " =================> Treating event " << e.id() << ", Number of EBDataFrames "
340  << ebDigis.product()->size() << ", Number of EEDataFrames " << eeDigis.product()->size();
341  else
342  LogDebug("EcalTPG") << " =================> Treating event " << e.id() << ", Number of EBDataFrames "
343  << ebDigis.product()->size();
344 
345  auto pOut = std::make_unique<EcalTrigPrimDigiCollection>();
346  auto pOutTcp = std::make_unique<EcalTrigPrimDigiCollection>();
347 
348  // invoke algorithm
349 
350  const EBDigiCollection *ebdc = nullptr;
351  const EEDigiCollection *eedc = nullptr;
352  if (barrel) {
353  ebdc = ebDigis.product();
354  algo_->run(ebdc, *pOut, *pOutTcp);
355  }
356 
357  if (endcap) {
358  eedc = eeDigis.product();
359  algo_->run(eedc, *pOut, *pOutTcp);
360  }
361 
362  edm::LogInfo("produce") << "For Barrel + Endcap, " << pOut->size() << " TP Digis were produced";
363 
364  // debug prints if TP >0
365 
366  for (unsigned int i = 0; i < pOut->size(); ++i) {
367  bool print = false;
368  for (int isam = 0; isam < (*pOut)[i].size(); ++isam) {
369  if ((*pOut)[i][isam].raw())
370  print = true;
371  }
372  if (print)
373  LogDebug("EcalTPG") << " For tower " << (((*pOut)[i])).id() << ", TP is " << (*pOut)[i];
374  }
375  if (barrelOnly_)
376  LogDebug("EcalTPG") << "\n =================> For Barrel , " << pOut->size()
377  << " TP Digis were produced (including zero ones)";
378  else
379  LogDebug("EcalTPG") << "\n =================> For Barrel + Endcap, " << pOut->size()
380  << " TP Digis were produced (including zero ones)";
381 
382  // put result into the Event
383 
384  e.put(std::move(pOut));
385  if (tcpFormat_)
386  e.put(std::move(pOutTcp), "formatTCP");
387 }
T const * product() const
Definition: Handle.h:70
std::unique_ptr< EcalTrigPrimFunctionalAlgo > algo_
unsigned long long cacheIdentifier() const
unsigned long long cacheID_
unsigned long long getRecords(edm::EventSetup const &setup)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
edm::EDGetTokenT< EBDigiCollection > tokenEB_
Log< level::Info, false > LogInfo
edm::EDGetTokenT< EEDigiCollection > tokenEE_
Log< level::Warning, false > LogWarning
def move(src, dest)
Definition: eostools.py:511
#define LogDebug(id)

Member Data Documentation

◆ algo_

std::unique_ptr<EcalTrigPrimFunctionalAlgo> EcalTrigPrimProducer::algo_
private

Definition at line 90 of file EcalTrigPrimProducer.cc.

Referenced by beginRun(), endRun(), getRecords(), and produce().

◆ barrelOnly_

bool EcalTrigPrimProducer::barrelOnly_
private

Definition at line 91 of file EcalTrigPrimProducer.cc.

Referenced by beginRun(), EcalTrigPrimProducer(), and produce().

◆ binOfMaximum_

int EcalTrigPrimProducer::binOfMaximum_
private

Definition at line 131 of file EcalTrigPrimProducer.cc.

Referenced by beginRun().

◆ cacheID_

unsigned long long EcalTrigPrimProducer::cacheID_
private

Definition at line 136 of file EcalTrigPrimProducer.cc.

Referenced by endRun(), and produce().

◆ debug_

bool EcalTrigPrimProducer::debug_
private

Definition at line 93 of file EcalTrigPrimProducer.cc.

Referenced by beginRun().

◆ famos_

bool EcalTrigPrimProducer::famos_
private

Definition at line 94 of file EcalTrigPrimProducer.cc.

Referenced by beginRun().

◆ fillBinOfMaximumFromHistory_

bool EcalTrigPrimProducer::fillBinOfMaximumFromHistory_
private

Definition at line 132 of file EcalTrigPrimProducer.cc.

Referenced by beginRun().

◆ tcpFormat_

bool EcalTrigPrimProducer::tcpFormat_
private

Definition at line 92 of file EcalTrigPrimProducer.cc.

Referenced by beginRun(), EcalTrigPrimProducer(), and produce().

◆ tokenEB_

edm::EDGetTokenT<EBDigiCollection> EcalTrigPrimProducer::tokenEB_
private

Definition at line 96 of file EcalTrigPrimProducer.cc.

Referenced by produce().

◆ tokenEcalMapping_

const edm::ESGetToken<EcalElectronicsMapping, EcalMappingRcd> EcalTrigPrimProducer::tokenEcalMapping_
private

Definition at line 99 of file EcalTrigPrimProducer.cc.

Referenced by beginRun().

◆ tokenEcalTPGCrystalStatus_

edm::ESGetToken<EcalTPGCrystalStatus, EcalTPGCrystalStatusRcd> EcalTrigPrimProducer::tokenEcalTPGCrystalStatus_
private

Definition at line 108 of file EcalTrigPrimProducer.cc.

Referenced by getRecords().

◆ tokenEcalTPGFineGrainEBGroup_

edm::ESGetToken<EcalTPGFineGrainEBGroup, EcalTPGFineGrainEBGroupRcd> EcalTrigPrimProducer::tokenEcalTPGFineGrainEBGroup_
private

Definition at line 121 of file EcalTrigPrimProducer.cc.

Referenced by getRecords().

◆ tokenEcalTPGFineGrainEBIdMap_

edm::ESGetToken<EcalTPGFineGrainEBIdMap, EcalTPGFineGrainEBIdMapRcd> EcalTrigPrimProducer::tokenEcalTPGFineGrainEBIdMap_
private

Definition at line 124 of file EcalTrigPrimProducer.cc.

Referenced by getRecords().

◆ tokenEcalTPGFineGrainStripEE_

edm::ESGetToken<EcalTPGFineGrainStripEE, EcalTPGFineGrainStripEERcd> EcalTrigPrimProducer::tokenEcalTPGFineGrainStripEE_
private

Definition at line 116 of file EcalTrigPrimProducer.cc.

Referenced by getRecords().

◆ tokenEcalTPGFineGrainTowerEE_

edm::ESGetToken<EcalTPGFineGrainTowerEE, EcalTPGFineGrainTowerEERcd> EcalTrigPrimProducer::tokenEcalTPGFineGrainTowerEE_
private

Definition at line 125 of file EcalTrigPrimProducer.cc.

Referenced by getRecords().

◆ tokenEcalTPGLinearization_

edm::ESGetToken<EcalTPGLinearizationConst, EcalTPGLinearizationConstRcd> EcalTrigPrimProducer::tokenEcalTPGLinearization_
private

Definition at line 106 of file EcalTrigPrimProducer.cc.

Referenced by getRecords().

◆ tokenEcalTPGLutGroup_

edm::ESGetToken<EcalTPGLutGroup, EcalTPGLutGroupRcd> EcalTrigPrimProducer::tokenEcalTPGLutGroup_
private

Definition at line 122 of file EcalTrigPrimProducer.cc.

Referenced by getRecords().

◆ tokenEcalTPGLutIdMap_

edm::ESGetToken<EcalTPGLutIdMap, EcalTPGLutIdMapRcd> EcalTrigPrimProducer::tokenEcalTPGLutIdMap_
private

Definition at line 123 of file EcalTrigPrimProducer.cc.

Referenced by getRecords().

◆ tokenEcalTPGOddWeightGroup_

edm::ESGetToken<EcalTPGOddWeightGroup, EcalTPGOddWeightGroupRcd> EcalTrigPrimProducer::tokenEcalTPGOddWeightGroup_
private

Definition at line 115 of file EcalTrigPrimProducer.cc.

Referenced by getRecords().

◆ tokenEcalTPGOddWeightIdMap_

edm::ESGetToken<EcalTPGOddWeightIdMap, EcalTPGOddWeightIdMapRcd> EcalTrigPrimProducer::tokenEcalTPGOddWeightIdMap_
private

Definition at line 114 of file EcalTrigPrimProducer.cc.

Referenced by getRecords().

◆ tokenEcalTPGPedestals_

edm::ESGetToken<EcalTPGPedestals, EcalTPGPedestalsRcd> EcalTrigPrimProducer::tokenEcalTPGPedestals_
private

Definition at line 107 of file EcalTrigPrimProducer.cc.

Referenced by getRecords().

◆ tokenEcalTPGSlidingWindow_

edm::ESGetToken<EcalTPGSlidingWindow, EcalTPGSlidingWindowRcd> EcalTrigPrimProducer::tokenEcalTPGSlidingWindow_
private

Definition at line 111 of file EcalTrigPrimProducer.cc.

Referenced by getRecords().

◆ tokenEcalTPGSpike_

edm::ESGetToken<EcalTPGSpike, EcalTPGSpikeRcd> EcalTrigPrimProducer::tokenEcalTPGSpike_
private

Definition at line 127 of file EcalTrigPrimProducer.cc.

Referenced by getRecords().

◆ tokenEcalTPGStripStatus_

edm::ESGetToken<EcalTPGStripStatus, EcalTPGStripStatusRcd> EcalTrigPrimProducer::tokenEcalTPGStripStatus_
private

Definition at line 117 of file EcalTrigPrimProducer.cc.

Referenced by getRecords().

◆ tokenEcalTPGTowerStatus_

edm::ESGetToken<EcalTPGTowerStatus, EcalTPGTowerStatusRcd> EcalTrigPrimProducer::tokenEcalTPGTowerStatus_
private

Definition at line 126 of file EcalTrigPrimProducer.cc.

Referenced by getRecords().

◆ tokenEcalTPGTPMode_

edm::ESGetToken<EcalTPGTPMode, EcalTPGTPModeRcd> EcalTrigPrimProducer::tokenEcalTPGTPMode_
private

Definition at line 129 of file EcalTrigPrimProducer.cc.

Referenced by getRecords().

◆ tokenEcalTPGWeightGroup_

edm::ESGetToken<EcalTPGWeightGroup, EcalTPGWeightGroupRcd> EcalTrigPrimProducer::tokenEcalTPGWeightGroup_
private

Definition at line 113 of file EcalTrigPrimProducer.cc.

Referenced by getRecords().

◆ tokenEcalTPGWeightIdMap_

edm::ESGetToken<EcalTPGWeightIdMap, EcalTPGWeightIdMapRcd> EcalTrigPrimProducer::tokenEcalTPGWeightIdMap_
private

Definition at line 112 of file EcalTrigPrimProducer.cc.

Referenced by getRecords().

◆ tokenEE_

edm::EDGetTokenT<EEDigiCollection> EcalTrigPrimProducer::tokenEE_
private

Definition at line 97 of file EcalTrigPrimProducer.cc.

Referenced by produce().

◆ tokenEndcapGeom_

edm::ESGetToken<CaloSubdetectorGeometry, EcalEndcapGeometryRecord> EcalTrigPrimProducer::tokenEndcapGeom_
private

Definition at line 101 of file EcalTrigPrimProducer.cc.

Referenced by beginRun(), and EcalTrigPrimProducer().

◆ tokenETTMap_

edm::ESGetToken<EcalTrigTowerConstituentsMap, IdealGeometryRecord> EcalTrigPrimProducer::tokenETTMap_
private

Definition at line 102 of file EcalTrigPrimProducer.cc.

Referenced by beginRun(), and EcalTrigPrimProducer().

◆ tpInfoPrintout_

bool EcalTrigPrimProducer::tpInfoPrintout_
private

Definition at line 95 of file EcalTrigPrimProducer.cc.

Referenced by beginRun().