CMS 3D CMS Logo

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

Public Member Functions

 SiPixelDigiErrorsFromSoA (const edm::ParameterSet &iConfig)
 
 ~SiPixelDigiErrorsFromSoA () 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
< SiPixelFedCablingTree
cabling_
 
const edm::ESGetToken
< SiPixelFedCablingMap,
SiPixelFedCablingMapRcd
cablingToken_
 
edm::ESWatcher
< SiPixelFedCablingMapRcd
cablingWatcher_
 
const edm::EDGetTokenT
< SiPixelErrorsSoA
digiErrorSoAGetToken_
 
const edm::EDPutTokenT
< edmNew::DetSetVector
< PixelFEDChannel > > 
disabledChannelPutToken_
 
const edm::EDPutTokenT
< edm::DetSetVector
< SiPixelRawDataError > > 
errorPutToken_
 
const std::vector< int > tkerrorlist_
 
const edm::EDPutTokenT
< DetIdCollection
tkErrorPutToken_
 
const bool usePhase1_
 
const std::vector< int > usererrorlist_
 
const edm::EDPutTokenT
< DetIdCollection
userErrorPutToken_
 

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 SiPixelDigiErrorsFromSoA.cc.

Constructor & Destructor Documentation

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

Definition at line 50 of file SiPixelDigiErrorsFromSoA.cc.

References edm::ParameterSet::getParameter().

51  : cablingToken_(esConsumes(edm::ESInputTag("", iConfig.getParameter<std::string>("CablingMapLabel")))),
52  digiErrorSoAGetToken_{consumes<SiPixelErrorsSoA>(iConfig.getParameter<edm::InputTag>("digiErrorSoASrc"))},
53  errorPutToken_{produces<edm::DetSetVector<SiPixelRawDataError>>()},
54  tkErrorPutToken_{produces<DetIdCollection>()},
55  userErrorPutToken_{produces<DetIdCollection>("UserErrorModules")},
56  disabledChannelPutToken_{produces<edmNew::DetSetVector<PixelFEDChannel>>()},
57  tkerrorlist_(iConfig.getParameter<std::vector<int>>("ErrorList")),
58  usererrorlist_(iConfig.getParameter<std::vector<int>>("UserErrorList")),
59  usePhase1_(iConfig.getParameter<bool>("UsePhase1")) {}
const edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > cablingToken_
const edm::EDPutTokenT< edm::DetSetVector< SiPixelRawDataError > > errorPutToken_
const edm::EDPutTokenT< edmNew::DetSetVector< PixelFEDChannel > > disabledChannelPutToken_
const edm::EDGetTokenT< SiPixelErrorsSoA > digiErrorSoAGetToken_
const edm::EDPutTokenT< DetIdCollection > tkErrorPutToken_
const edm::EDPutTokenT< DetIdCollection > userErrorPutToken_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const std::vector< int > tkerrorlist_
const std::vector< int > usererrorlist_
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
SiPixelDigiErrorsFromSoA::~SiPixelDigiErrorsFromSoA ( )
overridedefault

Member Function Documentation

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

Definition at line 61 of file SiPixelDigiErrorsFromSoA.cc.

References edm::ParameterSetDescription::add(), edm::ConfigurationDescriptions::addWithDefaultLabel(), submitPVResolutionJobs::desc, HLT_FULL_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

61  {
63  desc.add<edm::InputTag>("digiErrorSoASrc", edm::InputTag("siPixelDigiErrorsSoA"));
64  // the configuration parameters here are named following those in SiPixelRawToDigi
65  desc.add<std::string>("CablingMapLabel", "")->setComment("CablingMap label");
66  desc.add<bool>("UsePhase1", false)->setComment("## Use phase1");
67  desc.add<std::vector<int>>("ErrorList", std::vector<int>{29})
68  ->setComment("## ErrorList: list of error codes used by tracking to invalidate modules");
69  desc.add<std::vector<int>>("UserErrorList", std::vector<int>{40})
70  ->setComment("## UserErrorList: list of error codes used by Pixel experts for investigation");
71  descriptions.addWithDefaultLabel(desc);
72 }
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void SiPixelDigiErrorsFromSoA::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 74 of file SiPixelDigiErrorsFromSoA.cc.

References cms::cuda::assert(), cabling_, cablingToken_, SiPixelFedCablingMap::cablingTree(), cablingWatcher_, edm::ESWatcher< T >::check(), edm::DetSet< T >::data, digiErrorSoAGetToken_, disabledChannelPutToken_, edm::Event::emplace(), submitPVValidationJobs::err, relativeConstraints::error, errorPutToken_, SiPixelErrorCompact::errorType, SiPixelErrorCompact::fedId, edm::Event::get(), edm::EventSetup::getData(), mps_fire::i, LogDebug, FEDNumbering::MINSiPixeluTCAFEDID, eostools::move(), SiPixelErrorCompact::rawId, findQualityFiles::size, tkerrorlist_, tkErrorPutToken_, usePhase1_, usererrorlist_, userErrorPutToken_, and SiPixelErrorCompact::word.

74  {
75  // pack errors into collection
76 
77  // initialize cabling map or update if necessary
78  if (cablingWatcher_.check(iSetup)) {
79  // cabling map, which maps online address (fed->link->ROC->local pixel) to offline (DetId->global pixel)
80  const SiPixelFedCablingMap* cablingMap = &iSetup.getData(cablingToken_);
81  cabling_ = cablingMap->cablingTree();
82  LogDebug("map version:") << cabling_->version();
83  }
84 
85  const auto& digiErrors = iEvent.get(digiErrorSoAGetToken_);
86 
88  DetIdCollection tkerror_detidcollection{};
89  DetIdCollection usererror_detidcollection{};
90  edmNew::DetSetVector<PixelFEDChannel> disabled_channelcollection{};
91 
92  PixelDataFormatter formatter(cabling_.get(), usePhase1_); // for phase 1 & 0
93  const PixelDataFormatter::Errors* formatterErrors = digiErrors.formatterErrors();
94  assert(formatterErrors != nullptr);
95  auto errors = *formatterErrors; // make a copy
97 
98  auto size = digiErrors.size();
99  for (auto i = 0U; i < size; i++) {
100  SiPixelErrorCompact err = digiErrors.error(i);
101  if (err.errorType != 0) {
103  errors[err.rawId].push_back(error);
104  }
105  }
106 
107  formatter.unpackFEDErrors(errors,
108  tkerrorlist_,
110  errorcollection,
111  tkerror_detidcollection,
112  usererror_detidcollection,
113  disabled_channelcollection,
114  nodeterrors);
115 
116  const uint32_t dummydetid = 0xffffffff;
117  edm::DetSet<SiPixelRawDataError>& errorDetSet = errorcollection.find_or_insert(dummydetid);
118  errorDetSet.data = nodeterrors;
119 
120  iEvent.emplace(errorPutToken_, std::move(errorcollection));
121  iEvent.emplace(tkErrorPutToken_, std::move(tkerror_detidcollection));
122  iEvent.emplace(userErrorPutToken_, std::move(usererror_detidcollection));
123  iEvent.emplace(disabledChannelPutToken_, std::move(disabled_channelcollection));
124 }
const edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > cablingToken_
const edm::EDPutTokenT< edm::DetSetVector< SiPixelRawDataError > > errorPutToken_
const edm::EDPutTokenT< edmNew::DetSetVector< PixelFEDChannel > > disabledChannelPutToken_
const edm::EDGetTokenT< SiPixelErrorsSoA > digiErrorSoAGetToken_
assert(be >=bs)
bool getData(T &iHolder) const
Definition: EventSetup.h:128
const edm::EDPutTokenT< DetIdCollection > tkErrorPutToken_
std::unique_ptr< SiPixelFedCablingTree > cabling_
def move
Definition: eostools.py:511
const edm::EDPutTokenT< DetIdCollection > userErrorPutToken_
bool get(ProductID const &oid, Handle< PROD > &result) const
Definition: Event.h:346
std::unique_ptr< SiPixelFedCablingTree > cablingTree() const
OrphanHandle< PROD > emplace(EDPutTokenT< PROD > token, Args &&...args)
puts a new product
Definition: Event.h:433
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:57
const std::vector< int > tkerrorlist_
collection_type data
Definition: DetSet.h:80
const std::vector< int > usererrorlist_
tuple size
Write out results.
std::vector< SiPixelRawDataError > DetErrors
Pixel error – collection of errors and error information.
edm::ESWatcher< SiPixelFedCablingMapRcd > cablingWatcher_
std::map< cms_uint32_t, DetErrors > Errors
#define LogDebug(id)

Member Data Documentation

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

Definition at line 42 of file SiPixelDigiErrorsFromSoA.cc.

Referenced by produce().

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

Definition at line 34 of file SiPixelDigiErrorsFromSoA.cc.

Referenced by produce().

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

Definition at line 41 of file SiPixelDigiErrorsFromSoA.cc.

Referenced by produce().

const edm::EDGetTokenT<SiPixelErrorsSoA> SiPixelDigiErrorsFromSoA::digiErrorSoAGetToken_
private

Definition at line 35 of file SiPixelDigiErrorsFromSoA.cc.

Referenced by produce().

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

Definition at line 39 of file SiPixelDigiErrorsFromSoA.cc.

Referenced by produce().

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

Definition at line 36 of file SiPixelDigiErrorsFromSoA.cc.

Referenced by produce().

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

Definition at line 44 of file SiPixelDigiErrorsFromSoA.cc.

Referenced by produce().

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

Definition at line 37 of file SiPixelDigiErrorsFromSoA.cc.

Referenced by produce().

const bool SiPixelDigiErrorsFromSoA::usePhase1_
private

Definition at line 47 of file SiPixelDigiErrorsFromSoA.cc.

Referenced by produce().

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

Definition at line 45 of file SiPixelDigiErrorsFromSoA.cc.

Referenced by produce().

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

Definition at line 38 of file SiPixelDigiErrorsFromSoA.cc.

Referenced by produce().