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 16 of file PixelConfigurationVerifier.cc.
References 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(), i, pos::PixelROCStatus::noAnalogSignal, pos::PixelFEDCard::NRocs, pos::PixelFEDCard::setChannel(), AlCaHLTBitMon_QueryRunRegistry::string, and pos::PixelFEDCard::useChannel().
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
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