44 #include <boost/algorithm/string.hpp> 62 virtual void endJob()
override;
64 void readEvent(std::vector<uint32_t>& load32);
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)),
112 produces<FEDRawDataCollection>();
139 std::vector<uint32_t> load32;
145 int size = load32.size() * 4;
147 LogDebug(
"L1T") <<
"AMC13 size " << size <<
" bytes";
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;
179 while (getline(
file_, line) && !line.empty() ) {
181 std::istringstream iss(line);
183 iss >> std::hex >>
d;
185 load32.push_back( d ) ;
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
#define DEFINE_FWK_MODULE(type)
virtual void beginJob() override
size_t size() const
Lenght of the data buffer in bytes.
void addDefault(ParameterSetDescription const &psetDescription)
void resize(size_t newsize)
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.
virtual void produce(edm::Event &, const edm::EventSetup &) override
virtual void endJob() override
AMC13DumpToRaw(const edm::ParameterSet &)