81 void visual_raw(
int hl,
int id,
int run,
int event,
bool fedshort,
bool fDump,
short unsigned int*
buf)
const;
118 crateToken = esConsumes<CSCCrateMap, CSCCrateMapRcd>();
119 cscmapToken = esConsumes<CSCChamberMap, CSCChamberMapRcd>();
152 if (instantiateDQM) {
156 produces<CSCWireDigiCollection>(
"MuonCSCWireDigi");
157 produces<CSCStripDigiCollection>(
"MuonCSCStripDigi");
158 produces<CSCComparatorDigiCollection>(
"MuonCSCComparatorDigi");
159 produces<CSCALCTDigiCollection>(
"MuonCSCALCTDigi");
160 produces<CSCCLCTDigiCollection>(
"MuonCSCCLCTDigi");
161 produces<CSCCorrelatedLCTDigiCollection>(
"MuonCSCCorrelatedLCTDigi");
163 if (unpackStatusDigis) {
164 produces<CSCCFEBStatusDigiCollection>(
"MuonCSCCFEBStatusDigi");
165 produces<CSCTMBStatusDigiCollection>(
"MuonCSCTMBStatusDigi");
166 produces<CSCDMBStatusDigiCollection>(
"MuonCSCDMBStatusDigi");
167 produces<CSCALCTStatusDigiCollection>(
"MuonCSCALCTStatusDigi");
168 produces<CSCDDUStatusDigiCollection>(
"MuonCSCDDUStatusDigi");
169 produces<CSCDCCStatusDigiCollection>(
"MuonCSCDCCStatusDigi");
172 if (useFormatStatus) {
173 produces<CSCDCCFormatStatusDigiCollection>(
"MuonCSCDCCFormatStatusDigi");
177 produces<CSCRPCDigiCollection>(
"MuonCSCRPCDigi");
181 produces<GEMPadDigiClusterCollection>(
"MuonGEMPadDigiCluster");
184 if (useCSCShowers_) {
185 produces<CSCShowerDigiCollection>(
"MuonCSCShowerDigi");
207 ->setComment(
"# Define input to the unpacker");
208 desc.
add<
bool>(
"UseExaminer",
true)
209 ->setComment(
"# Use CSC examiner to check for corrupt or semi-corrupt data & avoid unpacker crashes");
210 desc.
add<
unsigned int>(
"ExaminerMask", 535557110)->setComment(
"# This mask is needed by the examiner");
211 desc.
add<
bool>(
"UseSelectiveUnpacking",
true)
212 ->setComment(
"# Use Examiner to unpack good chambers and skip only bad ones");
213 desc.
add<
unsigned int>(
"ErrorMask", 0)->setComment(
"# This mask simply reduces error reporting");
214 desc.
add<
bool>(
"UnpackStatusDigis",
false)->setComment(
"# Unpack general status digis?");
215 desc.
add<
bool>(
"UseFormatStatus",
true)->setComment(
"# Unpack FormatStatus digi?");
216 desc.
add<
bool>(
"useRPCs",
false)->setComment(
"Unpack RPC data");
217 desc.
add<
bool>(
"useGEMs",
false)->setComment(
"Unpack GEM trigger data");
218 desc.
add<
bool>(
"useCSCShowers",
false)->setComment(
"Unpack CSCShower trigger data");
219 desc.
addUntracked<
bool>(
"Debug",
false)->setComment(
"# Turn on lots of output");
222 desc.
addUntracked<
bool>(
"VisualFEDInspect",
false)->setComment(
"# Visualization of raw data in corrupted events");
223 desc.
addUntracked<
bool>(
"VisualFEDShort",
false)->setComment(
"# Visualization of raw data in corrupted events");
227 ->setComment(
"# Disable FED/DDU to chamber mapping inconsistency check");
228 desc.
addUntracked<
bool>(
"B904Setup",
false)->setComment(
"# Make the unpacker aware of B904 test setup configuration");
229 descriptions.
add(
"muonCSCDCCUnpacker", desc);
230 descriptions.
setComment(
" This is the generic cfi file for CSC unpacking");
253 auto wireProduct = std::make_unique<CSCWireDigiCollection>();
254 auto stripProduct = std::make_unique<CSCStripDigiCollection>();
255 auto alctProduct = std::make_unique<CSCALCTDigiCollection>();
256 auto clctProduct = std::make_unique<CSCCLCTDigiCollection>();
257 auto comparatorProduct = std::make_unique<CSCComparatorDigiCollection>();
258 auto rpcProduct = std::make_unique<CSCRPCDigiCollection>();
259 auto corrlctProduct = std::make_unique<CSCCorrelatedLCTDigiCollection>();
260 auto cfebStatusProduct = std::make_unique<CSCCFEBStatusDigiCollection>();
261 auto dmbStatusProduct = std::make_unique<CSCDMBStatusDigiCollection>();
262 auto tmbStatusProduct = std::make_unique<CSCTMBStatusDigiCollection>();
263 auto dduStatusProduct = std::make_unique<CSCDDUStatusDigiCollection>();
264 auto dccStatusProduct = std::make_unique<CSCDCCStatusDigiCollection>();
265 auto alctStatusProduct = std::make_unique<CSCALCTStatusDigiCollection>();
267 auto formatStatusProduct = std::make_unique<CSCDCCFormatStatusDigiCollection>();
269 auto gemProduct = std::make_unique<GEMPadDigiClusterCollection>();
271 auto showerProduct = std::make_unique<CSCShowerDigiCollection>();
276 unsigned long dccBinCheckMask = 0x06080016;
279 const unsigned postLS1_map[] = {841, 842, 843, 844, 845, 846, 847, 848, 849, 831, 832, 833,
280 834, 835, 836, 837, 838, 839, 861, 862, 863, 864, 865, 866,
281 867, 868, 869, 851, 852, 853, 854, 855, 856, 857, 858, 859};
284 std::vector<unsigned int> cscFEDids;
288 cscFEDids.push_back(
id);
293 cscFEDids.push_back(
id);
296 for (
unsigned int i = 0;
i < cscFEDids.size();
i++)
298 unsigned int id = cscFEDids[
i];
305 const FEDRawData& fedData = rawdata->FEDData(
id);
306 unsigned long length = fedData.
size();
326 if (examiner !=
nullptr)
330 const short unsigned int*
data = (
short unsigned int*)fedData.
data();
332 LogTrace(
"badData") <<
"Length: " << length / 2;
343 int res = examiner->
check(data,
long(fedData.
size() / 2));
362 formatStatusProduct->insertDigi(
CSCDetId(1, 1, 1, 1, 1),
376 short unsigned*
buf = (
short unsigned int*)fedData.
data();
386 ptrExaminer =
nullptr;
388 std::vector<CSCDDUEventData> fed_Data;
389 std::vector<CSCDDUEventData>* ptr_fedData = &fed_Data;
397 fed_Data.push_back(single_dduData);
413 fed_Data = dccData.dduData();
417 short unsigned* bufForDcc = (
short unsigned int*)fedData.
data();
422 dccStatusProduct->insertDigi(layer,
424 dccData.dccTrailer().data(),
426 bufForDcc[length / 2 - 4]));
430 const std::vector<CSCDDUEventData>& dduData = *ptr_fedData;
432 for (
unsigned int iDDU = 0; iDDU < dduData.size(); ++iDDU)
436 if (dduData[iDDU].trailer().errorstat() &
errorMask) {
437 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi")
438 <<
"FED ID" <<
id <<
" DDU# " << iDDU <<
" has serious error - no digis unpacked! " << std::hex
439 << dduData[iDDU].trailer().errorstat();
444 dduStatusProduct->insertDigi(
447 dduData[iDDU].trailer().
data(),
449 dduData[iDDU].trailer0()));
452 const std::vector<CSCEventData>& cscData = dduData[iDDU].cscData();
456 for (
unsigned int iCSC = 0; iCSC < cscData.size(); ++iCSC)
459 int vmecrate = cscData[iCSC].dmbHeader()->crateID();
460 int dmb = cscData[iCSC].dmbHeader()->dmbID();
466 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
"crate = " << vmecrate <<
"; dmb = " << dmb;
468 if ((vmecrate >= 1) && (vmecrate <= 60) && (dmb >= 1) && (dmb <= 10) && (dmb != 6)) {
469 layer = pcrate->
detId(vmecrate, dmb, icfeb, ilayer);
471 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
" detID input out of range!!! ";
472 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
" skipping chamber vme= " << vmecrate <<
" dmb= " << dmb;
479 unsigned int dduid = cscmapping->
ddu(layer);
480 if ((dduid >= 1) && (dduid <= 36)) {
481 dduid = postLS1_map[dduid - 1];
487 LogTrace(
"CSCDDUUnpacker|CSCRawToDigi") <<
" CSC->FED/DDU mapping inconsistency!!! ";
488 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi")
489 <<
"readout FED/DDU ID=" <<
id <<
" expected ID=" << dduid <<
", skipping chamber " << layer
490 <<
" vme= " << vmecrate <<
" dmb= " << dmb;
496 int nalct = cscData[iCSC].dmbHeader()->nalct();
497 bool goodALCT =
false;
499 if (nalct && cscData[iCSC].alctHeader()) {
500 if (cscData[iCSC].alctHeader()->
check()) {
503 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
"not storing ALCT digis; alct is bad or not present";
507 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
"nALCT==0 !!!";
512 std::vector<CSCALCTDigi> alctDigis = cscData[iCSC].alctHeader()->ALCTDigis();
514 std::vector<CSCALCTDigi> alctDigis_0;
515 for (
int unsigned i = 0;
i < alctDigis.size(); ++
i) {
517 alctDigis_0.push_back(alctDigis[
i]);
519 alctProduct->move(std::make_pair(alctDigis_0.begin(), alctDigis_0.end()), layer);
521 alctProduct->move(std::make_pair(alctDigis.begin(), alctDigis.end()), layer);
525 int nclct = cscData[iCSC].dmbHeader()->nclct();
526 bool goodTMB =
false;
528 if (nclct && cscData[iCSC].tmbData()) {
529 if (cscData[iCSC].tmbHeader()->
check()) {
530 if (cscData[iCSC].comparatorData()->
check())
533 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
"one of TMB checks failed! not storing TMB digis ";
537 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
"nCLCT==0 !!!";
542 std::vector<CSCCorrelatedLCTDigi> correlatedlctDigis =
543 cscData[iCSC].tmbHeader()->CorrelatedLCTDigis(layer.
rawId());
545 std::vector<CSCCorrelatedLCTDigi> correlatedlctDigis_0;
546 for (
int unsigned i = 0;
i < correlatedlctDigis.size(); ++
i) {
547 if (correlatedlctDigis[
i].
isValid())
548 correlatedlctDigis_0.push_back(correlatedlctDigis[
i]);
550 corrlctProduct->move(std::make_pair(correlatedlctDigis_0.begin(), correlatedlctDigis_0.end()), layer);
552 corrlctProduct->move(std::make_pair(correlatedlctDigis.begin(), correlatedlctDigis.end()), layer);
554 std::vector<CSCCLCTDigi> clctDigis = cscData[iCSC].tmbHeader()->CLCTDigis(layer.
rawId());
556 std::vector<CSCCLCTDigi> clctDigis_0;
557 for (
int unsigned i = 0;
i < clctDigis.size(); ++
i) {
559 clctDigis_0.push_back(clctDigis[
i]);
561 clctProduct->move(std::make_pair(clctDigis_0.begin(), clctDigis_0.end()), layer);
563 clctProduct->move(std::make_pair(clctDigis.begin(), clctDigis.end()), layer);
569 std::vector<CSCShowerDigi> showerDigis;
570 showerDigis.push_back(showerDigi);
571 showerProduct->move(std::make_pair(showerDigis.begin(), showerDigis.end()), layer);
576 if (cscData[iCSC].tmbData()->checkSize()) {
577 if (
useRPCs_ && cscData[iCSC].tmbData()->hasRPC()) {
578 std::vector<CSCRPCDigi> rpcDigis = cscData[iCSC].tmbData()->rpcData()->digis();
579 rpcProduct->move(std::make_pair(rpcDigis.begin(), rpcDigis.end()), layer);
583 if (
useGEMs_ && cscData[iCSC].tmbData()->hasGEM()) {
584 for (
int unsigned igem = 0; igem < (
int unsigned)(cscData[iCSC].tmbData()->gemData()->numGEMs());
586 int gem_chamber = layer.
chamber();
587 int gem_region = (layer.
endcap() == 1) ? 1 : -1;
588 for (
unsigned ieta = 0; ieta < 8; ieta++) {
590 GEMDetId gemid(gem_region, layer.
ring(), layer.
station(), igem + 1, gem_chamber, 8 - ieta);
591 std::vector<GEMPadDigiCluster> gemDigis =
592 cscData[iCSC].tmbData()->gemData()->etaDigis(igem, ieta);
593 if (!gemDigis.empty())
594 gemProduct->move(std::make_pair(gemDigis.begin(), gemDigis.end()), gemid);
599 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
" TMBData check size failed!";
606 if (cscData[iCSC].cfebData(icfeb) !=
nullptr)
607 cfebStatusProduct->insertDigi(layer, cscData[iCSC].cfebData(icfeb)->statusDigi());
610 dmbStatusProduct->insertDigi(
613 tmbStatusProduct->insertDigi(
617 alctStatusProduct->insertDigi(
627 layer = pcrate->
detId(vmecrate, dmb, 0, ilayer);
629 std::vector<CSCWireDigi> wireDigis = cscData[iCSC].wireDigis(ilayer);
630 wireProduct->move(std::make_pair(wireDigis.begin(), wireDigis.end()), layer);
634 layer = pcrate->
detId(vmecrate, dmb, icfeb, ilayer);
635 if (cscData[iCSC].cfebData(icfeb) && cscData[iCSC].cfebData(icfeb)->
check()) {
636 std::vector<CSCStripDigi> stripDigis;
637 cscData[iCSC].cfebData(icfeb)->digis(layer.
rawId(), stripDigis);
638 stripProduct->move(std::make_pair(stripDigis.begin(), stripDigis.end()), layer);
642 if (goodTMB && (cscData[iCSC].tmbHeader() !=
nullptr)) {
643 int nCFEBs = cscData[iCSC].tmbHeader()->NCFEBs();
644 for (icfeb = 0; icfeb < nCFEBs; ++icfeb) {
645 layer = pcrate->
detId(vmecrate, dmb, icfeb, ilayer);
646 std::vector<CSCComparatorDigi> comparatorDigis =
647 cscData[iCSC].comparatorData()->comparatorDigis(layer.
rawId(), icfeb);
650 layer = pcrate->
detId(vmecrate, dmb, 0, ilayer);
651 comparatorProduct->move(std::make_pair(comparatorDigis.begin(), comparatorDigis.end()), layer);
659 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
"ERROR! Examiner rejected FED #" <<
id;
666 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi")
667 <<
" Examiner errors:0x" << std::hex << examiner->
errors() <<
" & 0x" <<
examinerMask <<
" = "
675 if (examiner !=
nullptr)
684 e.
put(
std::move(comparatorProduct),
"MuonCSCComparatorDigi");
685 e.
put(
std::move(corrlctProduct),
"MuonCSCCorrelatedLCTDigi");
688 e.
put(
std::move(formatStatusProduct),
"MuonCSCDCCFormatStatusDigi");
691 e.
put(
std::move(cfebStatusProduct),
"MuonCSCCFEBStatusDigi");
692 e.
put(
std::move(dmbStatusProduct),
"MuonCSCDMBStatusDigi");
693 e.
put(
std::move(tmbStatusProduct),
"MuonCSCTMBStatusDigi");
694 e.
put(
std::move(dduStatusProduct),
"MuonCSCDDUStatusDigi");
695 e.
put(
std::move(dccStatusProduct),
"MuonCSCDCCStatusDigi");
696 e.
put(
std::move(alctStatusProduct),
"MuonCSCALCTStatusDigi");
709 LogTrace(
"CSCDCCUnpacker|CSCRawToDigi") <<
"[CSCDCCUnpacker]: " <<
numOfEvents <<
" events processed ";
715 int hl,
int id,
int run,
int event,
bool fedshort,
bool fDump,
short unsigned int*
buf)
const {
716 std::cout << std::endl << std::endl << std::endl;
717 std::cout <<
"Run: " << run <<
" Event: " <<
event << std::endl;
721 <<
"(scroll down to see summary)" << std::endl;
723 std::cout <<
"Problem seems in FED-" <<
id <<
" "
724 <<
"(scroll down to see summary)" << std::endl;
725 std::cout <<
"********************************************************************************" << std::endl;
726 std::cout << hl <<
" words of data:" << std::endl;
730 std::vector<int> dcc_id;
733 for (
int i = 750;
i < 758;
i++)
736 for (
int i = 830;
i < 838;
i++)
739 char dcc_common[] =
"DCC-";
743 std::vector<int> ddu_id;
744 int ddu_h1_12_13 = 0;
745 for (
int i = 1;
i < 37;
i++)
748 char ddu_common[] =
"DDU-";
749 char ddu_header1[] =
"Header 1";
750 char ddu_header2[] =
"Header 2";
751 char ddu_header3[] =
"Header 3";
752 char ddu_trail1[] =
"Trailer 1", ddu_trail2[] =
"Trailer 2", ddu_trail3[] =
"Trailer 3";
754 char ddu_trailer1_bit[] = {
'8',
'0',
'0',
'0',
'f',
'f',
'f',
'f',
'8',
'0',
'0',
'0',
'8',
'0',
'0',
'0'};
755 char ddu_trailer3_bit[] = {
'a'};
757 char ddu_tr1_err_common[] =
"Incomplet";
761 char dmb_common[] =
"DMB", dmb_header1[] =
"Header 1", dmb_header2[] =
"Header 2";
762 char dmb_common_crate[] =
"crate:", dmb_common_slot[] =
"slot:";
763 char dmb_common_l1a[] =
"L1A:";
764 char dmb_header1_bit[] = {
'9',
'9',
'9',
'9'};
765 char dmb_header2_bit[] = {
'a',
'a',
'a',
'a'};
766 char dmb_tr1[] =
"Trailer 1", dmb_tr2[] =
"Trailer 2";
767 char dmb_tr1_bit[] = {
'f',
'f',
'f',
'f'}, dmb_tr2_bit[] = {
'e',
'e',
'e',
'e'};
772 char alct_common[] =
"ALCT", alct_header1[] =
"Header 1", alct_header2[] =
"Header 2";
773 char alct_common_bxn[] =
"BXN:";
774 char alct_common_wcnt2[] =
"| Actual word count:";
775 char alct_common_wcnt1[] =
"Expected word count:";
776 char alct_header1_bit[] = {
'd',
'd',
'd',
'd',
'b',
'0',
'a'};
777 char alct_header2_bit[] = {
'0',
'0',
'0',
'0'};
778 char alct_tr1[] =
"Trailer 1";
783 char tmb_common[] =
"TMB", tmb_header1[] =
"Header", tmb_tr1[] =
"Trailer";
784 char tmb_header1_bit[] = {
'd',
'd',
'd',
'd',
'b',
'0',
'c'};
785 char tmb_tr1_bit[] = {
'd',
'd',
'd',
'd',
'e',
'0',
'f'};
790 char cfeb_common[] =
"CFEB", cfeb_tr1[] =
"Trailer", cfeb_b[] =
"B-word";
791 char cfeb_common_sample[] =
"sample:";
798 int word_lines = hl / 4;
801 char tempbuf_short[17];
802 char sign1[] =
" --->| ";
805 int word_numbering = 0;
806 int ddu_inst_i = 0, ddu_inst_n = 0, ddu_inst_l1a = 0;
807 int ddu_inst_bxn = 0;
808 int dmb_inst_crate = 0, dmb_inst_slot = 0, dmb_inst_l1a = 0;
810 int alct_inst_l1a = 0;
811 int alct_inst_bxn = 0;
812 int alct_inst_wcnt1 = 0;
813 int alct_inst_wcnt2 = 0;
816 int tmb_inst_l1a = 0;
817 int tmb_inst_wcnt1 = 0;
818 int tmb_inst_wcnt2 = 0;
821 int dcc_h1_check = 0;
824 int ddu_h2_found = 0;
829 bool dcc_check =
false;
830 bool ddu_h2_check[sz1] = {
false};
831 bool ddu_h1_check =
false;
832 bool dmb_h1_check[sz1] = {
false};
833 bool dmb_h2_check[sz1] = {
false};
834 bool ddu_h2_h1 =
false;
835 bool ddu_tr1_check[sz1] = {
false};
836 bool alct_h1_check[sz1] = {
false};
837 bool alct_h2_check[sz1] = {
false};
838 bool alct_tr1_check[sz1] = {
false};
839 bool dmb_tr1_check[sz1] = {
false};
840 bool dmb_tr2_check[sz1] = {
false};
841 bool tmb_h1_check[sz1] = {
false};
842 bool tmb_tr1_check[sz1] = {
false};
843 bool cfeb_tr1_check[sz1] = {
false};
844 bool cfeb_b_check[sz1] = {
false};
845 bool ddu_tr1_bad_check[sz1] = {
false};
846 bool extraction = fedshort;
850 std::vector<int> ddu_h1_coll;
851 std::vector<int> ddu_h1_n_coll;
852 std::vector<int> ddu_h2_coll;
853 std::vector<int> ddu_h3_coll;
854 std::vector<int> ddu_t1_coll;
855 std::vector<int> ddu_t2_coll;
856 std::vector<int> ddu_t3_coll;
857 std::vector<int> ddu_l1a_coll;
858 std::vector<int> ddu_bxn_coll;
860 std::vector<int> dmb_h1_coll;
861 std::vector<int> dmb_h2_coll;
862 std::vector<int> dmb_t1_coll;
863 std::vector<int> dmb_t2_coll;
864 std::vector<int> dmb_crate_coll;
865 std::vector<int> dmb_slot_coll;
866 std::vector<int> dmb_l1a_coll;
868 std::vector<int> alct_h1_coll;
869 std::vector<int> alct_h2_coll;
870 std::vector<int> alct_t1_coll;
871 std::vector<int> alct_l1a_coll;
872 std::vector<int> alct_bxn_coll;
873 std::vector<int> alct_wcnt1_coll;
874 std::vector<int> alct_wcnt2_coll;
875 std::vector<int> alct_wcnt2_id_coll;
877 std::vector<int> tmb_h1_coll;
878 std::vector<int> tmb_t1_coll;
879 std::vector<int> tmb_l1a_coll;
880 std::vector<int> tmb_wcnt1_coll;
881 std::vector<int> tmb_wcnt2_coll;
883 std::vector<int> cfeb_t1_coll;
888 char dcc_header1[] =
"DCC Header 1";
889 char dcc_header2[] =
"DCC Header 2";
890 char dcc_trail1[] =
"DCC Trailer 1", dcc_trail1_bit[] = {
'e'};
891 char dcc_trail2[] =
"DCC Trailer 2", dcc_trail2_bit[] = {
'a'};
894 for (
int i = 0;
i < hl;
i++) {
896 for (
int j = -1;
j < 4;
j++) {
897 sprintf(tempbuf_short,
899 buf[
i + 4 * (
j - 1) + 3],
900 buf[
i + 4 * (
j - 1) + 2],
901 buf[
i + 4 * (
j - 1) + 1],
902 buf[
i + 4 * (
j - 1)]);
908 ddu_h2_check[
j] = ((buf[
i + 4 * (
j - 1) + 1] == 0x8000) && (buf[
i + 4 * (
j - 1) + 2] == 0x0001) &&
909 (buf[
i + 4 * (
j - 1) + 3] == 0x8000));
911 ddu_tr1_check[
j] = ((tempbuf_short[0] == ddu_trailer1_bit[0]) && (tempbuf_short[1] == ddu_trailer1_bit[1]) &&
912 (tempbuf_short[2] == ddu_trailer1_bit[2]) && (tempbuf_short[3] == ddu_trailer1_bit[3]) &&
913 (tempbuf_short[4] == ddu_trailer1_bit[4]) && (tempbuf_short[5] == ddu_trailer1_bit[5]) &&
914 (tempbuf_short[6] == ddu_trailer1_bit[6]) && (tempbuf_short[7] == ddu_trailer1_bit[7]) &&
915 (tempbuf_short[8] == ddu_trailer1_bit[8]) && (tempbuf_short[9] == ddu_trailer1_bit[9]) &&
916 (tempbuf_short[10] == ddu_trailer1_bit[10]) && (tempbuf_short[11] == ddu_trailer1_bit[11]) &&
917 (tempbuf_short[12] == ddu_trailer1_bit[12]) && (tempbuf_short[13] == ddu_trailer1_bit[13]) &&
918 (tempbuf_short[14] == ddu_trailer1_bit[14]) && (tempbuf_short[15] == ddu_trailer1_bit[15]));
920 dmb_h1_check[
j] = ((tempbuf_short[0] == dmb_header1_bit[0]) && (tempbuf_short[4] == dmb_header1_bit[1]) &&
921 (tempbuf_short[8] == dmb_header1_bit[2]) && (tempbuf_short[12] == dmb_header1_bit[3]));
923 dmb_h2_check[
j] = ((tempbuf_short[0] == dmb_header2_bit[0]) && (tempbuf_short[4] == dmb_header2_bit[1]) &&
924 (tempbuf_short[8] == dmb_header2_bit[2]) && (tempbuf_short[12] == dmb_header2_bit[3]));
925 alct_h1_check[
j] = ((tempbuf_short[0] == alct_header1_bit[0]) && (tempbuf_short[4] == alct_header1_bit[1]) &&
926 (tempbuf_short[8] == alct_header1_bit[2]) && (tempbuf_short[12] == alct_header1_bit[3]) &&
927 (tempbuf_short[13] == alct_header1_bit[4]) && (tempbuf_short[14] == alct_header1_bit[5]) &&
928 (tempbuf_short[15] == alct_header1_bit[6]));
929 alct_h2_check[
j] = (((tempbuf_short[0] == alct_header2_bit[0]) && (tempbuf_short[1] == alct_header2_bit[1]) &&
930 (tempbuf_short[2] == alct_header2_bit[2]) && (tempbuf_short[3] == alct_header2_bit[3])) ||
931 ((tempbuf_short[4] == alct_header2_bit[0]) && (tempbuf_short[5] == alct_header2_bit[1]) &&
932 (tempbuf_short[6] == alct_header2_bit[2]) && (tempbuf_short[7] == alct_header2_bit[3])) ||
933 ((tempbuf_short[8] == alct_header2_bit[0]) && (tempbuf_short[9] == alct_header2_bit[1]) &&
934 (tempbuf_short[10] == alct_header2_bit[2]) && (tempbuf_short[11] == alct_header2_bit[3])) ||
935 ((tempbuf_short[12] == alct_header2_bit[0]) && (tempbuf_short[13] == alct_header2_bit[1]) &&
936 (tempbuf_short[14] == alct_header2_bit[2]) && (tempbuf_short[15] == alct_header2_bit[3]))
941 (((buf[
i + 4 * (
j - 1)] & 0xFFFF) == 0xDE0D) && ((buf[
i + 4 * (
j - 1) + 1] & 0xF800) == 0xD000) &&
942 ((buf[
i + 4 * (
j - 1) + 2] & 0xF800) == 0xD000) && ((buf[
i + 4 * (
j - 1) + 3] & 0xF000) == 0xD000));
944 dmb_tr1_check[
j] = ((tempbuf_short[0] == dmb_tr1_bit[0]) && (tempbuf_short[4] == dmb_tr1_bit[1]) &&
945 (tempbuf_short[8] == dmb_tr1_bit[2]) && (tempbuf_short[12] == dmb_tr1_bit[3]));
946 dmb_tr2_check[
j] = ((tempbuf_short[0] == dmb_tr2_bit[0]) && (tempbuf_short[4] == dmb_tr2_bit[1]) &&
947 (tempbuf_short[8] == dmb_tr2_bit[2]) && (tempbuf_short[12] == dmb_tr2_bit[3]));
949 tmb_h1_check[
j] = ((tempbuf_short[0] == tmb_header1_bit[0]) && (tempbuf_short[4] == tmb_header1_bit[1]) &&
950 (tempbuf_short[8] == tmb_header1_bit[2]) && (tempbuf_short[12] == tmb_header1_bit[3]) &&
951 (tempbuf_short[13] == tmb_header1_bit[4]) && (tempbuf_short[14] == tmb_header1_bit[5]) &&
952 (tempbuf_short[15] == tmb_header1_bit[6]));
953 tmb_tr1_check[
j] = ((tempbuf_short[0] == tmb_tr1_bit[0]) && (tempbuf_short[4] == tmb_tr1_bit[1]) &&
954 (tempbuf_short[8] == tmb_tr1_bit[2]) && (tempbuf_short[12] == tmb_tr1_bit[3]) &&
955 (tempbuf_short[13] == tmb_tr1_bit[4]) && (tempbuf_short[14] == tmb_tr1_bit[5]) &&
956 (tempbuf_short[15] == tmb_tr1_bit[6]));
959 (((buf[
i + 4 * (
j - 1) + 1] & 0xF000) == 0x7000) && ((buf[
i + 4 * (
j - 1) + 2] & 0xF000) == 0x7000) &&
960 ((buf[
i + 4 * (
j - 1) + 1] != 0x7FFF) || (buf[
i + 4 * (
j - 1) + 2] != 0x7FFF)) &&
961 ((buf[
i + 4 * (
j - 1) + 3] == 0x7FFF) || ((buf[
i + 4 * (
j - 1) + 3] & buf[
i + 4 * (
j - 1)]) == 0x0 &&
962 (buf[
i + 4 * (
j - 1) + 3] + buf[
i + 4 * (
j - 1)] == 0x7FFF))));
964 (((buf[
i + 4 * (
j - 1) + 3] & 0xF000) == 0xB000) && ((buf[
i + 4 * (
j - 1) + 2] & 0xF000) == 0xB000) &&
965 ((buf[
i + 4 * (
j - 1) + 1] & 0xF000) == 0xB000) && ((buf[
i + 4 * (
j - 1)] = 3 & 0xF000) == 0xB000));
967 ddu_tr1_bad_check[
j] =
968 ((tempbuf_short[0] != ddu_trailer1_bit[0]) &&
971 (tempbuf_short[4] != ddu_trailer1_bit[4]) &&
974 (tempbuf_short[8] == ddu_trailer1_bit[8]) && (tempbuf_short[9] == ddu_trailer1_bit[9]) &&
975 (tempbuf_short[10] == ddu_trailer1_bit[10]) && (tempbuf_short[11] == ddu_trailer1_bit[11]) &&
976 (tempbuf_short[12] == ddu_trailer1_bit[12]) && (tempbuf_short[13] == ddu_trailer1_bit[13]) &&
977 (tempbuf_short[14] == ddu_trailer1_bit[14]) && (tempbuf_short[15] == ddu_trailer1_bit[15]));
981 ddu_h2_h1 = ddu_h2_check[2];
983 sprintf(tempbuf_short,
"%04x%04x%04x%04x", buf[
i + 3], buf[
i + 2], buf[
i + 1], buf[
i]);
986 ddu_h1_12_13 = (buf[
i] >> 8);
987 for (
int kk = 0;
kk < 36;
kk++) {
988 if (((buf[i + 3] & 0xF000) == 0x5000) && (ddu_h1_12_13 == ddu_id[
kk]) && ddu_h2_h1) {
989 ddu_h1_coll.push_back(word_numbering);
990 ddu_h1_n_coll.push_back(ddu_id[
kk]);
991 ddu_inst_l1a = ((buf[i + 2] & 0xFFFF) + ((buf[i + 3] & 0x00FF) << 16));
992 ddu_l1a_coll.push_back(ddu_inst_l1a);
993 ddu_inst_bxn = (buf[i + 1] & 0xFFF0) >> 4;
994 ddu_bxn_coll.push_back(ddu_inst_bxn);
996 "%6i %04x %04x %04x %04x%s%s%i %s%s %s %i %s %i",
1013 ddu_h1_check =
true;
1019 dcc_h1_id = (((buf[i + 1] << 12) & 0xF000) >> 4) + (buf[i] >> 8);
1020 for (
int dcci = 0; dcci < 16; dcci++) {
1021 if ((dcc_id[dcci] == dcc_h1_id) && (((buf[i + 3] & 0xF000) == 0x5000) && (!ddu_h1_check))) {
1023 "%6i %04x %04x %04x %04x%s%s%i %s",
1033 dcc_h1_check = word_numbering;
1041 if (((word_numbering - 1) == dcc_h1_check) && ((buf[i + 3] & 0xFF00) == 0xD900)) {
1043 "%6i %04x %04x %04x %04x%s%s",
1053 }
else if ((word_numbering == word_lines - 1) && (tempbuf_short[0] == dcc_trail1_bit[0])) {
1055 "%6i %04x %04x %04x %04x%s%s",
1065 }
else if ((word_numbering == word_lines) && (tempbuf_short[0] == dcc_trail2_bit[0])) {
1067 "%6i %04x %04x %04x %04x%s%s",
1080 else if (ddu_h2_check[1]) {
1081 ddu_inst_i = ddu_h1_n_coll.size();
1082 if (ddu_inst_i > 0) {
1083 ddu_inst_n = ddu_h1_n_coll[ddu_inst_i - 1];
1086 "%6i %04x %04x %04x %04x%s%s%i %s",
1096 ddu_h2_coll.push_back(word_numbering);
1103 else if ((ddu_h2_check[0] && dmb_h1_check[2]) || (ddu_h2_check[0] && ddu_tr1_check[2])) {
1104 ddu_inst_i = ddu_h1_n_coll.size();
1105 if (ddu_inst_i > 0) {
1106 ddu_inst_n = ddu_h1_n_coll[ddu_inst_i - 1];
1109 "%6i %04x %04x %04x %04x%s%s%i %s",
1119 ddu_h3_coll.push_back(word_numbering);
1127 else if (dmb_h1_check[1]) {
1130 dmb_inst_l1a = ((buf[
i] & 0x0FFF) + ((buf[i + 1] & 0xFFF) << 12));
1131 dmb_l1a_coll.push_back(dmb_inst_l1a);
1132 if (dmb_h2_check[2]) {
1133 dmb_inst_crate = ((buf[i + 4 + 1] >> 4) & 0xFF);
1134 dmb_inst_slot = (buf[i + 4 + 1] & 0xF);
1135 dmb_crate_coll.push_back(dmb_inst_crate);
1136 dmb_slot_coll.push_back(dmb_inst_slot);
1139 "%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i %s %i",
1155 dmb_h1_coll.push_back(word_numbering);
1161 else if (dmb_h2_check[1]) {
1162 dmb_inst_crate = ((buf[i + 1] >> 4) & 0xFF);
1163 dmb_inst_slot = (buf[i + 1] & 0xF);
1164 dmb_h2_coll.push_back(word_numbering);
1165 if (dmb_h1_check[0])
1166 dmb_inst_l1a = ((buf[i - 4] & 0x0FFF) + ((buf[i - 4 + 1] & 0xFFF) << 12));
1168 "%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i %s %i",
1191 else if (ddu_tr1_check[1]) {
1192 ddu_inst_i = ddu_h1_n_coll.size();
1193 if (ddu_inst_i > 0) {
1194 ddu_inst_n = ddu_h1_n_coll[ddu_inst_i - 1];
1198 "%6i %04x %04x %04x %04x%s%s%i %s",
1208 ddu_t1_coll.push_back(word_numbering);
1214 else if (alct_h1_check[1]) {
1215 alct_start = word_numbering;
1216 alct_inst_l1a = (buf[i + 2] & 0x0FFF);
1217 alct_l1a_coll.push_back(alct_inst_l1a);
1219 "%6i %04x %04x %04x %04x%s%s %s%s %s %i",
1231 alct_h1_coll.push_back(word_numbering);
1236 else if ((alct_h1_check[0]) && (alct_h2_check[2])) {
1237 alct_inst_bxn = (buf[
i] & 0x0FFF);
1238 alct_bxn_coll.push_back(alct_inst_bxn);
1240 "%6i %04x %04x %04x %04x%s%s %s%s%s %i",
1252 alct_h2_coll.push_back(word_numbering);
1258 else if (alct_tr1_check[1]) {
1259 alct_stop = word_numbering;
1260 if ((alct_start != 0) && (alct_stop != 0) && (alct_stop > alct_start)) {
1261 alct_inst_wcnt2 = 4 * (alct_stop - alct_start + 1);
1262 alct_wcnt2_coll.push_back(alct_inst_wcnt2);
1263 alct_wcnt2_id_coll.push_back(alct_start);
1265 alct_inst_wcnt1 = (buf[i + 3] & 0x7FF);
1266 alct_wcnt1_coll.push_back(alct_inst_wcnt1);
1268 "%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i",
1282 alct_t1_coll.push_back(word_numbering);
1285 alct_inst_wcnt2 = 0;
1291 else if ((ddu_h2_h1) && (tempbuf_short[0] == ddu_trailer3_bit[0])) {
1293 ddu_inst_i = ddu_h1_n_coll.size();
1294 if (ddu_inst_i > 0) {
1295 ddu_inst_n = ddu_h1_n_coll[ddu_inst_i - 1];
1299 "%6i %04x %04x %04x %04x%s%s%i %s",
1309 ddu_t3_coll.push_back(word_numbering);
1314 else if ((ddu_tr1_check[0]) && (tempbuf_short[0] != ddu_trailer3_bit[0])) {
1316 ddu_inst_i = ddu_h1_n_coll.size();
1317 if (ddu_inst_i > 0) {
1318 ddu_inst_n = ddu_h1_n_coll[ddu_inst_i - 1];
1322 "%6i %04x %04x %04x %04x%s%s%i %s",
1332 ddu_t2_coll.push_back(word_numbering);
1338 else if (dmb_tr1_check[1]) {
1340 "%6i %04x %04x %04x %04x%s%s %s",
1349 dmb_t1_coll.push_back(word_numbering);
1355 else if (dmb_tr2_check[1]) {
1357 "%6i %04x %04x %04x %04x%s%s %s",
1366 dmb_t2_coll.push_back(word_numbering);
1371 else if (tmb_h1_check[1]) {
1372 tmb_start = word_numbering;
1373 tmb_inst_l1a = (buf[i + 2] & 0x000F);
1374 tmb_l1a_coll.push_back(tmb_inst_l1a);
1376 "%6i %04x %04x %04x %04x%s%s %s%s%s %i",
1388 tmb_h1_coll.push_back(word_numbering);
1391 }
else if (tmb_tr1_check[1]) {
1392 tmb_stop = word_numbering;
1393 if ((tmb_start != 0) && (tmb_stop != 0) && (tmb_stop > tmb_start)) {
1394 tmb_inst_wcnt2 = 4 * (tmb_stop - tmb_start + 1);
1395 tmb_wcnt2_coll.push_back(tmb_inst_wcnt2);
1397 tmb_inst_wcnt1 = (buf[i + 3] & 0x7FF);
1398 tmb_wcnt1_coll.push_back(tmb_inst_wcnt1);
1400 "%6i %04x %04x %04x %04x%s%s %s%s%s %i %s %i",
1414 tmb_t1_coll.push_back(word_numbering);
1420 else if (cfeb_tr1_check[1]) {
1423 "%6i %04x %04x %04x %04x%s%s %s%s %s %i",
1435 cfeb_t1_coll.push_back(word_numbering);
1438 }
else if (cfeb_b_check[1]) {
1440 "%6i %04x %04x %04x %04x%s%s %s",
1455 else if (ddu_tr1_bad_check[1]) {
1456 ddu_inst_i = ddu_h1_n_coll.size();
1457 ddu_inst_n = ddu_h1_n_coll[ddu_inst_i - 1];
1459 "%6i %04x %04x %04x %04x%s%s%i %s %s",
1469 ddu_tr1_err_common);
1474 else if (extraction && (!ddu_h1_check) && (!dcc_check)) {
1476 sprintf(tempbuf,
"%6i %04x %04x %04x %04x", word_numbering, buf[i + 3], buf[i + 2], buf[i + 1], buf[i]);
1481 std::cout <<
"..................................................." << std::endl;
1486 else if ((!ddu_h1_check) && (!dcc_check)) {
1487 sprintf(tempbuf,
"%6i %04x %04x %04x %04x", word_numbering, buf[i + 3], buf[i + 2], buf[i + 1], buf[i]);
1492 ddu_h1_check =
false;
1496 std::cout <<
"********************************************************************************" << std::endl
1499 std::cout <<
"For complete output turn off VisualFEDShort in muonCSCDigis configuration file." << std::endl;
1500 std::cout <<
"********************************************************************************" << std::endl
1505 std::cout << ddu_h1_coll.size() <<
" " << ddu_common <<
" " << ddu_header1 <<
" "
1506 <<
"found" << std::endl;
1511 for (
unsigned int k = 0;
k < ddu_h1_coll.size(); ++
k) {
1518 <<
" " << ddu_h1_coll[
k] <<
" " << sign1 <<
" " << ddu_common <<
" " << ddu_h1_n_coll[
k] <<
" "
1519 << dmb_common_l1a <<
" " << ddu_l1a_coll[
k] <<
" " << alct_common_bxn <<
" " << ddu_bxn_coll[
k]
1524 std::cout <<
"||||||||||||||||||||" << std::endl;
1526 std::cout << ddu_h2_coll.size() <<
" " << ddu_common <<
" " << ddu_header2 <<
" "
1527 <<
"found" << std::endl;
1528 for (
unsigned int k = 0;
k < ddu_h2_coll.size(); ++
k)
1529 std::cout <<
"Line: " << ddu_h2_coll[
k] << std::endl;
1531 std::cout <<
"||||||||||||||||||||" << std::endl;
1533 std::cout << ddu_h3_coll.size() <<
" " << ddu_common <<
" " << ddu_header3 <<
" "
1534 <<
"found" << std::endl;
1535 for (
unsigned int k = 0;
k < ddu_h3_coll.size(); ++
k)
1536 std::cout <<
"Line: " << ddu_h3_coll[
k] << std::endl;
1538 std::cout <<
"||||||||||||||||||||" << std::endl;
1540 std::cout << ddu_t1_coll.size() <<
" " << ddu_common <<
" " << ddu_trail1 <<
" "
1541 <<
"found" << std::endl;
1542 for (
unsigned int k = 0;
k < ddu_t1_coll.size(); ++
k)
1543 std::cout <<
"Line: " << ddu_t1_coll[
k] << std::endl;
1545 std::cout <<
"||||||||||||||||||||" << std::endl;
1547 std::cout << ddu_t2_coll.size() <<
" " << ddu_common <<
" " << ddu_trail2 <<
" "
1548 <<
"found" << std::endl;
1549 for (
unsigned int k = 0;
k < ddu_t2_coll.size(); ++
k)
1550 std::cout <<
"Line: " << ddu_t2_coll[
k] << std::endl;
1552 std::cout <<
"||||||||||||||||||||" << std::endl;
1554 std::cout << ddu_t3_coll.size() <<
" " << ddu_common <<
" " << ddu_trail3 <<
" "
1555 <<
"found" << std::endl;
1556 for (
unsigned int k = 0;
k < ddu_t3_coll.size(); ++
k)
1557 std::cout <<
"Line: " << ddu_t3_coll[
k] << std::endl;
1559 std::cout <<
"||||||||||||||||||||" << std::endl;
1561 std::cout << dmb_h1_coll.size() <<
" " << dmb_common <<
" " << dmb_header1 <<
" "
1562 <<
"found" << std::endl;
1564 for (
unsigned int k = 0;
k < dmb_h1_coll.size(); ++
k) {
1571 <<
" " << dmb_h1_coll[
k] <<
" " << sign1 << dmb_common <<
" " << dmb_common_crate <<
" "
1572 << dmb_crate_coll[
k] <<
" " << dmb_common_slot <<
" " << dmb_slot_coll[
k] <<
" " << dmb_common_l1a <<
" "
1573 << dmb_l1a_coll[
k] << std::endl;
1576 std::cout <<
"||||||||||||||||||||" << std::endl;
1578 std::cout << dmb_h2_coll.size() <<
" " << dmb_common <<
" " << dmb_header2 <<
" "
1579 <<
"found" << std::endl;
1580 for (
unsigned int k = 0;
k < dmb_h2_coll.size(); ++
k)
1581 std::cout <<
"Line: " << dmb_h2_coll[
k] << std::endl;
1583 std::cout <<
"||||||||||||||||||||" << std::endl;
1585 std::cout << dmb_t1_coll.size() <<
" " << dmb_common <<
" " << dmb_tr1 <<
" "
1586 <<
"found" << std::endl;
1587 for (
unsigned int k = 0;
k < dmb_t1_coll.size(); ++
k)
1588 std::cout <<
"Line: " << dmb_t1_coll[
k] << std::endl;
1590 std::cout <<
"||||||||||||||||||||" << std::endl;
1592 std::cout << dmb_t2_coll.size() <<
" " << dmb_common <<
" " << dmb_tr2 <<
" "
1593 <<
"found" << std::endl;
1594 for (
unsigned int k = 0;
k < dmb_t2_coll.size(); ++
k)
1595 std::cout <<
"Line: " << dmb_t2_coll[
k] << std::endl;
1597 std::cout <<
"||||||||||||||||||||" << std::endl;
1599 std::cout << alct_h1_coll.size() <<
" " << alct_common <<
" " << alct_header1 <<
" "
1600 <<
"found" << std::endl;
1601 for (
unsigned int k = 0;
k < alct_h1_coll.size(); ++
k) {
1609 <<
" " << alct_h1_coll[
k] <<
" " << sign1 <<
" " << alct_common <<
" " << dmb_common_l1a <<
" "
1610 << alct_l1a_coll[
k] << std::endl;
1614 std::cout <<
"||||||||||||||||||||" << std::endl;
1616 std::cout << alct_h2_coll.size() <<
" " << alct_common <<
" " << alct_header2 <<
" "
1617 <<
"found" << std::endl;
1618 for (
unsigned int k = 0;
k < alct_h2_coll.size(); ++
k) {
1626 <<
" " << alct_h1_coll[
k] <<
" " << sign1 <<
" " << alct_common <<
" " << alct_common_bxn <<
" "
1627 << alct_bxn_coll[
k] << std::endl;
1631 std::cout <<
"||||||||||||||||||||" << std::endl;
1633 std::cout << alct_t1_coll.size() <<
" " << alct_common <<
" " << alct_tr1 <<
" "
1634 <<
"found" << std::endl;
1635 for (
unsigned int k = 0;
k < alct_t1_coll.size(); ++
k) {
1643 <<
" " << alct_t1_coll[
k] <<
" " << sign1 <<
" " << alct_common <<
" " << alct_common_wcnt1 <<
" "
1644 << alct_wcnt1_coll[
k] <<
" " << alct_common_wcnt2 <<
" ";
1645 if (!alct_wcnt2_coll.empty()) {
1646 std::cout << alct_wcnt2_coll[
k] << std::endl;
1648 std::cout <<
"Undefined (ALCT Header is not found) " << std::endl;
1653 std::cout <<
"||||||||||||||||||||" << std::endl;
1655 std::cout << tmb_h1_coll.size() <<
" " << tmb_common <<
" " << tmb_header1 <<
" "
1656 <<
"found" << std::endl;
1657 for (
unsigned int k = 0;
k < tmb_h1_coll.size(); ++
k) {
1665 <<
" " << tmb_h1_coll[
k] <<
" " << sign1 <<
" " << tmb_common <<
" " << dmb_common_l1a <<
" "
1666 << tmb_l1a_coll[
k] << std::endl;
1670 std::cout <<
"||||||||||||||||||||" << std::endl;
1672 std::cout << tmb_t1_coll.size() <<
" " << tmb_common <<
" " << tmb_tr1 <<
" "
1673 <<
"found" << std::endl;
1674 for (
unsigned int k = 0;
k < tmb_t1_coll.size(); ++
k) {
1682 <<
" " << tmb_t1_coll[
k] <<
" " << sign1 <<
" " << tmb_common <<
" " << alct_common_wcnt1 <<
" "
1683 << tmb_wcnt1_coll[
k] <<
" " << alct_common_wcnt2 <<
" " << tmb_wcnt2_coll[
k] << std::endl;
1687 std::cout <<
"||||||||||||||||||||" << std::endl;
1689 std::cout << cfeb_t1_coll.size() <<
" " << cfeb_common <<
" " << cfeb_tr1 <<
" "
1690 <<
"found" << std::endl;
1691 for (
unsigned int k = 0;
k < cfeb_t1_coll.size(); ++
k)
1692 std::cout <<
"Line: " << cfeb_t1_coll[
k] << std::endl;
1693 std::cout <<
"********************************************************************************" << std::endl;
EventNumber_t event() const
void crcCFEB(bool enable)
T getUntrackedParameter(std::string const &, T const &) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
const edm::EventSetup & c
bool SuppressZeroLCT
Suppress zeros LCTs.
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
uint16_t *__restrict__ id
edm::ESGetToken< CSCChamberMap, CSCChamberMapRcd > cscmapToken
static void setDebug(bool value)
void modeDDU(bool enable)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_MODULE(type)
CSCDetId detId(int vme, int dmb, int cfeb, int layer=0) const
int ddu(const CSCDetId &) const
ddu id for given DetId
constexpr uint32_t rawId() const
get the raw id
CSCMonitorInterface * monitor
bool isValid() const
data
bool useRPCs_
option to unpack RPC data
ExaminerStatusType errors(void) const
void crcALCT(bool enable)
const char * errName(int num) const
bool visualFEDInspect
Visualization of raw data.
size_t size() const
Lenght of the data buffer in bytes.
constexpr std::array< uint8_t, layerIndexSize > layer
static void setDebug(const bool value)
virtual void process(CSCDCCExaminer *examiner, CSCDCCEventData *dccData)=0
edm::ESGetToken< CSCCrateMap, CSCCrateMapRcd > crateToken
static void setDebug(const bool 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) ...
static void setErrorMask(unsigned int value)
~CSCDCCUnpacker() override
Destructor.
static void setDebug(bool value)
std::map< DDUIdType, ExaminerStatusType > errorsDetailedDDU(void) const
bool useCSCShowers_
option to unpack CSC shower data
ParameterDescriptionBase * add(U const &iLabel, T const &value)
ExaminerMaskType getMask() const
void setComment(std::string const &value)
edm::EDGetTokenT< FEDRawDataCollection > i_token
Token for consumes interface & access to data.
unsigned int examinerMask
T const * product() const
T getParameter(std::string const &) const
bool useSelectiveUnpacking
bool useGEMs_
option to unpack GEM cluster data
void add(std::string const &label, ParameterSetDescription const &psetDescription)
int32_t check(const uint16_t *&buffer, int32_t length)
char data[epos_bytes_allocation]
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
CSCDCCUnpacker(const edm::ParameterSet &pset)
Constructor.
std::map< CSCIdType, ExaminerStatusType > statusDetailed(void) const
std::map< CSCIdType, ExaminerStatusType > errorsDetailed(void) const
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
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.
std::map< CSCIdType, ExaminerStatusType > payloadDetailed(void) const