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++){
96 unsigned int fecnumber = (
unsigned int)atoi(tableMat[
r][colM[
"PXLFEC_NAME"]].c_str());
97 unsigned int mfec = (
unsigned int)atoi(tableMat[
r][colM[
"MFEC_POSN"]].c_str());
98 unsigned int mfecchannel = (
unsigned int)atoi(tableMat[
r][colM[
"MFEC_CHAN"]].c_str());
99 unsigned int hubaddress = (
unsigned int)atoi(tableMat[
r][colM[
"HUB_ADDRS"]].c_str());
100 unsigned int portaddress = (
unsigned int)atoi(tableMat[
r][colM[
"PORT_NUM"]].c_str());
101 unsigned int rocid = (
unsigned int)atoi(tableMat[
r][colM[
"ROC_I2C_ADDR"]].c_str());
108 unsigned int fednumber = (
unsigned int)atoi(tableMat[
r][colM[
"PXLFED_NAME"]].c_str());
109 unsigned int fedchannel = (
unsigned int)atoi(tableMat[
r][colM[
"FED_CHAN"]].c_str());
110 unsigned int fedrocnumber = (
unsigned int)(atoi(tableMat[
r][colM[
"FED_ROC_NUM"]].c_str()));
115 std::cout << __LINE__ <<
"]\t" << mthn <<
"Rocname : " << rocname << std::endl;
116 std::cout << __LINE__ <<
"]\t" << mthn <<
"Parsed to: " << aROC.
rocname() << std::endl;
123 <<
"ROC with fednumber=" << fednumber
124 <<
" fedchannel=" << fedchannel
125 <<
" roc number=" << fedrocnumber
126 <<
" already exists" << std::endl;
127 std::cout << __LINE__ <<
"]\t" << mthn <<
"Fix this inconsistency in the name translation"
133 hubaddress,portaddress,
135 fednumber,fedchannel,fedrocnumber);
147 bool foundChannel =
false;
149 std::map<PixelChannel, PixelHdwAddress >::const_iterator channelTranslationTable_itr =
channelTranslationTable_.find(aChannel);
153 if (!(channelTranslationTable_itr->second |= hdwAdd))
155 cout <<
"Found two ROCs on the same channe, but not same hdw"<<endl;
156 cout <<
"Hdw1:"<<endl<<channelTranslationTable_itr->second<<endl;
157 cout <<
"Hdw2:"<<endl<<hdwAdd<<endl;
159 assert( channelTranslationTable_itr->second |= hdwAdd );
162 else if ( channelTranslationTable_itr->first.module() == aModule )
164 assert( channelTranslationTable_itr->second.fecnumber() == hdwAdd.
fecnumber() );
165 assert( channelTranslationTable_itr->second.mfec() == hdwAdd.
mfec() );
166 assert( channelTranslationTable_itr->second.mfecchannel() == hdwAdd.
mfecchannel() );
168 assert( channelTranslationTable_itr->second.hubaddress() == hdwAdd.
hubaddress() );
169 assert( channelTranslationTable_itr->second.fednumber() != hdwAdd.
fednumber() || channelTranslationTable_itr->second.fedchannel() != hdwAdd.
fedchannel() );
172 if ( foundChannel ==
false ) {
178 const std::map<unsigned int, std::set<unsigned int> > fedsAndChannels=
getFEDsAndChannels();
181 std::vector<PixelROCName>
tmp(24);
183 std::map<unsigned int, std::map<unsigned int, int > >
counter;
186 std::map<unsigned int, std::map<unsigned int, int > > maxindex;
188 std::map<PixelROCName,PixelHdwAddress>::const_iterator it=
translationtable_.begin();
192 int index=it->second.fedrocnumber();
194 unsigned int fednumber=it->second.fednumber();
195 unsigned int fedchannel=it->second.fedchannel();
201 counter[fednumber][fedchannel]=0;
202 maxindex[fednumber][fedchannel]=0;
205 if (index>maxindex[fednumber][fedchannel]) maxindex[fednumber][fedchannel]=
index;
206 tmp[
index]=it->first;
207 counter[fednumber][fedchannel]++;
216 unsigned int fednumber=it->second.fednumber();
217 unsigned int fedchannel=it->second.fedchannel();
221 assert(counter[fednumber][fedchannel]==maxindex[fednumber][fedchannel]+1);
223 tmp.resize(counter[fednumber][fedchannel]);
233 static std::string mthn =
"[PixelNameTranslation::PixelNameTranslation()]\t\t " ;
235 std::ifstream
in(filename.c_str());
238 std::cout << __LINE__ <<
"]\t" << mthn <<
"Could not open: " << filename << std::endl;
239 throw std::runtime_error(
"Failed to open file "+filename);
242 std::cout << __LINE__ <<
"]\t" << mthn <<
"Reading from: " << filename << std::endl;
254 unsigned int fecnumber;
256 unsigned int mfecchannel;
257 unsigned int hubaddress;
258 unsigned int portaddress;
260 unsigned int fednumber;
261 unsigned int fedchannel;
262 unsigned int fedrocnumber;
267 if ( TBMChannel !=
"A" && TBMChannel !=
"B" )
269 fecnumber = atoi(TBMChannel.c_str());
276 in >> mfec >> mfecchannel
277 >> hubaddress >> portaddress >> rocid >> fednumber
278 >> fedchannel >> fedrocnumber;
294 <<
"ROC with fednumber=" << fednumber
295 <<
" fedchannel=" << fedchannel
296 <<
" roc number=" << fedrocnumber
297 <<
" already exists" << std::endl;
299 <<
"Fix this inconsistency in the name translation"
306 hubaddress,portaddress,
308 fednumber,fedchannel,fedrocnumber);
346 bool foundChannel =
false;
349 std::map<PixelChannel, PixelHdwAddress >::const_iterator channelTranslationTable_itr =
channelTranslationTable_.find(aChannel);
352 if (!(channelTranslationTable_itr->second |= hdwAdd)){
354 cout << __LINE__ <<
"]\t" << mthn <<
"Found two ROCs on the same channe, but not same hdw" << endl;
355 cout << __LINE__ <<
"]\t" << mthn <<
"Hdw1: " << endl << channelTranslationTable_itr->second << endl;
356 cout << __LINE__ <<
"]\t" << mthn <<
"Hdw2: " << endl << hdwAdd << endl;
358 assert( channelTranslationTable_itr->second |= hdwAdd );
361 else if ( channelTranslationTable_itr->first.module() == aModule ) {
362 assert( channelTranslationTable_itr->second.fecnumber() == hdwAdd.
fecnumber() );
363 assert( channelTranslationTable_itr->second.mfec() == hdwAdd.
mfec() );
364 assert( channelTranslationTable_itr->second.mfecchannel() == hdwAdd.
mfecchannel() );
366 assert( channelTranslationTable_itr->second.hubaddress() == hdwAdd.
hubaddress() );
367 assert( channelTranslationTable_itr->second.fednumber() != hdwAdd.
fednumber() || channelTranslationTable_itr->second.fedchannel() != hdwAdd.
fedchannel() );
372 if ( foundChannel ==
false ){
382 const std::map<unsigned int, std::set<unsigned int> > fedsAndChannels=
getFEDsAndChannels();
385 std::vector<PixelROCName>
tmp(24);
387 std::map<unsigned int, std::map<unsigned int, int > >
counter;
390 std::map<unsigned int, std::map<unsigned int, int > > maxindex;
392 std::map<PixelROCName,PixelHdwAddress>::const_iterator it=
translationtable_.begin();
396 int index=it->second.fedrocnumber();
398 unsigned int fednumber=it->second.fednumber();
399 unsigned int fedchannel=it->second.fedchannel();
405 counter[fednumber][fedchannel]=0;
406 maxindex[fednumber][fedchannel]=0;
409 if (index>maxindex[fednumber][fedchannel]) maxindex[fednumber][fedchannel]=
index;
410 tmp[
index]=it->first;
411 counter[fednumber][fedchannel]++;
420 unsigned int fednumber=it->second.fednumber();
421 unsigned int fedchannel=it->second.fedchannel();
425 assert(counter[fednumber][fedchannel]==maxindex[fednumber][fedchannel]+1);
427 tmp.resize(counter[fednumber][fedchannel]);
445 std::list<const PixelROCName*> listOfROCs;
446 for ( std::map<PixelROCName, PixelHdwAddress>::const_iterator translationTableEntry =
translationtable_.begin();
448 listOfROCs.push_back(&(translationTableEntry->first));
456 std::list<const PixelModuleName*> listOfModules;
459 bool foundOne =
false;
460 for ( std::list<const PixelModuleName*>::const_iterator listOfModules_itr = listOfModules.begin(); listOfModules_itr != listOfModules.end(); listOfModules_itr++ )
462 if ( *(*listOfModules_itr) == channelTranslationTable_itr->first.module() )
468 if (!foundOne) listOfModules.push_back( &(channelTranslationTable_itr->first.module()) );
471 return listOfModules;
476 std::set<PixelChannel> channelSet;
479 channelSet.insert(channelTranslationTable_itr->first);
486 std::set<PixelChannel> channelSet;
489 if ( aDetectorConfig.
containsModule(channelTranslationTable_itr->first.module()) ) channelSet.insert(channelTranslationTable_itr->first);
496 static std::string mthn =
"[PixelNameTranslation::getHdwAddress()]\t\t " ;
497 std::map<PixelROCName,PixelHdwAddress>::const_iterator it=
501 std::cout<< __LINE__ <<
"]\t" << mthn <<
"Could not look up ROC: " << aROC << std::endl;
505 return &(it->second);
512 std::string mthn =
"[PixelNameTranslation::checkROCExistence()]\t\t " ;
530 std::map<PixelChannel, PixelHdwAddress >::const_iterator channelHdwAddress_itr =
channelTranslationTable_.find(aChannel);
532 return channelHdwAddress_itr->second;
537 std::string mthn =
"[PixelNameTranslation::firstHdwAddress()]\t\t " ;
539 if (channelsOnModule.size() == 0 ){
540 cout << __LINE__ <<
"]\t" << mthn <<
"module=" << aModule <<
" has zero channels!" << endl;
541 cout << __LINE__ <<
"]\t" << mthn <<
"Will terminate" << endl;
544 std::set<PixelChannel>::const_iterator firstChannel = channelsOnModule.begin();
545 assert( firstChannel != channelsOnModule.end() );
551 std::map<PixelROCName,PixelHdwAddress>::const_iterator foundEntry =
translationtable_.find(aROC);
558 std::set< PixelChannel > returnThis;
561 if ( channelTranslationTable_itr->first.module() == aModule ) returnThis.insert(channelTranslationTable_itr->first);
563 assert( returnThis.size() <= 2 );
569 unsigned int fedchannel)
const{
571 std::map<unsigned int, std::map<unsigned int, std::vector<PixelROCName> > >::const_iterator it=
rocsFromFEDidAndChannel_.find(fednumber);
575 std::map<unsigned int, std::vector<PixelROCName> >::const_iterator it2=it->second.find(fedchannel);
577 assert(it2!=it->second.end());
589 unsigned int fedchannel)
const{
591 std::vector<PixelROCName>
tmp(24);
597 std::map<PixelROCName,PixelHdwAddress>::const_iterator it=
translationtable_.begin();
601 if (it->second.fednumber()==fednumber&&
602 it->second.fedchannel()==fedchannel){
603 int index=it->second.fedrocnumber();
604 if (index>maxindex) maxindex=
index;
606 tmp[
index]=it->first;
612 assert(counter==maxindex+1);
622 unsigned int channel,
623 unsigned int roc)
const {
634 unsigned int channel,
635 unsigned int roc)
const {
638 std::string mthn =
"[PixelNameTranslation::ROCNameFromFEDChannelROC()]\t\t " ;
641 std::map<PixelHdwAddress,PixelROCName,PixelHdwAddress>::const_iterator it1=
fedlookup_.find(tmp);
647 std::cout << __LINE__ <<
"]\t" << mthn <<
"could not find ROCName "
648 <<
" for FED#" << fednumber <<
" chan=" << channel <<
" roc#=" << roc << std::endl;
660 std::string mthn =
"[PixelNameTranslation::ChannelFromFEDChannel()]\t\t " ;
661 std::map<PixelChannel,PixelHdwAddress>::const_iterator toReturn;
662 bool foundOne =
false;
665 if (it->second.fednumber()==fednumber && it->second.fedchannel()==fedchannel)
670 <<
"ERROR: multiple channels on FED#" << fednumber <<
", chan=" << fedchannel << std::endl;
684 <<
"ERROR: no channel found for FED#" << fednumber <<
", chan=" << fedchannel << std::endl;
688 return toReturn->first;
693 std::string mthn =
"[PixelNameTranslation::FEDChannelExist()]\t\t " ;
694 std::map<PixelChannel,PixelHdwAddress>::const_iterator toReturn;
695 bool foundOne =
false;
698 if (it->second.fednumber()==fednumber && it->second.fedchannel()==fedchannel)
703 <<
"ERROR: multiple channels on FED#" << fednumber <<
", chan=" << fedchannel << std::endl;
719 std::string mthn =
"[PixelNameTranslation::getChannelFromHdwAddress()]\t\t " ;
721 std::map<PixelHdwAddress, PixelChannel >::const_iterator it=
726 <<
"ERROR: no channel found for hardware address " << aHdwAddress << std::endl;
751 std::string mthn =
"[PixelNameTranslation::writeASCII()]\t\t\t " ;
752 if (dir!=
"") dir+=
"/";
755 std::ofstream
out(filename.c_str());
765 out <<
"# name TBMchannel FEC mfec mfecchannel hubaddress portadd rocid FED channel roc#"<<endl;
767 std::map<PixelROCName,PixelHdwAddress>::const_iterator iroc=
translationtable_.begin();
774 out << iroc->first.rocname()<<
" "
776 << iroc->second.fecnumber()<<
" "
777 << iroc->second.mfec()<<
" "
778 << iroc->second.mfecchannel()<<
" "
779 << iroc->second.hubaddress()<<
" "
780 << iroc->second.portaddress()<<
" "
781 << iroc->second.rocid()<<
" "
782 << iroc->second.fednumber()<<
" "
783 << iroc->second.fedchannel()<<
" "
784 << iroc->second.fedrocnumber()
798 std::ofstream *outstream,
799 std::ofstream *out1stream,
800 std::ofstream *out2stream)
const
802 std::string mthn =
"[PixelNameTranslation:::writeXMLHeader()]\t\t\t " ;
805 cout << __LINE__ <<
"]\t" << mthn <<
"Writing to: " << fullPath.str() << endl ;
807 outstream->open(fullPath.str().c_str()) ;
808 *outstream <<
"<?xml version='1.0' encoding='UTF-8' standalone='yes'?>" << endl ;
809 *outstream <<
"<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" << endl ;
810 *outstream <<
" <HEADER>" << endl ;
811 *outstream <<
" <TYPE>" << endl ;
812 *outstream <<
" <EXTENSION_TABLE_NAME>PIXEL_NAME_TRANSLATION</EXTENSION_TABLE_NAME>" << endl ;
813 *outstream <<
" <NAME>Pixel Name Translation</NAME>" << endl ;
814 *outstream <<
" </TYPE>" << endl ;
815 *outstream <<
" <RUN>" << endl ;
816 *outstream <<
" <RUN_TYPE>Pixel Name Translation</RUN_TYPE>" << endl ;
817 *outstream <<
" <RUN_NUMBER>1</RUN_NUMBER>" << endl ;
819 *outstream <<
" <LOCATION>CERN P5</LOCATION>" << endl ;
820 *outstream <<
" </RUN>" << endl ;
821 *outstream <<
" </HEADER>" << endl ;
822 *outstream <<
" " << endl ;
823 *outstream <<
" <DATA_SET>" << endl ;
824 *outstream <<
" <PART>" << endl ;
825 *outstream <<
" <NAME_LABEL>CMS-PIXEL-ROOT</NAME_LABEL>" << endl ;
826 *outstream <<
" <KIND_OF_PART>Detector ROOT</KIND_OF_PART>" << endl ;
827 *outstream <<
" </PART>" << endl ;
828 *outstream <<
" <VERSION>" << version <<
"</VERSION>" << endl ;
829 *outstream <<
" <COMMENT_DESCRIPTION>" <<
getComment() <<
"</COMMENT_DESCRIPTION>" << endl ;
830 *outstream <<
" <CREATED_BY_USER>" <<
getAuthor() <<
"</CREATED_BY_USER>" << endl ;
831 *outstream <<
" " << endl ;
837 std::ofstream *out1stream,
838 std::ofstream *out2stream)
const
840 std::string mthn =
"[PixelNameTranslation::writeXML()]\t\t\t " ;
842 std::map<PixelROCName,PixelHdwAddress>::const_iterator iroc=
translationtable_.begin();
849 *outstream <<
" <DATA>" << endl ;
850 *outstream <<
" <ROC_NAME>" << iroc->first.rocname() <<
"</ROC_NAME>" << endl ;
851 *outstream <<
" <TBM_MODE>" << TBMChannel <<
"</TBM_MODE>" << endl ;
852 *outstream <<
" <PXLFEC_NAME>" << iroc->second.fecnumber() <<
"</PXLFEC_NAME>" << endl ;
853 *outstream <<
" <MFEC_POSN>" << iroc->second.mfec() <<
"</MFEC_POSN>" << endl ;
854 *outstream <<
" <MFEC_CHAN>" << iroc->second.mfecchannel() <<
"</MFEC_CHAN>" << endl ;
855 *outstream <<
" <HUB_ADDRS>" << iroc->second.hubaddress() <<
"</HUB_ADDRS>" << endl ;
856 *outstream <<
" <PORT_NUM>" << iroc->second.portaddress() <<
"</PORT_NUM>" << endl ;
857 *outstream <<
" <ROC_I2C_ADDR>" << iroc->second.rocid() <<
"</ROC_I2C_ADDR>" << endl ;
858 *outstream <<
" <PXLFED_NAME>" << iroc->second.fednumber() <<
"</PXLFED_NAME>" << endl ;
859 *outstream <<
" <FED_CHAN>" << iroc->second.fedchannel() <<
"</FED_CHAN>" << endl ;
860 *outstream <<
" <FED_ROC_NUM>" << iroc->second.fedrocnumber() <<
"</FED_ROC_NUM>" << endl ;
861 *outstream <<
" </DATA>" << endl ;
862 *outstream <<
"" << endl ;
868 std::ofstream *out1stream,
869 std::ofstream *out2stream)
const
871 std::string mthn =
"[PixelNameTranslation::writeXMLTrailer()]\t\t\t " ;
873 *outstream <<
" </DATA_SET>" << endl ;
874 *outstream <<
"</ROOT> " << endl ;
881 std::string mthn =
"[PixelNameTranslation::writeXML]\t\t\t " ;
884 fullPath << path <<
"/Pixel_NameTranslation.xml" ;
885 cout << __LINE__ <<
"]\t" << mthn <<
"Writing to: " << fullPath.str() << endl ;
887 std::ofstream
out(fullPath.str().c_str()) ;
889 out <<
"<?xml version='1.0' encoding='UTF-8' standalone='yes'?>" << endl ;
890 out <<
"<ROOT xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>" << endl ;
892 out <<
" <HEADER>" << endl ;
893 out <<
" <HINTS mode='only-det-root' />" << endl ;
894 out <<
" <TYPE>" << endl ;
895 out <<
" <EXTENSION_TABLE_NAME>PIXEL_NAME_TRANSLATION</EXTENSION_TABLE_NAME>" << endl ;
896 out <<
" <NAME>Pixel Name Translation</NAME>" << endl ;
897 out <<
" </TYPE>" << endl ;
898 out <<
" <RUN>" << endl ;
899 out <<
" <RUN_TYPE>Pixel Name Translation</RUN_TYPE>" << endl ;
900 out <<
" <RUN_NUMBER>1</RUN_NUMBER>" << endl ;
902 out <<
" <COMMENT_DESCRIPTION>Test of Name Translation xml</COMMENT_DESCRIPTION>" << endl ;
903 out <<
" <LOCATION>CERN TAC</LOCATION>" << endl ;
904 out <<
" <CREATED_BY_USER>Dario Menasce</CREATED_BY_USER>" << endl ;
905 out <<
" </RUN>" << endl ;
906 out <<
" </HEADER>" << endl ;
908 out <<
" <DATA_SET>" << endl ;
909 out <<
" <VERSION>" << version <<
"</VERSION>" << endl ;
910 out <<
" <PART>" << endl ;
911 out <<
" <NAME_LABEL>CMS-PIXEL-ROOT</NAME_LABEL>" << endl ;
912 out <<
" <KIND_OF_PART>Detector ROOT</KIND_OF_PART>" << endl ;
913 out <<
" </PART>" << endl ;
916 std::map<PixelROCName,PixelHdwAddress>::const_iterator iroc=
translationtable_.begin();
923 out <<
" <DATA>" << endl ;
924 out <<
" <PXLFEC_NAME>" << iroc->second.fecnumber() <<
"</PXLFEC_NAME>" << endl ;
925 out <<
" <MFEC_POSN>" << iroc->second.mfec() <<
"</MFEC_POSN>" << endl ;
926 out <<
" <MFEC_CHAN>" << iroc->second.mfecchannel() <<
"</MFEC_CHAN>" << endl ;
927 out <<
" <HUB_ADDRS>" << iroc->second.hubaddress() <<
"</HUB_ADDRS>" << endl ;
928 out <<
" <PORT_NUM>" << iroc->second.portaddress() <<
"</PORT_NUM>" << endl ;
929 out <<
" <ROC_I2C_ADDR>" << iroc->second.rocid() <<
"</ROC_I2C_ADDR>" << endl ;
930 out <<
" <PXLFED_NAME>" << iroc->second.fednumber() <<
"</PXLFED_NAME>" << endl ;
931 out <<
" <FED_CHAN>" << iroc->second.fedchannel() <<
"</FED_CHAN>" << endl ;
932 out <<
" <FED_RO_NUM>" << iroc->second.fedrocnumber() <<
"</FED_ROC_NUM>" << endl ;
933 out <<
" </DATA>" << endl ;
936 out <<
" </DATA_SET> " << endl ;
937 out <<
"</ROOT> " << endl ;
942 const std::vector<PixelROCName>&
953 std::vector<PixelROCName> returnThis;
956 for ( std::set<PixelChannel>::const_iterator channelsOnThisModule_itr = channelsOnThisModule.begin(); channelsOnThisModule_itr != channelsOnThisModule.end(); channelsOnThisModule_itr++ )
958 std::vector<PixelROCName> ROCsOnThisChannel =
getROCsFromChannel( *channelsOnThisModule_itr );
959 for ( std::vector<PixelROCName>::const_iterator ROCsOnThisChannel_itr = ROCsOnThisChannel.begin(); ROCsOnThisChannel_itr != ROCsOnThisChannel.end(); ROCsOnThisChannel_itr++ )
961 returnThis.push_back(*ROCsOnThisChannel_itr);
979 std::map <unsigned int, std::set<unsigned int> >
tmp;
981 std::map<PixelChannel, PixelHdwAddress >::const_iterator
985 channelTranslationTable_itr++ ) {
987 unsigned int fednumber=channelTranslationTable_itr->second.fednumber();
988 unsigned int fedchannel=channelTranslationTable_itr->second.fedchannel();
990 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
virtual void writeXMLHeader(pos::PixelConfigKey key, int version, std::string path, std::ofstream *out, std::ofstream *out1=NULL, std::ofstream *out2=NULL) const
This file contains the base class for "pixel configuration data" management.
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::string TBMChannelString() const
std::string rocname() const
std::ostream & operator<<(std::ostream &s, const PixelCalibConfiguration &calib)
bool checkROCExistence(const PixelROCName &aROC) const
std::map< PixelROCName, PixelHdwAddress > translationtable_
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...
void writeXML(pos::PixelConfigKey key, int version, std::string path) const
virtual void writeXMLTrailer(std::ofstream *out, std::ofstream *out1=NULL, std::ofstream *out2=NULL) const
bool FEDChannelExist(unsigned int fednumber, unsigned int fedchannel) const
tuple path
else: Piece not in the list, fine.
std::map< PixelHdwAddress, PixelChannel > hdwTranslationTable_
PixelROCName ROCNameFromFEDChannelROC(unsigned int fednumber, unsigned int channel, unsigned int roc) const
bool ROCNameFromFEDChannelROCExists(unsigned int fednumber, unsigned int channel, unsigned int roc) const
std::string getComment() const
bool ROCexists(PixelROCName theROC)
unsigned int fedchannel() const
unsigned int hubaddress() const
const PixelHdwAddress & firstHdwAddress(const PixelModuleName &aModule) const
This is the documentation about PixelDetectorConfig...
void writeASCII(std::string dir="") const
Store mfec, mfecchannel etc.
std::string getAuthor() const
const bool checkFor(const PixelROCName &aROC) const
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
std::map< unsigned int, std::set< unsigned int > > getFEDsAndChannels() const
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
std::vector< std::vector< double > > tmp
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
volatile std::atomic< bool > shutdown_flag false
std::map< unsigned int, std::map< unsigned int, std::vector< PixelROCName > > > rocsFromFEDidAndChannel_
const PixelChannel & getChannelForROC(const PixelROCName &aROC) const
std::map< PixelChannel, PixelHdwAddress > channelTranslationTable_