23 #define EDM_ML_DEBUG 1
58 virtual void endJob()
override;
81 fedId_(config.getParameter<int>(
"FedId"))
84 produces<FEDRawDataCollection>();
115 auto board = item.first;
116 auto packers = item.second;
119 for (
const auto& packer: packers) {
120 LogDebug(
"L1T") <<
"Adding packed blocks";
122 block_load.insert(block_load.end(),
blocks.begin(),
blocks.end());
125 std::sort(block_load.begin(), block_load.end());
127 LogDebug(
"L1T") <<
"Concatenating blocks";
129 std::vector<uint32_t> load32;
133 for (
const auto&
block: block_load) {
134 LogDebug(
"L1T") <<
"Adding block " <<
block.header().getID() <<
" with size " <<
block.payload().size();
138 std::stringstream
s(
"");
139 s <<
"Block content:" << std::endl << std::hex << std::setfill(
'0');
140 for (
const auto& word:
load)
141 s << std::setw(8) << word << std::endl;
145 load32.push_back(
block.header().raw());
146 load32.insert(load32.end(), load.begin(), load.end());
149 LogDebug(
"L1T") <<
"Converting payload";
151 std::vector<uint64_t> load64;
152 for (
unsigned int i = 0;
i < load32.size();
i += 2) {
154 if (
i + 1 < load32.size())
155 word |= static_cast<uint64_t>(load32[
i + 1]) << 32;
156 load64.push_back(word);
159 LogDebug(
"L1T") <<
"Creating AMC packet";
161 amc13.add(board, load64);
168 fed_data.resize(
size);
169 unsigned char * payload = fed_data.data();
170 unsigned char * payload_start = payload;
172 auto bxId =
event.bunchCrossing();
173 auto evtId =
event.id().event();
182 payload += amc13.size() * 8;
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::unique_ptr< PackerTokens > tokens_
std::auto_ptr< PackingSetup > setup_
#define DEFINE_FWK_MODULE(type)
std::auto_ptr< PackingSetup > make(const std::string &) const
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
static void set(unsigned char *trailer, int evt_lgth, int crc, int evt_stat, int tts, bool T=false)
Set all fields in the trailer.
virtual void beginRun(edm::Run const &, edm::EventSetup const &) override
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void addDefault(ParameterSetDescription const &psetDescription)
virtual void beginJob() override
virtual void produce(edm::Event &, const edm::EventSetup &) override
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
unsigned short compute_crc(unsigned char *buffer, unsigned int bufSize)
std::vector< Block > Blocks
L1TDigiToRaw(const edm::ParameterSet &)
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
virtual void endJob() override
unsigned long long uint64_t
static const PackingSetupFactory * get()
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="")
tuple size
Write out results.