33 produces<FEDRawDataCollection>();
44 hCPU =
new TH1D (
"hCPU",
"hCPU",100,0.,0.050);
45 hDigi =
new TH1D(
"hDigi",
"hDigi",50,0.,15000.);
63 TFile
rootFile(
"analysis.root",
"RECREATE",
"my histograms");
77 edm::LogInfo(
"SiPixelDigiToRaw") <<
"[SiPixelDigiToRaw::produce] " 86 typedef vector< edm::DetSet<PixelDigi> >::const_iterator DI;
89 for (DI di=digiCollection->begin(); di != digiCollection->end(); di++) {
90 digiCounter += (di->data).
size();
91 digis[ di->id] = di->data;
114 auto buffers = std::make_unique<FEDRawDataCollection>();
122 typedef vector<const PixelFEDCabling *>::const_iterator FI;
123 for (FI it = fedList.begin(); it != fedList.end(); it++) {
124 LogDebug(
"SiPixelDigiToRaw")<<
" PRODUCE DATA FOR FED_id: " << (**it).id();
125 FEDRawData& fedRawData = buffers->FEDData( (**it).id() );
126 PixelDataFormatter::RawData::iterator fedbuffer = rawdata.find( (**it).id() );
127 if( fedbuffer != rawdata.end() ) fedRawData = fedbuffer->second;
128 LogDebug(
"SiPixelDigiToRaw")<<
"size of data in fedRawData: "<<fedRawData.
size();
131 if (debug)
LogDebug(
"SiPixelDigiToRaw")
133 <<
"Words/Digis this ev: "<<digiCounter<<
"(fm:"<<formatter.nDigis()<<
")/" 139 LogDebug(
"SiPixelDigiToRaw") <<
"TIMING IS: (real)" <<
theTimer->realTime() ;
140 LogDebug(
"SiPixelDigiToRaw") <<
" (Words/Digis) this ev: " 141 <<formatter.nWords()<<
"/"<<formatter.nDigis() <<
"--- all :"<<allWordCounter<<
"/"<<
allDigiCounter;
143 hDigi->Fill(formatter.nDigis());
T getParameter(std::string const &) const
EventNumber_t event() const
T getUntrackedParameter(std::string const &, T const &) const
SiPixelDigiToRaw(const edm::ParameterSet &)
ctor
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
void produce(edm::Event &, const edm::EventSetup &) override
get data, convert to raw event, attach again to Event
static MessageDrop * instance()
bool exists(std::string const ¶meterName) const
checks if a parameter exists
unsigned long eventCounter
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > tPixelDigi
size_t size() const
Lenght of the data buffer in bytes.
std::unique_ptr< SiPixelFedCablingTree > cablingTree_
std::vector< unsigned int > fedIds
std::vector< unsigned int > const fedList
std::unique_ptr< SiPixelFedCablingTree > cablingTree() const
std::unique_ptr< edm::CPUTimer > theTimer
edm::ESWatcher< SiPixelFedCablingMapRcd > recordWatcher
edm::ParameterSet config_
bool check(const edm::EventSetup &iSetup)
SiPixelFrameReverter * frameReverter_
~SiPixelDigiToRaw() override
dtor
std::vector< unsigned int > fedIds() const
T const * product() const