CMS 3D CMS Logo

Public Member Functions | Private Types | Private Member Functions | Private Attributes

DQMDaqInfo Class Reference

#include <CondCore/DQMDaqInfo/src/DQMDaqInfo.cc>

Inheritance diagram for DQMDaqInfo:
edm::EDAnalyzer

List of all members.

Public Member Functions

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

Private Types

enum  subDetList {
  Pixel, SiStrip, EcalBarrel, EcalEndcap,
  Hcal, DT, CSC, RPC,
  L1T
}

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 &)

Private Attributes

std::pair< int, int > CSCRange
MonitorElementDaqFraction [9]
DQMStoredbe_
std::pair< int, int > DTRange
std::pair< int, int > ECALBarrRange
std::pair< int, int > ECALEndcapRangeHigh
std::pair< int, int > ECALEndcapRangeLow
std::pair< int, int > HcalRange
std::pair< int, int > L1TRange
float NumberOfFeds [9]
std::pair< int, int > PixelRange
std::pair< int, int > RPCRange
std::pair< int, int > TrackerRange

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 49 of file DQMDaqInfo.h.


Member Enumeration Documentation

enum DQMDaqInfo::subDetList [private]
Enumerator:
Pixel 
SiStrip 
EcalBarrel 
EcalEndcap 
Hcal 
DT 
CSC 
RPC 
L1T 

Definition at line 64 of file DQMDaqInfo.h.


Constructor & Destructor Documentation

DQMDaqInfo::DQMDaqInfo ( const edm::ParameterSet iConfig) [explicit]

Definition at line 4 of file DQMDaqInfo.cc.

{   
}
DQMDaqInfo::~DQMDaqInfo ( )

Definition at line 8 of file DQMDaqInfo.cc.

{  
}

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 159 of file DQMDaqInfo.cc.

{ 
 

}
void DQMDaqInfo::beginJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 62 of file DQMDaqInfo.cc.

References DQMStore::bookFloat(), CSC, CSCRange, DaqFraction, dbe_, DT, DTRange, EcalBarrel, ECALBarrRange, EcalEndcap, ECALEndcapRangeHigh, ECALEndcapRangeLow, Hcal, HcalRange, L1T, L1TRange, FEDNumbering::MAXCSCFEDID, FEDNumbering::MAXHCALFEDID, FEDNumbering::MAXSiPixelFEDID, FEDNumbering::MAXSiStripFEDID, FEDNumbering::MAXTriggerGTPFEDID, FEDNumbering::MINCSCFEDID, FEDNumbering::MINHCALFEDID, FEDNumbering::MINSiPixelFEDID, FEDNumbering::MINSiStripFEDID, FEDNumbering::MINTriggerGTPFEDID, NumberOfFeds, cppFunctionSkipper::operator, Pixel, PixelRange, RPC, RPCRange, DQMStore::setCurrentFolder(), SiStrip, and TrackerRange.

{
  dbe_ = 0;
  dbe_ = edm::Service<DQMStore>().operator->();
  
  std::string commonFolder = "/EventInfo/DAQContents";  
  std::string subsystFolder;
  std::string curentFolder;
  
  subsystFolder="Pixel";  
  curentFolder= subsystFolder+commonFolder;
  dbe_->setCurrentFolder(curentFolder.c_str());
  DaqFraction[Pixel]   = dbe_->bookFloat("PixelDaqFraction");
  

  subsystFolder="SiStrip";  
  curentFolder=subsystFolder+commonFolder;
  dbe_->setCurrentFolder(curentFolder.c_str());
  DaqFraction[SiStrip]    = dbe_->bookFloat("SiStripDaqFraction");
  
  subsystFolder="RPC";  
  curentFolder=subsystFolder+commonFolder;
  dbe_->setCurrentFolder(curentFolder.c_str());
  DaqFraction[RPC]        = dbe_->bookFloat("RPCDaqFraction");
  
  subsystFolder="CSC";  
  curentFolder=subsystFolder+commonFolder;
  dbe_->setCurrentFolder(curentFolder.c_str());
  DaqFraction[CSC]       = dbe_->bookFloat("CSCDaqFraction");

  subsystFolder="DT";  
  curentFolder=subsystFolder+commonFolder;
  dbe_->setCurrentFolder(curentFolder.c_str());
  DaqFraction[DT]         = dbe_->bookFloat("DTDaqFraction");

  subsystFolder="Hcal";  
  curentFolder=subsystFolder+commonFolder;
  dbe_->setCurrentFolder(curentFolder.c_str());
  DaqFraction[Hcal]       = dbe_->bookFloat("HcalDaqFraction");

  subsystFolder="EcalBarrel";  
  curentFolder=subsystFolder+commonFolder;
  dbe_->setCurrentFolder(curentFolder.c_str());
  DaqFraction[EcalBarrel]       = dbe_->bookFloat("EcalBarrDaqFraction");

  subsystFolder="EcalEndcap";  
  curentFolder=subsystFolder+commonFolder;
  dbe_->setCurrentFolder(curentFolder.c_str());
  DaqFraction[EcalEndcap]       = dbe_->bookFloat("EcalEndDaqFraction");

  subsystFolder="L1T";  
  curentFolder=subsystFolder+commonFolder;
  dbe_->setCurrentFolder(curentFolder.c_str());
  DaqFraction[L1T]       = dbe_->bookFloat("L1TDaqFraction");


  PixelRange.first  = FEDNumbering::MINSiPixelFEDID;
  PixelRange.second = FEDNumbering::MAXSiPixelFEDID;
  TrackerRange.first = FEDNumbering::MINSiStripFEDID;
  TrackerRange.second = FEDNumbering::MAXSiStripFEDID;
  CSCRange.first  = FEDNumbering::MINCSCFEDID;
  CSCRange.second = FEDNumbering::MAXCSCFEDID;
  RPCRange.first  = 790;
  RPCRange.second = 792;
  DTRange.first   = 770;
  DTRange.second  = 774;
  HcalRange.first  = FEDNumbering::MINHCALFEDID;
  HcalRange.second = FEDNumbering::MAXHCALFEDID;
  L1TRange.first  = FEDNumbering::MINTriggerGTPFEDID;
  L1TRange.second = FEDNumbering::MAXTriggerGTPFEDID;
  ECALBarrRange.first  = 610;    
  ECALBarrRange.second = 645;
  ECALEndcapRangeLow.first   = 601;
  ECALEndcapRangeLow.second  = 609;
  ECALEndcapRangeHigh.first  = 646;
  ECALEndcapRangeHigh.second = 654;

  NumberOfFeds[Pixel]   = PixelRange.second-PixelRange.first +1;
  NumberOfFeds[SiStrip] = TrackerRange.second-TrackerRange.first +1;
  NumberOfFeds[CSC]     = CSCRange.second-CSCRange.first  +1;
  NumberOfFeds[RPC]     = RPCRange.second-RPCRange.first  +1;
  NumberOfFeds[DT]      = DTRange.second-DTRange.first +1;
  NumberOfFeds[Hcal]    = HcalRange.second-HcalRange.first +1;  
  NumberOfFeds[EcalBarrel]    = ECALBarrRange.second-ECALBarrRange.first +1 ;
  NumberOfFeds[EcalEndcap]    = (ECALEndcapRangeLow.second-ECALEndcapRangeLow.first +1)+(ECALEndcapRangeHigh.second-ECALEndcapRangeHigh.first +1) ;
  NumberOfFeds[L1T]    = L1TRange.second-L1TRange.first +1;

}
void DQMDaqInfo::beginLuminosityBlock ( const edm::LuminosityBlock lumiBlock,
const edm::EventSetup iSetup 
) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 12 of file DQMDaqInfo.cc.

References CSC, CSCRange, DaqFraction, DT, DTRange, EcalBarrel, ECALBarrRange, EcalEndcap, ECALEndcapRangeHigh, ECALEndcapRangeLow, MonitorElement::Fill(), HcalObjRepresent::Fill(), edm::EventSetup::find(), edm::eventsetup::heterocontainer::HCTypeTag::findType(), edm::EventSetup::get(), Hcal, HcalRange, L1T, L1TRange, NumberOfFeds, Pixel, PixelRange, RPC, RPCRange, SiStrip, and TrackerRange.

                                                                                                      {
  
  edm::eventsetup::EventSetupRecordKey recordKey(edm::eventsetup::EventSetupRecordKey::TypeTag::findType("RunInfoRcd"));
  
  if( 0 != iSetup.find( recordKey ) ) {
    
    edm::ESHandle<RunInfo> sumFED;
    iSetup.get<RunInfoRcd>().get(sumFED);    
   
    //const RunInfo* summaryFED=sumFED.product();
  
    std::vector<int> FedsInIds= sumFED->m_fed_in;   

    float  FedCount[9]={0., 0., 0., 0., 0., 0., 0., 0., 0.};
    
    for(unsigned int fedItr=0;fedItr<FedsInIds.size(); ++fedItr) {
      int fedID=FedsInIds[fedItr];     

      if(fedID>=PixelRange.first             &&  fedID<=PixelRange.second)        ++FedCount[Pixel];
      if(fedID>=TrackerRange.first           &&  fedID<=TrackerRange.second)      ++FedCount[SiStrip];
      if(fedID>=CSCRange.first               &&  fedID<=CSCRange.second)          ++FedCount[CSC];
      if(fedID>=RPCRange.first               &&  fedID<=RPCRange.second)          ++FedCount[RPC];
      if(fedID>=DTRange.first                &&  fedID<=DTRange.second)           ++FedCount[DT];
      if(fedID>=HcalRange.first              &&  fedID<=HcalRange.second)         ++FedCount[Hcal];       
      if(fedID>=ECALBarrRange.first          &&  fedID<=ECALBarrRange.second)     ++FedCount[EcalBarrel];      
      if((fedID>=ECALEndcapRangeLow.first    && fedID<=ECALEndcapRangeLow.second) ||
         (fedID>=ECALEndcapRangeHigh.first && fedID<=ECALEndcapRangeHigh.second)) ++FedCount[EcalEndcap];
      if(fedID>=L1TRange.first               &&  fedID<=L1TRange.second)          ++FedCount[L1T];
    
    }   
    
    for(int detIndex=0; detIndex<9; ++detIndex) { 
      DaqFraction[detIndex]->Fill( FedCount[detIndex]/NumberOfFeds[detIndex]);
    }

  }else{    
  
    for(int detIndex=0; detIndex<9; ++detIndex)  DaqFraction[detIndex]->Fill(-1);               
    return; 
  }
  
 
}
void DQMDaqInfo::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 153 of file DQMDaqInfo.cc.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 57 of file DQMDaqInfo.cc.

                                                                                                     {
}

Member Data Documentation

std::pair<int,int> DQMDaqInfo::CSCRange [private]

Definition at line 70 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

Definition at line 66 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

Definition at line 62 of file DQMDaqInfo.h.

Referenced by beginJob().

std::pair<int,int> DQMDaqInfo::DTRange [private]

Definition at line 72 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

std::pair<int,int> DQMDaqInfo::ECALBarrRange [private]

Definition at line 74 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

std::pair<int,int> DQMDaqInfo::ECALEndcapRangeHigh [private]

Definition at line 76 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

std::pair<int,int> DQMDaqInfo::ECALEndcapRangeLow [private]

Definition at line 75 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

std::pair<int,int> DQMDaqInfo::HcalRange [private]

Definition at line 73 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

std::pair<int,int> DQMDaqInfo::L1TRange [private]

Definition at line 77 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

float DQMDaqInfo::NumberOfFeds[9] [private]

Definition at line 79 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

std::pair<int,int> DQMDaqInfo::PixelRange [private]

Definition at line 68 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

std::pair<int,int> DQMDaqInfo::RPCRange [private]

Definition at line 71 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

std::pair<int,int> DQMDaqInfo::TrackerRange [private]

Definition at line 69 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().