81 void visual_raw(
int hl,
int id,
int run,
int event,
bool fedshort,
bool fDump,
short unsigned int*
buf)
const;
119 crateToken = esConsumes<CSCCrateMap, CSCCrateMapRcd>();
120 cscmapToken = esConsumes<CSCChamberMap, CSCChamberMapRcd>();
137 debug =
pset.getUntrackedParameter<
bool>(
"Debug",
false);
143 b904Setup =
pset.getUntrackedParameter<
bool>(
"B904Setup",
false);
145 b904dmb =
pset.getUntrackedParameter<
int>(
"B904dmb", 3);
159 produces<CSCWireDigiCollection>(
"MuonCSCWireDigi");
160 produces<CSCStripDigiCollection>(
"MuonCSCStripDigi");
161 produces<CSCComparatorDigiCollection>(
"MuonCSCComparatorDigi");
162 produces<CSCALCTDigiCollection>(
"MuonCSCALCTDigi");
163 produces<CSCCLCTDigiCollection>(
"MuonCSCCLCTDigi");
164 produces<CSCCorrelatedLCTDigiCollection>(
"MuonCSCCorrelatedLCTDigi");
167 produces<CSCCFEBStatusDigiCollection>(
"MuonCSCCFEBStatusDigi");
168 produces<CSCTMBStatusDigiCollection>(
"MuonCSCTMBStatusDigi");
169 produces<CSCDMBStatusDigiCollection>(
"MuonCSCDMBStatusDigi");
170 produces<CSCALCTStatusDigiCollection>(
"MuonCSCALCTStatusDigi");
171 produces<CSCDDUStatusDigiCollection>(
"MuonCSCDDUStatusDigi");
172 produces<CSCDCCStatusDigiCollection>(
"MuonCSCDCCStatusDigi");
176 produces<CSCDCCFormatStatusDigiCollection>(
"MuonCSCDCCFormatStatusDigi");
180 produces<CSCRPCDigiCollection>(
"MuonCSCRPCDigi");
184 produces<GEMPadDigiClusterCollection>(
"MuonGEMPadDigiCluster");
188 produces<CSCShowerDigiCollection>(
"MuonCSCShowerDigi");
189 produces<CSCShowerDigiCollection>(
"MuonCSCShowerDigiAnode");
190 produces<CSCShowerDigiCollection>(
"MuonCSCShowerDigiCathode");
191 produces<CSCShowerDigiCollection>(
"MuonCSCShowerDigiAnodeALCT");
213 ->setComment(
"# Define input to the unpacker");
214 desc.add<
bool>(
"UseExaminer",
true)
215 ->setComment(
"# Use CSC examiner to check for corrupt or semi-corrupt data & avoid unpacker crashes");
216 desc.add<
unsigned int>(
"ExaminerMask", 535557110)->setComment(
"# This mask is needed by the examiner");
217 desc.add<
bool>(
"UseSelectiveUnpacking",
true)
218 ->setComment(
"# Use Examiner to unpack good chambers and skip only bad ones");
219 desc.add<
unsigned int>(
"ErrorMask", 0)->setComment(
"# This mask simply reduces error reporting");
220 desc.add<
bool>(
"UnpackStatusDigis",
false)->setComment(
"# Unpack general status digis?");
221 desc.add<
bool>(
"UseFormatStatus",
true)->setComment(
"# Unpack FormatStatus digi?");
222 desc.add<
bool>(
"useRPCs",
false)->setComment(
"Unpack RPC data");
223 desc.add<
bool>(
"useGEMs",
true)->setComment(
"Unpack GEM trigger data");
224 desc.add<
bool>(
"useCSCShowers",
true)->setComment(
"Unpack CSCShower trigger data");
225 desc.addUntracked<
bool>(
"Debug",
false)->setComment(
"# Turn on lots of output");
226 desc.addUntracked<
bool>(
"PrintEventNumber",
false);
227 desc.addUntracked<
bool>(
"runDQM",
false);
228 desc.addUntracked<
bool>(
"VisualFEDInspect",
false)->setComment(
"# Visualization of raw data in corrupted events");
229 desc.addUntracked<
bool>(
"VisualFEDShort",
false)->setComment(
"# Visualization of raw data in corrupted events");
230 desc.addUntracked<
bool>(
"FormatedEventDump",
false);
231 desc.addUntracked<
bool>(
"SuppressZeroLCT",
true);
232 desc.addUntracked<
bool>(
"DisableMappingCheck",
false)
233 ->setComment(
"# Disable FED/DDU to chamber mapping inconsistency check");
234 desc.addUntracked<
bool>(
"B904Setup",
false)->setComment(
"# Make the unpacker aware of B904 test setup configuration");
235 desc.addUntracked<
int>(
"B904vmecrate", 1)->setComment(
"# Set vmecrate number for chamber used in B904 test setup");
236 desc.addUntracked<
int>(
"B904dmb", 3)->setComment(
"# Set dmb slot for chamber used in B904 test setup");
237 descriptions.
add(
"muonCSCDCCUnpacker",
desc);
238 descriptions.
setComment(
" This is the generic cfi file for CSC unpacking");
261 auto wireProduct = std::make_unique<CSCWireDigiCollection>();
262 auto stripProduct = std::make_unique<CSCStripDigiCollection>();
263 auto alctProduct = std::make_unique<CSCALCTDigiCollection>();
264 auto clctProduct = std::make_unique<CSCCLCTDigiCollection>();
265 auto comparatorProduct = std::make_unique<CSCComparatorDigiCollection>();
266 auto rpcProduct = std::make_unique<CSCRPCDigiCollection>();
267 auto corrlctProduct = std::make_unique<CSCCorrelatedLCTDigiCollection>();
268 auto cfebStatusProduct = std::make_unique<CSCCFEBStatusDigiCollection>();
269 auto dmbStatusProduct = std::make_unique<CSCDMBStatusDigiCollection>();
270 auto tmbStatusProduct = std::make_unique<CSCTMBStatusDigiCollection>();
271 auto dduStatusProduct = std::make_unique<CSCDDUStatusDigiCollection>();
272 auto dccStatusProduct = std::make_unique<CSCDCCStatusDigiCollection>();
273 auto alctStatusProduct = std::make_unique<CSCALCTStatusDigiCollection>();
275 auto formatStatusProduct = std::make_unique<CSCDCCFormatStatusDigiCollection>();
277 auto gemProduct = std::make_unique<GEMPadDigiClusterCollection>();
279 auto lctShowerProduct =
280 std::make_unique<CSCShowerDigiCollection>();
281 auto anodeShowerProductOTMB =
282 std::make_unique<CSCShowerDigiCollection>();
283 auto cathodeShowerProductOTMB =
284 std::make_unique<CSCShowerDigiCollection>();
285 auto anodeShowerProductALCT = std::make_unique<
291 unsigned long dccBinCheckMask = 0x06080016;
294 const unsigned postLS1_map[] = {841, 842, 843, 844, 845, 846, 847, 848, 849, 831, 832, 833,
295 834, 835, 836, 837, 838, 839, 861, 862, 863, 864, 865, 866,
296 867, 868, 869, 851, 852, 853, 854, 855, 856, 857, 858, 859};
299 std::vector<unsigned int> cscFEDids;
303 cscFEDids.push_back(
id);
308 cscFEDids.push_back(
id);
311 for (
unsigned int i = 0;
i < cscFEDids.size();
i++)
313 unsigned int id = cscFEDids[
i];
321 unsigned long length = fedData.
size();
341 if (examiner !=
nullptr)
345 const short unsigned int*
data = (
short unsigned int*)fedData.
data();
347 LogTrace(
"badData") <<
"Length: " << length / 2;
377 formatStatusProduct->insertDigi(
CSCDetId(1, 1, 1, 1, 1),
391 short unsigned*
buf = (
short unsigned int*)fedData.
data();
401 ptrExaminer =
nullptr;
403 std::vector<CSCDDUEventData> fed_Data;
404 std::vector<CSCDDUEventData>* ptr_fedData = &fed_Data;
412 fed_Data.push_back(single_dduData);
428 fed_Data = dccData.dduData();
432 short unsigned* bufForDcc = (
short unsigned int*)fedData.
data();
437 dccStatusProduct->insertDigi(
layer,
439 dccData.dccTrailer().data(),
441 bufForDcc[length / 2 - 4]));
445 const std::vector<CSCDDUEventData>& dduData = *ptr_fedData;
447 for (
unsigned int iDDU = 0; iDDU < dduData.size(); ++iDDU)
451 if (dduData[iDDU].trailer().errorstat() &
errorMask) {
452 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi")
453 <<
"FED ID" <<
id <<
" DDU# " << iDDU <<
" has serious error - no digis unpacked! " << std::hex
454 << dduData[iDDU].trailer().errorstat();
459 dduStatusProduct->insertDigi(
462 dduData[iDDU].trailer().
data(),
464 dduData[iDDU].trailer0()));
467 const std::vector<CSCEventData>& cscData = dduData[iDDU].cscData();
471 for (
unsigned int iCSC = 0; iCSC < cscData.size(); ++iCSC)
482 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
"crate = " << vmecrate <<
"; dmb = " << dmb;
484 if ((vmecrate >= 1) && (vmecrate <= 60) && (dmb >= 1) && (dmb <= 10) && (dmb != 6)) {
485 layer = pcrate->
detId(vmecrate, dmb, icfeb, ilayer);
487 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
" detID input out of range!!! ";
488 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
" skipping chamber vme= " << vmecrate <<
" dmb= " << dmb;
495 unsigned int dduid = cscmapping->
ddu(
layer);
496 if ((dduid >= 1) && (dduid <= 36)) {
497 dduid = postLS1_map[dduid - 1];
503 LogTrace(
"CSCDDUUnpacker|CSCRawToDigi") <<
" CSC->FED/DDU mapping inconsistency!!! ";
504 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi")
505 <<
"readout FED/DDU ID=" <<
id <<
" expected ID=" << dduid <<
", skipping chamber " <<
layer 506 <<
" vme= " << vmecrate <<
" dmb= " << dmb;
512 int nalct = cscData[iCSC].dmbHeader()->nalct();
513 bool goodALCT =
false;
515 if (nalct && cscData[iCSC].alctHeader()) {
516 if (cscData[iCSC].alctHeader()->
check()) {
519 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
"not storing ALCT digis; alct is bad or not present";
523 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
"nALCT==0 !!!";
528 std::vector<CSCALCTDigi> alctDigis = cscData[iCSC].alctHeader()->ALCTDigis();
530 std::vector<CSCALCTDigi> alctDigis_0;
531 for (
int unsigned i = 0;
i < alctDigis.size(); ++
i) {
534 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") << alctDigis[
i] << std::endl;
535 alctDigis_0.push_back(alctDigis[
i]);
538 alctProduct->move(std::make_pair(alctDigis_0.begin(), alctDigis_0.end()),
layer);
540 alctProduct->move(std::make_pair(alctDigis.begin(), alctDigis.end()),
layer);
545 std::vector<CSCShowerDigi> anodeShowerDigisALCT = cscData[iCSC].alctHeader()->alctShowerDigis();
546 anodeShowerProductALCT->move(std::make_pair(anodeShowerDigisALCT.begin(), anodeShowerDigisALCT.end()),
552 int nclct = cscData[iCSC].dmbHeader()->nclct();
553 bool goodTMB =
false;
555 if (nclct && cscData[iCSC].tmbData()) {
556 if (cscData[iCSC].tmbHeader()->
check()) {
557 if (cscData[iCSC].comparatorData()->
check())
560 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
"one of TMB checks failed! not storing TMB digis ";
564 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
"nCLCT==0 !!!";
569 std::vector<CSCCorrelatedLCTDigi> correlatedlctDigis =
570 cscData[iCSC].tmbHeader()->CorrelatedLCTDigis(
layer.rawId());
572 std::vector<CSCCorrelatedLCTDigi> correlatedlctDigis_0;
573 for (
int unsigned i = 0;
i < correlatedlctDigis.size(); ++
i) {
574 if (correlatedlctDigis[
i].
isValid()) {
576 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") << correlatedlctDigis[
i] << std::endl;
577 correlatedlctDigis_0.push_back(correlatedlctDigis[
i]);
580 corrlctProduct->move(std::make_pair(correlatedlctDigis_0.begin(), correlatedlctDigis_0.end()),
layer);
582 corrlctProduct->move(std::make_pair(correlatedlctDigis.begin(), correlatedlctDigis.end()),
layer);
584 std::vector<CSCCLCTDigi> clctDigis = cscData[iCSC].tmbHeader()->CLCTDigis(
layer.rawId());
586 std::vector<CSCCLCTDigi> clctDigis_0;
587 for (
int unsigned i = 0;
i < clctDigis.size(); ++
i) {
590 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") << clctDigis[
i] << std::endl;
591 clctDigis_0.push_back(clctDigis[
i]);
594 clctProduct->move(std::make_pair(clctDigis_0.begin(), clctDigis_0.end()),
layer);
596 clctProduct->move(std::make_pair(clctDigis.begin(), clctDigis.end()),
layer);
603 std::vector<CSCShowerDigi> lctShowerDigis;
604 lctShowerDigis.push_back(lctShowerDigi);
605 lctShowerProduct->move(std::make_pair(lctShowerDigis.begin(), lctShowerDigis.end()),
layer);
609 CSCShowerDigi anodeShowerDigiOTMB = cscData[iCSC].tmbHeader()->anodeShowerDigi(
layer.rawId());
610 if (anodeShowerDigiOTMB.
isValid()) {
611 std::vector<CSCShowerDigi> anodeShowerDigis;
612 anodeShowerDigis.push_back(anodeShowerDigiOTMB);
613 anodeShowerProductOTMB->move(std::make_pair(anodeShowerDigis.begin(), anodeShowerDigis.end()),
layer);
617 CSCShowerDigi cathodeShowerDigiOTMB = cscData[iCSC].tmbHeader()->cathodeShowerDigi(
layer.rawId());
618 if (cathodeShowerDigiOTMB.
isValid()) {
619 std::vector<CSCShowerDigi> cathodeShowerDigis;
620 cathodeShowerDigis.push_back(cathodeShowerDigiOTMB);
621 cathodeShowerProductOTMB->move(std::make_pair(cathodeShowerDigis.begin(), cathodeShowerDigis.end()),
627 if (cscData[iCSC].tmbData()->checkSize()) {
628 if (
useRPCs_ && cscData[iCSC].tmbData()->hasRPC()) {
629 std::vector<CSCRPCDigi> rpcDigis = cscData[iCSC].tmbData()->rpcData()->digis();
630 rpcProduct->move(std::make_pair(rpcDigis.begin(), rpcDigis.end()),
layer);
634 if (
useGEMs_ && cscData[iCSC].tmbData()->hasGEM()) {
635 for (
int unsigned igem = 0; igem < (
int unsigned)(cscData[iCSC].tmbData()->gemData()->numGEMs());
637 int gem_chamber =
layer.chamber();
638 int gem_region = (
layer.endcap() == 1) ? 1 : -1;
645 std::vector<GEMPadDigiCluster> gemDigis = cscData[iCSC].tmbData()->gemData()->etaDigis(
646 igem, 7 -
ieta, cscData[iCSC].tmbHeader()->ALCTMatchTime());
647 if (!gemDigis.empty()) {
648 gemProduct->move(std::make_pair(gemDigis.begin(), gemDigis.end()), gemid);
654 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
" TMBData check size failed!";
661 if (cscData[iCSC].cfebData(icfeb) !=
nullptr)
662 cfebStatusProduct->insertDigi(
layer, cscData[iCSC].cfebData(icfeb)->statusDigi());
665 dmbStatusProduct->insertDigi(
668 tmbStatusProduct->insertDigi(
672 alctStatusProduct->insertDigi(
682 layer = pcrate->
detId(vmecrate, dmb, 0, ilayer);
684 std::vector<CSCWireDigi> wireDigis = cscData[iCSC].wireDigis(ilayer);
685 wireProduct->move(std::make_pair(wireDigis.begin(), wireDigis.end()),
layer);
689 layer = pcrate->
detId(vmecrate, dmb, icfeb, ilayer);
690 if (cscData[iCSC].cfebData(icfeb) && cscData[iCSC].cfebData(icfeb)->
check()) {
691 std::vector<CSCStripDigi> stripDigis;
692 cscData[iCSC].cfebData(icfeb)->digis(
layer.rawId(), stripDigis);
693 stripProduct->move(std::make_pair(stripDigis.begin(), stripDigis.end()),
layer);
697 if (goodTMB && (cscData[iCSC].tmbHeader() !=
nullptr)) {
698 int nCFEBs = cscData[iCSC].tmbHeader()->NCFEBs();
699 for (icfeb = 0; icfeb < nCFEBs; ++icfeb) {
700 layer = pcrate->
detId(vmecrate, dmb, icfeb, ilayer);
701 std::vector<CSCComparatorDigi> comparatorDigis =
702 cscData[iCSC].comparatorData()->comparatorDigis(
layer.rawId(), icfeb);
705 layer = pcrate->
detId(vmecrate, dmb, 0, ilayer);
706 comparatorProduct->move(std::make_pair(comparatorDigis.begin(), comparatorDigis.end()),
layer);
714 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
"ERROR! Examiner rejected FED #" <<
id;
721 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi")
722 <<
" Examiner errors:0x" << std::hex << examiner->
errors() <<
" & 0x" <<
examinerMask <<
" = " 730 if (examiner !=
nullptr)
735 e.put(
std::move(wireProduct),
"MuonCSCWireDigi");
736 e.put(
std::move(stripProduct),
"MuonCSCStripDigi");
737 e.put(
std::move(alctProduct),
"MuonCSCALCTDigi");
738 e.put(
std::move(clctProduct),
"MuonCSCCLCTDigi");
739 e.put(
std::move(comparatorProduct),
"MuonCSCComparatorDigi");
740 e.put(
std::move(corrlctProduct),
"MuonCSCCorrelatedLCTDigi");
743 e.put(
std::move(formatStatusProduct),
"MuonCSCDCCFormatStatusDigi");
746 e.put(
std::move(cfebStatusProduct),
"MuonCSCCFEBStatusDigi");
747 e.put(
std::move(dmbStatusProduct),
"MuonCSCDMBStatusDigi");
748 e.put(
std::move(tmbStatusProduct),
"MuonCSCTMBStatusDigi");
749 e.put(
std::move(dduStatusProduct),
"MuonCSCDDUStatusDigi");
750 e.put(
std::move(dccStatusProduct),
"MuonCSCDCCStatusDigi");
751 e.put(
std::move(alctStatusProduct),
"MuonCSCALCTStatusDigi");
755 e.put(
std::move(rpcProduct),
"MuonCSCRPCDigi");
758 e.put(
std::move(gemProduct),
"MuonGEMPadDigiCluster");
761 e.put(
std::move(lctShowerProduct),
"MuonCSCShowerDigi");
762 e.put(
std::move(anodeShowerProductOTMB),
"MuonCSCShowerDigiAnode");
763 e.put(
std::move(cathodeShowerProductOTMB),
"MuonCSCShowerDigiCathode");
764 e.put(
std::move(anodeShowerProductALCT),
"MuonCSCShowerDigiAnodeALCT");
767 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
"[CSCDCCUnpacker]: " <<
numOfEvents <<
" events processed ";
773 int hl,
int id,
int run,
int event,
bool fedshort,
bool fDump,
short unsigned int*
buf)
const {
774 std::cout << std::endl << std::endl << std::endl;
775 std::cout <<
"Run: " <<
run <<
" Event: " <<
event << std::endl;
779 <<
"(scroll down to see summary)" << std::endl;
781 std::cout <<
"Problem seems in FED-" <<
id <<
" " 782 <<
"(scroll down to see summary)" << std::endl;
783 std::cout <<
"********************************************************************************" << std::endl;
784 std::cout << hl <<
" words of data:" << std::endl;
788 std::vector<int> dcc_id;
791 for (
int i = 750;
i < 758;
i++)
794 for (
int i = 830;
i < 838;
i++)
797 char dcc_common[] =
"DCC-";
801 std::vector<int> ddu_id;
802 int ddu_h1_12_13 = 0;
803 for (
int i = 1;
i < 37;
i++)
806 char ddu_common[] =
"DDU-";
807 char ddu_header1[] =
"Header 1";
808 char ddu_header2[] =
"Header 2";
809 char ddu_header3[] =
"Header 3";
810 char ddu_trail1[] =
"Trailer 1", ddu_trail2[] =
"Trailer 2", ddu_trail3[] =
"Trailer 3";
812 char ddu_trailer1_bit[] = {
'8',
'0',
'0',
'0',
'f',
'f',
'f',
'f',
'8',
'0',
'0',
'0',
'8',
'0',
'0',
'0'};
813 char ddu_trailer3_bit[] = {
'a'};
815 char ddu_tr1_err_common[] =
"Incomplet";
819 char dmb_common[] =
"DMB", dmb_header1[] =
"Header 1", dmb_header2[] =
"Header 2";
820 char dmb_common_crate[] =
"crate:", dmb_common_slot[] =
"slot:";
821 char dmb_common_l1a[] =
"L1A:";
822 char dmb_header1_bit[] = {
'9',
'9',
'9',
'9'};
823 char dmb_header2_bit[] = {
'a',
'a',
'a',
'a'};
824 char dmb_tr1[] =
"Trailer 1", dmb_tr2[] =
"Trailer 2";
825 char dmb_tr1_bit[] = {
'f',
'f',
'f',
'f'}, dmb_tr2_bit[] = {
'e',
'e',
'e',
'e'};
830 char alct_common[] =
"ALCT", alct_header1[] =
"Header 1", alct_header2[] =
"Header 2";
831 char alct_common_bxn[] =
"BXN:";
832 char alct_common_wcnt2[] =
"| Actual word count:";
833 char alct_common_wcnt1[] =
"Expected word count:";
834 char alct_header1_bit[] = {
'd',
'd',
'd',
'd',
'b',
'0',
'a'};
835 char alct_header2_bit[] = {
'0',
'0',
'0',
'0'};
836 char alct_tr1[] =
"Trailer 1";
841 char tmb_common[] =
"TMB", tmb_header1[] =
"Header", tmb_tr1[] =
"Trailer";
842 char tmb_header1_bit[] = {
'd',
'd',
'd',
'd',
'b',
'0',
'c'};
843 char tmb_tr1_bit[] = {
'd',
'd',
'd',
'd',
'e',
'0',
'f'};
848 char cfeb_common[] =
"CFEB", cfeb_tr1[] =
"Trailer", cfeb_b[] =
"B-word";
849 char cfeb_common_sample[] =
"sample:";
856 int word_lines = hl / 4;
859 char tempbuf_short[17];
860 char sign1[] =
" --->| ";
863 int word_numbering = 0;
864 int ddu_inst_i = 0, ddu_inst_n = 0, ddu_inst_l1a = 0;
865 int ddu_inst_bxn = 0;
866 int dmb_inst_crate = 0, dmb_inst_slot = 0, dmb_inst_l1a = 0;
868 int alct_inst_l1a = 0;
869 int alct_inst_bxn = 0;
870 int alct_inst_wcnt1 = 0;
871 int alct_inst_wcnt2 = 0;
874 int tmb_inst_l1a = 0;
875 int tmb_inst_wcnt1 = 0;
876 int tmb_inst_wcnt2 = 0;
879 int dcc_h1_check = 0;
886 bool dcc_check =
false;
887 bool ddu_h2_check[sz1] = {
false};
888 bool ddu_h1_check =
false;
889 bool dmb_h1_check[sz1] = {
false};
890 bool dmb_h2_check[sz1] = {
false};
891 bool ddu_h2_h1 =
false;
892 bool ddu_tr1_check[sz1] = {
false};
893 bool alct_h1_check[sz1] = {
false};
894 bool alct_h2_check[sz1] = {
false};
895 bool alct_tr1_check[sz1] = {
false};
896 bool dmb_tr1_check[sz1] = {
false};
897 bool dmb_tr2_check[sz1] = {
false};
898 bool tmb_h1_check[sz1] = {
false};
899 bool tmb_tr1_check[sz1] = {
false};
900 bool cfeb_tr1_check[sz1] = {
false};
901 bool cfeb_b_check[sz1] = {
false};
902 bool ddu_tr1_bad_check[sz1] = {
false};
903 bool extraction = fedshort;
907 std::vector<int> ddu_h1_coll;
908 std::vector<int> ddu_h1_n_coll;
909 std::vector<int> ddu_h2_coll;
910 std::vector<int> ddu_h3_coll;
911 std::vector<int> ddu_t1_coll;
912 std::vector<int> ddu_t2_coll;
913 std::vector<int> ddu_t3_coll;
914 std::vector<int> ddu_l1a_coll;
915 std::vector<int> ddu_bxn_coll;
917 std::vector<int> dmb_h1_coll;
918 std::vector<int> dmb_h2_coll;
919 std::vector<int> dmb_t1_coll;
920 std::vector<int> dmb_t2_coll;
921 std::vector<int> dmb_crate_coll;
922 std::vector<int> dmb_slot_coll;
923 std::vector<int> dmb_l1a_coll;
925 std::vector<int> alct_h1_coll;
926 std::vector<int> alct_h2_coll;
927 std::vector<int> alct_t1_coll;
928 std::vector<int> alct_l1a_coll;
929 std::vector<int> alct_bxn_coll;
930 std::vector<int> alct_wcnt1_coll;
931 std::vector<int> alct_wcnt2_coll;
932 std::vector<int> alct_wcnt2_id_coll;
934 std::vector<int> tmb_h1_coll;
935 std::vector<int> tmb_t1_coll;
936 std::vector<int> tmb_l1a_coll;
937 std::vector<int> tmb_wcnt1_coll;
938 std::vector<int> tmb_wcnt2_coll;
940 std::vector<int> cfeb_t1_coll;
945 char dcc_header1[] =
"DCC Header 1";
946 char dcc_header2[] =
"DCC Header 2";
947 char dcc_trail1[] =
"DCC Trailer 1", dcc_trail1_bit[] = {
'e'};
948 char dcc_trail2[] =
"DCC Trailer 2", dcc_trail2_bit[] = {
'a'};
951 for (
int i = 0;
i < hl;
i++) {
953 for (
int j = -1;
j < 4;
j++) {
954 sprintf(tempbuf_short,
956 buf[
i + 4 * (
j - 1) + 3],
957 buf[
i + 4 * (
j - 1) + 2],
958 buf[
i + 4 * (
j - 1) + 1],
959 buf[
i + 4 * (
j - 1)]);
962 ddu_h2_check[
j] = ((
buf[
i + 4 * (
j - 1) + 1] == 0x8000) && (
buf[
i + 4 * (
j - 1) + 2] == 0x0001) &&
963 (
buf[
i + 4 * (
j - 1) + 3] == 0x8000));
965 ddu_tr1_check[
j] = ((tempbuf_short[0] == ddu_trailer1_bit[0]) && (tempbuf_short[1] == ddu_trailer1_bit[1]) &&
966 (tempbuf_short[2] == ddu_trailer1_bit[2]) && (tempbuf_short[3] == ddu_trailer1_bit[3]) &&
967 (tempbuf_short[4] == ddu_trailer1_bit[4]) && (tempbuf_short[5] == ddu_trailer1_bit[5]) &&
968 (tempbuf_short[6] == ddu_trailer1_bit[6]) && (tempbuf_short[7] == ddu_trailer1_bit[7]) &&
969 (tempbuf_short[8] == ddu_trailer1_bit[8]) && (tempbuf_short[9] == ddu_trailer1_bit[9]) &&
970 (tempbuf_short[10] == ddu_trailer1_bit[10]) && (tempbuf_short[11] == ddu_trailer1_bit[11]) &&
971 (tempbuf_short[12] == ddu_trailer1_bit[12]) && (tempbuf_short[13] == ddu_trailer1_bit[13]) &&
972 (tempbuf_short[14] == ddu_trailer1_bit[14]) && (tempbuf_short[15] == ddu_trailer1_bit[15]));
974 dmb_h1_check[
j] = ((tempbuf_short[0] == dmb_header1_bit[0]) && (tempbuf_short[4] == dmb_header1_bit[1]) &&
975 (tempbuf_short[8] == dmb_header1_bit[2]) && (tempbuf_short[12] == dmb_header1_bit[3]));
977 dmb_h2_check[
j] = ((tempbuf_short[0] == dmb_header2_bit[0]) && (tempbuf_short[4] == dmb_header2_bit[1]) &&
978 (tempbuf_short[8] == dmb_header2_bit[2]) && (tempbuf_short[12] == dmb_header2_bit[3]));
979 alct_h1_check[
j] = ((tempbuf_short[0] == alct_header1_bit[0]) && (tempbuf_short[4] == alct_header1_bit[1]) &&
980 (tempbuf_short[8] == alct_header1_bit[2]) && (tempbuf_short[12] == alct_header1_bit[3]) &&
981 (tempbuf_short[13] == alct_header1_bit[4]) && (tempbuf_short[14] == alct_header1_bit[5]) &&
982 (tempbuf_short[15] == alct_header1_bit[6]));
983 alct_h2_check[
j] = (((tempbuf_short[0] == alct_header2_bit[0]) && (tempbuf_short[1] == alct_header2_bit[1]) &&
984 (tempbuf_short[2] == alct_header2_bit[2]) && (tempbuf_short[3] == alct_header2_bit[3])) ||
985 ((tempbuf_short[4] == alct_header2_bit[0]) && (tempbuf_short[5] == alct_header2_bit[1]) &&
986 (tempbuf_short[6] == alct_header2_bit[2]) && (tempbuf_short[7] == alct_header2_bit[3])) ||
987 ((tempbuf_short[8] == alct_header2_bit[0]) && (tempbuf_short[9] == alct_header2_bit[1]) &&
988 (tempbuf_short[10] == alct_header2_bit[2]) && (tempbuf_short[11] == alct_header2_bit[3])) ||
989 ((tempbuf_short[12] == alct_header2_bit[0]) && (tempbuf_short[13] == alct_header2_bit[1]) &&
990 (tempbuf_short[14] == alct_header2_bit[2]) && (tempbuf_short[15] == alct_header2_bit[3]))
995 (((
buf[
i + 4 * (
j - 1)] & 0xFFFF) == 0xDE0D) && ((
buf[
i + 4 * (
j - 1) + 1] & 0xF800) == 0xD000) &&
996 ((
buf[
i + 4 * (
j - 1) + 2] & 0xF800) == 0xD000) && ((
buf[
i + 4 * (
j - 1) + 3] & 0xF000) == 0xD000));
998 dmb_tr1_check[
j] = ((tempbuf_short[0] == dmb_tr1_bit[0]) && (tempbuf_short[4] == dmb_tr1_bit[1]) &&
999 (tempbuf_short[8] == dmb_tr1_bit[2]) && (tempbuf_short[12] == dmb_tr1_bit[3]));
1000 dmb_tr2_check[
j] = ((tempbuf_short[0] == dmb_tr2_bit[0]) && (tempbuf_short[4] == dmb_tr2_bit[1]) &&
1001 (tempbuf_short[8] == dmb_tr2_bit[2]) && (tempbuf_short[12] == dmb_tr2_bit[3]));
1003 tmb_h1_check[
j] = ((tempbuf_short[0] == tmb_header1_bit[0]) && (tempbuf_short[4] == tmb_header1_bit[1]) &&
1004 (tempbuf_short[8] == tmb_header1_bit[2]) && (tempbuf_short[12] == tmb_header1_bit[3]) &&
1005 (tempbuf_short[13] == tmb_header1_bit[4]) && (tempbuf_short[14] == tmb_header1_bit[5]) &&
1006 (tempbuf_short[15] == tmb_header1_bit[6]));
1007 tmb_tr1_check[
j] = ((tempbuf_short[0] == tmb_tr1_bit[0]) && (tempbuf_short[4] == tmb_tr1_bit[1]) &&
1008 (tempbuf_short[8] == tmb_tr1_bit[2]) && (tempbuf_short[12] == tmb_tr1_bit[3]) &&
1009 (tempbuf_short[13] == tmb_tr1_bit[4]) && (tempbuf_short[14] == tmb_tr1_bit[5]) &&
1010 (tempbuf_short[15] == tmb_tr1_bit[6]));
1013 (((
buf[
i + 4 * (
j - 1) + 1] & 0xF000) == 0x7000) && ((
buf[
i + 4 * (
j - 1) + 2] & 0xF000) == 0x7000) &&
1014 ((
buf[
i + 4 * (
j - 1) + 1] != 0x7FFF) || (
buf[
i + 4 * (
j - 1) + 2] != 0x7FFF)) &&
1015 ((
buf[
i + 4 * (
j - 1) + 3] == 0x7FFF) || ((
buf[
i + 4 * (
j - 1) + 3] &
buf[
i + 4 * (
j - 1)]) == 0x0 &&
1016 (
buf[
i + 4 * (
j - 1) + 3] +
buf[
i + 4 * (
j - 1)] == 0x7FFF))));
1018 (((
buf[
i + 4 * (
j - 1) + 3] & 0xF000) == 0xB000) && ((
buf[
i + 4 * (
j - 1) + 2] & 0xF000) == 0xB000) &&
1019 ((
buf[
i + 4 * (
j - 1) + 1] & 0xF000) == 0xB000) && ((
buf[
i + 4 * (
j - 1)] = 3 & 0xF000) == 0xB000));
1021 ddu_tr1_bad_check[
j] =
1022 ((tempbuf_short[0] != ddu_trailer1_bit[0]) &&
1025 (tempbuf_short[4] != ddu_trailer1_bit[4]) &&
1028 (tempbuf_short[8] == ddu_trailer1_bit[8]) && (tempbuf_short[9] == ddu_trailer1_bit[9]) &&
1029 (tempbuf_short[10] == ddu_trailer1_bit[10]) && (tempbuf_short[11] == ddu_trailer1_bit[11]) &&
1030 (tempbuf_short[12] == ddu_trailer1_bit[12]) && (tempbuf_short[13] == ddu_trailer1_bit[13]) &&
1031 (tempbuf_short[14] == ddu_trailer1_bit[14]) && (tempbuf_short[15] == ddu_trailer1_bit[15]));
1035 ddu_h2_h1 = ddu_h2_check[2];
1037 sprintf(tempbuf_short,
"%04x%04x%04x%04x",
buf[
i + 3],
buf[
i + 2],
buf[
i + 1],
buf[
i]);
1040 ddu_h1_12_13 = (
buf[
i] >> 8);
1041 for (
int kk = 0;
kk < 36;
kk++) {
1042 if (((
buf[
i + 3] & 0xF000) == 0x5000) && (ddu_h1_12_13 == ddu_id[
kk]) && ddu_h2_h1) {
1043 ddu_h1_coll.push_back(word_numbering);
1044 ddu_h1_n_coll.push_back(ddu_id[
kk]);
1045 ddu_inst_l1a = ((
buf[
i + 2] & 0xFFFF) + ((
buf[
i + 3] & 0x00FF) << 16));
1046 ddu_l1a_coll.push_back(ddu_inst_l1a);
1047 ddu_inst_bxn = (
buf[
i + 1] & 0xFFF0) >> 4;
1048 ddu_bxn_coll.push_back(ddu_inst_bxn);
1050 "%6i %04x %04x %04x %04x%s%s%i %s%s %s %i %s %i",
1067 ddu_h1_check =
true;
1073 dcc_h1_id = (((
buf[
i + 1] << 12) & 0xF000) >> 4) + (
buf[
i] >> 8);
1074 for (
int dcci = 0; dcci < 16; dcci++) {
1075 if ((dcc_id[dcci] == dcc_h1_id) && (((
buf[
i + 3] & 0xF000) == 0x5000) && (!ddu_h1_check))) {
1077 "%6i %04x %04x %04x %04x%s%s%i %s",
1087 dcc_h1_check = word_numbering;
1095 if (((word_numbering - 1) == dcc_h1_check) && ((
buf[
i + 3] & 0xFF00) == 0xD900)) {
1097 "%6i %04x %04x %04x %04x%s%s",
1107 }
else if ((word_numbering == word_lines - 1) && (tempbuf_short[0] == dcc_trail1_bit[0])) {
1109 "%6i %04x %04x %04x %04x%s%s",
1119 }
else if ((word_numbering == word_lines) && (tempbuf_short[0] == dcc_trail2_bit[0])) {
1121 "%6i %04x %04x %04x %04x%s%s",
1134 else if (ddu_h2_check[1]) {
1135 ddu_inst_i = ddu_h1_n_coll.size();
1136 if (ddu_inst_i > 0) {
1137 ddu_inst_n = ddu_h1_n_coll[ddu_inst_i - 1];
1140 "%6i %04x %04x %04x %04x%s%s%i %s",
1150 ddu_h2_coll.push_back(word_numbering);
1156 else if ((ddu_h2_check[0] && dmb_h1_check[2]) || (ddu_h2_check[0] && ddu_tr1_check[2])) {
1157 ddu_inst_i = ddu_h1_n_coll.size();
1158 if (ddu_inst_i > 0) {
1159 ddu_inst_n = ddu_h1_n_coll[ddu_inst_i - 1];
1162 "%6i %04x %04x %04x %04x%s%s%i %s",
1172 ddu_h3_coll.push_back(word_numbering);
1179 else if (dmb_h1_check[1]) {
1182 dmb_inst_l1a = ((
buf[
i] & 0x0FFF) + ((
buf[
i + 1] & 0xFFF) << 12));
1183 dmb_l1a_coll.push_back(dmb_inst_l1a);
1184 if (dmb_h2_check[2]) {
1185 dmb_inst_crate = ((
buf[
i + 4 + 1] >> 4) & 0xFF);
1186 dmb_inst_slot = (
buf[
i + 4 + 1] & 0xF);
1187 dmb_crate_coll.push_back(dmb_inst_crate);
1188 dmb_slot_coll.push_back(dmb_inst_slot);
1191 "%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i %s %i",
1207 dmb_h1_coll.push_back(word_numbering);
1212 else if (dmb_h2_check[1]) {
1213 dmb_inst_crate = ((
buf[
i + 1] >> 4) & 0xFF);
1214 dmb_inst_slot = (
buf[
i + 1] & 0xF);
1215 dmb_h2_coll.push_back(word_numbering);
1216 if (dmb_h1_check[0])
1217 dmb_inst_l1a = ((
buf[
i - 4] & 0x0FFF) + ((
buf[
i - 4 + 1] & 0xFFF) << 12));
1219 "%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i %s %i",
1241 else if (ddu_tr1_check[1]) {
1242 ddu_inst_i = ddu_h1_n_coll.size();
1243 if (ddu_inst_i > 0) {
1244 ddu_inst_n = ddu_h1_n_coll[ddu_inst_i - 1];
1248 "%6i %04x %04x %04x %04x%s%s%i %s",
1258 ddu_t1_coll.push_back(word_numbering);
1264 else if (alct_h1_check[1]) {
1265 alct_start = word_numbering;
1266 alct_inst_l1a = (
buf[
i + 2] & 0x0FFF);
1267 alct_l1a_coll.push_back(alct_inst_l1a);
1269 "%6i %04x %04x %04x %04x%s%s %s%s %s %i",
1281 alct_h1_coll.push_back(word_numbering);
1286 else if ((alct_h1_check[0]) && (alct_h2_check[2])) {
1287 alct_inst_bxn = (
buf[
i] & 0x0FFF);
1288 alct_bxn_coll.push_back(alct_inst_bxn);
1290 "%6i %04x %04x %04x %04x%s%s %s%s%s %i",
1302 alct_h2_coll.push_back(word_numbering);
1308 else if (alct_tr1_check[1]) {
1309 alct_stop = word_numbering;
1310 if ((alct_start != 0) && (alct_stop != 0) && (alct_stop > alct_start)) {
1311 alct_inst_wcnt2 = 4 * (alct_stop - alct_start + 1);
1312 alct_wcnt2_coll.push_back(alct_inst_wcnt2);
1313 alct_wcnt2_id_coll.push_back(alct_start);
1315 alct_inst_wcnt1 = (
buf[
i + 3] & 0x7FF);
1316 alct_wcnt1_coll.push_back(alct_inst_wcnt1);
1318 "%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i",
1332 alct_t1_coll.push_back(word_numbering);
1335 alct_inst_wcnt2 = 0;
1341 else if ((ddu_h2_h1) && (tempbuf_short[0] == ddu_trailer3_bit[0])) {
1343 ddu_inst_i = ddu_h1_n_coll.size();
1344 if (ddu_inst_i > 0) {
1345 ddu_inst_n = ddu_h1_n_coll[ddu_inst_i - 1];
1349 "%6i %04x %04x %04x %04x%s%s%i %s",
1359 ddu_t3_coll.push_back(word_numbering);
1364 else if ((ddu_tr1_check[0]) && (tempbuf_short[0] != ddu_trailer3_bit[0])) {
1366 ddu_inst_i = ddu_h1_n_coll.size();
1367 if (ddu_inst_i > 0) {
1368 ddu_inst_n = ddu_h1_n_coll[ddu_inst_i - 1];
1372 "%6i %04x %04x %04x %04x%s%s%i %s",
1382 ddu_t2_coll.push_back(word_numbering);
1388 else if (dmb_tr1_check[1]) {
1390 "%6i %04x %04x %04x %04x%s%s %s",
1399 dmb_t1_coll.push_back(word_numbering);
1405 else if (dmb_tr2_check[1]) {
1407 "%6i %04x %04x %04x %04x%s%s %s",
1416 dmb_t2_coll.push_back(word_numbering);
1421 else if (tmb_h1_check[1]) {
1422 tmb_start = word_numbering;
1423 tmb_inst_l1a = (
buf[
i + 2] & 0x000F);
1424 tmb_l1a_coll.push_back(tmb_inst_l1a);
1426 "%6i %04x %04x %04x %04x%s%s %s%s%s %i",
1438 tmb_h1_coll.push_back(word_numbering);
1441 }
else if (tmb_tr1_check[1]) {
1442 tmb_stop = word_numbering;
1443 if ((tmb_start != 0) && (tmb_stop != 0) && (tmb_stop > tmb_start)) {
1444 tmb_inst_wcnt2 = 4 * (tmb_stop - tmb_start + 1);
1445 tmb_wcnt2_coll.push_back(tmb_inst_wcnt2);
1447 tmb_inst_wcnt1 = (
buf[
i + 3] & 0x7FF);
1448 tmb_wcnt1_coll.push_back(tmb_inst_wcnt1);
1450 "%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i",
1464 tmb_t1_coll.push_back(word_numbering);
1470 else if (cfeb_tr1_check[1]) {
1473 "%6i %04x %04x %04x %04x%s%s %s%s %s %i",
1485 cfeb_t1_coll.push_back(word_numbering);
1488 }
else if (cfeb_b_check[1]) {
1490 "%6i %04x %04x %04x %04x%s%s %s",
1505 else if (ddu_tr1_bad_check[1]) {
1506 ddu_inst_i = ddu_h1_n_coll.size();
1507 ddu_inst_n = ddu_h1_n_coll[ddu_inst_i - 1];
1509 "%6i %04x %04x %04x %04x%s%s%i %s %s",
1519 ddu_tr1_err_common);
1524 else if (extraction && (!ddu_h1_check) && (!dcc_check)) {
1526 sprintf(tempbuf,
"%6i %04x %04x %04x %04x", word_numbering,
buf[
i + 3],
buf[
i + 2],
buf[
i + 1],
buf[
i]);
1531 std::cout <<
"..................................................." << std::endl;
1536 else if ((!ddu_h1_check) && (!dcc_check)) {
1537 sprintf(tempbuf,
"%6i %04x %04x %04x %04x", word_numbering,
buf[
i + 3],
buf[
i + 2],
buf[
i + 1],
buf[
i]);
1542 ddu_h1_check =
false;
1546 std::cout <<
"********************************************************************************" << std::endl
1549 std::cout <<
"For complete output turn off VisualFEDShort in muonCSCDigis configuration file." << std::endl;
1550 std::cout <<
"********************************************************************************" << std::endl
1555 std::cout << ddu_h1_coll.size() <<
" " << ddu_common <<
" " << ddu_header1 <<
" " 1556 <<
"found" << std::endl;
1561 for (
unsigned int k = 0;
k < ddu_h1_coll.size(); ++
k) {
1568 <<
" " << ddu_h1_coll[
k] <<
" " << sign1 <<
" " << ddu_common <<
" " << ddu_h1_n_coll[
k] <<
" " 1569 << dmb_common_l1a <<
" " << ddu_l1a_coll[
k] <<
" " << alct_common_bxn <<
" " << ddu_bxn_coll[
k]
1574 std::cout <<
"||||||||||||||||||||" << std::endl;
1576 std::cout << ddu_h2_coll.size() <<
" " << ddu_common <<
" " << ddu_header2 <<
" " 1577 <<
"found" << std::endl;
1578 for (
unsigned int k = 0;
k < ddu_h2_coll.size(); ++
k)
1579 std::cout <<
"Line: " << ddu_h2_coll[
k] << std::endl;
1581 std::cout <<
"||||||||||||||||||||" << std::endl;
1583 std::cout << ddu_h3_coll.size() <<
" " << ddu_common <<
" " << ddu_header3 <<
" " 1584 <<
"found" << std::endl;
1585 for (
unsigned int k = 0;
k < ddu_h3_coll.size(); ++
k)
1586 std::cout <<
"Line: " << ddu_h3_coll[
k] << std::endl;
1588 std::cout <<
"||||||||||||||||||||" << std::endl;
1590 std::cout << ddu_t1_coll.size() <<
" " << ddu_common <<
" " << ddu_trail1 <<
" " 1591 <<
"found" << std::endl;
1592 for (
unsigned int k = 0;
k < ddu_t1_coll.size(); ++
k)
1593 std::cout <<
"Line: " << ddu_t1_coll[
k] << std::endl;
1595 std::cout <<
"||||||||||||||||||||" << std::endl;
1597 std::cout << ddu_t2_coll.size() <<
" " << ddu_common <<
" " << ddu_trail2 <<
" " 1598 <<
"found" << std::endl;
1599 for (
unsigned int k = 0;
k < ddu_t2_coll.size(); ++
k)
1600 std::cout <<
"Line: " << ddu_t2_coll[
k] << std::endl;
1602 std::cout <<
"||||||||||||||||||||" << std::endl;
1604 std::cout << ddu_t3_coll.size() <<
" " << ddu_common <<
" " << ddu_trail3 <<
" " 1605 <<
"found" << std::endl;
1606 for (
unsigned int k = 0;
k < ddu_t3_coll.size(); ++
k)
1607 std::cout <<
"Line: " << ddu_t3_coll[
k] << std::endl;
1609 std::cout <<
"||||||||||||||||||||" << std::endl;
1611 std::cout << dmb_h1_coll.size() <<
" " << dmb_common <<
" " << dmb_header1 <<
" " 1612 <<
"found" << std::endl;
1614 for (
unsigned int k = 0;
k < dmb_h1_coll.size(); ++
k) {
1621 <<
" " << dmb_h1_coll[
k] <<
" " << sign1 << dmb_common <<
" " << dmb_common_crate <<
" " 1622 << dmb_crate_coll[
k] <<
" " << dmb_common_slot <<
" " << dmb_slot_coll[
k] <<
" " << dmb_common_l1a <<
" " 1623 << dmb_l1a_coll[
k] << std::endl;
1626 std::cout <<
"||||||||||||||||||||" << std::endl;
1628 std::cout << dmb_h2_coll.size() <<
" " << dmb_common <<
" " << dmb_header2 <<
" " 1629 <<
"found" << std::endl;
1630 for (
unsigned int k = 0;
k < dmb_h2_coll.size(); ++
k)
1631 std::cout <<
"Line: " << dmb_h2_coll[
k] << std::endl;
1633 std::cout <<
"||||||||||||||||||||" << std::endl;
1635 std::cout << dmb_t1_coll.size() <<
" " << dmb_common <<
" " << dmb_tr1 <<
" " 1636 <<
"found" << std::endl;
1637 for (
unsigned int k = 0;
k < dmb_t1_coll.size(); ++
k)
1638 std::cout <<
"Line: " << dmb_t1_coll[
k] << std::endl;
1640 std::cout <<
"||||||||||||||||||||" << std::endl;
1642 std::cout << dmb_t2_coll.size() <<
" " << dmb_common <<
" " << dmb_tr2 <<
" " 1643 <<
"found" << std::endl;
1644 for (
unsigned int k = 0;
k < dmb_t2_coll.size(); ++
k)
1645 std::cout <<
"Line: " << dmb_t2_coll[
k] << std::endl;
1647 std::cout <<
"||||||||||||||||||||" << std::endl;
1649 std::cout << alct_h1_coll.size() <<
" " << alct_common <<
" " << alct_header1 <<
" " 1650 <<
"found" << std::endl;
1651 for (
unsigned int k = 0;
k < alct_h1_coll.size(); ++
k) {
1659 <<
" " << alct_h1_coll[
k] <<
" " << sign1 <<
" " << alct_common <<
" " << dmb_common_l1a <<
" " 1660 << alct_l1a_coll[
k] << std::endl;
1664 std::cout <<
"||||||||||||||||||||" << std::endl;
1666 std::cout << alct_h2_coll.size() <<
" " << alct_common <<
" " << alct_header2 <<
" " 1667 <<
"found" << std::endl;
1668 for (
unsigned int k = 0;
k < alct_h2_coll.size(); ++
k) {
1676 <<
" " << alct_h1_coll[
k] <<
" " << sign1 <<
" " << alct_common <<
" " << alct_common_bxn <<
" " 1677 << alct_bxn_coll[
k] << std::endl;
1681 std::cout <<
"||||||||||||||||||||" << std::endl;
1683 std::cout << alct_t1_coll.size() <<
" " << alct_common <<
" " << alct_tr1 <<
" " 1684 <<
"found" << std::endl;
1685 for (
unsigned int k = 0;
k < alct_t1_coll.size(); ++
k) {
1693 <<
" " << alct_t1_coll[
k] <<
" " << sign1 <<
" " << alct_common <<
" " << alct_common_wcnt1 <<
" " 1694 << alct_wcnt1_coll[
k] <<
" " << alct_common_wcnt2 <<
" ";
1695 if (!alct_wcnt2_coll.empty()) {
1696 std::cout << alct_wcnt2_coll[
k] << std::endl;
1698 std::cout <<
"Undefined (ALCT Header is not found) " << std::endl;
1703 std::cout <<
"||||||||||||||||||||" << std::endl;
1705 std::cout << tmb_h1_coll.size() <<
" " << tmb_common <<
" " << tmb_header1 <<
" " 1706 <<
"found" << std::endl;
1707 for (
unsigned int k = 0;
k < tmb_h1_coll.size(); ++
k) {
1715 <<
" " << tmb_h1_coll[
k] <<
" " << sign1 <<
" " << tmb_common <<
" " << dmb_common_l1a <<
" " 1716 << tmb_l1a_coll[
k] << std::endl;
1720 std::cout <<
"||||||||||||||||||||" << std::endl;
1722 std::cout << tmb_t1_coll.size() <<
" " << tmb_common <<
" " << tmb_tr1 <<
" " 1723 <<
"found" << std::endl;
1724 for (
unsigned int k = 0;
k < tmb_t1_coll.size(); ++
k) {
1732 <<
" " << tmb_t1_coll[
k] <<
" " << sign1 <<
" " << tmb_common <<
" " << alct_common_wcnt1 <<
" " 1733 << tmb_wcnt1_coll[
k] <<
" " << alct_common_wcnt2 <<
" " << tmb_wcnt2_coll[
k] << std::endl;
1737 std::cout <<
"||||||||||||||||||||" << std::endl;
1739 std::cout << cfeb_t1_coll.size() <<
" " << cfeb_common <<
" " << cfeb_tr1 <<
" " 1740 <<
"found" << std::endl;
1741 for (
unsigned int k = 0;
k < cfeb_t1_coll.size(); ++
k)
1742 std::cout <<
"Line: " << cfeb_t1_coll[
k] << std::endl;
1743 std::cout <<
"********************************************************************************" << std::endl;
std::map< CSCIdType, ExaminerStatusType > statusDetailed(void) const
void crcCFEB(bool enable)
bool SuppressZeroLCT
Suppress zeros LCTs.
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
edm::ESGetToken< CSCChamberMap, CSCChamberMapRcd > cscmapToken
static void setDebug(bool value)
void modeDDU(bool enable)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
CSCMonitorInterface * monitor
ExaminerMaskType getMask() const
size_t size() const
Lenght of the data buffer in bytes.
bool useRPCs_
option to unpack RPC data
void crcALCT(bool enable)
bool visualFEDInspect
Visualization of raw data.
static void setDebug(const bool value)
virtual void process(CSCDCCExaminer *examiner, CSCDCCEventData *dccData)=0
edm::ESGetToken< CSCCrateMap, CSCCrateMapRcd > crateToken
T const * product() const
static void setDebug(const bool value)
static void setErrorMask(unsigned int value)
void visual_raw(int hl, int id, int run, int event, bool fedshort, bool fDump, short unsigned int *buf) const
Visualization of raw data in FED-less events (Robert Harr and Alexander Sakharov) ...
~CSCDCCUnpacker() override
Destructor.
static void setDebug(bool value)
std::map< CSCIdType, ExaminerStatusType > payloadDetailed(void) const
const char * errName(int num) const
#define DEFINE_FWK_MODULE(type)
bool useCSCShowers_
option to unpack CSC shower data
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
void setComment(std::string const &value)
edm::EDGetTokenT< FEDRawDataCollection > i_token
Token for consumes interface & access to data.
CSCDetId detId(int vme, int dmb, int cfeb, int layer=0) const
unsigned int examinerMask
std::map< CSCIdType, ExaminerStatusType > errorsDetailed(void) const
bool useSelectiveUnpacking
bool useGEMs_
option to unpack GEM cluster data
void add(std::string const &label, ParameterSetDescription const &psetDescription)
int ddu(const CSCDetId &) const
ddu id for given DetId
int32_t check(const uint16_t *&buffer, int32_t length)
char data[epos_bytes_allocation]
ExaminerStatusType errors(void) const
CSCDCCUnpacker(const edm::ParameterSet &pset)
Constructor.
std::map< DDUIdType, ExaminerStatusType > errorsDetailedDDU(void) const
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
void setMask(ExaminerMaskType mask)
static void setDebug(const bool value)
static void setDebug(bool debugValue)
void produce(edm::Event &e, const edm::EventSetup &c) override
Produce digis out of raw data.
A container for a generic type of digis indexed by some index, implemented with a map<IndexType...