CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
DQMHcalPhiSymHLT Class Reference
Inheritance diagram for DQMHcalPhiSymHLT:
edm::EDAnalyzer

Public Member Functions

 DQMHcalPhiSymHLT (const edm::ParameterSet &)
 
 ~DQMHcalPhiSymHLT ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

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
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

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_.

64 {
65  folderName_ = iConfig.getParameter<std::string>("folderName");
66  outRootFileName_=iConfig.getParameter<std::string>("outputRootFileName");
67  rawInLabel_=iConfig.getParameter<edm::InputTag>("rawInputLabel");
68  saveToRootFile_=iConfig.getParameter<bool>("SaveToRootFile");
69 
70  iEvt=0;
71 }
T getParameter(std::string const &) const
std::string outRootFileName_
edm::InputTag rawInLabel_
std::string folderName_
DQMHcalPhiSymHLT::~DQMHcalPhiSymHLT ( )

Definition at line 73 of file DQMHcalPhiSymHLT.cc.

74 {
75 }

Member Function Documentation

void DQMHcalPhiSymHLT::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
privatevirtual

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

80 {
81  if (iEvt==0) firstLumiSec=iEvent.luminosityBlock();
82  iEvt++;
83 
84  std::auto_ptr<FEDRawDataCollection> producedData(new FEDRawDataCollection);
85 
87  iEvent.getByLabel(rawInLabel_,rawIn);
88 
89  std::vector<int> selFEDs;
90 
91  //get HCAL FEDs:
93  {
94  selFEDs.push_back(i);
95  }
96 
97  const FEDRawDataCollection *rdc=rawIn.product();
98 
99  //calculate full HCAL data size:
100  size_t hcalSize=0;
101  for (unsigned int k=0; k<selFEDs.size(); k++)
102  {
103  const FEDRawData & fedData = rdc->FEDData(selFEDs[k]);
104  hcalSize+=fedData.size();
105  hFEDsize->Fill(fedData.size()*pow(1024,-1),1);
106  }
107  hHCALsize->Fill(hcalSize*pow(1024,-1),1);
108  hHCALvsLumiSec->Fill(iEvent.luminosityBlock()-firstLumiSec,hcalSize*pow(1024,-1),1);
109 
110  //calculate full data size:
111  size_t fullSize=0;
112  for (int j=0; j<FEDNumbering::MAXFEDID; ++j )
113  {
114  const FEDRawData & fedData = rdc->FEDData(j);
115  fullSize+=fedData.size();
116  }
117  hFULLsize->Fill(fullSize*pow(1024,-1),1);
118 }
int i
Definition: DBlmapReader.cc:9
MonitorElement * hFULLsize
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:59
MonitorElement * hFEDsize
size_t size() const
Lenght of the data buffer in bytes.
Definition: FEDRawData.h:47
void Fill(long long x)
const FEDRawData & FEDData(int fedid) const
retrieve data for fed
int j
Definition: DBlmapReader.cc:9
edm::InputTag rawInLabel_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:355
int k[5][pyjets_maxn]
MonitorElement * hHCALsize
T const * product() const
Definition: Handle.h:74
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
MonitorElement * hHCALvsLumiSec
void DQMHcalPhiSymHLT::beginJob ( void  )
privatevirtual

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

124 {
127 
128  hFEDsize=dbe_->book1D("hFEDsize","HCAL FED size (kB)",1000,0,100);
129  hFEDsize->setAxisTitle("kB",1);
130 
131  hHCALsize=dbe_->book1D("hHCALsize","HCAL data size (kB)",1000,0,1000);
132  hHCALsize->setAxisTitle("kB",1);
133 
134  hFULLsize=dbe_->book1D("hFULLsize","Full data size (kB)",1000,0,2000);
135  hFULLsize->setAxisTitle("kB",1);
136 
137  hHCALvsLumiSec=dbe_->book2D("hHCALvsLumiSec","HCAL data size (kB) vs. internal lumi block number",10000,0,10000,1000,0,1000);
138  hHCALvsLumiSec->setAxisTitle("kB",2);
139  hHCALvsLumiSec->setAxisTitle("internal luminosity block number",1);
140 }
MonitorElement * hFULLsize
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:514
MonitorElement * hFEDsize
MonitorElement * hHCALsize
std::string folderName_
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:642
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
MonitorElement * hHCALvsLumiSec
void DQMHcalPhiSymHLT::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 143 of file DQMHcalPhiSymHLT.cc.

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

145 {
146  if(dbe_&&saveToRootFile_)
147  {
149  }
150 }
std::string outRootFileName_
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:1898

Member Data Documentation

DQMStore* DQMHcalPhiSymHLT::dbe_

Definition at line 51 of file DQMHcalPhiSymHLT.cc.

Referenced by beginJob(), and endJob().

int DQMHcalPhiSymHLT::firstLumiSec
private

Definition at line 58 of file DQMHcalPhiSymHLT.cc.

Referenced by analyze().

std::string DQMHcalPhiSymHLT::folderName_

Definition at line 46 of file DQMHcalPhiSymHLT.cc.

Referenced by beginJob(), and DQMHcalPhiSymHLT().

MonitorElement* DQMHcalPhiSymHLT::hFEDsize

Definition at line 40 of file DQMHcalPhiSymHLT.cc.

Referenced by analyze(), and beginJob().

MonitorElement* DQMHcalPhiSymHLT::hFULLsize

Definition at line 42 of file DQMHcalPhiSymHLT.cc.

Referenced by analyze(), and beginJob().

MonitorElement* DQMHcalPhiSymHLT::hHCALsize

Definition at line 41 of file DQMHcalPhiSymHLT.cc.

Referenced by analyze(), and beginJob().

MonitorElement* DQMHcalPhiSymHLT::hHCALvsLumiSec

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

std::string DQMHcalPhiSymHLT::outRootFileName_

Definition at line 47 of file DQMHcalPhiSymHLT.cc.

Referenced by DQMHcalPhiSymHLT(), and endJob().

edm::InputTag DQMHcalPhiSymHLT::rawInLabel_

Definition at line 48 of file DQMHcalPhiSymHLT.cc.

Referenced by analyze(), and DQMHcalPhiSymHLT().

bool DQMHcalPhiSymHLT::saveToRootFile_

Definition at line 49 of file DQMHcalPhiSymHLT.cc.

Referenced by DQMHcalPhiSymHLT(), and endJob().