23 #define EDM_ML_DEBUG 1
58 virtual void endJob()
override;
81 fedId_(config.getParameter<int>(
"FedId"))
84 produces<FEDRawDataCollection>();
115 auto amc_no = item.first.first;
116 auto board = item.first.second;
117 auto packers = item.second;
120 for (
const auto& packer: packers) {
121 LogDebug(
"L1T") <<
"Adding packed blocks";
123 block_load.insert(block_load.end(),
blocks.begin(),
blocks.end());
126 std::sort(block_load.begin(), block_load.end());
128 LogDebug(
"L1T") <<
"Concatenating blocks";
130 std::vector<uint32_t> load32;
134 for (
const auto&
block: block_load) {
135 LogDebug(
"L1T") <<
"Adding block " <<
block.header().getID() <<
" with size " <<
block.payload().size();
139 std::stringstream
s(
"");
140 s <<
"Block content:" << std::endl << std::hex << std::setfill(
'0');
141 for (
const auto& word:
load)
142 s << std::setw(8) << word << std::endl;
146 load32.push_back(
block.header().raw(
MP7));
147 load32.insert(load32.end(), load.begin(), load.end());
150 LogDebug(
"L1T") <<
"Converting payload";
152 std::vector<uint64_t> load64;
153 for (
unsigned int i = 0;
i < load32.size();
i += 2) {
155 if (
i + 1 < load32.size())
156 word |= static_cast<uint64_t>(load32[
i + 1]) << 32;
157 load64.push_back(word);
160 LogDebug(
"L1T") <<
"Creating AMC packet";
162 amc13.add(amc_no, board, load64);
169 fed_data.resize(
size);
170 unsigned char * payload = fed_data.data();
171 unsigned char * payload_start = payload;
173 auto bxId =
event.bunchCrossing();
174 auto evtId =
event.id().event();
183 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.