38 #define COUT std::cout << "VI "
40 #define COUT LogDebug("")
55 <<
"[ClustersFromRawProducer::"
58 <<
" NULL pointer to FEDRawData for FED id "
68 <<
"[ClustersFromRawProducer::"
70 <<
" FEDRawData has zero size for FED id "
84 <<
"Exception caught when creating FEDBuffer object for FED " << fedId <<
": " << e.
what();
86 delete buffer; buffer=
nullptr;
109 bool idoAPVEmulatorCheck):
113 doAPVEmulatorCheck(idoAPVEmulatorCheck){
118 ~ClusterFiller() { printStat();}
125 std::unique_ptr<sistrip::FEDBuffer> buffers[1024];
126 bool done[1024] = {};
136 bool doAPVEmulatorCheck;
149 void zeroStat()
const { stat = Stat(); }
150 void incTot(
int n)
const { stat.totDet=
n;}
151 void incReady()
const { stat.detReady++;}
152 void incSet()
const { stat.detSet++;}
153 void incAct()
const { stat.detAct++;}
154 void incNoZ()
const { stat.detNoZ++;}
155 void printStat()
const {
156 COUT <<
"VI clusters " << stat.totDet <<
','<< stat.detReady <<
','<< stat.detSet <<
','<< stat.detAct<<
','<< stat.detNoZ << std::endl;
160 static void zeroStat(){}
161 static void incTot(
int){}
162 static void incReady() {}
163 static void incSet() {}
164 static void incAct() {}
165 static void incNoZ() {}
166 static void printStat(){}
181 onDemand(conf.getParameter<bool>(
"onDemand")),
185 doAPVEmulatorCheck_(conf.existsAs<bool>(
"DoAPVEmulatorCheck") ? conf.getParameter<bool>(
"DoAPVEmulatorCheck") :
true)
188 produces< edmNew::DetSetVector<SiStripCluster> > ();
208 std::auto_ptr< edmNew::DetSetVector<SiStripCluster> >
218 output->reserve(15000,12*10000);
224 COUT <<
output->dataSize() <<
" clusters from "
225 <<
output->size() <<
" modules"
249 std::auto_ptr<SiStripRawProcessingAlgorithms>
rawAlgos_;
265 (*clusterizer_).initialize(es);
266 cabling_ = (*clusterizer_).cabling();
267 (*rawAlgos_).initialize(es);
283 if(record.empty()) record.abort();
292 auto idet= record.id();
296 if (!
clusterizer.stripByStripBegin(idet)) {
return; }
312 auto buffer = buffers[
fedId].get();
318 if unlikely(!buffer->channelGood(fedCh,doAPVEmulatorCheck)) {
320 std::ostringstream
ss;
321 ss <<
"Problem unpacking channel " << fedCh <<
" on FED " <<
fedId;
328 uint16_t ipair =
conn->apvPairNumber();
352 std::ostringstream
ss;
353 ss <<
"Unordered clusters for channel " << fedCh <<
" on FED " << fedId <<
": " << e.
what();
370 std::ostringstream
ss;
371 ss <<
"Unordered clusters for channel " << fedCh <<
" on FED " << fedId <<
": " << e.
what();
396 std::ostringstream
ss;
397 ss <<
"Unordered clusters for channel " << fedCh <<
" on FED " << fedId <<
": " << e.
what();
408 std::vector<int16_t> digis;
410 digis.push_back(unpacker.
adc());
415 uint32_t
id =
conn->detId();
420 uint16_t firstAPV = ipair*2;
421 rawAlgos.SuppressVirginRawData(
id, firstAPV,digis, zsdigis);
433 std::vector<int16_t> digis;
435 digis.push_back(unpacker.
adc());
440 uint32_t
id =
conn->detId();
444 uint16_t firstAPV = ipair*2;
445 rawAlgos.SuppressProcessedRawData(
id, firstAPV,digis, zsdigis);
451 <<
"[ClustersFromRawProducer::"
453 <<
" FEDRawData readout mode "
457 <<
" not supported.";
466 if(!record.empty()) incNoZ();
static FEDRawChannelUnpacker procRawModeUnpacker(const FEDChannel &channel)
virtual char const * what() const
T getParameter(std::string const &) const
static FEDZSChannelUnpacker zeroSuppressedModeUnpacker(const FEDChannel &channel)
void run(const FEDRawDataCollection &rawColl, edmNew::DetSetVector< SiStripCluster > &output)
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
static const char mlRawToCluster_[]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
std::auto_ptr< SiStripRawProcessingAlgorithms > rawAlgos_
static FEDRawChannelUnpacker virginRawModeUnpacker(const FEDChannel &channel)
std::auto_ptr< StripClusterizerAlgorithm > clusterizer_
void initialize(const edm::EventSetup &es)
size_t size() const
Lenght of the data buffer in bytes.
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual bool doChecks(bool doCRC=true) const
void beginRun(const edm::Run &, const edm::EventSetup &es)
void produce(edm::Event &ev, const edm::EventSetup &es)
static FEDZSChannelUnpacker zeroSuppressedLiteModeUnpacker(const FEDChannel &channel)
SiStripDetCabling const * cabling_
SiStripClusterizerFromRaw(const edm::ParameterSet &conf)
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
if(conf.exists("allCellsPositionCalc"))
collection_type::const_iterator const_iterator
edm::EDGetTokenT< FEDRawDataCollection > productToken_