CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
SiPixelDigiErrorsFromSoAAlpaka Class Reference
Inheritance diagram for SiPixelDigiErrorsFromSoAAlpaka:
edm::stream::EDProducer<>

Public Member Functions

 SiPixelDigiErrorsFromSoAAlpaka (const edm::ParameterSet &iConfig)
 
 ~SiPixelDigiErrorsFromSoAAlpaka () override=default
 
- 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

void produce (edm::Event &iEvent, const edm::EventSetup &iSetup) override
 

Private Attributes

std::unique_ptr< SiPixelFedCablingTreecabling_
 
const edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcdcablingToken_
 
edm::ESWatcher< SiPixelFedCablingMapRcdcablingWatcher_
 
const edm::EDGetTokenT< SiPixelDigiErrorsHostdigiErrorsSoAGetToken_
 
const edm::EDPutTokenT< edmNew::DetSetVector< PixelFEDChannel > > disabledChannelPutToken_
 
const edm::EDPutTokenT< edm::DetSetVector< SiPixelRawDataError > > errorPutToken_
 
const edm::EDGetTokenT< SiPixelFormatterErrorsfmtErrorsGetToken_
 
const std::vector< int > tkerrorlist_
 
const edm::EDPutTokenT< DetIdCollectiontkErrorPutToken_
 
const bool usePhase1_
 
const std::vector< int > usererrorlist_
 
const edm::EDPutTokenT< DetIdCollectionuserErrorPutToken_
 

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

Definition at line 24 of file SiPixelDigiErrorsFromSoAAlpaka.cc.

Constructor & Destructor Documentation

◆ SiPixelDigiErrorsFromSoAAlpaka()

SiPixelDigiErrorsFromSoAAlpaka::SiPixelDigiErrorsFromSoAAlpaka ( const edm::ParameterSet iConfig)
explicit

Definition at line 51 of file SiPixelDigiErrorsFromSoAAlpaka.cc.

References edm::ParameterSet::getParameter().

52  : cablingToken_(esConsumes(edm::ESInputTag("", iConfig.getParameter<std::string>("CablingMapLabel")))),
53  digiErrorsSoAGetToken_{consumes<SiPixelDigiErrorsHost>(iConfig.getParameter<edm::InputTag>("digiErrorSoASrc"))},
54  fmtErrorsGetToken_{consumes<SiPixelFormatterErrors>(iConfig.getParameter<edm::InputTag>("fmtErrorsSoASrc"))},
55  errorPutToken_{produces<edm::DetSetVector<SiPixelRawDataError>>()},
56  tkErrorPutToken_{produces<DetIdCollection>()},
57  userErrorPutToken_{produces<DetIdCollection>("UserErrorModules")},
58  disabledChannelPutToken_{produces<edmNew::DetSetVector<PixelFEDChannel>>()},
59  tkerrorlist_(iConfig.getParameter<std::vector<int>>("ErrorList")),
60  usererrorlist_(iConfig.getParameter<std::vector<int>>("UserErrorList")),
61  usePhase1_(iConfig.getParameter<bool>("UsePhase1")) {}
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const edm::EDGetTokenT< SiPixelFormatterErrors > fmtErrorsGetToken_
const edm::EDGetTokenT< SiPixelDigiErrorsHost > digiErrorsSoAGetToken_
const edm::EDPutTokenT< DetIdCollection > userErrorPutToken_
const edm::EDPutTokenT< edm::DetSetVector< SiPixelRawDataError > > errorPutToken_
const edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > cablingToken_
const edm::EDPutTokenT< DetIdCollection > tkErrorPutToken_
const edm::EDPutTokenT< edmNew::DetSetVector< PixelFEDChannel > > disabledChannelPutToken_

◆ ~SiPixelDigiErrorsFromSoAAlpaka()

SiPixelDigiErrorsFromSoAAlpaka::~SiPixelDigiErrorsFromSoAAlpaka ( )
overridedefault

Member Function Documentation

◆ fillDescriptions()

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

Definition at line 63 of file SiPixelDigiErrorsFromSoAAlpaka.cc.

References edm::ConfigurationDescriptions::addWithDefaultLabel(), submitPVResolutionJobs::desc, ProducerED_cfi::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

63  {
65  desc.add<edm::InputTag>("digiErrorSoASrc", edm::InputTag("siPixelDigis"));
66  desc.add<edm::InputTag>("fmtErrorsSoASrc", edm::InputTag("siPixelDigis"));
67  // the configuration parameters here are named following those in SiPixelRawToDigi
68  desc.add<std::string>("CablingMapLabel", "")->setComment("CablingMap label");
69  desc.add<bool>("UsePhase1", false)->setComment("## Use phase1");
70  desc.add<std::vector<int>>("ErrorList", std::vector<int>{29})
71  ->setComment("## ErrorList: list of error codes used by tracking to invalidate modules");
72  desc.add<std::vector<int>>("UserErrorList", std::vector<int>{40})
73  ->setComment("## UserErrorList: list of error codes used by Pixel experts for investigation");
74  descriptions.addWithDefaultLabel(desc);
75 }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)

◆ produce()

void SiPixelDigiErrorsFromSoAAlpaka::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 77 of file SiPixelDigiErrorsFromSoAAlpaka.cc.

References cabling_, cablingToken_, SiPixelFedCablingMap::cablingTree(), cablingWatcher_, edm::ESWatcher< T >::check(), edm::DetSet< T >::data, digiErrorsSoAGetToken_, disabledChannelPutToken_, submitPVResolutionJobs::err, relativeConstraints::error, errorPutToken_, fmtErrorsGetToken_, edm::EventSetup::getData(), mps_fire::i, iEvent, LogDebug, FEDNumbering::MINSiPixeluTCAFEDID, eostools::move(), findQualityFiles::size, tkerrorlist_, tkErrorPutToken_, mitigatedMETSequence_cff::U, usePhase1_, usererrorlist_, and userErrorPutToken_.

77  {
78  // pack errors into collection
79 
80  // initialize cabling map or update if necessary
81  if (cablingWatcher_.check(iSetup)) {
82  // cabling map, which maps online address (fed->link->ROC->local pixel) to offline (DetId->global pixel)
83  const SiPixelFedCablingMap* cablingMap = &iSetup.getData(cablingToken_);
84  cabling_ = cablingMap->cablingTree();
85  LogDebug("map version:") << cabling_->version();
86  }
87 
88  const auto& digiErrors = iEvent.get(digiErrorsSoAGetToken_);
89  const auto& formatterErrors = iEvent.get(fmtErrorsGetToken_);
90 
92  DetIdCollection tkerror_detidcollection{};
93  DetIdCollection usererror_detidcollection{};
94  edmNew::DetSetVector<PixelFEDChannel> disabled_channelcollection{};
95 
96  PixelDataFormatter formatter(cabling_.get(), usePhase1_); // for phase 1 & 0
97  auto errors = formatterErrors; // make a copy
99 
100  // if (digiErrors.view().size() > 0) { // TODO: need to know if this size will be useful or not and how to use it
101  uint32_t size = digiErrors.view().metadata().size();
102  for (auto i = 0U; i < size; i++) {
103  SiPixelErrorCompact err = digiErrors.view()[i].pixelErrors();
104  if (err.errorType != 0) {
106  errors[err.rawId].push_back(error);
107  }
108  }
109  // }
110 
111  formatter.unpackFEDErrors(errors,
112  tkerrorlist_,
114  errorcollection,
115  tkerror_detidcollection,
116  usererror_detidcollection,
117  disabled_channelcollection,
118  nodeterrors);
119 
120  const uint32_t dummydetid = 0xffffffff;
121  edm::DetSet<SiPixelRawDataError>& errorDetSet = errorcollection.find_or_insert(dummydetid);
122  errorDetSet.data = nodeterrors;
123 
124  iEvent.emplace(errorPutToken_, std::move(errorcollection));
125  iEvent.emplace(tkErrorPutToken_, std::move(tkerror_detidcollection));
126  iEvent.emplace(userErrorPutToken_, std::move(usererror_detidcollection));
127  iEvent.emplace(disabledChannelPutToken_, std::move(disabled_channelcollection));
128 }
size
Write out results.
std::unique_ptr< SiPixelFedCablingTree > cabling_
std::unique_ptr< SiPixelFedCablingTree > cablingTree() const
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Definition: EventSetup.h:119
edm::ESWatcher< SiPixelFedCablingMapRcd > cablingWatcher_
int iEvent
Definition: GenABIO.cc:224
const edm::EDGetTokenT< SiPixelFormatterErrors > fmtErrorsGetToken_
const edm::EDGetTokenT< SiPixelDigiErrorsHost > digiErrorsSoAGetToken_
const edm::EDPutTokenT< DetIdCollection > userErrorPutToken_
const edm::EDPutTokenT< edm::DetSetVector< SiPixelRawDataError > > errorPutToken_
const edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > cablingToken_
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
collection_type data
Definition: DetSet.h:80
Definition: errors.py:1
const edm::EDPutTokenT< DetIdCollection > tkErrorPutToken_
std::vector< SiPixelRawDataError > DetErrors
def move(src, dest)
Definition: eostools.py:511
const edm::EDPutTokenT< edmNew::DetSetVector< PixelFEDChannel > > disabledChannelPutToken_
Pixel error – collection of errors and error information.
#define LogDebug(id)

Member Data Documentation

◆ cabling_

std::unique_ptr<SiPixelFedCablingTree> SiPixelDigiErrorsFromSoAAlpaka::cabling_
private

Definition at line 43 of file SiPixelDigiErrorsFromSoAAlpaka.cc.

Referenced by produce().

◆ cablingToken_

const edm::ESGetToken<SiPixelFedCablingMap, SiPixelFedCablingMapRcd> SiPixelDigiErrorsFromSoAAlpaka::cablingToken_
private

Definition at line 34 of file SiPixelDigiErrorsFromSoAAlpaka.cc.

Referenced by produce().

◆ cablingWatcher_

edm::ESWatcher<SiPixelFedCablingMapRcd> SiPixelDigiErrorsFromSoAAlpaka::cablingWatcher_
private

Definition at line 42 of file SiPixelDigiErrorsFromSoAAlpaka.cc.

Referenced by produce().

◆ digiErrorsSoAGetToken_

const edm::EDGetTokenT<SiPixelDigiErrorsHost> SiPixelDigiErrorsFromSoAAlpaka::digiErrorsSoAGetToken_
private

Definition at line 35 of file SiPixelDigiErrorsFromSoAAlpaka.cc.

Referenced by produce().

◆ disabledChannelPutToken_

const edm::EDPutTokenT<edmNew::DetSetVector<PixelFEDChannel> > SiPixelDigiErrorsFromSoAAlpaka::disabledChannelPutToken_
private

Definition at line 40 of file SiPixelDigiErrorsFromSoAAlpaka.cc.

Referenced by produce().

◆ errorPutToken_

const edm::EDPutTokenT<edm::DetSetVector<SiPixelRawDataError> > SiPixelDigiErrorsFromSoAAlpaka::errorPutToken_
private

Definition at line 37 of file SiPixelDigiErrorsFromSoAAlpaka.cc.

Referenced by produce().

◆ fmtErrorsGetToken_

const edm::EDGetTokenT<SiPixelFormatterErrors> SiPixelDigiErrorsFromSoAAlpaka::fmtErrorsGetToken_
private

Definition at line 36 of file SiPixelDigiErrorsFromSoAAlpaka.cc.

Referenced by produce().

◆ tkerrorlist_

const std::vector<int> SiPixelDigiErrorsFromSoAAlpaka::tkerrorlist_
private

Definition at line 45 of file SiPixelDigiErrorsFromSoAAlpaka.cc.

Referenced by produce().

◆ tkErrorPutToken_

const edm::EDPutTokenT<DetIdCollection> SiPixelDigiErrorsFromSoAAlpaka::tkErrorPutToken_
private

Definition at line 38 of file SiPixelDigiErrorsFromSoAAlpaka.cc.

Referenced by produce().

◆ usePhase1_

const bool SiPixelDigiErrorsFromSoAAlpaka::usePhase1_
private

Definition at line 48 of file SiPixelDigiErrorsFromSoAAlpaka.cc.

Referenced by produce().

◆ usererrorlist_

const std::vector<int> SiPixelDigiErrorsFromSoAAlpaka::usererrorlist_
private

Definition at line 46 of file SiPixelDigiErrorsFromSoAAlpaka.cc.

Referenced by produce().

◆ userErrorPutToken_

const edm::EDPutTokenT<DetIdCollection> SiPixelDigiErrorsFromSoAAlpaka::userErrorPutToken_
private

Definition at line 39 of file SiPixelDigiErrorsFromSoAAlpaka.cc.

Referenced by produce().