This class performs various tests to make sure that configurations are consistent.
More...
This class performs various tests to make sure that configurations are consistent.
This class collects the information about the range of DAC settings used in scans of the DACs.
A longer explanation will be placed here later
Definition at line 23 of file PixelConfigurationVerifier.h.
Definition at line 15 of file PixelConfigurationVerifier.cc.
References cms::cuda::assert(), gather_cfg::cout, pos::PixelHdwAddress::fedchannel(), pos::PixelNameTranslation::FEDChannelExist(), pos::PixelHdwAddress::fednumber(), pos::PixelFEDCard::fedNumber, pos::PixelROCStatus::get(), pos::PixelNameTranslation::getChannels(), pos::PixelNameTranslation::getHdwAddress(), pos::PixelNameTranslation::getROCsFromChannel(), pos::PixelNameTranslation::getROCsFromFEDChannel(), pos::PixelDetectorConfig::getROCsList(), mps_fire::i, pos::PixelROCStatus::noAnalogSignal, pos::PixelFEDCard::NRocs, pos::PixelFEDCard::setChannel(), AlCaHLTBitMon_QueryRunRegistry::string, and pos::PixelFEDCard::useChannel().
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
unsigned int fedchannel() const
Store mfec, mfecchannel etc.
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