CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
l1t::MP7BufferDumpToRaw Class Reference
Inheritance diagram for l1t::MP7BufferDumpToRaw:
edm::EDProducer edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 MP7BufferDumpToRaw (const edm::ParameterSet &)
 
 ~MP7BufferDumpToRaw () override
 
- Public Member Functions inherited from edm::EDProducer
 EDProducer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducer () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::EDProducer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 

Private Member Functions

void beginJob () override
 
void endJob () override
 
void formatAMC (amc13::Packet &amc13, const std::vector< Block > &blocks, int iAmc)
 
void formatRaw (edm::Event &iEvent, amc13::Packet &amc13, FEDRawData &fed_data)
 
std::vector< BlockgetBlocks (int iAmc)
 
void produce (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

std::vector< int > boardId_
 
int evType_
 
int fedId_
 
int fwVer_
 
unsigned iBoard_
 
bool mux_
 
int muxOffset_
 
unsigned nBoard_
 
unsigned nFramesPerEvent_
 
bool packetisedData_
 
std::vector< std::vector< int > > rxBlockLength_
 
MP7FileReader rxFileReader_
 
std::vector< unsigned > rxIndex_
 
MP7PacketReader rxPacketReader_
 
int slinkHeaderSize_
 
int slinkTrailerSize_
 
std::vector< std::vector< int > > txBlockLength_
 
MP7FileReader txFileReader_
 
std::vector< unsigned > txIndex_
 
MP7PacketReader txPacketReader_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 56 of file MP7BufferDumpToRaw.cc.

Constructor & Destructor Documentation

◆ MP7BufferDumpToRaw()

l1t::MP7BufferDumpToRaw::MP7BufferDumpToRaw ( const edm::ParameterSet iConfig)
explicit

Definition at line 131 of file MP7BufferDumpToRaw.cc.

132  : rxFileReader_(iConfig.getUntrackedParameter<std::string>("rxFile", "rx_summary.txt")),
133  txFileReader_(iConfig.getUntrackedParameter<std::string>("txFile", "tx_summary.txt")),
134  rxPacketReader_(iConfig.getUntrackedParameter<std::string>("rxFile", "rx_summary.txt"),
135  iConfig.getUntrackedParameter<int>("rxHeaderFrames", 1),
136  0,
137  iConfig.getUntrackedParameter<int>("rxKeyLink", 0)),
138  txPacketReader_(iConfig.getUntrackedParameter<std::string>("txFile", "tx_summary.txt"),
139  iConfig.getUntrackedParameter<int>("txHeaderFrames", 1),
140  0,
141  iConfig.getUntrackedParameter<int>("txKeyLink", 0)),
142  packetisedData_(iConfig.getUntrackedParameter<bool>("packetisedData", true)),
143  nFramesPerEvent_(iConfig.getUntrackedParameter<int>("nFramesPerEvent", 6)),
144  iBoard_(iConfig.getUntrackedParameter<int>("boardOffset", 0)),
145  boardId_(iConfig.getUntrackedParameter<std::vector<int> >("boardId")),
146  mux_(iConfig.getUntrackedParameter<bool>("mux", false)),
147  fedId_(iConfig.getUntrackedParameter<int>("fedId", 1)),
148  evType_(iConfig.getUntrackedParameter<int>("eventType", 1)),
149  fwVer_(iConfig.getUntrackedParameter<int>("fwVersion", 1)),
150  slinkHeaderSize_(iConfig.getUntrackedParameter<int>("lenSlinkHeader", 8)),
151  slinkTrailerSize_(iConfig.getUntrackedParameter<int>("lenSlinkTrailer", 8)) {
152  produces<FEDRawDataCollection>();
153 
154  // check tx/rx file size consistency and number of boards
155  if (rxFileReader_.size() != txFileReader_.size()) {
156  edm::LogError("L1T") << "Different number of boards in Rx and Tx files";
157  }
159  LogDebug("L1T") << "# boards : " << nBoard_;
160 
161  // advance pointers for non packetised data
162  rxIndex_ = iConfig.getUntrackedParameter<std::vector<unsigned> >("nFramesOffset");
163  if (rxIndex_.size() != nBoard_) {
164  edm::LogError("L1T") << "Wrong number of boards in nFramesOffset " << rxIndex_.size();
165  }
166 
167  txIndex_ = iConfig.getUntrackedParameter<std::vector<unsigned> >("nFramesLatency");
168  if (txIndex_.size() != nBoard_) {
169  edm::LogError("L1T") << "Wrong number of boards in nFramesLatency " << txIndex_.size();
170  }
171 
172  // add latency to offset for Tx
173  for (unsigned i = 0; i < rxIndex_.size(); ++i)
174  txIndex_.at(i) += rxIndex_.at(i);
175 
176  // check board IDs
177  if (nBoard_ != boardId_.size()) {
178  edm::LogError("L1T") << "Found " << nBoard_ << " boards, but given " << boardId_.size() << " IDs";
179  }
180 
181  // block length PSet
182  std::vector<edm::ParameterSet> vpset = iConfig.getUntrackedParameter<std::vector<edm::ParameterSet> >("blocks");
183 
184  if (vpset.size() != nBoard_) {
185  edm::LogError("L1T") << "Wrong number of block specs " << vpset.size();
186  }
187 
188  rxBlockLength_.resize(nBoard_);
189  txBlockLength_.resize(nBoard_);
190 
191  for (unsigned i = 0; i < nBoard_; ++i) {
192  std::vector<int> rx = vpset.at(i).getUntrackedParameter<std::vector<int> >("rxBlockLength");
193 
194  rxBlockLength_.at(i).resize(rx.size());
195 
196  for (unsigned j = 0; j < rx.size(); ++j) {
197  rxBlockLength_.at(i).at(j) = rx.at(j);
198 
199  if (rx.at(j) != 0) {
200  // LogDebug("L1T") << "Block readout : board " << i << " Rx link " << j << " size " << rx.at(j);
201  }
202  }
203 
204  std::vector<int> tx = vpset.at(i).getUntrackedParameter<std::vector<int> >("txBlockLength");
205  txBlockLength_.at(i).resize(tx.size());
206 
207  for (unsigned j = 0; j < tx.size(); ++j) {
208  txBlockLength_.at(i).at(j) = tx.at(j);
209 
210  if (tx.at(j) != 0) {
211  // LogDebug("L1T") << "Block readout : board " << i << " Tx link " << j << " size " << tx.at(j);
212  }
213  }
214  }
215 
216  LogDebug("L1T") << "Board ID size " << boardId_.size();
217 
218  LogDebug("L1T") << "Frames per event " << nFramesPerEvent_;
219  }

References boardId_, edm::ParameterSet::getUntrackedParameter(), mps_fire::i, dqmiolumiharvest::j, LogDebug, SiStripPI::max, nBoard_, nFramesPerEvent_, corrVsCorr::rx, rxBlockLength_, rxFileReader_, rxIndex_, MP7FileReader::size(), txBlockLength_, txFileReader_, and txIndex_.

◆ ~MP7BufferDumpToRaw()

l1t::MP7BufferDumpToRaw::~MP7BufferDumpToRaw ( )
override

Definition at line 221 of file MP7BufferDumpToRaw.cc.

221  {
222  // do anything here that needs to be done at desctruction time
223  // (e.g. close files, deallocate resources etc.)
224  }

Member Function Documentation

◆ beginJob()

void l1t::MP7BufferDumpToRaw::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDProducer.

Definition at line 430 of file MP7BufferDumpToRaw.cc.

430 {}

◆ endJob()

void l1t::MP7BufferDumpToRaw::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDProducer.

Definition at line 433 of file MP7BufferDumpToRaw.cc.

433 {}

◆ fillDescriptions()

void l1t::MP7BufferDumpToRaw::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 468 of file MP7BufferDumpToRaw.cc.

468  {
469  //The following says we do not know what parameters are allowed so do no validation
470  // Please change this to state exactly what you do use, even if it is no parameters
472  desc.setUnknown();
473  descriptions.addDefault(desc);
474  }

References edm::ConfigurationDescriptions::addDefault(), and submitPVResolutionJobs::desc.

◆ formatAMC()

void l1t::MP7BufferDumpToRaw::formatAMC ( amc13::Packet amc13,
const std::vector< Block > &  blocks,
int  iAmc 
)
private

Definition at line 365 of file MP7BufferDumpToRaw.cc.

365  {
366  LogDebug("L1T") << "Formatting Board " << iBoard;
367 
368  std::vector<uint32_t> load32;
369  // TODO this is an empty word to be replaced with a proper MP7
370  // header containing at least the firmware version
371  load32.push_back(0);
372  load32.push_back(fwVer_);
373 
374  for (const auto& block : blocks) {
375  LogDebug("L1T") << "Adding block " << block.header().getID() << " with size " << block.payload().size();
376  auto load = block.payload();
377 
378 #ifdef EDM_ML_DEBUG
379  std::stringstream s("");
380  s << "Block content:" << std::endl << std::hex << std::setfill('0');
381  for (const auto& word : load)
382  s << std::setw(8) << word << std::endl;
383  LogDebug("L1T") << s.str();
384 #endif
385 
386  load32.push_back(block.header().raw());
387  load32.insert(load32.end(), load.begin(), load.end());
388  }
389 
390  LogDebug("L1T") << "Converting payload " << iBoard;
391 
392  std::vector<uint64_t> load64;
393  for (unsigned int i = 0; i < load32.size(); i += 2) {
394  uint64_t word = load32[i];
395  if (i + 1 < load32.size())
396  word |= static_cast<uint64_t>(load32[i + 1]) << 32;
397  load64.push_back(word);
398  }
399 
400  LogDebug("L1T") << "Creating AMC packet " << iBoard;
401  // LogDebug("L1T") << iBoard << ", " << boardId_.at(iBoard) << ", " << load64.size();
402 
403  amc13.add(iBoard, boardId_.at(iBoard), 0, 0, 0, load64);
404  }

References groupFilesInBlocks::block, gather_cfg::blocks, boardId_, fwVer_, mps_fire::i, svgfig::load(), LogDebug, and alignCSCRings::s.

Referenced by produce().

◆ formatRaw()

void l1t::MP7BufferDumpToRaw::formatRaw ( edm::Event iEvent,
amc13::Packet amc13,
FEDRawData fed_data 
)
private

Definition at line 406 of file MP7BufferDumpToRaw.cc.

406  {
407  unsigned int size = slinkHeaderSize_ + slinkTrailerSize_ + amc13.size() * 8;
408  fed_data.resize(size);
409  unsigned char* payload = fed_data.data();
410  unsigned char* payload_start = payload;
411 
412  auto bxId = iEvent.bunchCrossing();
413  auto evtId = iEvent.id().event();
414 
415  LogDebug("L1T") << "Creating FEDRawData ID " << fedId_ << ", size " << size;
416 
418  header.set(payload, evType_, evtId, bxId, fedId_);
419 
421 
423  payload += amc13.size() * 8;
424 
425  FEDTrailer trailer(payload);
426  trailer.set(payload, size / 8, evf::compute_crc(payload_start, size), 0, 0);
427  }

References evf::compute_crc(), FEDRawData::data(), evType_, fedId_, RecoTauValidation_cfi::header, iEvent, LogDebug, jets_cff::payload, FEDRawData::resize(), FEDTrailer::set(), findQualityFiles::size, slinkHeaderSize_, and slinkTrailerSize_.

Referenced by produce().

◆ getBlocks()

std::vector< Block > l1t::MP7BufferDumpToRaw::getBlocks ( int  iAmc)
private

Definition at line 268 of file MP7BufferDumpToRaw.cc.

268  {
269  LogDebug("L1T") << "Getting blocks from board " << iBoard << ", " << rxBlockLength_.at(iBoard).size()
270  << " Rx links, " << txBlockLength_.at(iBoard).size() << " Tx links";
271 
272  std::vector<Block> blocks;
273 
274  // Rx blocks first
275  for (unsigned link = 0; link < rxBlockLength_.at(iBoard).size(); ++link) {
276  unsigned id = link * 2;
277  unsigned size = rxBlockLength_.at(iBoard).at(link);
278 
279  if (size == 0)
280  continue;
281 
282  std::vector<uint32_t> data;
283  if (packetisedData_) {
284  const PacketData& p = rxPacketReader_.get(iBoard);
285  PacketData::const_iterator itr = p.begin();
286  for (unsigned i = 0; i < rxIndex_.at(iBoard); i++)
287  itr++;
288 
289  LogDebug("L1T") << "Found packet [" << itr->first_ << ", " << itr->last_ << "]";
290  LogDebug("L1T") << "Link " << link << " has " << itr->links_.find(link)->second.size() << " frames";
291 
292  for (unsigned iFrame = 0; iFrame < itr->links_.find(link)->second.size(); ++iFrame) {
293  uint64_t d = itr->links_.find(link)->second.at(iFrame);
294  data.push_back(d);
295  }
296  } else {
297  for (unsigned iFrame = rxIndex_.at(iBoard); iFrame < rxIndex_.at(iBoard) + size; ++iFrame) {
298  uint64_t d = rxFileReader_.get(iBoard).link(link).at(iFrame);
299  LogDebug("L1T") << "Frame " << iFrame << " : " << std::hex << d;
300  if ((d & 0x100000000) > 0)
301  data.push_back(d & 0xffffffff);
302  }
303  }
304 
305  LogDebug("L1T") << "Board " << iBoard << " block " << id << ", size " << data.size();
306 
307  Block block(id, data);
308  blocks.push_back(block);
309  }
310 
311  // then Tx blocks
312  for (unsigned link = 0; link < txBlockLength_.at(iBoard).size(); ++link) {
313  unsigned id = (link * 2) + 1;
314  unsigned size = txBlockLength_.at(iBoard).at(link);
315 
316  if (size == 0)
317  continue;
318 
319  LogDebug("L1T") << "Block " << id << " expecting size " << size;
320 
321  std::vector<uint32_t> data;
322  if (packetisedData_) {
323  const PacketData& p = txPacketReader_.get(iBoard);
324  PacketData::const_iterator itr = p.begin();
325  for (unsigned i = 0; i < txIndex_.at(iBoard); i++)
326  itr++;
327 
328  LogDebug("L1T") << "Found packet [" << itr->first_ << ", " << itr->last_ << "]";
329  LogDebug("L1T") << "Link " << link << " has " << itr->links_.find(link)->second.size() << " frames";
330 
331  for (unsigned iFrame = 0; iFrame < itr->links_.find(link)->second.size(); ++iFrame) {
332  uint64_t d = itr->links_.find(link)->second.at(iFrame);
333  data.push_back(d);
334  }
335 
336  } else {
337  for (unsigned iFrame = txIndex_.at(iBoard); iFrame < txIndex_.at(iBoard) + size; ++iFrame) {
338  uint64_t d = txFileReader_.get(iBoard).link(link).at(iFrame);
339  LogDebug("L1T") << "Frame " << iFrame << " : " << std::hex << d;
340  if ((d & 0x100000000) > 0)
341  data.push_back(d & 0xffffffff);
342  }
343  }
344 
345  LogDebug("L1T") << "Board " << iBoard << " block " << id << ", size " << data.size();
346 
347  Block block(id, data);
348 
349  blocks.push_back(block);
350  }
351 
352  if (packetisedData_) {
353  rxIndex_.at(iBoard)++;
354  txIndex_.at(iBoard)++;
355  } else {
356  rxIndex_.at(iBoard) += nFramesPerEvent_;
357  txIndex_.at(iBoard) += nFramesPerEvent_;
358  }
359 
360  LogDebug("L1T") << "Board " << iBoard << ", read " << blocks.size() << " blocks";
361 
362  return blocks;
363  }

References groupFilesInBlocks::block, gather_cfg::blocks, ztail::d, data, MP7PacketReader::get(), MP7FileReader::get(), mps_fire::i, FileData::link(), MainPageGenerator::link, LogDebug, nFramesPerEvent_, AlCaHLTBitMon_ParallelJobs::p, packetisedData_, rxBlockLength_, rxFileReader_, rxIndex_, rxPacketReader_, findQualityFiles::size, txBlockLength_, txFileReader_, txIndex_, and txPacketReader_.

Referenced by produce().

◆ produce()

void l1t::MP7BufferDumpToRaw::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::EDProducer.

Definition at line 231 of file MP7BufferDumpToRaw.cc.

231  {
232  using namespace edm;
233 
234  // AMC 13 packet
236 
237  // create AMC formatted data
238  if (mux_) {
239  std::vector<Block> blocks = getBlocks(iBoard_);
241  } else {
242  for (unsigned iBoard = 0; iBoard < nBoard_; ++iBoard) {
243  std::vector<Block> blocks = getBlocks(iBoard);
244  formatAMC(amc13, blocks, iBoard);
245  }
246  }
247 
248  LogDebug("L1T") << "AMC13 size " << amc13.size();
249 
250  // prepare the raw data collection
251  std::unique_ptr<FEDRawDataCollection> raw_coll(new FEDRawDataCollection());
252  FEDRawData& fed_data = raw_coll->FEDData(fedId_);
253 
254  formatRaw(iEvent, amc13, fed_data);
255 
256  LogDebug("L1T") << "Packing FED ID " << fedId_ << " size " << fed_data.size();
257 
258  // put the collection in the event
259  iEvent.put(std::move(raw_coll));
260 
261  //advance to next AMC for next event, if required...
262  if (mux_) {
263  iBoard_++;
264  iBoard_ = iBoard_ % nBoard_;
265  }
266  }

References gather_cfg::blocks, fedId_, EcalFEDMonitor_cfi::FEDRawDataCollection, formatAMC(), formatRaw(), getBlocks(), iBoard_, iEvent, LogDebug, eostools::move(), mux_, nBoard_, and FEDRawData::size().

Member Data Documentation

◆ boardId_

std::vector<int> l1t::MP7BufferDumpToRaw::boardId_
private

Definition at line 104 of file MP7BufferDumpToRaw.cc.

Referenced by formatAMC(), and MP7BufferDumpToRaw().

◆ evType_

int l1t::MP7BufferDumpToRaw::evType_
private

Definition at line 114 of file MP7BufferDumpToRaw.cc.

Referenced by formatRaw().

◆ fedId_

int l1t::MP7BufferDumpToRaw::fedId_
private

Definition at line 113 of file MP7BufferDumpToRaw.cc.

Referenced by formatRaw(), and produce().

◆ fwVer_

int l1t::MP7BufferDumpToRaw::fwVer_
private

Definition at line 115 of file MP7BufferDumpToRaw.cc.

Referenced by formatAMC().

◆ iBoard_

unsigned l1t::MP7BufferDumpToRaw::iBoard_
private

Definition at line 103 of file MP7BufferDumpToRaw.cc.

Referenced by produce().

◆ mux_

bool l1t::MP7BufferDumpToRaw::mux_
private

Definition at line 109 of file MP7BufferDumpToRaw.cc.

Referenced by produce().

◆ muxOffset_

int l1t::MP7BufferDumpToRaw::muxOffset_
private

Definition at line 110 of file MP7BufferDumpToRaw.cc.

◆ nBoard_

unsigned l1t::MP7BufferDumpToRaw::nBoard_
private

Definition at line 102 of file MP7BufferDumpToRaw.cc.

Referenced by MP7BufferDumpToRaw(), and produce().

◆ nFramesPerEvent_

unsigned l1t::MP7BufferDumpToRaw::nFramesPerEvent_
private

Definition at line 97 of file MP7BufferDumpToRaw.cc.

Referenced by getBlocks(), and MP7BufferDumpToRaw().

◆ packetisedData_

bool l1t::MP7BufferDumpToRaw::packetisedData_
private

Definition at line 94 of file MP7BufferDumpToRaw.cc.

Referenced by getBlocks().

◆ rxBlockLength_

std::vector<std::vector<int> > l1t::MP7BufferDumpToRaw::rxBlockLength_
private

Definition at line 107 of file MP7BufferDumpToRaw.cc.

Referenced by getBlocks(), and MP7BufferDumpToRaw().

◆ rxFileReader_

MP7FileReader l1t::MP7BufferDumpToRaw::rxFileReader_
private

Definition at line 82 of file MP7BufferDumpToRaw.cc.

Referenced by getBlocks(), and MP7BufferDumpToRaw().

◆ rxIndex_

std::vector<unsigned> l1t::MP7BufferDumpToRaw::rxIndex_
private

Definition at line 84 of file MP7BufferDumpToRaw.cc.

Referenced by getBlocks(), and MP7BufferDumpToRaw().

◆ rxPacketReader_

MP7PacketReader l1t::MP7BufferDumpToRaw::rxPacketReader_
private

Definition at line 88 of file MP7BufferDumpToRaw.cc.

Referenced by getBlocks().

◆ slinkHeaderSize_

int l1t::MP7BufferDumpToRaw::slinkHeaderSize_
private

Definition at line 116 of file MP7BufferDumpToRaw.cc.

Referenced by formatRaw().

◆ slinkTrailerSize_

int l1t::MP7BufferDumpToRaw::slinkTrailerSize_
private

Definition at line 117 of file MP7BufferDumpToRaw.cc.

Referenced by formatRaw().

◆ txBlockLength_

std::vector<std::vector<int> > l1t::MP7BufferDumpToRaw::txBlockLength_
private

Definition at line 108 of file MP7BufferDumpToRaw.cc.

Referenced by getBlocks(), and MP7BufferDumpToRaw().

◆ txFileReader_

MP7FileReader l1t::MP7BufferDumpToRaw::txFileReader_
private

Definition at line 83 of file MP7BufferDumpToRaw.cc.

Referenced by getBlocks(), and MP7BufferDumpToRaw().

◆ txIndex_

std::vector<unsigned> l1t::MP7BufferDumpToRaw::txIndex_
private

Definition at line 85 of file MP7BufferDumpToRaw.cc.

Referenced by getBlocks(), and MP7BufferDumpToRaw().

◆ txPacketReader_

MP7PacketReader l1t::MP7BufferDumpToRaw::txPacketReader_
private

Definition at line 89 of file MP7BufferDumpToRaw.cc.

Referenced by getBlocks().

l1t::MP7BufferDumpToRaw::mux_
bool mux_
Definition: MP7BufferDumpToRaw.cc:109
mps_fire.i
i
Definition: mps_fire.py:428
MP7PacketReader::get
const PacketData & get(size_t i)
Definition: MP7PacketReader.h:56
l1t::MP7BufferDumpToRaw::txPacketReader_
MP7PacketReader txPacketReader_
Definition: MP7BufferDumpToRaw.cc:89
MainPageGenerator.link
link
Definition: MainPageGenerator.py:271
l1t::MP7BufferDumpToRaw::rxFileReader_
MP7FileReader rxFileReader_
Definition: MP7BufferDumpToRaw.cc:82
l1t::MP7BufferDumpToRaw::slinkHeaderSize_
int slinkHeaderSize_
Definition: MP7BufferDumpToRaw.cc:116
edm
HLT enums.
Definition: AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
PacketData::const_iterator
std::vector< Packet >::const_iterator const_iterator
Definition: MP7PacketReader.h:29
l1t::MP7BufferDumpToRaw::rxIndex_
std::vector< unsigned > rxIndex_
Definition: MP7BufferDumpToRaw.cc:84
amc13
Definition: AMC13Spec.h:14
PacketData
Definition: MP7PacketReader.h:25
edm::ParameterSet::getUntrackedParameter
T getUntrackedParameter(std::string const &, T const &) const
MP7FileReader::size
size_t size() const
number of rawdata objects stored
Definition: MP7FileReader.h:71
l1t::MP7BufferDumpToRaw::txFileReader_
MP7FileReader txFileReader_
Definition: MP7BufferDumpToRaw.cc:83
FileData::link
const std::vector< uint64_t > & link(uint32_t i) const
Definition: MP7FileReader.cc:25
FEDRawData::data
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
Definition: FEDRawData.cc:24
FEDRawData
Definition: FEDRawData.h:19
word
uint64_t word
Definition: CTPPSTotemDataFormatter.cc:29
alignCSCRings.s
s
Definition: alignCSCRings.py:92
l1t::MP7BufferDumpToRaw::formatRaw
void formatRaw(edm::Event &iEvent, amc13::Packet &amc13, FEDRawData &fed_data)
Definition: MP7BufferDumpToRaw.cc:406
l1t::MP7BufferDumpToRaw::packetisedData_
bool packetisedData_
Definition: MP7BufferDumpToRaw.cc:94
amc13::Packet
Definition: AMC13Spec.h:69
l1t::MP7BufferDumpToRaw::getBlocks
std::vector< Block > getBlocks(int iAmc)
Definition: MP7BufferDumpToRaw.cc:268
l1t::MP7BufferDumpToRaw::evType_
int evType_
Definition: MP7BufferDumpToRaw.cc:114
svgfig.load
def load(fileName)
Definition: svgfig.py:547
l1t::MP7BufferDumpToRaw::txBlockLength_
std::vector< std::vector< int > > txBlockLength_
Definition: MP7BufferDumpToRaw.cc:108
EcalFEDMonitor_cfi.FEDRawDataCollection
FEDRawDataCollection
Definition: EcalFEDMonitor_cfi.py:6
jets_cff.payload
payload
Definition: jets_cff.py:32
evf::compute_crc
unsigned short compute_crc(unsigned char *buffer, unsigned int bufSize)
Definition: CRC16.h:46
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
FEDTrailer
Definition: FEDTrailer.h:14
l1t::MP7BufferDumpToRaw::txIndex_
std::vector< unsigned > txIndex_
Definition: MP7BufferDumpToRaw.cc:85
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
iEvent
int iEvent
Definition: GenABIO.cc:224
l1t::MP7BufferDumpToRaw::rxBlockLength_
std::vector< std::vector< int > > rxBlockLength_
Definition: MP7BufferDumpToRaw.cc:107
groupFilesInBlocks.block
block
Definition: groupFilesInBlocks.py:150
corrVsCorr.rx
rx
Definition: corrVsCorr.py:103
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
FEDRawData::size
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:45
l1t::MP7BufferDumpToRaw::fedId_
int fedId_
Definition: MP7BufferDumpToRaw.cc:113
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
MP7FileReader::get
const FileData & get(size_t k) const
data getter via index
Definition: MP7FileReader.cc:59
l1t::MP7BufferDumpToRaw::slinkTrailerSize_
int slinkTrailerSize_
Definition: MP7BufferDumpToRaw.cc:117
l1t::MP7BufferDumpToRaw::formatAMC
void formatAMC(amc13::Packet &amc13, const std::vector< Block > &blocks, int iAmc)
Definition: MP7BufferDumpToRaw.cc:365
l1t::MP7BufferDumpToRaw::nBoard_
unsigned nBoard_
Definition: MP7BufferDumpToRaw.cc:102
FEDRawData::resize
void resize(size_t newsize)
Definition: FEDRawData.cc:28
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
RecoTauValidation_cfi.header
header
Definition: RecoTauValidation_cfi.py:292
cond::uint64_t
unsigned long long uint64_t
Definition: Time.h:13
l1t::MP7BufferDumpToRaw::fwVer_
int fwVer_
Definition: MP7BufferDumpToRaw.cc:115
ztail.d
d
Definition: ztail.py:151
l1t::MP7BufferDumpToRaw::boardId_
std::vector< int > boardId_
Definition: MP7BufferDumpToRaw.cc:104
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
l1t::MP7BufferDumpToRaw::rxPacketReader_
MP7PacketReader rxPacketReader_
Definition: MP7BufferDumpToRaw.cc:88
FEDHeader
Definition: FEDHeader.h:14
l1t::Block
Definition: Block.h:70
edm::ConfigurationDescriptions::addDefault
void addDefault(ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:99
gather_cfg.blocks
blocks
Definition: gather_cfg.py:90
l1t::MP7BufferDumpToRaw::nFramesPerEvent_
unsigned nFramesPerEvent_
Definition: MP7BufferDumpToRaw.cc:97
l1t::MP7BufferDumpToRaw::iBoard_
unsigned iBoard_
Definition: MP7BufferDumpToRaw.cc:103
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443