44 #include <boost/algorithm/string.hpp>
62 virtual void endJob()
override;
64 void readEvent(std::vector<uint32_t>& load32);
102 filename_(iConfig.getUntrackedParameter<std::
string>(
"filename",
"data.txt")),
103 fedId_(iConfig.getUntrackedParameter<int>(
"fedId", 1)),
104 iAmc_(iConfig.getUntrackedParameter<int>(
"iAmc", 1)),
105 boardId_(iConfig.getUntrackedParameter<int>(
"boardId", 1)),
106 evType_(iConfig.getUntrackedParameter<int>(
"eventType", 1)),
107 fwVer_(iConfig.getUntrackedParameter<int>(
"fwVersion", 1)),
108 slinkHeaderSize_(iConfig.getUntrackedParameter<int>(
"lenSlinkHeader", 8)),
109 slinkTrailerSize_(iConfig.getUntrackedParameter<int>(
"lenSlinkTrailer", 8))
112 produces<FEDRawDataCollection>();
139 std::vector<uint32_t> load32;
145 int size = load32.size() * 4;
156 for (
unsigned i=0;
i<load32.size(); ++
i) {
157 for (
unsigned j=0;
j<4; ++
j) {
158 fed_data.data()[
i*4+
j] = (load32.at(
i)>>(8*
j)) & 0xff;
164 LogDebug(
"L1T") <<
"Packing FED ID " <<
fedId_ <<
" size " << fed_data.size();
167 iEvent.
put(raw_coll);
179 while (getline(
file_, line) && !line.empty() ) {
181 std::istringstream iss(line);
183 iss >> std::hex >>
d;
185 load32.push_back( d ) ;
#define DEFINE_FWK_MODULE(type)
virtual void beginJob() override
void addDefault(ParameterSetDescription const &psetDescription)
void resize(size_t newsize)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
void readEvent(std::vector< uint32_t > &load32)
virtual void produce(edm::Event &, const edm::EventSetup &) override
virtual void endJob() override
tuple size
Write out results.
AMC13DumpToRaw(const edm::ParameterSet &)