18 std::string mthn =
"[PixelConfigurationVerifier::checkChannelEnable()]\t\t ";
19 set<PixelChannel> channels = theNameTranslation->
getChannels(*theDetConfig);
21 unsigned int fedid = theFEDCard->
fedNumber;
25 vector<bool> usedChannel(37);
26 for (
unsigned int i = 1;
i < 37;
i++) {
27 usedChannel[
i] =
false;
30 set<PixelChannel>::const_iterator iChannel = channels.begin();
33 for (; iChannel != channels.end(); ++iChannel) {
37 assert(fedchannel > 0 && fedchannel < 37);
38 usedChannel[fedchannel] =
true;
43 map<PixelROCName, PixelROCStatus> roclistcopy = theDetConfig->
getROCsList();
46 for (
unsigned int jChannel = 1; jChannel < 37; jChannel++) {
52 if (nrocs[jChannel] != theFEDCard->
NRocs[jChannel - 1]) {
53 cout <<
"[PixelConfigurationVerifier] Warning in FED#" << fedid <<
", channel#" << jChannel
54 <<
": number of ROCs mismatch: theNameTranslation=" << nrocs[jChannel]
55 <<
"; theFEDCard=" << theFEDCard->
NRocs[jChannel - 1] << endl;
63 bool onehasNAS =
false, onedoesnothaveNAS =
false;
64 vector<PixelROCName>::const_iterator jROC = rocsOnThisChannel.begin();
65 for (; jROC != rocsOnThisChannel.end(); ++jROC) {
70 onedoesnothaveNAS =
true;
72 if (onehasNAS && onedoesnothaveNAS) {
73 cout <<
"[PixelConfigurationVerifier] Error in FED#" << fedid <<
", channel#" << jChannel
74 <<
": not all ROCs have the same noAnalogSignal state." << endl;
80 cout <<
"[PixelConfigurationVerifier] FEDid=" << fedid <<
", channel=" << jChannel
81 <<
": Channel disabled because ROCs are set to noAnalogSignal" << endl;
85 if (!onehasNAS && (used != usedChannel[jChannel])) {
86 cout << __LINE__ <<
"]\t" << mthn <<
"*******************************************************" << endl;
87 cout << __LINE__ <<
"]\t" << mthn <<
"WARNING for fedid=" << fedid <<
" and channel=" << jChannel
88 <<
" found that fedcard has channel as " << endl;
90 cout << __LINE__ <<
"]\t" << mthn <<
"used while configuration not using this channel" << endl;
92 cout << __LINE__ <<
"]\t" << mthn <<
"not used while configuration uses this channel" << endl;
93 cout << __LINE__ <<
"]\t" << mthn <<
"The fedcard will be modifed to agree with configuration" << endl;
94 cout << __LINE__ <<
"]\t" << mthn <<
"*******************************************************" << endl;
95 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.