66 std::unique_ptr<SiPixelFedCablingTree>
cabling_;
95 badPixelInfo_(nullptr),
97 tkerrorlist_(config_.getParameter<
std::
vector<
int>>(
"ErrorList")),
98 usererrorlist_(config_.getParameter<
std::
vector<
int>>(
"UserErrorList")),
100 cablingMapToken_{esConsumes<SiPixelFedCablingMap, SiPixelFedCablingMapRcd>(
102 siPixelDigiCollectionToken_{produces<edm::DetSetVector<PixelDigi>>()},
103 includeErrors_(config_.getParameter<
bool>(
"IncludeErrors")),
104 useQuality_(config_.getParameter<
bool>(
"UseQualityInfo")),
105 usePilotBlade_(config_.getParameter<
bool>(
"UsePilotBlade")),
106 usePhase1_(config_.getParameter<
bool>(
"UsePhase1"))
110 siPixelQualityToken_ = esConsumes<SiPixelQuality, SiPixelQualityRcd>(
115 if (includeErrors_) {
116 errorPutToken_ = produces<edm::DetSetVector<SiPixelRawDataError>>();
117 tkErrorPutToken_ = produces<DetIdCollection>();
118 userErrorPutToken_ = produces<DetIdCollection>(
"UserErrorModules");
119 disabledChannelPutToken_ = produces<edmNew::DetSetVector<PixelFEDChannel>>();
129 edm::LogInfo(
"SiPixelRawToDigi") <<
" Use pilot blade data (FED 40)";
138 edm::LogInfo(
"SiPixelRawToDigi") <<
" HERE ** SiPixelRawToDigi destructor!";
145 desc.add<
bool>(
"IncludeErrors",
true);
146 desc.add<
bool>(
"UseQualityInfo",
false);
148 desc.add<std::vector<int>>(
"ErrorList", std::vector<int>{29})
149 ->setComment(
"## ErrorList: list of error codes used by tracking to invalidate modules");
152 desc.add<std::vector<int>>(
"UserErrorList", std::vector<int>{40})
153 ->setComment(
"## UserErrorList: list of error codes used by Pixel experts for investigation");
158 psd0.
addOptional<std::vector<edm::InputTag>>(
"inputs");
163 ->setComment(
"## Empty Regions PSet means complete unpacking");
165 desc.add<
bool>(
"UsePilotBlade",
false)->setComment(
"## Use pilot blades");
166 desc.add<
bool>(
"UsePhase1",
false)->setComment(
"## Use phase1");
167 desc.add<
std::string>(
"CablingMapLabel",
"")->setComment(
"CablingMap label");
168 desc.add<
std::string>(
"SiPixelQualityLabel",
"")->setComment(
"SiPixelQuality label");
169 descriptions.
add(
"siPixelRawToDigi",
desc);
176 const uint32_t dummydetid = 0xffffffff;
192 edm::LogError(
"SiPixelQualityNotPresent") <<
"Configured to use SiPixelQuality, but SiPixelQuality not present";
214 bool errorsInEvent =
false;
225 for (
auto aFed =
fedIds_.begin(); aFed !=
fedIds_.end(); ++aFed) {
234 LogDebug(
"SiPixelRawToDigi") <<
"PRODUCE DIGI FOR FED:" <<
fedId;
250 tkerror_detidcollection,
251 usererror_detidcollection,
252 disabled_channelcollection,
259 errorDetSet.
data = nodeterrors;
262 LogDebug(
"SiPixelRawToDigi") <<
"Error words were stored in this event";
T getParameter(std::string const &) const
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
std::unique_ptr< SiPixelFedCablingTree > cablingTree() const
edm::EDPutTokenT< edmNew::DetSetVector< PixelFEDChannel > > disabledChannelPutToken_
edm::ESWatcher< SiPixelQualityRcd > qualityWatcher_
std::vector< unsigned int > fedIds_
edm::EDPutTokenT< DetIdCollection > userErrorPutToken_
void produce(edm::Event &, const edm::EventSetup &) override
get data, convert to digis attach againe to Event
Log< level::Error, false > LogError
PixelUnpackingRegions * regions_
unsigned int nForwardModules() const
reference find_or_insert(det_id_type id)
SiPixelRawToDigi(const edm::ParameterSet &)
ctor
edm::EDPutTokenT< edm::DetSetVector< SiPixelRawDataError > > errorPutToken_
T const * product() const
const bool usePilotBlade_
const std::vector< int > tkerrorlist_
std::unique_ptr< SiPixelFedCablingTree > cabling_
const edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > cablingMapToken_
edm::ESWatcher< SiPixelFedCablingMapRcd > recordWatcher_
#define DEFINE_FWK_MODULE(type)
const std::set< unsigned int > * modulesToUnpack() const
full set of module ids to unpack
std::vector< unsigned int > fedIds() const
unsigned int nModules() const
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
~SiPixelRawToDigi() override
dtor
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
const std::vector< int > usererrorlist_
Log< level::Info, false > LogInfo
void run(const edm::Event &e, const edm::EventSetup &es)
has to be run during each event
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
unsigned int nBarrelModules() const
bool check(const edm::EventSetup &iSetup)
edm::ParameterSet config_
const edm::EDGetTokenT< FEDRawDataCollection > fedRawDataCollectionToken_
edm::ESGetToken< SiPixelQuality, SiPixelQualityRcd > siPixelQualityToken_
bool mayUnpackFED(unsigned int fed_n) const
check whether a FED has to be unpacked
unsigned int nFEDs() const
various informational accessors:
edm::EDPutTokenT< DetIdCollection > tkErrorPutToken_
std::vector< std::string > getParameterNames() const
const SiPixelQuality * badPixelInfo_
const edm::EDPutTokenT< edm::DetSetVector< PixelDigi > > siPixelDigiCollectionToken_
const bool includeErrors_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)