4 #ifdef SiStripMonitorHardware_BuildEventMatchingCode
6 #include "boost/cstdint.hpp"
56 : filterNonMatchingEvents_( config.getParameter<bool>(
"FilterNonMatchingEvents") ),
57 doMerge_( config.getParameter<bool>(
"MergeData") ),
58 primaryStreamRawDataTag_( config.getParameter<edm::InputTag>(
"PrimaryEventRawDataTag") ),
63 produces<FEDRawDataCollection>(
"RawSpyData");
64 produces< std::vector<uint32_t> >(
"SpyTotalEventCount");
65 produces< std::vector<uint32_t> >(
"SpyL1ACount");
66 produces< std::vector<uint32_t> >(
"SpyAPVAddress");
67 produces< edm::DetSetVector<SiStripRawDigi> >(
"SpyScope");
68 produces< edm::DetSetVector<SiStripRawDigi> >(
"SpyPayload");
69 produces< edm::DetSetVector<SiStripRawDigi> >(
"SpyReordered");
70 produces< edm::DetSetVector<SiStripRawDigi> >(
"SpyVirginRaw");
86 uint8_t apvAddress = 0;
97 copyData(eventId,apvAddress,matches,event,cabling);
110 for (std::vector<uint16_t>::const_iterator iFedId = cabling.
feds().begin(); iFedId != cabling.
feds().end(); ++iFedId) {
112 if ( (!data.
data()) || (!data.
size()) ) {
116 std::auto_ptr<FEDBuffer> buffer;
123 if (!buffer->doChecks()) {
127 l1ID = buffer->daqLvl1ID();
128 apvAddress = buffer->trackerSpecialHeader().apveAddress();
129 if (apvAddress != 0) {
136 const std::vector<FedChannelConnection>& connections = cabling.
connections(*iFedId);
137 for (std::vector<FedChannelConnection>::const_iterator iConn = connections.begin(); iConn != connections.end(); ++iConn) {
138 if (!iConn->isConnected()) {
141 if ( !buffer->channelGood(iConn->fedCh()) ) {
158 spyEventMatcher_->getMatchedCollections(eventId,apvAddress,matches,cabling,matchedCollections);
159 if (matchedCollections.
rawData.get()) event.
put(matchedCollections.
rawData,
"RawSpyData");
175 #endif //SiStripMonitorHardware_BuildEventMatchingCode
virtual ~SpyEventMatcherModule()
virtual char const * what() const
const std::vector< uint16_t > & feds() 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
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
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_
virtual bool filter(edm::Event &event, const edm::EventSetup &eventSetup)
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.
const edm::InputTag primaryStreamRawDataTag_
const std::vector< FedChannelConnection > & connections(uint16_t fed_id) const
sistrip::SpyEventMatcherModule SiStripSpyEventMatcherModule
void findL1IDandAPVAddress(const edm::Event &event, const SiStripFedCabling &cabling, uint32_t &l1ID, uint8_t &apvAddress) const