CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

SiPixelDcsInfo Class Reference

#include <SiPixelDcsInfo.h>

Inheritance diagram for SiPixelDcsInfo:
edm::EDAnalyzer

List of all members.

Public Member Functions

 SiPixelDcsInfo (const edm::ParameterSet &)
 ~SiPixelDcsInfo ()

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
virtual void beginJob ()
virtual void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
virtual void endJob ()
virtual void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &)
virtual void endRun (const edm::Run &, const edm::EventSetup &)

Private Attributes

DQMStoredbe_
std::pair< int, int > DCSPixelRange_
MonitorElementFraction_
MonitorElementFractionBarrel_
MonitorElementFractionEndcap_
int NumberOfDcsChannels_

Detailed Description

Definition at line 25 of file SiPixelDcsInfo.h.


Constructor & Destructor Documentation

SiPixelDcsInfo::SiPixelDcsInfo ( const edm::ParameterSet ps) [explicit]

Definition at line 9 of file SiPixelDcsInfo.cc.

                                                        {
 
//  DCSPixelRange_.first  = ps.getUntrackedParameter<unsigned int>("MinimumPixelDcsChannel", 0);
//  DCSPixelRange_.second = ps.getUntrackedParameter<unsigned int>("MaximumPixelDcsChannel", 39);
  
//  NumberOfDcsChannels_ =DCSPixelRange_.second -  DCSPixelRange_.first +1;
  NumberOfDcsChannels_ = 100;
}
SiPixelDcsInfo::~SiPixelDcsInfo ( )

Definition at line 18 of file SiPixelDcsInfo.cc.

{}

Member Function Documentation

void SiPixelDcsInfo::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDAnalyzer.

Definition at line 144 of file SiPixelDcsInfo.cc.

{}
void SiPixelDcsInfo::beginJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 126 of file SiPixelDcsInfo.cc.

References DQMStore::bookFloat(), dbe_, cppFunctionSkipper::operator, and DQMStore::setCurrentFolder().

                             {

  dbe_ = 0;
  dbe_ = Service<DQMStore>().operator->();
  
 
  dbe_->setCurrentFolder("Pixel/EventInfo");
  Fraction_= dbe_->bookFloat("DCSSummary");  
  dbe_->setCurrentFolder("Pixel/EventInfo/DCSContents");
  FractionBarrel_= dbe_->bookFloat("PixelBarrelFraction");  
  FractionEndcap_= dbe_->bookFloat("PixelEndcapFraction");  
}
void SiPixelDcsInfo::beginLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 20 of file SiPixelDcsInfo.cc.

{}
void SiPixelDcsInfo::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 140 of file SiPixelDcsInfo.cc.

{}
void SiPixelDcsInfo::endLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 23 of file SiPixelDcsInfo.cc.

References edm::EventSetup::find(), and edm::eventsetup::heterocontainer::HCTypeTag::findType().

                                                                                                         {
  edm::eventsetup::EventSetupRecordKey recordKey(edm::eventsetup::EventSetupRecordKey::TypeTag::findType("RunInfoRcd"));
  if(0 != iSetup.find( recordKey ) ) {
    // cout<<"record key found"<<endl;
    //get DCS channel information
//    ESHandle<RunInfo> sumDCS;
//    iSetup.get<RunInfoRcd>().get(sumDCS);    
//    vector<int> DcsChannelsInIds= sumDCS->m_dcs_in;   

/*    int DcsCount=0;
    int DcsCountBarrel=0;
    int DcsCountEndcap=0;
*/
    //loop on all active DCS channels
/*    for(unsigned int fedItr=0;fedItr<FedsInIds.size(); ++fedItr) {
      int fedID=FedsInIds[fedItr];
      //make sure fed id is in allowed range  
      //cout<<fedID<<endl;   
      if(fedID>=FEDRange_.first && fedID<=FEDRange_.second){
        ++FedCount;
        if(fedID>=0 && fedID<=31){
          ++FedCountBarrel;
        }else if(fedID>=32 && fedID<=39){
          ++FedCountEndcap;
        }
      }
    }   
*/
    //Fill active dcs fraction ME's
//    if(NumberOfFeds_>0){
      //all Pixel:
      Fraction_->Fill(1.);
      //Barrel:
      FractionBarrel_->Fill(1.);
      //Endcap:
      FractionEndcap_->Fill(1.);
/*    }else{
      Fraction_->Fill(-1);
      FractionBarrel_->Fill(-1);
      FractionEndcap_->Fill(-1);
    }

  }else{      
    Fraction_->Fill(-1);    
    FractionBarrel_->Fill(-1);
    FractionEndcap_->Fill(-1);
*/ 
    return; 
  }
}
void SiPixelDcsInfo::endRun ( const edm::Run r,
const edm::EventSetup iSetup 
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 74 of file SiPixelDcsInfo.cc.

References edm::EventSetup::find(), and edm::eventsetup::heterocontainer::HCTypeTag::findType().

                                                                         {
  edm::eventsetup::EventSetupRecordKey recordKey(edm::eventsetup::EventSetupRecordKey::TypeTag::findType("RunInfoRcd"));
  if(0 != iSetup.find( recordKey ) ) {
    // cout<<"record key found"<<endl;
    //get DCS channel information
//    ESHandle<RunInfo> sumDCS;
//    iSetup.get<RunInfoRcd>().get(sumDCS);    
//    vector<int> DcsChannelsInIds= sumDCS->m_dcs_in;   

/*    int DcsCount=0;
    int DcsCountBarrel=0;
    int DcsCountEndcap=0;
*/
    //loop on all active DCS channels
/*    for(unsigned int fedItr=0;fedItr<FedsInIds.size(); ++fedItr) {
      int fedID=FedsInIds[fedItr];
      //make sure fed id is in allowed range  
      //cout<<fedID<<endl;   
      if(fedID>=FEDRange_.first && fedID<=FEDRange_.second){
        ++FedCount;
        if(fedID>=0 && fedID<=31){
          ++FedCountBarrel;
        }else if(fedID>=32 && fedID<=39){
          ++FedCountEndcap;
        }
      }
    }   
*/
    //Fill active dcs fraction ME's
//    if(NumberOfFeds_>0){
      //all Pixel:
      Fraction_->Fill(1.);
      //Barrel:
      FractionBarrel_->Fill(1.);
      //Endcap:
      FractionEndcap_->Fill(1.);
/*    }else{
      Fraction_->Fill(-1);
      FractionBarrel_->Fill(-1);
      FractionEndcap_->Fill(-1);
    }

  }else{      
    Fraction_->Fill(-1);    
    FractionBarrel_->Fill(-1);
    FractionEndcap_->Fill(-1);
*/ 
    return; 
  }
}

Member Data Documentation

Definition at line 39 of file SiPixelDcsInfo.h.

std::pair<int,int> SiPixelDcsInfo::DCSPixelRange_ [private]

Definition at line 45 of file SiPixelDcsInfo.h.

Definition at line 41 of file SiPixelDcsInfo.h.

Definition at line 42 of file SiPixelDcsInfo.h.

Definition at line 43 of file SiPixelDcsInfo.h.

Definition at line 47 of file SiPixelDcsInfo.h.