CMS 3D CMS Logo

pos::PixelConfigurationVerifier Class Reference

This class performs various tests to make sure that configurations are consistent. More...

#include <interface/PixelConfigurationVerifier.h>

List of all members.

Public Member Functions

void checkChannelEnable (PixelFEDCard *theFEDCard, PixelNameTranslation *theNameTranslation, PixelDetectorConfig *theDetConfig)
 PixelConfigurationVerifier ()
virtual ~PixelConfigurationVerifier ()


Detailed Description

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.


Constructor & Destructor Documentation

pos::PixelConfigurationVerifier::PixelConfigurationVerifier (  )  [inline]

Definition at line 27 of file PixelConfigurationVerifier.h.

00027 {}

virtual pos::PixelConfigurationVerifier::~PixelConfigurationVerifier (  )  [inline, virtual]

Definition at line 28 of file PixelConfigurationVerifier.h.

00028 {}


Member Function Documentation

void PixelConfigurationVerifier::checkChannelEnable ( PixelFEDCard theFEDCard,
PixelNameTranslation theNameTranslation,
PixelDetectorConfig theDetConfig 
)

Definition at line 15 of file PixelConfigurationVerifier.cc.

References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), pos::PixelHdwAddress::fedchannel(), pos::PixelFEDCard::fedNumber, pos::PixelHdwAddress::fednumber(), pos::PixelNameTranslation::getChannels(), pos::PixelNameTranslation::getHdwAddress(), i, pos::PixelFEDCard::setChannel(), and pos::PixelFEDCard::useChannel().

00017                                                                                       {
00018   
00019   set<PixelChannel> channels=theNameTranslation->getChannels(*theDetConfig);
00020 
00021   unsigned int fedid=theFEDCard->fedNumber;
00022 
00023   //use slots 1-36
00024 
00025   vector<bool> usedChannel(37);
00026   for(unsigned int i=1;i<37;i++){
00027     usedChannel[i]=false;
00028   }
00029 
00030   set<PixelChannel>::const_iterator iChannel=channels.begin();
00031 
00032 
00033   for(;iChannel!=channels.end();++iChannel){
00034     PixelHdwAddress hdw=theNameTranslation->getHdwAddress(*iChannel);
00035     if (fedid==hdw.fednumber()){
00036       unsigned int fedchannel=hdw.fedchannel();
00037       assert(fedchannel>0&&fedchannel<37);
00038       usedChannel[fedchannel]=true;
00039     }
00040   }
00041 
00042   //Now check the channels
00043   
00044   for(unsigned int iChannel=1;iChannel<37;iChannel++){
00045     bool used=theFEDCard->useChannel(iChannel);
00046     //if (used) cout << "Channel="<<iChannel<<" is used"<<endl;
00047     //if (!used) cout << "Channel="<<iChannel<<" is not used"<<endl;
00048     if (used!=usedChannel[iChannel]) {
00049       cout << "*******************************************************"<<endl;
00050       cout << "WARNING for fedid="<<fedid<<" and channel="<<iChannel;
00051       cout << " found that fedcard has channel as"<<endl;
00052       if (used) cout << "used while configuration not using this channel"
00053                      << endl;
00054       if (!used)cout << "not used while configuration uses this channel"
00055                      << endl;
00056       cout << "The fedcard will be modifed to agree with configuration"<<endl;
00057       cout << "*******************************************************"<<endl;
00058       theFEDCard->setChannel(iChannel,usedChannel[iChannel]);
00059     }
00060   }
00061 
00062 }


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:50:33 2009 for CMSSW by  doxygen 1.5.4