|
|
Go to the documentation of this file.
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>();
114 if (includeErrors_) {
115 errorPutToken_ = produces<edm::DetSetVector<SiPixelRawDataError>>();
116 tkErrorPutToken_ = produces<DetIdCollection>();
117 userErrorPutToken_ = produces<DetIdCollection>(
"UserErrorModules");
118 disabledChannelPutToken_ = produces<edmNew::DetSetVector<PixelFEDChannel>>();
128 edm::LogInfo(
"SiPixelRawToDigi") <<
" Use pilot blade data (FED 40)";
137 edm::LogInfo(
"SiPixelRawToDigi") <<
" HERE ** SiPixelRawToDigi destructor!";
144 desc.add<
bool>(
"IncludeErrors",
true);
145 desc.add<
bool>(
"UseQualityInfo",
false);
147 desc.add<std::vector<int>>(
"ErrorList", std::vector<int>{29})
148 ->setComment(
"## ErrorList: list of error codes used by tracking to invalidate modules");
151 desc.add<std::vector<int>>(
"UserErrorList", std::vector<int>{40})
152 ->setComment(
"## UserErrorList: list of error codes used by Pixel experts for investigation");
157 psd0.
addOptional<std::vector<edm::InputTag>>(
"inputs");
162 ->setComment(
"## Empty Regions PSet means complete unpacking");
164 desc.add<
bool>(
"UsePilotBlade",
false)->setComment(
"## Use pilot blades");
165 desc.add<
bool>(
"UsePhase1",
false)->setComment(
"## Use phase1");
166 desc.add<
std::string>(
"CablingMapLabel",
"")->setComment(
"CablingMap label");
167 descriptions.
add(
"siPixelRawToDigi",
desc);
174 const uint32_t dummydetid = 0xffffffff;
190 edm::LogError(
"SiPixelQualityNotPresent") <<
"Configured to use SiPixelQuality, but SiPixelQuality not present";
212 bool errorsInEvent =
false;
223 for (
auto aFed =
fedIds_.begin(); aFed !=
fedIds_.end(); ++aFed) {
232 LogDebug(
"SiPixelRawToDigi") <<
"PRODUCE DIGI FOR FED:" <<
fedId;
248 tkerror_detidcollection,
249 usererror_detidcollection,
250 disabled_channelcollection,
257 errorDetSet.
data = nodeterrors;
260 LogDebug(
"SiPixelRawToDigi") <<
"Error words were stored in this event";
bool check(const edm::EventSetup &iSetup)
T const * product() const
SiPixelRawToDigi(const edm::ParameterSet &)
ctor
PixelUnpackingRegions * regions_
void produce(edm::Event &, const edm::EventSetup &) override
get data, convert to digis attach againe to Event
unsigned int nModules() const
unsigned int nFEDs() const
various informational accessors:
std::vector< unsigned int > fedIds_
bool mayUnpackFED(unsigned int fed_n) const
check whether a FED has to be unpacked
const SiPixelQuality * badPixelInfo_
Log< level::Info, false > LogInfo
ParameterDescriptionBase * addOptional(U const &iLabel, T const &value)
const bool usePilotBlade_
const std::vector< int > tkerrorlist_
std::unique_ptr< SiPixelFedCablingTree > cabling_
edm::ESWatcher< SiPixelQualityRcd > qualityWatcher_
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const edm::EDGetTokenT< FEDRawDataCollection > fedRawDataCollectionToken_
edm::ESWatcher< SiPixelFedCablingMapRcd > recordWatcher_
edm::ESGetToken< SiPixelQuality, SiPixelQualityRcd > siPixelQualityToken_
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
std::unique_ptr< SiPixelFedCablingTree > cablingTree() const
~SiPixelRawToDigi() override
dtor
std::vector< std::string > getParameterNames() const
edm::EDPutTokenT< edm::DetSetVector< SiPixelRawDataError > > errorPutToken_
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
const std::vector< int > usererrorlist_
Log< level::Error, false > LogError
const std::set< unsigned int > * modulesToUnpack() const
full set of module ids to unpack
const edm::EDPutTokenT< edm::DetSetVector< PixelDigi > > siPixelDigiCollectionToken_
edm::ParameterSet config_
const bool includeErrors_
T getParameter(std::string const &) const
unsigned int nForwardModules() const
edm::EDPutTokenT< edmNew::DetSetVector< PixelFEDChannel > > disabledChannelPutToken_
edm::EDPutTokenT< DetIdCollection > tkErrorPutToken_
void run(const edm::Event &e, const edm::EventSetup &es)
has to be run during each event
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
const edm::ESGetToken< SiPixelFedCablingMap, SiPixelFedCablingMapRcd > cablingMapToken_
edm::EDPutTokenT< DetIdCollection > userErrorPutToken_
std::vector< unsigned int > fedIds() const
unsigned int nBarrelModules() const