32 #define BEG_DCC_FED_ID 0 33 #define END_DCC_FED_ID 35 34 #define BEG_DCC_FED_ID_GLOBAL 600 35 #define END_DCC_FED_ID_GLOBAL 670 37 #define ECAL_SUPERVISOR_FED_ID 40 38 #define TBCAMAC_FED_ID 41 39 #define TABLE_FED_ID 42 40 #define MATACQ_FED_ID 43 43 fedRawDataCollectionTag_(pset.getParameter<
edm::InputTag>(
"fedRawDataCollectionTag")) {
52 produces<EBDigiCollection>(
"ebDigis");
53 produces<EcalMatacqDigiCollection>();
54 produces<EcalPnDiodeDigiCollection>();
55 produces<EcalRawDataCollection>();
56 produces<EcalTrigPrimDigiCollection>(
"EBTT");
59 produces<EcalTBHodoscopeRawInfo>();
60 produces<EcalTBTDCRawInfo>();
61 produces<EcalTBEventHeader>();
64 produces<EBDetIdCollection>(
"EcalIntegrityDCCSizeErrors");
65 produces<EcalElectronicsIdCollection>(
"EcalIntegrityTTIdErrors");
66 produces<EcalElectronicsIdCollection>(
"EcalIntegrityBlockSizeErrors");
67 produces<EBDetIdCollection>(
"EcalIntegrityChIdErrors");
68 produces<EBDetIdCollection>(
"EcalIntegrityGainErrors");
69 produces<EBDetIdCollection>(
"EcalIntegrityGainSwitchErrors");
72 produces<EcalElectronicsIdCollection>(
"EcalIntegrityMemTtIdErrors");
73 produces<EcalElectronicsIdCollection>(
"EcalIntegrityMemBlockSize");
74 produces<EcalElectronicsIdCollection>(
"EcalIntegrityMemChIdErrors");
75 produces<EcalElectronicsIdCollection>(
"EcalIntegrityMemGainErrors");
100 auto productEb = std::make_unique<EBDigiCollection>();
103 auto productMatacq = std::make_unique<EcalMatacqDigiCollection>();
106 auto productPN = std::make_unique<EcalPnDiodeDigiCollection>();
109 auto productDCCHeader = std::make_unique<EcalRawDataCollection>();
112 auto productTriggerPrimitives = std::make_unique<EcalTrigPrimDigiCollection>();
115 auto productDCCSize = std::make_unique<EBDetIdCollection>();
118 auto productTTId = std::make_unique<EcalElectronicsIdCollection>();
121 auto productBlockSize = std::make_unique<EcalElectronicsIdCollection>();
124 auto productChId = std::make_unique<EBDetIdCollection>();
127 auto productGain = std::make_unique<EBDetIdCollection>();
130 auto productGainSwitch = std::make_unique<EBDetIdCollection>();
133 auto productMemTtId = std::make_unique<EcalElectronicsIdCollection>();
136 auto productMemBlockSize = std::make_unique<EcalElectronicsIdCollection>();
139 auto productMemGain = std::make_unique<EcalElectronicsIdCollection>();
142 auto productMemChIdErrors = std::make_unique<EcalElectronicsIdCollection>();
145 auto productHodo = std::make_unique<EcalTBHodoscopeRawInfo>();
146 auto productTdc = std::make_unique<EcalTBTDCRawInfo>();
147 auto productHeader = std::make_unique<EcalTBEventHeader>();
177 (*productHeader).setSmInBeam(
id);
181 *productTTId, *productBlockSize,
182 *productChId, *productGain, *productGainSwitch,
183 *productMemTtId, *productMemBlockSize,
184 *productMemGain, *productMemChIdErrors,
185 *productTriggerPrimitives);
186 int runType = (*productDCCHeader)[0].getRunType();
188 (*productHeader).setTriggerMask(0
x1);
189 else if ( runType == 4 || runType == 5 || runType == 6 )
190 (*productHeader).setTriggerMask(0x2000);
191 else if ( runType == 9 || runType == 10 || runType == 11 )
192 (*productHeader).setTriggerMask(0x800);
193 LogDebug(
"EcalDCCTBUnpackingModule") <<
"Event type is " << (*productHeader).eventType() <<
" dbEventType " << (*productHeader).dbEventType();
214 e.
put(
std::move(productDCCSize),
"EcalIntegrityDCCSizeErrors");
215 e.
put(
std::move(productTTId),
"EcalIntegrityTTIdErrors");
216 e.
put(
std::move(productBlockSize),
"EcalIntegrityBlockSizeErrors");
217 e.
put(
std::move(productChId),
"EcalIntegrityChIdErrors");
218 e.
put(
std::move(productGain),
"EcalIntegrityGainErrors");
219 e.
put(
std::move(productGainSwitch),
"EcalIntegrityGainSwitchErrors");
221 e.
put(
std::move(productMemTtId),
"EcalIntegrityMemTtIdErrors");
222 e.
put(
std::move(productMemBlockSize),
"EcalIntegrityMemBlockSize");
223 e.
put(
std::move(productMemChIdErrors),
"EcalIntegrityMemChIdErrors");
224 e.
put(
std::move(productMemGain),
"EcalIntegrityMemGainErrors");
231 std::cout <<
"[EcalDCCTBUnpackingModule] " << e.
what() << std::endl;
233 std::cout <<
"[EcalDCCTBUnpackingModule] " << e.
what() << std::endl;
235 std::cout <<
"[EcalDCCTBUnpackingModule] " << e.
what() << std::endl;
237 std::cout <<
"[EcalDCCTBUnpackingModule] Unknown exception ..." << std::endl;
void produce(edm::Event &e, const edm::EventSetup &c) override
Produce digis out of raw data.
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const char * what() const
~EcalDCCTBUnpackingModule() override
Destructor.
char const * what() const override
MatacqTBDataFormatter * matacqFormatter_
size_t size() const
Lenght of the data buffer in bytes.
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
EcalDCCTBUnpackingModule(const edm::ParameterSet &pset)
Constructor.
TableDataFormatter * tableFormatter_
void endJob(void) override
EcalSupervisorTBDataFormatter * ecalSupervisorFormatter_
EcalTBDaqFormatter * formatter_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
edm::InputTag fedRawDataCollectionTag_
#define BEG_DCC_FED_ID_GLOBAL
CamacTBDataFormatter * camacTBformatter_
char data[epos_bytes_allocation]
const char * what() const
#define ECAL_SUPERVISOR_FED_ID
#define END_DCC_FED_ID_GLOBAL