15 regions_(&(regioncabling.getRegionCabling())),
16 clusterizer_(&clustalgo),
20 doAPVEmulatorCheck_(
true)
22 buffers_.assign(1024,static_cast<sistrip::FEDBuffer*>(0));
27 std::vector< sistrip::FEDBuffer*>::iterator ibuffer =
buffers_.begin();
28 for (; ibuffer!=
buffers_.end(); ibuffer++) {
29 if (*ibuffer)
delete *ibuffer;
44 SiStripRegionCabling::ElementCabling::const_iterator idet = element.begin();
45 for (;idet!=element.end();idet++) {
51 std::vector<FedChannelConnection>::const_iterator iconn = idet->second.begin();
52 for (;iconn!=idet->second.end();iconn++) {
53 const uint16_t fedId = iconn->fedId();
56 if ( !fedId || !iconn->isConnected() ) {
continue; }
66 if ( !rawData.
data() ) {
69 <<
"[sistrip::RawToClustersLazyGetter::"
72 <<
" NULL pointer to FEDRawData for FED id "
79 if ( !rawData.
size() ) {
82 <<
"[sistrip::RawToClustersLazyGetter::"
84 <<
" FEDRawData has zero size for FED id "
93 if (!buffer->
doChecks(
false))
throw cms::Exception(
"FEDBuffer") <<
"FED Buffer check fails for FED ID" << fedId <<
".";
98 <<
"Exception caught when creating FEDBuffer object for FED " << fedId <<
": " << e.
what();
100 if ( buffer ) {
delete buffer; }
107 std::stringstream ss;
115 const uint8_t fedCh = iconn->fedCh();
119 std::ostringstream ss;
120 ss <<
"Problem unpacking channel " << fedCh <<
" on FED " << fedId;
127 uint16_t ipair = iconn->apvPairNumber();
146 std::ostringstream ss;
147 ss <<
"Unordered clusters for channel " << fedCh <<
" on FED " << fedId <<
": " << e.
what();
170 std::ostringstream ss;
171 ss <<
"Unordered clusters for channel " << fedCh <<
" on FED " << fedId <<
": " << e.
what();
184 std::vector<int16_t> digis;
186 digis.push_back(unpacker.
adc());
191 uint32_t
id = iconn->detId();
196 uint16_t firstAPV = ipair*2;
209 std::vector<int16_t> digis;
211 digis.push_back(unpacker.
adc());
216 uint32_t
id = iconn->detId();
220 uint16_t firstAPV = ipair*2;
229 <<
"[sistrip::RawToClustersLazyGetter::"
231 <<
" FEDRawData readout mode "
235 <<
" 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_
virtual void addFed(sistrip::FEDZSChannelUnpacker &unpacker, uint16_t ipair, std::vector< SiStripCluster > &out)
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_[]
std::vector< Element > ElementCabling
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 void stripByStripEnd(std::vector< SiStripCluster > &out)
virtual bool stripByStripBegin(uint32_t id)=0
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
static 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
virtual bool doChecks(bool doCRC=true) 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)
const FEDRawDataCollection * raw_
raw data
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]
virtual void stripByStripAdd(uint16_t strip, uint8_t adc, std::vector< SiStripCluster > &out)
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)