|
|
Go to the documentation of this file.
23 #include <ext/algorithm>
29 SpyUnpacker::SpyUnpacker(
const bool allowIncompleteEvents) : allowIncompleteEvents_(allowIncompleteEvents) {
31 LogTrace(
"SiStripSpyUnpacker") <<
"[sistrip::SpyUnpacker::" << __func__ <<
"]"
32 <<
" Constructing object...";
38 LogTrace(
"SiStripSpyUnpacker") <<
"[sistrip::SpyUnpacker::" << __func__ <<
"]"
39 <<
" Destructing object...";
46 const std::vector<uint32_t>& ids,
61 if (cabling.
fedIds().empty()) {
62 edm::LogWarning(
"SiStripSpyUnpacker") <<
"[sistrip::SpyUnpacker::" << __func__ <<
"]"
63 <<
" No FEDs found in cabling map!";
68 std::vector<uint32_t>::const_iterator ifed = ids.begin();
69 std::vector<uint32_t>::const_iterator endfed = ids.end();
79 for (; ifed != endfed; ++ifed) {
80 uint32_t lFedId = (*ifed);
83 if (lFedId < FED_ID_MIN || lFedId >
FED_ID_MAX) {
85 edm::LogWarning(
"SiStripSpyUnpacker") <<
"[sistrip::SpyUnpacker::" << __func__ <<
"]"
86 <<
" Invalid FED id provided: " << lFedId;
96 edm::LogWarning(
"SiStripSpyUnpacker") <<
"[sistrip::SpyUnpacker::" << __func__ <<
"]"
97 <<
" NULL pointer to FEDRawData for FED id " << lFedId;
104 edm::LogWarning(
"SiStripSpyUnpacker") <<
"[sistrip::SpyUnpacker::" << __func__ <<
"]"
105 <<
" FEDRawData has zero size for FED id " << lFedId;
117 <<
"Exception caught when creating FEDSpyBuffer object for FED " << lFedId <<
": "
118 <<
"An exception of category 'FEDBuffer' occurred.\n"
125 <<
"Exception caught when creating FEDSpyBuffer object for FED " << lFedId <<
": "
126 <<
"An exception of category 'FEDSpyBuffer' occurred.\n"
127 <<
"FED Buffer check fails for FED ID " << lFedId <<
".";
133 uint32_t totalEvCount =
buffer.spyHeaderTotalEventCount();
134 uint32_t l1ID =
buffer.spyHeaderL1ID();
136 uint32_t lGRun =
buffer.globalRunNumber();
142 edm::LogError(
"SiStripSpyUnpacker") <<
" -- Global run encoded in buffer for FED " << lFedId <<
": " << lGRun
143 <<
" is different from reference value " << lRef << std::endl;
147 (*pL1ACounts)[lFedId] = l1ID;
148 (*pTotalEventCounts)[lFedId] = totalEvCount;
151 std::vector<FedChannelConnection>::const_iterator iconn = conns.begin();
152 std::vector<FedChannelConnection>::const_iterator endconn = conns.end();
153 for (; iconn != endconn; ++iconn) {
155 if (!iconn->isConnected()) {
160 uint16_t
chan = iconn->fedCh();
165 std::ostringstream
ss;
166 ss <<
"Channel connection values invalid: iconn->fedId() = " << iconn->fedId() <<
" for FED " << lFedId
167 <<
", iconn->fedCh() = " <<
chan << std::endl;
176 std::ostringstream
ss;
177 ss <<
"Channel check failed for FED " << lFedId <<
" channel " <<
chan << std::endl;
205 pDigis->
swap(*pResult);
FEDBufferStatusCode preconstructCheckFEDSpyBuffer(const FEDRawData &fedBuffer)
static const std::string input
std::vector< uint32_t > Counters
static const uint16_t FED_ID_MIN
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses,...
void swap(DetSetVector &other)
void newChannel(const uint32_t key, const uint16_t firstItem=0)
A Digi for the silicon strip detector, containing only adc information, and suitable for storing raw ...
static const uint16_t SPY_SAMPLES_PER_CHANNEL
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
~SpyUnpacker()
Destructor.
const bool allowIncompleteEvents_
std::unique_ptr< edm::DetSetVector< T > > createDetSetVector()
void addItem(const T &item)
static const uint16_t invalid_
static const uint16_t FED_ID_MAX
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi....
static const uint16_t FEDCH_PER_FED
FedsConstIterRange fedIds() const
ConnsConstIterRange fedConnections(uint16_t fed_id) const
void createDigis(const SiStripFedCabling &, const FEDRawDataCollection &, RawDigis *pDigis, const std::vector< uint32_t > &ids, Counters *pTotalEventCounts, Counters *pL1ACounts, uint32_t *aRunRef)
Creates the scope mode digis for the supplied FED IDs or detIds and stores event counters.