22 #define EDM_ML_DEBUG 1
62 std::auto_ptr<PackingSetup>
prov_;
75 o <<
"L1T Block Header " << h.
getID() <<
" with size " << h.
getSize();
81 fedId_(config.getParameter<int>(
"FedId")),
82 fwId_(config.getUntrackedParameter<int>(
"FWId", -1))
87 prov_->registerProducts(*
this);
113 std::unique_ptr<UnpackerCollections>
coll =
prov_->getCollections(event);
118 if (!feds.isValid()) {
119 LogError(
"L1T") <<
"Cannot unpack: no collection found";
125 LogDebug(
"L1T") <<
"Found FEDRawDataCollection with ID " <<
fedId_ <<
" and size " << l1tRcd.size();
133 const unsigned char *
data = l1tRcd.data();
136 if (header.
check()) {
137 LogDebug(
"L1T") <<
"Found SLink header:"
139 <<
" L1 event ID " << header.
lvl1ID()
140 <<
" BX Number " << header.
bxID()
141 <<
" FED source " << header.
sourceID()
142 <<
" FED version " << header.
version();
144 LogWarning(
"L1T") <<
"Did not find a SLink header!";
149 if (trailer.
check()) {
150 LogDebug(
"L1T") <<
"Found SLink trailer:"
151 <<
" Length " << trailer.
lenght()
152 <<
" CRC " << trailer.
crc()
154 <<
" Throttling bits " << trailer.
ttsBits();
156 LogWarning(
"L1T") <<
"Did not find a SLink trailer!";
164 <<
"Could not extract AMC13 Packet.";
168 for (
auto&
amc: packet.payload()) {
169 auto payload64 =
amc.data();
170 const uint32_t * payload = (
const uint32_t*) payload64.get();
171 const uint32_t *
end = payload + (
amc.size() * 2);
182 unsigned board =
amc.header().getBoardID();
186 while (payload != end) {
192 if (end - payload < block_hdr.
getSize()) {
194 <<
"Expecting a block size of " << block_hdr.
getSize()
195 <<
" but only " << (end - payload) <<
" words remaining";
207 }
else if (!unpacker->second->unpack(
block,
coll.get())) {
208 LogWarning(
"L1T") <<
"Error unpacking data for block ID "
209 << block_hdr.
getID() <<
", FED ID " <<
fedId_ <<
", and FW ID "
214 payload += block_hdr.
getSize();
virtual void produce(edm::Event &, const edm::EventSetup &) override
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::auto_ptr< PackingSetup > prov_
#define DEFINE_FWK_MODULE(type)
std::auto_ptr< PackingSetup > make(const std::string &) const
int evtStatus()
Event fragment status information.
std::ostream & operator<<(std::ostream &out, const ALILine &li)
L1TRawToDigi(const edm::ParameterSet &)
void addDefault(ParameterSetDescription const &psetDescription)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
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
int ttsBits()
Current value of the Trigger Throttling System bitsAQ).
unsigned long long uint64_t
int lenght()
The length of the event fragment counted in 64-bit words including header and trailer.
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
static const PackingSetupFactory * get()
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
char data[epos_bytes_allocation]
edm::EDGetTokenT< FEDRawDataCollection > fedData_
int crc()
Cyclic Redundancy Code of the event fragment including header and trailer.
virtual void endRun(edm::Run const &, edm::EventSetup const &) override
virtual void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
virtual void beginRun(edm::Run const &, edm::EventSetup const &) override