|
|
Go to the documentation of this file.
97 desc.add<
bool>(
"skipRpc",
false);
98 desc.add<
bool>(
"skipCsc",
false);
99 desc.add<
bool>(
"skipDt",
false);
100 desc.add<
bool>(
"useRpcConnectionFile",
false);
103 descriptions.
add(
"omtfPacker",
desc);
132 std::list<unsigned int> amcIds = {1, 3, 5, 7, 9, 11};
133 std::list<unsigned int>
fedIds = {1380, 1381};
135 for (
auto& amcId : amcIds) {
136 raws[std::make_pair(
fedId, amcId)];
169 auto bxId =
ev.bunchCrossing();
170 auto evtId =
ev.id().event();
171 auto orbit =
ev.eventAuxiliary().orbitNumber();
178 for (
const auto& it : raws) {
179 if (
fedId != it.first.first)
181 const std::vector<Word64>& amcData = it.second;
182 unsigned int amcId = it.first.second;
183 for (
const auto& raw : amcData) {
184 std::ostringstream dataStr;
193 LogTrace(
"") <<
" fed: " <<
fedId <<
" amcId: " << amcId <<
" RAW DATA: " << dataStr.str() << std::endl;
195 amc13.add(amcId, 43981, evtId, orbit, bxId, amcData);
200 const unsigned int slinkHeaderSize = 8;
201 const unsigned int slinkTrailerSize = 8;
202 unsigned int size = (
amc13.size()) *
sizeof(
Word64) + slinkHeaderSize + slinkTrailerSize;
205 unsigned char* payload_start =
payload;
208 const unsigned int evtType = 1;
223 using namespace omtf;
T const * product() const
unsigned long theEventCounter
OmtfPacker(const edm::ParameterSet &pset)
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::ParameterSet theConfig
void pack(const RPCDigiCollection *prod, FedAmcRawsMap &raws)
void init(const edm::EventSetup &es)
void beginRun(const edm::Run &run, const edm::EventSetup &es) override
std::map< std::pair< unsigned int, unsigned int >, std::vector< Word64 > > FedAmcRawsMap
unsigned short compute_crc(unsigned char *buffer, unsigned int bufSize)
edm::EDGetTokenT< RPCDigiCollection > theRpcToken
static void set(unsigned char *trailer, uint32_t lenght, uint16_t crc, uint8_t evt_stat, uint8_t tts, bool moreTrailers=false)
Set all fields in the trailer.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< L1MuDTChambPhContainer > theDtPhToken
void pack(const L1MuDTChambPhContainer *phCont, const L1MuDTChambThContainer *thCont, FedAmcRawsMap &raws)
void resize(size_t newsize)
T getParameter(std::string const &) const
void pack(const CSCCorrelatedLCTDigiCollection *prod, FedAmcRawsMap &raws)
void produce(edm::Event &ev, const edm::EventSetup &es) override
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > theCscToken
std::string fullPath() const
edm::EDGetTokenT< L1MuDTChambThContainer > theDtThToken