CMS 3D CMS Logo

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

DQMHcalPhiSymHLT Class Reference

Inheritance diagram for DQMHcalPhiSymHLT:
edm::EDAnalyzer

List of all members.

Public Member Functions

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

Public Attributes

DQMStoredbe_
std::string folderName_
MonitorElementhFEDsize
MonitorElementhFULLsize
MonitorElementhHCALsize
MonitorElementhHCALvsLumiSec
std::string outRootFileName_
edm::InputTag rawInLabel_
bool saveToRootFile_

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
virtual void beginJob ()
virtual void endJob ()

Private Attributes

int firstLumiSec
int iEvt

Detailed Description

Definition at line 35 of file DQMHcalPhiSymHLT.cc.


Constructor & Destructor Documentation

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

Definition at line 63 of file DQMHcalPhiSymHLT.cc.

References folderName_, edm::ParameterSet::getParameter(), iEvt, outRootFileName_, rawInLabel_, and saveToRootFile_.

{
  folderName_ = iConfig.getParameter<std::string>("folderName");
  outRootFileName_=iConfig.getParameter<std::string>("outputRootFileName");
  rawInLabel_=iConfig.getParameter<edm::InputTag>("rawInputLabel");
  saveToRootFile_=iConfig.getParameter<bool>("SaveToRootFile");
 
  iEvt=0;
}
DQMHcalPhiSymHLT::~DQMHcalPhiSymHLT ( )

Definition at line 73 of file DQMHcalPhiSymHLT.cc.

{
}

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 79 of file DQMHcalPhiSymHLT.cc.

References FEDRawDataCollection::FEDData(), MonitorElement::Fill(), firstLumiSec, edm::Event::getByLabel(), hFEDsize, hFULLsize, hHCALsize, hHCALvsLumiSec, i, iEvt, j, gen::k, edm::EventBase::luminosityBlock(), FEDNumbering::MAXFEDID, FEDNumbering::MAXHCALFEDID, FEDNumbering::MINHCALFEDID, funct::pow(), edm::Handle< T >::product(), rawInLabel_, and FEDRawData::size().

{
  if (iEvt==0) firstLumiSec=iEvent.luminosityBlock();
  iEvt++;
  
  std::auto_ptr<FEDRawDataCollection> producedData(new FEDRawDataCollection);
  
  edm::Handle<FEDRawDataCollection> rawIn;
  iEvent.getByLabel(rawInLabel_,rawIn);
 
  std::vector<int> selFEDs;

  //get HCAL FEDs:
  for (int i=FEDNumbering::MINHCALFEDID; i<=FEDNumbering::MAXHCALFEDID; i++)
    {
      selFEDs.push_back(i);
    }

  const FEDRawDataCollection *rdc=rawIn.product();
  
  //calculate full HCAL data size:
  size_t hcalSize=0;
  for (unsigned int k=0; k<selFEDs.size(); k++)
    {
      const FEDRawData & fedData = rdc->FEDData(selFEDs[k]);
      hcalSize+=fedData.size();
      hFEDsize->Fill(fedData.size()*pow(1024,-1),1);
    }
  hHCALsize->Fill(hcalSize*pow(1024,-1),1);
  hHCALvsLumiSec->Fill(iEvent.luminosityBlock()-firstLumiSec,hcalSize*pow(1024,-1),1);
  
  //calculate full data size:
  size_t fullSize=0;
  for (int j=0; j<FEDNumbering::MAXFEDID; ++j )
    {
      const FEDRawData & fedData = rdc->FEDData(j);
      fullSize+=fedData.size();
    }
  hFULLsize->Fill(fullSize*pow(1024,-1),1);
}
void DQMHcalPhiSymHLT::beginJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 123 of file DQMHcalPhiSymHLT.cc.

References DQMStore::book1D(), DQMStore::book2D(), dbe_, folderName_, hFEDsize, hFULLsize, hHCALsize, hHCALvsLumiSec, cmsCodeRules::cppFunctionSkipper::operator, MonitorElement::setAxisTitle(), and DQMStore::setCurrentFolder().

{
  dbe_ = edm::Service<DQMStore>().operator->();
  dbe_->setCurrentFolder(folderName_);
  
  hFEDsize=dbe_->book1D("hFEDsize","HCAL FED size (kB)",1000,0,100);
  hFEDsize->setAxisTitle("kB",1);

  hHCALsize=dbe_->book1D("hHCALsize","HCAL data size (kB)",1000,0,1000);
  hHCALsize->setAxisTitle("kB",1);

  hFULLsize=dbe_->book1D("hFULLsize","Full data size (kB)",1000,0,2000);
  hFULLsize->setAxisTitle("kB",1);

  hHCALvsLumiSec=dbe_->book2D("hHCALvsLumiSec","HCAL data size (kB) vs. internal lumi block number",10000,0,10000,1000,0,1000);
  hHCALvsLumiSec->setAxisTitle("kB",2);
  hHCALvsLumiSec->setAxisTitle("internal luminosity block number",1);
}
void DQMHcalPhiSymHLT::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 143 of file DQMHcalPhiSymHLT.cc.

References dbe_, outRootFileName_, DQMStore::save(), and saveToRootFile_.


Member Data Documentation

Definition at line 51 of file DQMHcalPhiSymHLT.cc.

Referenced by beginJob(), and endJob().

Definition at line 58 of file DQMHcalPhiSymHLT.cc.

Referenced by analyze().

Definition at line 46 of file DQMHcalPhiSymHLT.cc.

Referenced by beginJob(), and DQMHcalPhiSymHLT().

Definition at line 40 of file DQMHcalPhiSymHLT.cc.

Referenced by analyze(), and beginJob().

Definition at line 42 of file DQMHcalPhiSymHLT.cc.

Referenced by analyze(), and beginJob().

Definition at line 41 of file DQMHcalPhiSymHLT.cc.

Referenced by analyze(), and beginJob().

Definition at line 43 of file DQMHcalPhiSymHLT.cc.

Referenced by analyze(), and beginJob().

int DQMHcalPhiSymHLT::iEvt [private]

Definition at line 59 of file DQMHcalPhiSymHLT.cc.

Referenced by analyze(), and DQMHcalPhiSymHLT().

Definition at line 47 of file DQMHcalPhiSymHLT.cc.

Referenced by DQMHcalPhiSymHLT(), and endJob().

Definition at line 48 of file DQMHcalPhiSymHLT.cc.

Referenced by analyze(), and DQMHcalPhiSymHLT().

Definition at line 49 of file DQMHcalPhiSymHLT.cc.

Referenced by DQMHcalPhiSymHLT(), and endJob().