24 std::string mthn =
"[PixelNameTranslation::PixelNameTranslation()]\t\t ";
25 std::map<std::string, int> colM;
26 std::vector<std::string> colNames;
49 colNames.push_back(
"CONFIG_KEY");
50 colNames.push_back(
"KEY_TYPE");
51 colNames.push_back(
"KEY_ALIAS");
52 colNames.push_back(
"VERSION");
53 colNames.push_back(
"KIND_OF_COND");
54 colNames.push_back(
"ROC_NAME");
55 colNames.push_back(
"PXLFEC_NAME");
56 colNames.push_back(
"MFEC_POSN");
57 colNames.push_back(
"MFEC_CHAN");
58 colNames.push_back(
"HUB_ADDRS");
59 colNames.push_back(
"PORT_NUM");
60 colNames.push_back(
"ROC_I2C_ADDR");
61 colNames.push_back(
"PXLFED_NAME");
62 colNames.push_back(
"FED_CHAN");
63 colNames.push_back(
"FED_ROC_NUM");
64 colNames.push_back(
"TBM_MODE");
66 for (
unsigned int c = 0;
c < tableMat[0].size();
c++) {
67 for (
unsigned int n = 0;
n < colNames.size();
n++) {
68 if (tableMat[0][
c] == colNames[
n]) {
69 colM[colNames[
n]] =
c;
83 for (
unsigned int r = 1;
r < tableMat.size();
r++) {
86 if (TBMChannel.empty()) {
95 unsigned int fecnumber = (
unsigned int)atoi(tableMat[
r][colM[
"PXLFEC_NAME"]].c_str());
96 unsigned int mfec = (
unsigned int)atoi(tableMat[
r][colM[
"MFEC_POSN"]].c_str());
97 unsigned int mfecchannel = (
unsigned int)atoi(tableMat[
r][colM[
"MFEC_CHAN"]].c_str());
98 unsigned int hubaddress = (
unsigned int)atoi(tableMat[
r][colM[
"HUB_ADDRS"]].c_str());
99 unsigned int portaddress = (
unsigned int)atoi(tableMat[
r][colM[
"PORT_NUM"]].c_str());
100 unsigned int rocid = (
unsigned int)atoi(tableMat[
r][colM[
"ROC_I2C_ADDR"]].c_str());
107 unsigned int fednumber = (
unsigned int)atoi(tableMat[
r][colM[
"PXLFED_NAME"]].c_str());
108 unsigned int fedchannel = (
unsigned int)atoi(tableMat[
r][colM[
"FED_CHAN"]].c_str());
109 unsigned int fedrocnumber = (
unsigned int)(atoi(tableMat[
r][colM[
"FED_ROC_NUM"]].c_str()));
112 if (aROC.
rocname() != rocname) {
113 std::cout << __LINE__ <<
"]\t" << mthn <<
"Rocname : " << rocname << std::endl;
114 std::cout << __LINE__ <<
"]\t" << mthn <<
"Parsed to: " << aROC.
rocname() << std::endl;
119 std::cout << __LINE__ <<
"]\t" << mthn <<
"ROC with fednumber=" << fednumber <<
" fedchannel=" << fedchannel
120 <<
" roc number=" << fedrocnumber <<
" already exists" << std::endl;
121 std::cout << __LINE__ <<
"]\t" << mthn <<
"Fix this inconsistency in the name translation" << std::endl;
126 fecnumber, mfec, mfecchannel, hubaddress, portaddress, rocid, fednumber, fedchannel, fedrocnumber);
137 bool foundChannel =
false;
139 std::map<PixelChannel, PixelHdwAddress>::const_iterator channelTranslationTable_itr =
143 if (!(channelTranslationTable_itr->second |= hdwAdd)) {
144 cout <<
"Found two ROCs on the same channe, but not same hdw" << endl;
145 cout <<
"Hdw1:" << endl << channelTranslationTable_itr->second << endl;
146 cout <<
"Hdw2:" << endl << hdwAdd << endl;
148 assert(channelTranslationTable_itr->second |= hdwAdd);
150 }
else if (channelTranslationTable_itr->first.module() == aModule) {
151 assert(channelTranslationTable_itr->second.fecnumber() == hdwAdd.
fecnumber());
152 assert(channelTranslationTable_itr->second.mfec() == hdwAdd.
mfec());
153 assert(channelTranslationTable_itr->second.mfecchannel() == hdwAdd.
mfecchannel());
155 assert(channelTranslationTable_itr->second.hubaddress() == hdwAdd.
hubaddress());
156 assert(channelTranslationTable_itr->second.fednumber() != hdwAdd.
fednumber() ||
157 channelTranslationTable_itr->second.fedchannel() != hdwAdd.
fedchannel());
160 if (foundChannel ==
false) {
166 const std::map<unsigned int, std::set<unsigned int> > fedsAndChannels =
getFEDsAndChannels();
168 std::vector<PixelROCName>
tmp(24);
170 std::map<unsigned int, std::map<unsigned int, int> >
counter;
173 std::map<unsigned int, std::map<unsigned int, int> > maxindex;
175 std::map<PixelROCName, PixelHdwAddress>::const_iterator it =
translationtable_.begin();
178 int index = it->second.fedrocnumber();
180 unsigned int fednumber = it->second.fednumber();
181 unsigned int fedchannel = it->second.fedchannel();
187 counter[fednumber][fedchannel] = 0;
188 maxindex[fednumber][fedchannel] = 0;
191 if (index > maxindex[fednumber][fedchannel])
192 maxindex[fednumber][fedchannel] =
index;
193 tmp[
index] = it->first;
194 counter[fednumber][fedchannel]++;
200 unsigned int fednumber = it->second.fednumber();
201 unsigned int fedchannel = it->second.fedchannel();
205 assert(counter[fednumber][fedchannel] == maxindex[fednumber][fedchannel] + 1);
207 tmp.resize(counter[fednumber][fedchannel]);
214 static std::string mthn =
"[PixelNameTranslation::PixelNameTranslation()]\t\t ";
216 std::ifstream
in(filename.c_str());
219 std::cout << __LINE__ <<
"]\t" << mthn <<
"Could not open: " << filename << std::endl;
220 throw std::runtime_error(
"Failed to open file " + filename);
222 std::cout << __LINE__ <<
"]\t" << mthn <<
"Reading from: " << filename << std::endl;
232 unsigned int fecnumber;
234 unsigned int mfecchannel;
235 unsigned int hubaddress;
236 unsigned int portaddress;
238 unsigned int fednumber;
239 unsigned int fedchannel;
240 unsigned int fedrocnumber;
244 if (TBMChannel !=
"A" &&
248 fecnumber = atoi(TBMChannel.c_str());
254 in >> mfec >> mfecchannel >> hubaddress >> portaddress >> rocid >> fednumber >> fedchannel >> fedrocnumber;
267 std::cout << __LINE__ <<
"]\t" << mthn <<
"ROC with fednumber=" << fednumber <<
" fedchannel=" << fedchannel
268 <<
" roc number=" << fedrocnumber <<
" already exists" << std::endl;
269 std::cout << __LINE__ <<
"]\t" << mthn <<
"Fix this inconsistency in the name translation" << std::endl;
274 fecnumber, mfec, mfecchannel, hubaddress, portaddress, rocid, fednumber, fedchannel, fedrocnumber);
311 bool foundChannel =
false;
313 std::map<PixelChannel, PixelHdwAddress>::const_iterator channelTranslationTable_itr =
317 if (!(channelTranslationTable_itr->second |= hdwAdd)) {
318 cout << __LINE__ <<
"]\t" << mthn <<
"Found two ROCs on the same channe, but not same hdw" << endl;
319 cout << __LINE__ <<
"]\t" << mthn <<
"Hdw1: " << endl << channelTranslationTable_itr->second << endl;
320 cout << __LINE__ <<
"]\t" << mthn <<
"Hdw2: " << endl << hdwAdd << endl;
322 assert(channelTranslationTable_itr->second |= hdwAdd);
324 }
else if (channelTranslationTable_itr->first.module() == aModule) {
325 assert(channelTranslationTable_itr->second.fecnumber() == hdwAdd.
fecnumber());
326 assert(channelTranslationTable_itr->second.mfec() == hdwAdd.
mfec());
327 assert(channelTranslationTable_itr->second.mfecchannel() == hdwAdd.
mfecchannel());
329 assert(channelTranslationTable_itr->second.hubaddress() == hdwAdd.
hubaddress());
330 assert(channelTranslationTable_itr->second.fednumber() != hdwAdd.
fednumber() ||
331 channelTranslationTable_itr->second.fedchannel() != hdwAdd.
fedchannel());
334 if (foundChannel ==
false) {
341 const std::map<unsigned int, std::set<unsigned int> > fedsAndChannels =
getFEDsAndChannels();
343 std::vector<PixelROCName>
tmp(24);
345 std::map<unsigned int, std::map<unsigned int, int> >
counter;
348 std::map<unsigned int, std::map<unsigned int, int> > maxindex;
350 std::map<PixelROCName, PixelHdwAddress>::const_iterator it =
translationtable_.begin();
353 int index = it->second.fedrocnumber();
355 unsigned int fednumber = it->second.fednumber();
356 unsigned int fedchannel = it->second.fedchannel();
362 counter[fednumber][fedchannel] = 0;
363 maxindex[fednumber][fedchannel] = 0;
366 if (index > maxindex[fednumber][fedchannel])
367 maxindex[fednumber][fedchannel] =
index;
368 tmp[
index] = it->first;
369 counter[fednumber][fedchannel]++;
375 unsigned int fednumber = it->second.fednumber();
376 unsigned int fedchannel = it->second.fedchannel();
380 assert(counter[fednumber][fedchannel] == maxindex[fednumber][fedchannel] + 1);
382 tmp.resize(counter[fednumber][fedchannel]);
394 std::list<const PixelROCName*> listOfROCs;
395 for (std::map<PixelROCName, PixelHdwAddress>::const_iterator translationTableEntry =
translationtable_.begin();
397 ++translationTableEntry) {
398 listOfROCs.push_back(&(translationTableEntry->first));
405 std::list<const PixelModuleName*> listOfModules;
406 for (std::map<PixelChannel, PixelHdwAddress>::const_iterator channelTranslationTable_itr =
409 ++channelTranslationTable_itr) {
410 bool foundOne =
false;
411 for (std::list<const PixelModuleName*>::const_iterator listOfModules_itr = listOfModules.begin();
412 listOfModules_itr != listOfModules.end();
413 ++listOfModules_itr) {
414 if (*(*listOfModules_itr) == channelTranslationTable_itr->first.module()) {
420 listOfModules.push_back(&(channelTranslationTable_itr->first.module()));
423 return listOfModules;
427 std::set<PixelChannel> channelSet;
428 for (std::map<PixelChannel, PixelHdwAddress>::const_iterator channelTranslationTable_itr =
431 ++channelTranslationTable_itr) {
432 channelSet.insert(channelTranslationTable_itr->first);
438 std::set<PixelChannel> channelSet;
439 for (std::map<PixelChannel, PixelHdwAddress>::const_iterator channelTranslationTable_itr =
442 ++channelTranslationTable_itr) {
443 if (aDetectorConfig.
containsModule(channelTranslationTable_itr->first.module()))
444 channelSet.insert(channelTranslationTable_itr->first);
450 static std::string mthn =
"[PixelNameTranslation::getHdwAddress()]\t\t ";
451 std::map<PixelROCName, PixelHdwAddress>::const_iterator it =
translationtable_.find(aROC);
454 std::cout << __LINE__ <<
"]\t" << mthn <<
"Could not look up ROC: " << aROC << std::endl;
458 return &(it->second);
463 std::string mthn =
"[PixelNameTranslation::checkROCExistence()]\t\t ";
478 std::map<PixelChannel, PixelHdwAddress>::const_iterator channelHdwAddress_itr =
481 return channelHdwAddress_itr->second;
485 std::string mthn =
"[PixelNameTranslation::firstHdwAddress()]\t\t ";
487 if (channelsOnModule.empty()) {
488 cout << __LINE__ <<
"]\t" << mthn <<
"module=" << aModule <<
" has zero channels!" << endl;
489 cout << __LINE__ <<
"]\t" << mthn <<
"Will terminate" << endl;
492 std::set<PixelChannel>::const_iterator firstChannel = channelsOnModule.begin();
493 assert(firstChannel != channelsOnModule.end());
498 std::map<PixelROCName, PixelHdwAddress>::const_iterator foundEntry =
translationtable_.find(aROC);
504 std::set<PixelChannel> returnThis;
505 for (std::map<PixelChannel, PixelHdwAddress>::const_iterator channelTranslationTable_itr =
508 ++channelTranslationTable_itr) {
509 if (channelTranslationTable_itr->first.module() == aModule)
510 returnThis.insert(channelTranslationTable_itr->first);
512 assert(returnThis.size() <= 2);
517 unsigned int fedchannel)
const {
518 std::map<unsigned int, std::map<unsigned int, std::vector<PixelROCName> > >::const_iterator it =
523 std::map<unsigned int, std::vector<PixelROCName> >::const_iterator it2 = it->second.find(fedchannel);
525 assert(it2 != it->second.end());
535 unsigned int fedchannel)
const {
536 std::vector<PixelROCName>
tmp(24);
542 std::map<PixelROCName, PixelHdwAddress>::const_iterator it =
translationtable_.begin();
545 if (it->second.fednumber() == fednumber && it->second.fedchannel() == fedchannel) {
546 int index = it->second.fedrocnumber();
547 if (index > maxindex)
550 tmp[
index] = it->first;
555 assert(counter == maxindex + 1);
563 unsigned int channel,
564 unsigned int roc)
const {
571 unsigned int channel,
572 unsigned int roc)
const {
573 std::string mthn =
"[PixelNameTranslation::ROCNameFromFEDChannelROC()]\t\t ";
576 std::map<PixelHdwAddress, PixelROCName, PixelHdwAddress>::const_iterator it1 =
fedlookup_.find(tmp);
582 std::cout << __LINE__ <<
"]\t" << mthn <<
"could not find ROCName "
583 <<
" for FED#" << fednumber <<
" chan=" << channel <<
" roc#=" << roc << std::endl;
593 std::string mthn =
"[PixelNameTranslation::ChannelFromFEDChannel()]\t\t ";
594 std::map<PixelChannel, PixelHdwAddress>::const_iterator toReturn;
595 bool foundOne =
false;
599 if (it->second.fednumber() == fednumber && it->second.fedchannel() == fedchannel) {
601 std::cout << __LINE__ <<
"]\t" << mthn <<
"ERROR: multiple channels on FED#" << fednumber
602 <<
", chan=" << fedchannel << std::endl;
612 std::cout << __LINE__ <<
"]\t" << mthn <<
"ERROR: no channel found for FED#" << fednumber <<
", chan=" << fedchannel
617 return toReturn->first;
621 std::string mthn =
"[PixelNameTranslation::FEDChannelExist()]\t\t ";
622 std::map<PixelChannel, PixelHdwAddress>::const_iterator toReturn;
623 bool foundOne =
false;
627 if (it->second.fednumber() == fednumber && it->second.fedchannel() == fedchannel) {
629 std::cout << __LINE__ <<
"]\t" << mthn <<
"ERROR: multiple channels on FED#" << fednumber
630 <<
", chan=" << fedchannel << std::endl;
643 std::string mthn =
"[PixelNameTranslation::getChannelFromHdwAddress()]\t\t ";
645 std::map<PixelHdwAddress, PixelChannel>::const_iterator it =
hdwTranslationTable_.find(aHdwAddress);
648 std::cout << __LINE__ <<
"]\t" << mthn <<
"ERROR: no channel found for hardware address " << aHdwAddress
673 std::string mthn =
"[PixelNameTranslation::writeASCII()]\t\t\t ";
678 std::ofstream
out(filename.c_str());
688 out <<
"# name TBMchannel FEC mfec mfecchannel hubaddress portadd rocid FED "
692 std::map<PixelROCName, PixelHdwAddress>::const_iterator iroc =
translationtable_.begin();
698 out << iroc->first.rocname() <<
" " << TBMChannel <<
" " << iroc->second.fecnumber() <<
" "
699 << iroc->second.mfec() <<
" " << iroc->second.mfecchannel() <<
" " << iroc->second.hubaddress()
700 <<
" " << iroc->second.portaddress() <<
" " << iroc->second.rocid() <<
" "
701 << iroc->second.fednumber() <<
" " << iroc->second.fedchannel() <<
" "
702 << iroc->second.fedrocnumber() << endl;
712 std::ofstream* outstream,
713 std::ofstream* out1stream,
714 std::ofstream* out2stream)
const {
715 std::string mthn =
"[PixelNameTranslation:::writeXMLHeader()]\t\t\t ";
718 cout << __LINE__ <<
"]\t" << mthn <<
"Writing to: " << fullPath.str() << endl;
720 outstream->open(fullPath.str().c_str());
721 *outstream <<
"<?xml version='1.0' encoding='UTF-8' standalone='yes'?>" << endl;
722 *outstream <<
"<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" << endl;
723 *outstream <<
" <HEADER>" << endl;
724 *outstream <<
" <TYPE>" << endl;
725 *outstream <<
" <EXTENSION_TABLE_NAME>PIXEL_NAME_TRANSLATION</EXTENSION_TABLE_NAME>" << endl;
726 *outstream <<
" <NAME>Pixel Name Translation</NAME>" << endl;
727 *outstream <<
" </TYPE>" << endl;
728 *outstream <<
" <RUN>" << endl;
729 *outstream <<
" <RUN_TYPE>Pixel Name Translation</RUN_TYPE>" << endl;
730 *outstream <<
" <RUN_NUMBER>1</RUN_NUMBER>" << endl;
732 *outstream <<
" <LOCATION>CERN P5</LOCATION>" << endl;
733 *outstream <<
" </RUN>" << endl;
734 *outstream <<
" </HEADER>" << endl;
735 *outstream <<
" " << endl;
736 *outstream <<
" <DATA_SET>" << endl;
737 *outstream <<
" <PART>" << endl;
738 *outstream <<
" <NAME_LABEL>CMS-PIXEL-ROOT</NAME_LABEL>" << endl;
739 *outstream <<
" <KIND_OF_PART>Detector ROOT</KIND_OF_PART>" << endl;
740 *outstream <<
" </PART>" << endl;
741 *outstream <<
" <VERSION>" << version <<
"</VERSION>" << endl;
742 *outstream <<
" <COMMENT_DESCRIPTION>" <<
getComment() <<
"</COMMENT_DESCRIPTION>" << endl;
743 *outstream <<
" <CREATED_BY_USER>" <<
getAuthor() <<
"</CREATED_BY_USER>" << endl;
744 *outstream <<
" " << endl;
749 std::ofstream* out1stream,
750 std::ofstream* out2stream)
const {
751 std::string mthn =
"[PixelNameTranslation::writeXML()]\t\t\t ";
753 std::map<PixelROCName, PixelHdwAddress>::const_iterator iroc =
translationtable_.begin();
759 *outstream <<
" <DATA>" << endl;
760 *outstream <<
" <ROC_NAME>" << iroc->first.rocname() <<
"</ROC_NAME>" << endl;
761 *outstream <<
" <TBM_MODE>" << TBMChannel <<
"</TBM_MODE>" << endl;
762 *outstream <<
" <PXLFEC_NAME>" << iroc->second.fecnumber() <<
"</PXLFEC_NAME>" << endl;
763 *outstream <<
" <MFEC_POSN>" << iroc->second.mfec() <<
"</MFEC_POSN>" << endl;
764 *outstream <<
" <MFEC_CHAN>" << iroc->second.mfecchannel() <<
"</MFEC_CHAN>" << endl;
765 *outstream <<
" <HUB_ADDRS>" << iroc->second.hubaddress() <<
"</HUB_ADDRS>" << endl;
766 *outstream <<
" <PORT_NUM>" << iroc->second.portaddress() <<
"</PORT_NUM>" << endl;
767 *outstream <<
" <ROC_I2C_ADDR>" << iroc->second.rocid() <<
"</ROC_I2C_ADDR>" << endl;
768 *outstream <<
" <PXLFED_NAME>" << iroc->second.fednumber() <<
"</PXLFED_NAME>" << endl;
769 *outstream <<
" <FED_CHAN>" << iroc->second.fedchannel() <<
"</FED_CHAN>" << endl;
770 *outstream <<
" <FED_ROC_NUM>" << iroc->second.fedrocnumber() <<
"</FED_ROC_NUM>" << endl;
771 *outstream <<
" </DATA>" << endl;
772 *outstream <<
"" << endl;
778 std::ofstream* out1stream,
779 std::ofstream* out2stream)
const {
780 std::string mthn =
"[PixelNameTranslation::writeXMLTrailer()]\t\t\t ";
782 *outstream <<
" </DATA_SET>" << endl;
783 *outstream <<
"</ROOT> " << endl;
790 std::string mthn =
"[PixelNameTranslation::writeXML]\t\t\t ";
793 fullPath << path <<
"/Pixel_NameTranslation.xml";
794 cout << __LINE__ <<
"]\t" << mthn <<
"Writing to: " << fullPath.str() << endl;
796 std::ofstream
out(fullPath.str().c_str());
798 out <<
"<?xml version='1.0' encoding='UTF-8' standalone='yes'?>" << endl;
799 out <<
"<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" << endl;
801 out <<
" <HEADER>" << endl;
802 out <<
" <HINTS mode='only-det-root' />" << endl;
803 out <<
" <TYPE>" << endl;
804 out <<
" <EXTENSION_TABLE_NAME>PIXEL_NAME_TRANSLATION</EXTENSION_TABLE_NAME>" << endl;
805 out <<
" <NAME>Pixel Name Translation</NAME>" << endl;
806 out <<
" </TYPE>" << endl;
807 out <<
" <RUN>" << endl;
808 out <<
" <RUN_TYPE>Pixel Name Translation</RUN_TYPE>" << endl;
809 out <<
" <RUN_NUMBER>1</RUN_NUMBER>" << endl;
811 out <<
" <COMMENT_DESCRIPTION>Test of Name Translation xml</COMMENT_DESCRIPTION>" << endl;
812 out <<
" <LOCATION>CERN TAC</LOCATION>" << endl;
813 out <<
" <CREATED_BY_USER>Dario Menasce</CREATED_BY_USER>" << endl;
814 out <<
" </RUN>" << endl;
815 out <<
" </HEADER>" << endl;
817 out <<
" <DATA_SET>" << endl;
818 out <<
" <VERSION>" << version <<
"</VERSION>" << endl;
819 out <<
" <PART>" << endl;
820 out <<
" <NAME_LABEL>CMS-PIXEL-ROOT</NAME_LABEL>" << endl;
821 out <<
" <KIND_OF_PART>Detector ROOT</KIND_OF_PART>" << endl;
822 out <<
" </PART>" << endl;
825 std::map<PixelROCName, PixelHdwAddress>::const_iterator iroc =
translationtable_.begin();
831 out <<
" <DATA>" << endl;
832 out <<
" <PXLFEC_NAME>" << iroc->second.fecnumber() <<
"</PXLFEC_NAME>" << endl;
833 out <<
" <MFEC_POSN>" << iroc->second.mfec() <<
"</MFEC_POSN>" << endl;
834 out <<
" <MFEC_CHAN>" << iroc->second.mfecchannel() <<
"</MFEC_CHAN>" << endl;
835 out <<
" <HUB_ADDRS>" << iroc->second.hubaddress() <<
"</HUB_ADDRS>" << endl;
836 out <<
" <PORT_NUM>" << iroc->second.portaddress() <<
"</PORT_NUM>" << endl;
837 out <<
" <ROC_I2C_ADDR>" << iroc->second.rocid() <<
"</ROC_I2C_ADDR>" << endl;
838 out <<
" <PXLFED_NAME>" << iroc->second.fednumber() <<
"</PXLFED_NAME>" << endl;
839 out <<
" <FED_CHAN>" << iroc->second.fedchannel() <<
"</FED_CHAN>" << endl;
840 out <<
" <FED_RO_NUM>" << iroc->second.fedrocnumber() <<
"</FED_ROC_NUM>" << endl;
841 out <<
" </DATA>" << endl;
844 out <<
" </DATA_SET> " << endl;
845 out <<
"</ROOT> " << endl;
856 std::vector<PixelROCName> returnThis;
859 for (std::set<PixelChannel>::const_iterator channelsOnThisModule_itr = channelsOnThisModule.begin();
860 channelsOnThisModule_itr != channelsOnThisModule.end();
861 ++channelsOnThisModule_itr) {
862 std::vector<PixelROCName> ROCsOnThisChannel =
getROCsFromChannel(*channelsOnThisModule_itr);
863 for (std::vector<PixelROCName>::const_iterator ROCsOnThisChannel_itr = ROCsOnThisChannel.begin();
864 ROCsOnThisChannel_itr != ROCsOnThisChannel.end();
865 ++ROCsOnThisChannel_itr) {
866 returnThis.push_back(*ROCsOnThisChannel_itr);
883 std::map<unsigned int, std::set<unsigned int> >
tmp;
885 std::map<PixelChannel, PixelHdwAddress>::const_iterator channelTranslationTable_itr =
889 unsigned int fednumber = channelTranslationTable_itr->second.fednumber();
890 unsigned int fedchannel = channelTranslationTable_itr->second.fedchannel();
892 tmp[fednumber].insert(fedchannel);
std::vector< PixelROCName > getROCsFromModule(const PixelModuleName &aModule) const
unsigned int mfec() const
const PixelHdwAddress * getHdwAddress(const PixelROCName &aROC) const
This class specifies which detector components are used in the configuration (and eventually should s...
std::list< const PixelModuleName * > getModules() const
This file contains the base class for "pixel configuration data" management.
const edm::EventSetup & c
PixelChannel ChannelFromFEDChannel(unsigned int fednumber, unsigned int fedchannel) const
PixelNameTranslation(std::vector< std::vector< std::string > > &tableMat)
const PixelChannel & getChannelFromHdwAddress(const PixelHdwAddress &aHdwAddress) const
unsigned int fednumber() const
std::map< PixelROCName, PixelHdwAddress > translationtable_
std::string TBMChannelString() const
std::string rocname() const
std::ostream & operator<<(std::ostream &s, const PixelCalibConfiguration &calib)
bool checkROCExistence(const PixelROCName &aROC) const
void writeXML(pos::PixelConfigKey key, int version, std::string path) const override
unsigned int mfecchannel() const
std::set< PixelChannel > getChannels() const
This class provides a translation from the naming documents standard to specify the ROC to the corres...
std::map< PixelHdwAddress, PixelChannel > hdwTranslationTable_
bool FEDChannelExist(unsigned int fednumber, unsigned int fedchannel) const
PixelROCName ROCNameFromFEDChannelROC(unsigned int fednumber, unsigned int channel, unsigned int roc) const
bool ROCNameFromFEDChannelROCExists(unsigned int fednumber, unsigned int channel, unsigned int roc) const
void writeXMLHeader(pos::PixelConfigKey key, int version, std::string path, std::ofstream *out, std::ofstream *out1=nullptr, std::ofstream *out2=nullptr) const override
std::string getComment() const
bool ROCexists(PixelROCName theROC)
unsigned int fedchannel() const
unsigned int hubaddress() const
tuple key
prepare the HTCondor submission files and eventually submit them
void writeXMLTrailer(std::ofstream *out, std::ofstream *out1=nullptr, std::ofstream *out2=nullptr) const override
const PixelHdwAddress & firstHdwAddress(const PixelModuleName &aModule) const
This is the documentation about PixelDetectorConfig...
Store mfec, mfecchannel etc.
std::string getAuthor() const
const bool checkFor(const PixelROCName &aROC) const
std::map< unsigned int, std::set< unsigned int > > getFEDsAndChannels() const
void writeASCII(std::string dir="") const override
std::vector< PixelROCName > buildROCsFromFEDChannel(unsigned int fednumber, unsigned int fedchannel) const
std::list< const PixelROCName * > getROCs() const
std::set< PixelChannel > getChannelsOnModule(const PixelModuleName &aModule) const
This is the documentation about PixelNameTranslation...
std::map< PixelHdwAddress, PixelROCName, PixelHdwAddress > fedlookup_
const std::vector< PixelROCName > & getROCsFromFEDChannel(unsigned int fednumber, unsigned int fedchannel) const
static std::atomic< unsigned int > counter
bool containsModule(const PixelModuleName &moduleToFind) const
const std::vector< PixelROCName > & getROCsFromChannel(const PixelChannel &aChannel) const
unsigned int fecnumber() const
std::map< unsigned int, std::map< unsigned int, std::vector< PixelROCName > > > rocsFromFEDidAndChannel_
const PixelChannel & getChannelForROC(const PixelROCName &aROC) const
std::map< PixelChannel, PixelHdwAddress > channelTranslationTable_