40 : packRctEm_(iConfig.getUntrackedParameter<
bool>(
"packRctEm",
true)),
41 packRctCalo_(iConfig.getUntrackedParameter<
bool>(
"packRctCalo",
true)),
42 fedId_(iConfig.getParameter<
int>(
"gctFedId")),
43 verbose_(iConfig.getUntrackedParameter<
bool>(
"verbose",
false)),
48 tokenPut_ = produces<FEDRawDataCollection>();
119 if (packRctEmThisEvent) {
122 packRctEmThisEvent =
false;
123 LogDebug(
"GCT") <<
"RCT EM Candidate packing requested, but failed to get them from event!";
130 if (packRctCaloThisEvent) {
133 packRctCaloThisEvent =
false;
134 LogDebug(
"GCT") <<
"RCT Calo Region packing requested, but failed to get them from event!";
145 unsigned int rawSize = 88;
146 if (packRctEmThisEvent) {
149 if (packRctCaloThisEvent) {
154 unsigned char* pPayload = pHeader + 16;
155 unsigned char* pFooter = pHeader + rawSize - 8;
159 fedHeader.
set(pHeader, 1, eventNumber,
bx,
fedId_);
179 if (packRctEmThisEvent) {
185 if (packRctCaloThisEvent) {
203 const unsigned char*
d =
data.data();
205 for (
unsigned int i = 0;
i <
data.size();
i =
i + 4) {
206 uint32_t
w = (uint32_t)
d[
i] + (uint32_t)(
d[
i + 1] << 8) + (uint32_t)(
d[
i + 2] << 16) + (uint32_t)(
d[
i + 3] << 24);
207 cout << std::hex << std::setw(4) <<
i / 4 <<
" " << std::setw(8) <<
w << endl;
edm::EDGetTokenT< L1GctHFBitCountsCollection > tokenGctHFBitCounts_
std::atomic< int > counter_
edm::EDGetTokenT< L1GctJetCandCollection > tokenGctJetCand_forJets_
T getParameter(std::string const &) const
edm::EDGetTokenT< L1GctEmCandCollection > tokenL1GctEmCand_isoEm_
edm::EDGetTokenT< L1CaloEmCollection > tokenCaloEm_
edm::EDGetTokenT< L1GctJetCandCollection > tokenGctJetCand_tauJets_
edm::EDGetTokenT< L1GctHtMissCollection > tokenGctHtMiss_
T const * product() const
unsigned long long EventNumber_t
edm::EDGetTokenT< L1GctEtTotalCollection > tokenGctEtTotal_
edm::EDGetTokenT< L1CaloRegionCollection > tokenCaloRegion_
edm::EDGetTokenT< L1GctJetCountsCollection > tokenGctJetCounts_
GctDigiToRaw(const edm::ParameterSet &)
edm::EDGetTokenT< L1GctJetCandCollection > tokenGctJetCand_cenJets_
edm::EDGetTokenT< L1GctEtMissCollection > tokenGctEtMiss_
static void set(unsigned char *trailer, uint32_t lenght, uint16_t crc, uint8_t evt_stat, uint8_t tts, bool moreTrailers=false)
Set all fields in the trailer.
edm::EDGetTokenT< L1GctEtHadCollection > tokenGctEtHad_
unsigned short compute_crc(unsigned char *buffer, unsigned int bufSize)
#define DEFINE_FWK_MODULE(type)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const final
edm::EDPutTokenT< FEDRawDataCollection > tokenPut_
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
edm::EDGetTokenT< L1GctHFRingEtSumsCollection > tokenGctHFRingEtSums_
edm::EDGetTokenT< L1GctEmCandCollection > tokenL1GctEmCand_nonIsoEm_
void print(FEDRawData &data) const
char data[epos_bytes_allocation]