43 #include <boost/algorithm/string.hpp> 60 void readEvent(std::vector<uint32_t>& load32);
92 : filename_(iConfig.getUntrackedParameter<
std::
string>(
"filename",
"data.txt")),
93 fedId_(iConfig.getUntrackedParameter<
int>(
"fedId", 1)),
94 iAmc_(iConfig.getUntrackedParameter<
int>(
"iAmc", 1)),
95 boardId_(iConfig.getUntrackedParameter<
int>(
"boardId", 1)),
96 evType_(iConfig.getUntrackedParameter<
int>(
"eventType", 1)),
97 fwVer_(iConfig.getUntrackedParameter<
int>(
"fwVersion", 1)),
98 slinkHeaderSize_(iConfig.getUntrackedParameter<
int>(
"lenSlinkHeader", 8)),
99 slinkTrailerSize_(iConfig.getUntrackedParameter<
int>(
"lenSlinkTrailer", 8)) {
100 produces<FEDRawDataCollection>();
114 std::vector<uint32_t> load32;
120 int size = load32.size() * 4;
122 LogDebug(
"L1T") <<
"AMC13 size " << size <<
" bytes";
131 for (
unsigned i = 0;
i < load32.size(); ++
i) {
132 for (
unsigned j = 0;
j < 4; ++
j) {
133 fed_data.
data()[
i * 4 +
j] = (load32.at(
i) >> (8 *
j)) & 0xff;
151 std::istringstream iss(
line);
153 iss >> std::hex >>
d;
size_t size() const
Lenght of the data buffer in bytes.
void addDefault(ParameterSetDescription const &psetDescription)
#define DEFINE_FWK_MODULE(type)
Log< level::Info, false > LogInfo
void resize(size_t newsize, size_t wordsize=8)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void readEvent(std::vector< uint32_t > &load32)
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
void produce(edm::Event &, const edm::EventSetup &) override
AMC13DumpToRaw(const edm::ParameterSet &)