42 hCPU(0), hDigi(0), theTimer(0)
54 produces< edm::DetSetVector<PixelDigi> >();
55 if(
includeErrors) produces< edm::DetSetVector<SiPixelRawDataError> >();
61 hCPU =
new TH1D (
"hCPU",
"hCPU",100,0.,0.050);
62 hDigi =
new TH1D(
"hDigi",
"hDigi",50,0.,15000.);
69 edm::LogInfo(
"SiPixelRawToDigi") <<
" HERE ** SiPixelRawToDigi destructor!";
74 TFile
rootFile(
"analysis.root",
"RECREATE",
"my histograms");
90 const uint32_t dummydetid = 0xffffffff;
98 fedIds = cablingMap->fedIds();
111 edm::LogError(
"**SiPixelRawToDigi**")<<
" Configured to use SiPixelQuality, but SiPixelQuality not present"<<endl;
128 bool errorsInEvent =
false;
131 typedef std::vector<unsigned int>::const_iterator IF;
132 for (IF aFed =
fedIds.begin(); aFed !=
fedIds.end(); ++aFed) {
134 if(
debug)
LogDebug(
"SiPixelRawToDigi")<<
" PRODUCE DIGI FOR FED: " << fedId << endl;
139 const FEDRawData& fedRawData = buffers->FEDData( fedId );
142 formatter.
interpretRawData( errorsInEvent, fedId, fedRawData, digis, errors);
145 typedef PixelDataFormatter::Digis::iterator
ID;
146 for (ID it = digis.begin(); it != digis.end(); it++) {
147 uint32_t
detid = it->first;
149 detSet.
data = it->second;
154 typedef PixelDataFormatter::Errors::iterator IE;
155 for (IE is = errors.begin(); is != errors.end(); is++) {
156 uint32_t errordetid = is->first;
157 if (errordetid==dummydetid) {
158 nodeterrors.insert( nodeterrors.end(), errors[errordetid].begin(), errors[errordetid].end() );
161 errorDetSet.
data = is->second;
169 errorDetSet.
data = nodeterrors;
171 if (errorsInEvent)
LogDebug(
"SiPixelRawToDigi") <<
"Error words were stored in this event";
178 LogDebug(
"SiPixelRawToDigi") <<
" (Words/Digis) this ev: "
185 ev.
put( collection );
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
static MessageDrop * instance()
virtual std::string version() const =0
std::vector< unsigned int > fedIds
SiPixelRawToDigi(const edm::ParameterSet &)
ctor
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual ~SiPixelRawToDigi()
dtor
edm::ESWatcher< SiPixelFedCablingMapRcd > recordWatcher
const LastMeasurement & lastMeasurement()
T const * product() const
T const * product() const
bool check(const edm::EventSetup &iSetup)
edm::ParameterSet config_
R2DTimerObserver * theTimer
edm::ESWatcher< SiPixelQualityRcd > qualityWatcher
const SiPixelQuality * badPixelInfo_
const SiPixelFedCabling * cabling_
virtual void produce(edm::Event &, const edm::EventSetup &)
get data, convert to digis attach againe to Event