24 inputTags_ =
pset.getParameter<std::vector<InputTag> >(
"RawCollectionList");
25 verbose_ =
pset.getUntrackedParameter<
int>(
"verbose", 0);
27 inputTokens_.reserve(inputTags_.size());
29 inputTokens_.push_back(consumes<FEDRawDataCollection>(*
inputTag));
31 produces<FEDRawDataCollection>();
38 std::vector<Handle<FEDRawDataCollection> >
rawData;
39 rawData.reserve(inputTokens_.size());
40 for (
tok_iterator_t inputTok = inputTokens_.begin(); inputTok != inputTokens_.end(); ++inputTok) {
42 if (
e.getByToken(*inputTok,
input)) {
48 auto producedData = std::make_unique<FEDRawDataCollection>();
50 for (
unsigned int i = 0;
i <
rawData.size(); ++
i) {
54 std::cout <<
"\nRAW collection #" <<
i + 1 << std::endl;
55 std::cout <<
"branch name = " <<
rawData[
i].provenance()->branchName() << std::endl;
56 std::cout <<
"process index = " <<
rawData[
i].provenance()->productID().processIndex() << std::endl;
66 std::cout <<
"Copying data from FED #" <<
j << std::endl;
68 if (fedDataProd.
size() != 0) {
70 std::cout <<
" More than one FEDRawDataCollection with data in FED ";
76 unsigned char *dataProd = fedDataProd.
data();
77 const unsigned char *
data = fedData.
data();
78 for (
unsigned int k = 0;
k <
size; ++
k) {
std::vector< edm::InputTag >::const_iterator tag_iterator_t
std::vector< edm::EDGetTokenT< FEDRawDataCollection > >::const_iterator tok_iterator_t
size_t size() const
Lenght of the data buffer in bytes.
static std::string const input
void resize(size_t newsize)
~RawDataCollectorByLabel() override
Destructor.
void produce(edm::Event &e, const edm::EventSetup &c) override
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
char data[epos_bytes_allocation]
RawDataCollectorByLabel(const edm::ParameterSet &pset)
Constructor.
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.