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");
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(0x1);
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();
209 e.
put(productEb,
"ebDigis");
210 e.
put(productMatacq);
211 e.
put(productDCCHeader);
212 e.
put(productTriggerPrimitives,
"EBTT");
214 e.
put(productDCCSize,
"EcalIntegrityDCCSizeErrors");
215 e.
put(productTTId,
"EcalIntegrityTTIdErrors");
216 e.
put(productBlockSize,
"EcalIntegrityBlockSizeErrors");
217 e.
put(productChId,
"EcalIntegrityChIdErrors");
218 e.
put(productGain,
"EcalIntegrityGainErrors");
219 e.
put(productGainSwitch,
"EcalIntegrityGainSwitchErrors");
221 e.
put(productMemTtId,
"EcalIntegrityMemTtIdErrors");
222 e.
put(productMemBlockSize,
"EcalIntegrityMemBlockSize");
223 e.
put(productMemChIdErrors,
"EcalIntegrityMemChIdErrors");
224 e.
put(productMemGain,
"EcalIntegrityMemGainErrors");
228 e.
put(productHeader);
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;
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