43 #include <boost/algorithm/string.hpp> 61 void readEvent(std::vector<uint32_t>& load32);
98 : filename_(iConfig.getUntrackedParameter<
std::
string>(
"filename",
"data.txt")),
99 fedId_(iConfig.getUntrackedParameter<
int>(
"fedId", 1)),
100 iAmc_(iConfig.getUntrackedParameter<
int>(
"iAmc", 1)),
101 boardId_(iConfig.getUntrackedParameter<
int>(
"boardId", 1)),
102 evType_(iConfig.getUntrackedParameter<
int>(
"eventType", 1)),
103 fwVer_(iConfig.getUntrackedParameter<
int>(
"fwVersion", 1)),
104 slinkHeaderSize_(iConfig.getUntrackedParameter<
int>(
"lenSlinkHeader", 8)),
105 slinkTrailerSize_(iConfig.getUntrackedParameter<
int>(
"lenSlinkTrailer", 8)) {
106 produces<FEDRawDataCollection>();
125 std::vector<uint32_t> load32;
131 int size = load32.size() * 4;
133 LogDebug(
"L1T") <<
"AMC13 size " << size <<
" bytes";
142 for (
unsigned i = 0;
i < load32.size(); ++
i) {
143 for (
unsigned j = 0;
j < 4; ++
j) {
144 fed_data.
data()[
i * 4 +
j] = (load32.at(
i) >> (8 *
j)) & 0xff;
162 std::istringstream iss(
line);
164 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
~AMC13DumpToRaw() override
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 &)