4 #ifdef SiStripMonitorHardware_BuildEventMatchingCode
7 #include "boost/cstdint.hpp"
58 : filterNonMatchingEvents_( config.getParameter<bool>(
"FilterNonMatchingEvents") ),
59 doMerge_( config.getParameter<bool>(
"MergeData") ),
60 primaryStreamRawDataTag_( config.getParameter<edm::InputTag>(
"PrimaryEventRawDataTag") ),
66 produces<FEDRawDataCollection>(
"RawSpyData");
67 produces< std::vector<uint32_t> >(
"SpyTotalEventCount");
68 produces< std::vector<uint32_t> >(
"SpyL1ACount");
69 produces< std::vector<uint32_t> >(
"SpyAPVAddress");
70 produces< edm::DetSetVector<SiStripRawDigi> >(
"SpyScope");
71 produces< edm::DetSetVector<SiStripRawDigi> >(
"SpyPayload");
72 produces< edm::DetSetVector<SiStripRawDigi> >(
"SpyReordered");
73 produces< edm::DetSetVector<SiStripRawDigi> >(
"SpyVirginRaw");
89 uint8_t apvAddress = 0;
100 copyData(eventId,apvAddress,matches,event,cabling);
113 for (
auto iFedId = cabling.
fedIds().begin(); iFedId != cabling.
fedIds().end(); ++iFedId) {
115 if ( (!data.
data()) || (!data.
size()) ) {
119 std::auto_ptr<FEDBuffer> buffer;
126 if (!buffer->doChecks()) {
130 l1ID = buffer->daqLvl1ID();
131 apvAddress = buffer->trackerSpecialHeader().apveAddress();
132 if (apvAddress != 0) {
140 for (
auto iConn = connections.begin(); iConn != connections.end(); ++iConn) {
141 if (!iConn->isConnected()) {
144 if ( !buffer->channelGood(iConn->fedCh()) ) {
161 spyEventMatcher_->getMatchedCollections(eventId,apvAddress,matches,cabling,matchedCollections);
162 if (matchedCollections.
rawData.get()) event.
put(matchedCollections.
rawData,
"RawSpyData");
178 #endif //SiStripMonitorHardware_BuildEventMatchingCode
virtual ~SpyEventMatcherModule()
virtual char const * what() const
std::auto_ptr< std::vector< uint32_t > > apvAddresses
void copyData(const uint32_t eventId, const uint8_t apvAddress, const SpyEventMatcher::SpyEventList *matches, edm::Event &event, const SiStripFedCabling &cabling) const
SpyEventMatcherModule(const edm::ParameterSet &config)
#define DEFINE_FWK_MODULE(type)
std::auto_ptr< std::vector< uint32_t > > l1aCounters
std::auto_ptr< std::vector< uint32_t > > totalEventCounters
size_t size() const
Lenght of the data buffer in bytes.
std::auto_ptr< edm::DetSetVector< SiStripRawDigi > > reorderedDigis
std::auto_ptr< SpyUtilities > utils_
static const char * messageLabel_
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
edm::EDGetTokenT< FEDRawDataCollection > primaryStreamRawDataToken_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual bool filter(edm::Event &event, const edm::EventSetup &eventSetup) override
FedsConstIterRange fedIds() const
std::set< EventID > SpyEventList
std::auto_ptr< edm::DetSetVector< SiStripRawDigi > > payloadDigis
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
std::auto_ptr< SpyEventMatcher > spyEventMatcher_
std::auto_ptr< edm::DetSetVector< SiStripRawDigi > > scopeDigis
static const uint16_t FEDCH_PER_FEUNIT
std::auto_ptr< FEDRawDataCollection > rawData
const bool filterNonMatchingEvents_
ConnsConstIterRange fedConnections(uint16_t fed_id) const
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
std::auto_ptr< edm::DetSetVector< SiStripRawDigi > > virginRawDigis
char data[epos_bytes_allocation]
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
virtual void beginJob() override
const edm::InputTag primaryStreamRawDataTag_
sistrip::SpyEventMatcherModule SiStripSpyEventMatcherModule
void findL1IDandAPVAddress(const edm::Event &event, const SiStripFedCabling &cabling, uint32_t &l1ID, uint8_t &apvAddress) const