34 #define BEG_DCC_FED_ID 0
35 #define END_DCC_FED_ID 35
36 #define BEG_DCC_FED_ID_GLOBAL 600
37 #define END_DCC_FED_ID_GLOBAL 670
39 #define ECAL_SUPERVISOR_FED_ID 40
40 #define TBCAMAC_FED_ID 41
41 #define TABLE_FED_ID 42
42 #define MATACQ_FED_ID 43
45 fedRawDataCollectionTag_(pset.getParameter<edm::InputTag>(
"fedRawDataCollectionTag")) {
54 produces<EBDigiCollection>(
"ebDigis");
55 produces<EcalMatacqDigiCollection>();
56 produces<EcalPnDiodeDigiCollection>();
57 produces<EcalRawDataCollection>();
58 produces<EcalTrigPrimDigiCollection>(
"EBTT");
61 produces<EcalTBHodoscopeRawInfo>();
62 produces<EcalTBTDCRawInfo>();
63 produces<EcalTBEventHeader>();
66 produces<EBDetIdCollection>(
"EcalIntegrityDCCSizeErrors");
67 produces<EcalElectronicsIdCollection>(
"EcalIntegrityTTIdErrors");
68 produces<EcalElectronicsIdCollection>(
"EcalIntegrityBlockSizeErrors");
69 produces<EBDetIdCollection>(
"EcalIntegrityChIdErrors");
70 produces<EBDetIdCollection>(
"EcalIntegrityGainErrors");
71 produces<EBDetIdCollection>(
"EcalIntegrityGainSwitchErrors");
74 produces<EcalElectronicsIdCollection>(
"EcalIntegrityMemTtIdErrors");
75 produces<EcalElectronicsIdCollection>(
"EcalIntegrityMemBlockSize");
76 produces<EcalElectronicsIdCollection>(
"EcalIntegrityMemChIdErrors");
77 produces<EcalElectronicsIdCollection>(
"EcalIntegrityMemGainErrors");
179 (*productHeader).setSmInBeam(
id);
183 *productTTId, *productBlockSize,
184 *productChId, *productGain, *productGainSwitch,
185 *productMemTtId, *productMemBlockSize,
186 *productMemGain, *productMemChIdErrors,
187 *productTriggerPrimitives);
188 int runType = (*productDCCHeader)[0].getRunType();
190 (*productHeader).setTriggerMask(0x1);
191 else if ( runType == 4 || runType == 5 || runType == 6 )
192 (*productHeader).setTriggerMask(0x2000);
193 else if ( runType == 9 || runType == 10 || runType == 11 )
194 (*productHeader).setTriggerMask(0x800);
195 LogDebug(
"EcalDCCTBUnpackingModule") <<
"Event type is " << (*productHeader).eventType() <<
" dbEventType " << (*productHeader).dbEventType();
211 e.
put(productEb,
"ebDigis");
212 e.
put(productMatacq);
213 e.
put(productDCCHeader);
214 e.
put(productTriggerPrimitives,
"EBTT");
216 e.
put(productDCCSize,
"EcalIntegrityDCCSizeErrors");
217 e.
put(productTTId,
"EcalIntegrityTTIdErrors");
218 e.
put(productBlockSize,
"EcalIntegrityBlockSizeErrors");
219 e.
put(productChId,
"EcalIntegrityChIdErrors");
220 e.
put(productGain,
"EcalIntegrityGainErrors");
221 e.
put(productGainSwitch,
"EcalIntegrityGainSwitchErrors");
223 e.
put(productMemTtId,
"EcalIntegrityMemTtIdErrors");
224 e.
put(productMemBlockSize,
"EcalIntegrityMemBlockSize");
225 e.
put(productMemChIdErrors,
"EcalIntegrityMemChIdErrors");
226 e.
put(productMemGain,
"EcalIntegrityMemGainErrors");
230 e.
put(productHeader);
233 std::cout <<
"[EcalDCCTBUnpackingModule] " << e.
what() << std::endl;
235 std::cout <<
"[EcalDCCTBUnpackingModule] " << e.
what() << std::endl;
237 std::cout <<
"[EcalDCCTBUnpackingModule] " << e.
what() << std::endl;
239 std::cout <<
"[EcalDCCTBUnpackingModule] Unknown exception ..." << std::endl;
virtual char const * what() const
const char * what() const
edm::SortedCollection< EcalMatacqDigi > EcalMatacqDigiCollection
void produce(edm::Event &e, const edm::EventSetup &c)
Produce digis out of raw data.
MatacqTBDataFormatter * matacqFormatter_
size_t size() const
Lenght of the data buffer in bytes.
EcalDCCTBUnpackingModule(const edm::ParameterSet &pset)
Constructor.
TableDataFormatter * tableFormatter_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
EcalSupervisorTBDataFormatter * ecalSupervisorFormatter_
virtual ~EcalDCCTBUnpackingModule()
Destructor.
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