11 regions_(&(regioncabling.getRegionCabling())),
12 clusterizer_(&clustalgo),
15 rawToDigi_(0,0,0,0,0,0,0,0),
17 doAPVEmulatorCheck_(
true)
19 buffers_.assign(1024,static_cast<sistrip::FEDBuffer*>(0));
24 std::vector< sistrip::FEDBuffer*>::iterator ibuffer =
buffers_.begin();
25 for (; ibuffer!=
buffers_.end(); ibuffer++) {
26 if (*ibuffer)
delete *ibuffer;
41 SiStripRegionCabling::ElementCabling::const_iterator idet = element.begin();
42 for (;idet!=element.end();idet++) {
48 std::vector<FedChannelConnection>::const_iterator iconn = idet->second.begin();
49 for (;iconn!=idet->second.end();iconn++) {
50 const uint16_t fedId = iconn->fedId();
53 if ( !fedId || !iconn->isConnected() ) {
continue; }
63 if ( !rawData.
data() ) {
66 <<
"[sistrip::RawToClustersLazyGetter::"
69 <<
" NULL pointer to FEDRawData for FED id "
76 if ( !rawData.
size() ) {
79 <<
"[sistrip::RawToClustersLazyGetter::"
81 <<
" FEDRawData has zero size for FED id "
90 if (!buffer->
doChecks())
throw cms::Exception(
"FEDBuffer") <<
"FED Buffer check fails for FED ID" << fedId <<
".";
95 <<
"Exception caught when creating FEDBuffer object for FED " << fedId <<
": " << e.
what();
97 if ( buffer ) {
delete buffer; }
104 std::stringstream ss;
112 const uint8_t fedCh = iconn->fedCh();
116 std::ostringstream ss;
117 ss <<
"Problem unpacking channel " << fedCh <<
" on FED " << fedId;
124 uint16_t ipair = iconn->apvPairNumber();
140 std::ostringstream ss;
141 ss <<
"Unordered clusters for channel " << fedCh <<
" on FED " << fedId <<
": " << e.
what();
161 std::ostringstream ss;
162 ss <<
"Unordered clusters for channel " << fedCh <<
" on FED " << fedId <<
": " << e.
what();
175 std::vector<int16_t> digis;
177 digis.push_back(unpacker.
adc());
182 uint32_t
id = iconn->detId();
187 uint16_t firstAPV = ipair*2;
200 std::vector<int16_t> digis;
202 digis.push_back(unpacker.
adc());
207 uint32_t
id = iconn->detId();
211 uint16_t firstAPV = ipair*2;
220 <<
"[sistrip::RawToClustersLazyGetter::"
222 <<
" FEDRawData readout mode "
226 <<
" not supported.";
static FEDRawChannelUnpacker procRawModeUnpacker(const FEDChannel &channel)
virtual char const * what() const
static FEDZSChannelUnpacker zeroSuppressedModeUnpacker(const FEDChannel &channel)
SiStripRawProcessingAlgorithms *const rawAlgos_
raw processing algorithms
static const char mlRawToCluster_[]
static const uint32_t invalid32_
int16_t SuppressVirginRawData(const uint32_t &, const uint16_t &, std::vector< int16_t > &, edm::DetSet< SiStripDigi > &)
static FEDRawChannelUnpacker virginRawModeUnpacker(const FEDChannel &channel)
FEDReadoutMode readoutMode() const
static const char mlRawToDigi_[]
virtual bool doChecks() const
virtual void stripByStripEnd(std::vector< SiStripCluster > &out)=0
virtual bool channelGood(const uint8_t internalFEDannelNum, const bool doAPVeCheck=true) const
size_t size() const
Lenght of the data buffer in bytes.
virtual void fill(const uint32_t &, record_type &)
virtual bool stripByStripBegin(uint32_t id)=0
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
void dumpRawData(uint16_t fed_id, const FEDRawData &, std::stringstream &)
dumps raw data to stdout (NB: payload is byte-swapped,headers/trailer are not).
std::vector< SiStripCluster > record_type
uint8_t sampleNumber() const
static const SubDet subdet(const ElementIndex)
virtual ~RawToClustersLazyUnpacker()
const FEDChannel & channel(const uint8_t internalFEDChannelNum) const
StripClusterizerAlgorithm *const clusterizer_
clusterizer algorithm
std::vector< sistrip::FEDBuffer * > buffers_
FED event cache.
static FEDZSChannelUnpacker zeroSuppressedLiteModeUnpacker(const FEDChannel &channel)
virtual void stripByStripAdd(uint16_t strip, uint16_t adc, std::vector< SiStripCluster > &out)=0
const FEDRawDataCollection * raw_
raw data
RawToDigiUnpacker rawToDigi_
raw-to-digi
const uint32_t region(const Position) const
int16_t SuppressProcessedRawData(const uint32_t &, const uint16_t &, std::vector< int16_t > &, edm::DetSet< SiStripDigi > &)
char data[epos_bytes_allocation]
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
collection_type::const_iterator const_iterator
RawToClustersLazyUnpacker()
private default constructor
static const uint32_t layer(const ElementIndex)
std::map< uint32_t, std::vector< FedChannelConnection > > ElementCabling