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");
162 auto productEb = std::make_unique<EBDigiCollection>();
165 auto productEe = std::make_unique<EEDigiCollection>();
168 auto productMatacq = std::make_unique<EcalMatacqDigiCollection>();
171 auto productPN = std::make_unique<EcalPnDiodeDigiCollection>();
174 auto productDCCHeader = std::make_unique<EcalRawDataCollection>();
177 auto productTriggerPrimitives = std::make_unique<EcalTrigPrimDigiCollection>();
180 auto productDCCSize = std::make_unique<EBDetIdCollection>();
183 auto productTTId = std::make_unique<EcalElectronicsIdCollection>();
186 auto productBlockSize = std::make_unique<EcalElectronicsIdCollection>();
189 auto productChId = std::make_unique<EBDetIdCollection>();
192 auto productGain = std::make_unique<EBDetIdCollection>();
195 auto productGainSwitch = std::make_unique<EBDetIdCollection>();
198 auto productMemTtId = std::make_unique<EcalElectronicsIdCollection>();
201 auto productMemBlockSize = std::make_unique<EcalElectronicsIdCollection>();
204 auto productMemGain = std::make_unique<EcalElectronicsIdCollection>();
207 auto productMemChIdErrors = std::make_unique<EcalElectronicsIdCollection>();
210 auto productHodo = std::make_unique<EcalTBHodoscopeRawInfo>();
211 auto productTdc = std::make_unique<EcalTBTDCRawInfo>();
212 auto productHeader = std::make_unique<EcalTBEventHeader>();
232 if (
data.size() > 16) {
237 (*productHeader).setSmInBeam(
id);
251 *productMemBlockSize,
253 *productMemChIdErrors,
254 *productTriggerPrimitives);
255 int runType = (*productDCCHeader)[0].getRunType();
257 (*productHeader).setTriggerMask(0
x1);
259 (*productHeader).setTriggerMask(0x2000);
261 (*productHeader).setTriggerMask(0x800);
262 LogDebug(
"EcalDCCTB07UnpackingModule")
263 <<
"Event type is " << (*productHeader).eventType() <<
" dbEventType " << (*productHeader).dbEventType();
283 e.put(
std::move(productTriggerPrimitives),
"EBTT");
286 e.put(
std::move(productDCCSize),
"EcalIntegrityDCCSizeErrors");
288 e.put(
std::move(productTTId),
"EcalIntegrityTTIdErrors");
290 e.put(
std::move(productBlockSize),
"EcalIntegrityBlockSizeErrors");
292 e.put(
std::move(productChId),
"EcalIntegrityChIdErrors");
294 e.put(
std::move(productGain),
"EcalIntegrityGainErrors");
296 e.put(
std::move(productGainSwitch),
"EcalIntegrityGainSwitchErrors");
299 e.put(
std::move(productMemTtId),
"EcalIntegrityMemTtIdErrors");
301 e.put(
std::move(productMemBlockSize),
"EcalIntegrityMemBlockSize");
303 e.put(
std::move(productMemChIdErrors),
"EcalIntegrityMemChIdErrors");
305 e.put(
std::move(productMemGain),
"EcalIntegrityMemGainErrors");
312 std::cout <<
"[EcalDCCTB07UnpackingModule] " <<
e.what() << std::endl;
314 std::cout <<
"[EcalDCCTB07UnpackingModule] " <<
e.what() << std::endl;
316 std::cout <<
"[EcalDCCTB07UnpackingModule] " <<
e.what() << std::endl;
318 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.