20 std::string mthn =
"[PixelConfigurationVerifier::checkChannelEnable()]\t\t " ;
21 set<PixelChannel> channels=theNameTranslation->
getChannels(*theDetConfig);
27 vector<bool> usedChannel(37);
28 for(
unsigned int i=1;
i<37;
i++){
32 set<PixelChannel>::const_iterator iChannel=channels.begin();
36 for(;iChannel!=channels.end();++iChannel){
40 assert(fedchannel>0&&fedchannel<37);
41 usedChannel[fedchannel]=
true;
46 map<PixelROCName, PixelROCStatus> roclistcopy = theDetConfig->
getROCsList();
49 for(
unsigned int jChannel=1;jChannel<37;jChannel++){
55 if (nrocs[jChannel] != theFEDCard->
NRocs[jChannel-1]) {
56 cout<<
"[PixelConfigurationVerifier] Warning in FED#"<<fedid<<
", channel#"<<jChannel
57 <<
": number of ROCs mismatch: theNameTranslation="<<nrocs[jChannel]<<
"; theFEDCard="<<theFEDCard->
NRocs[jChannel-1]<<endl;
66 bool onehasNAS=
false,onedoesnothaveNAS=
false;
67 vector<PixelROCName>::const_iterator jROC=rocsOnThisChannel.begin();
68 for (; jROC!= rocsOnThisChannel.end(); ++jROC) {
71 else onedoesnothaveNAS=
true;
73 if (onehasNAS && onedoesnothaveNAS) {
74 cout<<
"[PixelConfigurationVerifier] Error in FED#"<<fedid<<
", channel#"<<jChannel
75 <<
": not all ROCs have the same noAnalogSignal state."<<endl;
81 cout<<
"[PixelConfigurationVerifier] FEDid="<<fedid<<
", channel="<<jChannel
82 <<
": Channel disabled because ROCs are set to noAnalogSignal"<<endl;
86 if (!onehasNAS && (used!=usedChannel[jChannel])) {
87 cout << __LINE__ <<
"]\t" << mthn <<
"*******************************************************" << endl;
88 cout << __LINE__ <<
"]\t" << mthn <<
"WARNING for fedid=" << fedid <<
" and channel=" << jChannel <<
89 " found that fedcard has channel as " << endl;
90 if (used)
cout << __LINE__ <<
"]\t" << mthn <<
"used while configuration not using this channel" 92 if (!used)
cout << __LINE__ <<
"]\t" << mthn <<
"not used while configuration uses this channel" 94 cout << __LINE__ <<
"]\t" << mthn <<
"The fedcard will be modifed to agree with configuration" << endl;
95 cout << __LINE__ <<
"]\t" << mthn <<
"*******************************************************" << endl;
96 theFEDCard->
setChannel(jChannel,usedChannel[jChannel]);
const PixelHdwAddress * getHdwAddress(const PixelROCName &aROC) const
unsigned int fednumber() const
bool get(ROCstatus stat) const
std::set< PixelChannel > getChannels() const
bool useChannel(unsigned int iChannel)
bool FEDChannelExist(unsigned int fednumber, unsigned int fedchannel) const
void checkChannelEnable(PixelFEDCard *theFEDCard, PixelNameTranslation *theNameTranslation, PixelDetectorConfig *theDetConfig)
unsigned int fedchannel() const
This is the documentation about PixelDetectorConfig...
Store mfec, mfecchannel etc.
This class performs various tests to make sure that configurations are consistent.
This is the documentation about PixelNameTranslation...
const std::vector< PixelROCName > & getROCsFromFEDChannel(unsigned int fednumber, unsigned int fedchannel) const
const std::vector< PixelROCName > & getROCsFromChannel(const PixelChannel &aChannel) const
void setChannel(unsigned int iChannel, bool mode)
const std::map< PixelROCName, PixelROCStatus > & getROCsList() const
This is the documentation about PixelFEDCard...
This class keeps the possible non-standard status a ROC can have.