30 #define BEG_DCC_FED_ID 0 31 #define END_DCC_FED_ID 0 32 #define BEG_DCC_FED_ID_GLOBAL 0 33 #define END_DCC_FED_ID_GLOBAL 0 35 #define ECAL_SUPERVISOR_FED_ID 40 36 #define TBCAMAC_FED_ID 41 37 #define TABLE_FED_ID 42 38 #define MATACQ_FED_ID 43 41 : fedRawDataCollectionTag_(
pset.getParameter<
edm::
InputTag>(
"fedRawDataCollectionTag")) {
48 std::vector<int>
ics =
pset.getUntrackedParameter<std::vector<int> >(
"ics", std::vector<int>());
49 std::vector<int>
towerIDs =
pset.getUntrackedParameter<std::vector<int> >(
"towerIDs", std::vector<int>());
50 std::vector<int>
stripIDs =
pset.getUntrackedParameter<std::vector<int> >(
"stripIDs", std::vector<int>());
51 std::vector<int>
channelIDs =
pset.getUntrackedParameter<std::vector<int> >(
"channelIDs", std::vector<int>());
54 std::vector<int>
statusIDs =
pset.getUntrackedParameter<std::vector<int> >(
"statusIDs", std::vector<int>());
55 std::vector<int>
ccuIDs =
pset.getUntrackedParameter<std::vector<int> >(
"ccuIDs", std::vector<int>());
56 std::vector<int>
positionIDs =
pset.getUntrackedParameter<std::vector<int> >(
"positionIDs", std::vector<int>());
61 <<
"Some of the mapping info is missing! Check config files! " 62 <<
" Size of IC vector is " <<
ics.size() <<
" Size of Tower ID vector is " <<
towerIDs.size()
63 <<
" Size of Strip ID vector is " <<
stripIDs.size() <<
" Size of Channel ID vector is " <<
channelIDs.size();
67 <<
"Some of the mapping info is missing! Check config files! " 68 <<
" Size of status ID vector is " <<
statusIDs.size() <<
" Size of ccu ID vector is " <<
ccuIDs.size()
77 <<
"Mapping information is corrupted. " 78 <<
"Tower/DQM position/strip/channel vectors are of different size! Check cfi files! \n" 79 <<
" Size of IC vector is " <<
ics.size() <<
" Size of Tower ID vector is " <<
towerIDs.size()
80 <<
" Size of Strip ID vector is " <<
stripIDs.size() <<
" Size of Channel ID vector is " <<
channelIDs.size();
85 <<
"Mapping information is corrupted. " 86 <<
"Status/CCU ID/DQM position vectors are of different size! Check cfi files! \n" 87 <<
" Size of status ID vector is " <<
statusIDs.size() <<
" Size of ccu ID vector is " <<
ccuIDs.size()
90 int cryIcMap[68][5][5];
91 int tbStatusToLocation[71];
92 int tbTowerIDToLocation[201];
93 for (
unsigned it = 1; it <= 68; ++it)
94 for (
unsigned is = 1; is <= 5; ++is)
95 for (
unsigned ic = 1; ic <= 5; ++ic)
96 cryIcMap[it - 1][is - 1][ic - 1] = 1700;
98 for (
unsigned it = 1; it <= 71; ++it)
99 tbStatusToLocation[it - 1] = it - 1;
101 for (
unsigned it = 1; it <= 201; ++it)
102 tbTowerIDToLocation[it - 1] = it - 1;
105 for (
unsigned int i = 0;
i <
ics.size(); ++
i) {
110 cryIcMap[
tower - 1][
strip - 1][channel - 1] = ic;
117 tbStatusToLocation[is] = itEB;
118 tbTowerIDToLocation[it] = itEB;
128 produces<EBDigiCollection>(
"ebDigis");
129 produces<EEDigiCollection>(
"eeDigis");
130 produces<EcalMatacqDigiCollection>();
131 produces<EcalPnDiodeDigiCollection>();
132 produces<EcalRawDataCollection>();
133 produces<EcalTrigPrimDigiCollection>(
"EBTT");
136 produces<EcalTBHodoscopeRawInfo>();
137 produces<EcalTBTDCRawInfo>();
138 produces<EcalTBEventHeader>();
141 produces<EBDetIdCollection>(
"EcalIntegrityDCCSizeErrors");
142 produces<EcalElectronicsIdCollection>(
"EcalIntegrityTTIdErrors");
143 produces<EcalElectronicsIdCollection>(
"EcalIntegrityBlockSizeErrors");
144 produces<EBDetIdCollection>(
"EcalIntegrityChIdErrors");
145 produces<EBDetIdCollection>(
"EcalIntegrityGainErrors");
146 produces<EBDetIdCollection>(
"EcalIntegrityGainSwitchErrors");
149 produces<EcalElectronicsIdCollection>(
"EcalIntegrityMemTtIdErrors");
150 produces<EcalElectronicsIdCollection>(
"EcalIntegrityMemBlockSize");
151 produces<EcalElectronicsIdCollection>(
"EcalIntegrityMemChIdErrors");
152 produces<EcalElectronicsIdCollection>(
"EcalIntegrityMemGainErrors");
166 auto productEb = std::make_unique<EBDigiCollection>();
169 auto productEe = std::make_unique<EEDigiCollection>();
172 auto productMatacq = std::make_unique<EcalMatacqDigiCollection>();
175 auto productPN = std::make_unique<EcalPnDiodeDigiCollection>();
178 auto productDCCHeader = std::make_unique<EcalRawDataCollection>();
181 auto productTriggerPrimitives = std::make_unique<EcalTrigPrimDigiCollection>();
184 auto productDCCSize = std::make_unique<EBDetIdCollection>();
187 auto productTTId = std::make_unique<EcalElectronicsIdCollection>();
190 auto productBlockSize = std::make_unique<EcalElectronicsIdCollection>();
193 auto productChId = std::make_unique<EBDetIdCollection>();
196 auto productGain = std::make_unique<EBDetIdCollection>();
199 auto productGainSwitch = std::make_unique<EBDetIdCollection>();
202 auto productMemTtId = std::make_unique<EcalElectronicsIdCollection>();
205 auto productMemBlockSize = std::make_unique<EcalElectronicsIdCollection>();
208 auto productMemGain = std::make_unique<EcalElectronicsIdCollection>();
211 auto productMemChIdErrors = std::make_unique<EcalElectronicsIdCollection>();
214 auto productHodo = std::make_unique<EcalTBHodoscopeRawInfo>();
215 auto productTdc = std::make_unique<EcalTBTDCRawInfo>();
216 auto productHeader = std::make_unique<EcalTBEventHeader>();
236 if (
data.size() > 16) {
241 (*productHeader).setSmInBeam(
id);
255 *productMemBlockSize,
257 *productMemChIdErrors,
258 *productTriggerPrimitives);
259 int runType = (*productDCCHeader)[0].getRunType();
261 (*productHeader).setTriggerMask(0
x1);
263 (*productHeader).setTriggerMask(0x2000);
265 (*productHeader).setTriggerMask(0x800);
266 LogDebug(
"EcalDCCTB07UnpackingModule")
267 <<
"Event type is " << (*productHeader).eventType() <<
" dbEventType " << (*productHeader).dbEventType();
287 e.put(
std::move(productTriggerPrimitives),
"EBTT");
290 e.put(
std::move(productDCCSize),
"EcalIntegrityDCCSizeErrors");
292 e.put(
std::move(productTTId),
"EcalIntegrityTTIdErrors");
294 e.put(
std::move(productBlockSize),
"EcalIntegrityBlockSizeErrors");
296 e.put(
std::move(productChId),
"EcalIntegrityChIdErrors");
298 e.put(
std::move(productGain),
"EcalIntegrityGainErrors");
300 e.put(
std::move(productGainSwitch),
"EcalIntegrityGainSwitchErrors");
303 e.put(
std::move(productMemTtId),
"EcalIntegrityMemTtIdErrors");
305 e.put(
std::move(productMemBlockSize),
"EcalIntegrityMemBlockSize");
307 e.put(
std::move(productMemChIdErrors),
"EcalIntegrityMemChIdErrors");
309 e.put(
std::move(productMemGain),
"EcalIntegrityMemGainErrors");
316 std::cout <<
"[EcalDCCTB07UnpackingModule] " <<
e.what() << std::endl;
318 std::cout <<
"[EcalDCCTB07UnpackingModule] " <<
e.what() << std::endl;
320 std::cout <<
"[EcalDCCTB07UnpackingModule] " <<
e.what() << std::endl;
322 std::cout <<
"[EcalDCCTB07UnpackingModule] Unknown exception ..." << std::endl;
TableDataFormatter * tableFormatter_
#define END_DCC_FED_ID_GLOBAL
EcalTB07DaqFormatter * formatter_
Log< level::Error, false > LogError
edm::InputTag fedRawDataCollectionTag_
void produce(edm::Event &e, const edm::EventSetup &c) override
Produce digis out of raw data.
CamacTBDataFormatter * camacTBformatter_
MatacqTBDataFormatter * matacqFormatter_
EcalSupervisorTBDataFormatter * ecalSupervisorFormatter_
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
#define ECAL_SUPERVISOR_FED_ID
char data[epos_bytes_allocation]
~EcalDCCTB07UnpackingModule() override
Destructor.
#define BEG_DCC_FED_ID_GLOBAL
EcalDCCTB07UnpackingModule(const edm::ParameterSet &pset)
Constructor.
void endJob(void) override