CMS 3D CMS Logo

DQMDaqInfo Class Reference

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

#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 (const edm::EventSetup &)
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, intCSCRange
MonitorElementDaqFraction [9]
DQMStoredbe_
std::pair< int, intDTRange
std::pair< int, intECALBarrRange
std::pair< int, intECALEndcapRangeHigh
std::pair< int, intECALEndcapRangeLow
std::pair< int, intHcalRange
std::pair< int, intL1TRange
float NumberOfFeds [9]
std::pair< int, intPixelRange
std::pair< int, intRPCRange
std::pair< int, intTrackerRange


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.

00005 {   
00006 }

DQMDaqInfo::~DQMDaqInfo (  ) 

Definition at line 8 of file DQMDaqInfo.cc.

00009 {  
00010 }


Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 154 of file DQMDaqInfo.cc.

00155 { 
00156  
00157 
00158 }

void DQMDaqInfo::beginJob ( const edm::EventSetup iSetup  )  [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, FEDNumbering::getCSCFEDIds(), FEDNumbering::getHcalFEDIds(), FEDNumbering::getSiPixelFEDIds(), FEDNumbering::getSiStripFEDIds(), FEDNumbering::getTriggerGTPFEDIds(), Hcal, HcalRange, L1T, L1TRange, NumberOfFeds, Pixel, PixelRange, RPC, RPCRange, DQMStore::setCurrentFolder(), SiStrip, and TrackerRange.

00063 {
00064   dbe_ = 0;
00065   dbe_ = edm::Service<DQMStore>().operator->();
00066   
00067   std::string commonFolder = "/EventInfo/DAQContents";  
00068   std::string subsystFolder;
00069   std::string curentFolder;
00070   
00071   subsystFolder="Pixel";  
00072   curentFolder= subsystFolder+commonFolder;
00073   dbe_->setCurrentFolder(curentFolder.c_str());
00074   DaqFraction[Pixel]   = dbe_->bookFloat("PixelDaqFraction");
00075   
00076 
00077   subsystFolder="SiStrip";  
00078   curentFolder=subsystFolder+commonFolder;
00079   dbe_->setCurrentFolder(curentFolder.c_str());
00080   DaqFraction[SiStrip]    = dbe_->bookFloat("SiStripDaqFraction");
00081   
00082   subsystFolder="RPC";  
00083   curentFolder=subsystFolder+commonFolder;
00084   dbe_->setCurrentFolder(curentFolder.c_str());
00085   DaqFraction[RPC]        = dbe_->bookFloat("RPCDaqFraction");
00086   
00087   subsystFolder="CSC";  
00088   curentFolder=subsystFolder+commonFolder;
00089   dbe_->setCurrentFolder(curentFolder.c_str());
00090   DaqFraction[CSC]       = dbe_->bookFloat("CSCDaqFraction");
00091 
00092   subsystFolder="DT";  
00093   curentFolder=subsystFolder+commonFolder;
00094   dbe_->setCurrentFolder(curentFolder.c_str());
00095   DaqFraction[DT]         = dbe_->bookFloat("DTDaqFraction");
00096 
00097   subsystFolder="Hcal";  
00098   curentFolder=subsystFolder+commonFolder;
00099   dbe_->setCurrentFolder(curentFolder.c_str());
00100   DaqFraction[Hcal]       = dbe_->bookFloat("HcalDaqFraction");
00101 
00102   subsystFolder="EcalBarrel";  
00103   curentFolder=subsystFolder+commonFolder;
00104   dbe_->setCurrentFolder(curentFolder.c_str());
00105   DaqFraction[EcalBarrel]       = dbe_->bookFloat("EcalBarrDaqFraction");
00106 
00107   subsystFolder="EcalEndcap";  
00108   curentFolder=subsystFolder+commonFolder;
00109   dbe_->setCurrentFolder(curentFolder.c_str());
00110   DaqFraction[EcalEndcap]       = dbe_->bookFloat("EcalEndDaqFraction");
00111 
00112   subsystFolder="L1T";  
00113   curentFolder=subsystFolder+commonFolder;
00114   dbe_->setCurrentFolder(curentFolder.c_str());
00115   DaqFraction[L1T]       = dbe_->bookFloat("L1TDaqFraction");
00116 
00117 
00118   PixelRange   = FEDNumbering::getSiPixelFEDIds();
00119   TrackerRange = FEDNumbering::getSiStripFEDIds();
00120   CSCRange     = FEDNumbering::getCSCFEDIds();
00121   RPCRange.first  = 790;
00122   RPCRange.second = 792;
00123   DTRange.first   = 770;
00124   DTRange.second  = 774;
00125   HcalRange  = FEDNumbering::getHcalFEDIds();
00126   L1TRange   = FEDNumbering::getTriggerGTPFEDIds();
00127   ECALBarrRange.first  = 610;    
00128   ECALBarrRange.second = 645;
00129   ECALEndcapRangeLow.first   = 601;
00130   ECALEndcapRangeLow.second  = 609;
00131   ECALEndcapRangeHigh.first  = 646;
00132   ECALEndcapRangeHigh.second = 654;
00133 
00134   NumberOfFeds[Pixel]   = PixelRange.second-PixelRange.first +1;
00135   NumberOfFeds[SiStrip] = TrackerRange.second-TrackerRange.first +1;
00136   NumberOfFeds[CSC]     = CSCRange.second-CSCRange.first  +1;
00137   NumberOfFeds[RPC]     = RPCRange.second-RPCRange.first  +1;
00138   NumberOfFeds[DT]      = DTRange.second-DTRange.first +1;
00139   NumberOfFeds[Hcal]    = HcalRange.second-HcalRange.first +1;  
00140   NumberOfFeds[EcalBarrel]    = ECALBarrRange.second-ECALBarrRange.first +1 ;
00141   NumberOfFeds[EcalEndcap]    = (ECALEndcapRangeLow.second-ECALEndcapRangeLow.first +1)+(ECALEndcapRangeHigh.second-ECALEndcapRangeHigh.first +1) ;
00142   NumberOfFeds[L1T]    = L1TRange.second-L1TRange.first +1;
00143 
00144 }

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(), edm::EventSetup::find(), edm::eventsetup::heterocontainer::HCTypeTag< Group >::findType(), edm::EventSetup::get(), Hcal, HcalRange, L1T, L1TRange, NumberOfFeds, Pixel, PixelRange, RPC, RPCRange, SiStrip, and TrackerRange.

00012                                                                                                       {
00013   
00014   edm::eventsetup::EventSetupRecordKey recordKey(edm::eventsetup::EventSetupRecordKey::TypeTag::findType("RunInfoRcd"));
00015   
00016   if( 0 != iSetup.find( recordKey ) ) {
00017     
00018     edm::ESHandle<RunInfo> sumFED;
00019     iSetup.get<RunInfoRcd>().get(sumFED);    
00020    
00021     //const RunInfo* summaryFED=sumFED.product();
00022   
00023     std::vector<int> FedsInIds= sumFED->m_fed_in;   
00024 
00025     float  FedCount[9]={0., 0., 0., 0., 0., 0., 0., 0., 0.};
00026     
00027     for(unsigned int fedItr=0;fedItr<FedsInIds.size(); ++fedItr) {
00028       int fedID=FedsInIds[fedItr];     
00029 
00030       if(fedID>=PixelRange.first   &  fedID<=PixelRange.second)    ++FedCount[Pixel]  ;
00031       if(fedID>=TrackerRange.first &  fedID<=TrackerRange.second)  ++FedCount[SiStrip];
00032       if(fedID>=CSCRange.first     &  fedID<=CSCRange.second)      ++FedCount[CSC]    ;
00033       if(fedID>=RPCRange.first     &  fedID<=RPCRange.second)      ++FedCount[RPC]    ;
00034       if(fedID>=DTRange.first      &  fedID<=DTRange.second)       ++FedCount[DT]     ;
00035       if(fedID>=HcalRange.first    &  fedID<=HcalRange.second)     ++FedCount[Hcal]     ;       
00036       if(fedID>=ECALBarrRange.first    &  fedID<=ECALBarrRange.second)     ++FedCount[EcalBarrel]   ;      
00037       if((fedID>=ECALEndcapRangeLow.first & fedID<=ECALEndcapRangeLow.second)
00038          ||(fedID>=ECALEndcapRangeHigh.first & fedID<=ECALEndcapRangeHigh.second)) ++FedCount[EcalEndcap]   ;
00039       if(fedID>=L1TRange.first    &  fedID<=L1TRange.second)     ++FedCount[L1T]   ;
00040     
00041     }   
00042     
00043     for(int detIndex=0; detIndex<9; ++detIndex) { 
00044       DaqFraction[detIndex]->Fill( FedCount[detIndex]/NumberOfFeds[detIndex]);
00045     }
00046 
00047   }else{    
00048   
00049     for(int detIndex=0; detIndex<9; ++detIndex)  DaqFraction[detIndex]->Fill(-1);               
00050     return; 
00051   }
00052   
00053  
00054 }

void DQMDaqInfo::endJob ( void   )  [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 148 of file DQMDaqInfo.cc.

00148                    {
00149 }

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.

00057                                                                                                      {
00058 }


Member Data Documentation

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

Definition at line 70 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

MonitorElement* DQMDaqInfo::DaqFraction[9] [private]

Definition at line 66 of file DQMDaqInfo.h.

Referenced by beginJob(), and beginLuminosityBlock().

DQMStore* DQMDaqInfo::dbe_ [private]

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().


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