CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
EcalPhiSymRecHitProducerRun Class Reference
Inheritance diagram for EcalPhiSymRecHitProducerRun:
edm::global::EDProducer< edm::StreamCache< PhiSymCache >, edm::RunCache< ConfigCache >, edm::RunSummaryCache< PhiSymCache >, edm::EndRunProducer, edm::Accumulator > EcalPhiSymRecHitProducerBase edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 EcalPhiSymRecHitProducerRun (const edm::ParameterSet &pSet)
 
 ~EcalPhiSymRecHitProducerRun () override
 
- Public Member Functions inherited from edm::global::EDProducer< edm::StreamCache< PhiSymCache >, edm::RunCache< ConfigCache >, edm::RunSummaryCache< PhiSymCache >, edm::EndRunProducer, edm::Accumulator >
 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
 
EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 
- Public Member Functions inherited from EcalPhiSymRecHitProducerBase
 EcalPhiSymRecHitProducerBase (const edm::ParameterSet &pSet, edm::ConsumesCollector &&cc)
 
void initializeConfigCache (edm::EventSetup const &setup, edm::ESGetToken< CaloGeometry, CaloGeometryRecord > const &geoToken, std::shared_ptr< ConfigCache > &cache) const
 
void initializeJob ()
 
void initializePhiSymCache (edm::EventSetup const &setup, edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > const &chStatusToken, ConfigCache const *config, std::shared_ptr< PhiSymCache > &cache) const
 
void initializeStreamCache (ConfigCache const *config, PhiSymCache *cache) const
 
void processEvent (edm::Event const &event, edm::EventSetup const &setup, ConfigCache const *config, PhiSymCache *cache) const
 
void sumCache (PhiSymCache *summaryc, PhiSymCache *streamc) const
 
 ~EcalPhiSymRecHitProducerBase ()
 

Private Member Functions

void accumulate (edm::StreamID stream, edm::Event const &event, edm::EventSetup const &setup) const override
 
void beginJob () override
 
std::unique_ptr< PhiSymCachebeginStream (edm::StreamID stream) const override
 
std::shared_ptr< ConfigCacheglobalBeginRun (edm::Run const &run, edm::EventSetup const &setup) const override
 
std::shared_ptr< PhiSymCacheglobalBeginRunSummary (edm::Run const &run, edm::EventSetup const &setup) const override
 
void globalEndRun (edm::Run const &run, edm::EventSetup const &setup) const override
 
void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, PhiSymCache const *cache) const override
 
void globalEndRunSummary (edm::Run const &run, edm::EventSetup const &setup, PhiSymCache *cache) const override
 
void streamBeginLuminosityBlock (edm::StreamID stream, edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) const override
 
void streamBeginRun (edm::StreamID stream, edm::Run const &run, edm::EventSetup const &setup) const override
 
void streamEndRunSummary (edm::StreamID stream, edm::Run const &run, edm::EventSetup const &setup, PhiSymCache *cache) const override
 

Private Attributes

edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcdchStatusTokenRun_
 
edm::ESGetToken< CaloGeometry, CaloGeometryRecordgeoTokenRun_
 
edm::ESGetToken< LHCInfo, LHCInfoRcdlhcInfoTokenLumi_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
template<typename T >
using BranchAliasSetterT = ProductRegistryHelper::BranchAliasSetterT< T >
 
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 
- Protected Attributes inherited from EcalPhiSymRecHitProducerBase
std::vector< double > A_
 
std::vector< double > B_
 
EcalRingCalibrationTools calibRing_
 
edm::EDGetTokenT< EBRecHitCollectionebToken_
 
edm::EDGetTokenT< EBRecHitCollectioneeToken_
 
float etCutEB_
 
float etCutEE_
 
std::vector< double > eThresholdsEB_
 
float eThresholdsEE_ [kNRingsEE]
 
edm::ESGetToken< CaloGeometry, CaloGeometryRecordgeoToken_
 
edm::ESGetToken< EcalLaserDbService, EcalLaserDbRecordlaserDbToken_
 
std::vector< double > misCalibRangeEB_
 
std::vector< double > misCalibRangeEE_
 
std::vector< float > misCalibStepsEB_
 
std::vector< float > misCalibStepsEE_
 
int nMisCalib_
 
int nSumEtValues_
 
float thrEEmod_
 
- Static Protected Attributes inherited from EcalPhiSymRecHitProducerBase
static const short kNRingsEB = EcalRingCalibrationTools::N_RING_BARREL
 
static const short kNRingsEE = EcalRingCalibrationTools::N_RING_ENDCAP
 
static const short ringsInOneEE = kNRingsEE / 2
 

Detailed Description

Definition at line 499 of file EcalPhiSymRecHitProducers.cc.

Constructor & Destructor Documentation

◆ EcalPhiSymRecHitProducerRun()

EcalPhiSymRecHitProducerRun::EcalPhiSymRecHitProducerRun ( const edm::ParameterSet pSet)
explicit

Definition at line 539 of file EcalPhiSymRecHitProducers.cc.

541  lhcInfoTokenLumi_(esConsumes<edm::Transition::BeginLuminosityBlock>()),
542  chStatusTokenRun_(esConsumes<edm::Transition::BeginRun>()),
543  geoTokenRun_(esConsumes<edm::Transition::BeginRun>()) {
544  produces<EcalPhiSymInfo, edm::Transition::EndRun>();
545  produces<EcalPhiSymRecHitCollection, edm::Transition::EndRun>("EB");
546  produces<EcalPhiSymRecHitCollection, edm::Transition::EndRun>("EE");
547 }
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > chStatusTokenRun_
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geoTokenRun_
EcalPhiSymRecHitProducerBase(const edm::ParameterSet &pSet, edm::ConsumesCollector &&cc)
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
edm::ESGetToken< LHCInfo, LHCInfoRcd > lhcInfoTokenLumi_

◆ ~EcalPhiSymRecHitProducerRun()

EcalPhiSymRecHitProducerRun::~EcalPhiSymRecHitProducerRun ( )
inlineoverride

Definition at line 507 of file EcalPhiSymRecHitProducers.cc.

507 {};

Member Function Documentation

◆ accumulate()

void EcalPhiSymRecHitProducerRun::accumulate ( edm::StreamID  stream,
edm::Event const &  event,
edm::EventSetup const &  setup 
) const
overrideprivate

Definition at line 621 of file EcalPhiSymRecHitProducers.cc.

References EcalPhiSymRecHitProducerBase::processEvent(), singleTopDQM_cfi::setup, and cms::cuda::stream.

623  {
624  processEvent(event, setup, runCache(event.getRun().index()), streamCache(stream));
625 }
void processEvent(edm::Event const &event, edm::EventSetup const &setup, ConfigCache const *config, PhiSymCache *cache) const
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
Definition: event.py:1

◆ beginJob()

void EcalPhiSymRecHitProducerRun::beginJob ( )
inlineoverrideprivatevirtual

◆ beginStream()

std::unique_ptr< PhiSymCache > EcalPhiSymRecHitProducerRun::beginStream ( edm::StreamID  stream) const
overrideprivate

Definition at line 583 of file EcalPhiSymRecHitProducers.cc.

583  {
584  //---create stream cache
585  return std::make_unique<PhiSymCache>();
586 }

◆ globalBeginRun()

std::shared_ptr< ConfigCache > EcalPhiSymRecHitProducerRun::globalBeginRun ( edm::Run const &  run,
edm::EventSetup const &  setup 
) const
overrideprivate

Definition at line 549 of file EcalPhiSymRecHitProducers.cc.

References utilities::cache(), geoTokenRun_, EcalPhiSymRecHitProducerBase::initializeConfigCache(), and singleTopDQM_cfi::setup.

550  {
551  auto cache = std::make_shared<ConfigCache>();
552 
553  //---Reset cache with config values
555 
556  return cache;
557 }
edm::ESGetToken< CaloGeometry, CaloGeometryRecord > geoTokenRun_
void initializeConfigCache(edm::EventSetup const &setup, edm::ESGetToken< CaloGeometry, CaloGeometryRecord > const &geoToken, std::shared_ptr< ConfigCache > &cache) const
def cache(function)
Definition: utilities.py:3

◆ globalBeginRunSummary()

std::shared_ptr< PhiSymCache > EcalPhiSymRecHitProducerRun::globalBeginRunSummary ( edm::Run const &  run,
edm::EventSetup const &  setup 
) const
overrideprivate

Definition at line 559 of file EcalPhiSymRecHitProducers.cc.

References utilities::cache(), chStatusTokenRun_, EcalPhiSymRecHitProducerBase::initializePhiSymCache(), writedatasetfile::run, and singleTopDQM_cfi::setup.

560  {
561  auto cache = std::make_shared<PhiSymCache>();
562  initializePhiSymCache(setup, chStatusTokenRun_, runCache(run.index()), cache);
563  return cache;
564 }
void initializePhiSymCache(edm::EventSetup const &setup, edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > const &chStatusToken, ConfigCache const *config, std::shared_ptr< PhiSymCache > &cache) const
edm::ESGetToken< EcalChannelStatus, EcalChannelStatusRcd > chStatusTokenRun_
def cache(function)
Definition: utilities.py:3

◆ globalEndRun()

void EcalPhiSymRecHitProducerRun::globalEndRun ( edm::Run const &  run,
edm::EventSetup const &  setup 
) const
inlineoverrideprivate

Definition at line 516 of file EcalPhiSymRecHitProducers.cc.

516 {};

◆ globalEndRunProduce()

void EcalPhiSymRecHitProducerRun::globalEndRunProduce ( edm::Run run,
edm::EventSetup const &  setup,
PhiSymCache const *  cache 
) const
overrideprivate

Definition at line 566 of file EcalPhiSymRecHitProducers.cc.

References utilities::cache(), EcalPhiSymRecHitProducerBase::misCalibRangeEB_, EcalPhiSymRecHitProducerBase::misCalibRangeEE_, eostools::move(), EcalPhiSymRecHitProducerBase::nMisCalib_, and writedatasetfile::run.

568  {
569  //---put the collections in the Runs tree
570  auto ecalLumiInfo = std::make_unique<EcalPhiSymInfo>(cache->ecalLumiInfo);
571  ecalLumiInfo->setMiscalibInfo(
573  auto recHitCollEB =
574  std::make_unique<EcalPhiSymRecHitCollection>(cache->recHitCollEB.begin(), cache->recHitCollEB.end());
575  auto recHitCollEE =
576  std::make_unique<EcalPhiSymRecHitCollection>(cache->recHitCollEE.begin(), cache->recHitCollEE.end());
577 
578  run.put(std::move(ecalLumiInfo));
579  run.put(std::move(recHitCollEB), "EB");
580  run.put(std::move(recHitCollEE), "EE");
581 }
def cache(function)
Definition: utilities.py:3
def move(src, dest)
Definition: eostools.py:511

◆ globalEndRunSummary()

void EcalPhiSymRecHitProducerRun::globalEndRunSummary ( edm::Run const &  run,
edm::EventSetup const &  setup,
PhiSymCache cache 
) const
inlineoverrideprivate

Definition at line 517 of file EcalPhiSymRecHitProducers.cc.

517 {};

◆ streamBeginLuminosityBlock()

void EcalPhiSymRecHitProducerRun::streamBeginLuminosityBlock ( edm::StreamID  stream,
edm::LuminosityBlock const &  lumi,
edm::EventSetup const &  setup 
) const
overrideprivate

Definition at line 595 of file EcalPhiSymRecHitProducers.cc.

References lhcInfoTokenLumi_, singleTopDQM_cfi::setup, and cms::cuda::stream.

597  {
598  //---Get LHC info
599  // LHCInfo only returns the correct luminosity information
600  // for each lumisection, accessing LHCInfo at the beginning
601  // of each run would return only the luminosity info of the
602  // first LS.
603  // Therefore the LHCInfo is accessed only by the first stream
604  // each time a new LS is processed
605  if (stream.value() == 0) {
606  const auto& lhcinfo = setup.getData(lhcInfoTokenLumi_);
607  EcalPhiSymInfo thisLumi(0, 0, 0, 1, lhcinfo.fillNumber(), lhcinfo.delivLumi(), lhcinfo.recLumi());
608 
609  streamCache(stream)->ecalLumiInfo += thisLumi;
610  }
611 }
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
edm::ESGetToken< LHCInfo, LHCInfoRcd > lhcInfoTokenLumi_

◆ streamBeginRun()

void EcalPhiSymRecHitProducerRun::streamBeginRun ( edm::StreamID  stream,
edm::Run const &  run,
edm::EventSetup const &  setup 
) const
overrideprivate

Definition at line 588 of file EcalPhiSymRecHitProducers.cc.

References EcalPhiSymRecHitProducerBase::initializeStreamCache(), writedatasetfile::run, and cms::cuda::stream.

590  {
591  //---Reset stream cache
592  initializeStreamCache(runCache(run.index()), streamCache(stream));
593 }
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
void initializeStreamCache(ConfigCache const *config, PhiSymCache *cache) const

◆ streamEndRunSummary()

void EcalPhiSymRecHitProducerRun::streamEndRunSummary ( edm::StreamID  stream,
edm::Run const &  run,
edm::EventSetup const &  setup,
PhiSymCache cache 
) const
overrideprivate

Definition at line 613 of file EcalPhiSymRecHitProducers.cc.

References cms::cuda::stream, and EcalPhiSymRecHitProducerBase::sumCache().

616  {
617  //---sum stream cache to run cache
618  sumCache(scache, streamCache(stream));
619 }
void sumCache(PhiSymCache *summaryc, PhiSymCache *streamc) const
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream

Member Data Documentation

◆ chStatusTokenRun_

edm::ESGetToken<EcalChannelStatus, EcalChannelStatusRcd> EcalPhiSymRecHitProducerRun::chStatusTokenRun_
private

Definition at line 534 of file EcalPhiSymRecHitProducers.cc.

Referenced by globalBeginRunSummary().

◆ geoTokenRun_

edm::ESGetToken<CaloGeometry, CaloGeometryRecord> EcalPhiSymRecHitProducerRun::geoTokenRun_
private

Definition at line 535 of file EcalPhiSymRecHitProducers.cc.

Referenced by globalBeginRun().

◆ lhcInfoTokenLumi_

edm::ESGetToken<LHCInfo, LHCInfoRcd> EcalPhiSymRecHitProducerRun::lhcInfoTokenLumi_
private

Definition at line 533 of file EcalPhiSymRecHitProducers.cc.

Referenced by streamBeginLuminosityBlock().