CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Member Functions | Private Attributes
BeamConditionsMonitor Class Reference

#include <BeamConditionsMonitor.h>

Inheritance diagram for BeamConditionsMonitor:
edm::EDAnalyzer

Public Member Functions

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

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 
void beginJob ()
 
void beginLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
 
void beginRun (const edm::Run &r, const edm::EventSetup &c)
 
void endJob ()
 
void endLuminosityBlock (const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
 
void endRun (const edm::Run &r, const edm::EventSetup &c)
 
- Protected Member Functions inherited from edm::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Private Attributes

edm::InputTag bsSrc_
 
BeamSpotObjects condBeamSpot
 
int countEvt_
 
int countLumi_
 
DQMStoredbe_
 
bool debug_
 
MonitorElementh_x0_lumi
 
MonitorElementh_y0_lumi
 
std::string monitorName_
 
edm::ParameterSet parameters_
 

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)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 28 of file BeamConditionsMonitor.h.

Constructor & Destructor Documentation

BeamConditionsMonitor::BeamConditionsMonitor ( const edm::ParameterSet ps)
BeamConditionsMonitor::~BeamConditionsMonitor ( )

Definition at line 43 of file BeamConditionsMonitor.cc.

43  {
44 }

Member Function Documentation

void BeamConditionsMonitor::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

Implements edm::EDAnalyzer.

Definition at line 77 of file BeamConditionsMonitor.cc.

References condBeamSpot, countEvt_, and edm::EventSetup::get().

77  {
78 
79  countEvt_++;
80  ESHandle< BeamSpotObjects > beamhandle;
81  iSetup.get<BeamSpotObjectsRcd>().get(beamhandle);
82  condBeamSpot = *beamhandle;
83 
84 }
void BeamConditionsMonitor::beginJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 48 of file BeamConditionsMonitor.cc.

References DQMStore::book1D(), dbe_, MonitorElement::getTH1(), h_x0_lumi, h_y0_lumi, monitorName_, MonitorElement::setAxisTitle(), and DQMStore::setCurrentFolder().

48  {
49 
50  // book some histograms here
51  // create and cd into new folder
52  dbe_->setCurrentFolder(monitorName_+"Conditions");
53 
54  h_x0_lumi = dbe_->book1D("x0_lumi_cond","x coordinate of beam spot vs lumi (Cond)",10,0,10);
55  h_x0_lumi->setAxisTitle("Lumisection",1);
56  h_x0_lumi->setAxisTitle("x_{0} (cm)",2);
57  h_x0_lumi->getTH1()->SetOption("E1");
58 
59  h_y0_lumi = dbe_->book1D("y0_lumi_cond","y coordinate of beam spot vs lumi (Cond)",10,0,10);
60  h_y0_lumi->setAxisTitle("Lumisection",1);
61  h_y0_lumi->setAxisTitle("y_{0} (cm)",2);
62  h_y0_lumi->getTH1()->SetOption("E1");
63 
64 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:717
TH1 * getTH1(void) const
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:429
void BeamConditionsMonitor::beginLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup context 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 71 of file BeamConditionsMonitor.cc.

References countLumi_.

72  {
73  countLumi_++;
74 }
void BeamConditionsMonitor::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 67 of file BeamConditionsMonitor.cc.

67  {
68 }
void BeamConditionsMonitor::endJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 100 of file BeamConditionsMonitor.cc.

100  {
101 }
void BeamConditionsMonitor::endLuminosityBlock ( const edm::LuminosityBlock lumiSeg,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 88 of file BeamConditionsMonitor.cc.

References condBeamSpot, BeamSpotObjects::GetX(), BeamSpotObjects::GetXError(), BeamSpotObjects::GetY(), BeamSpotObjects::GetYError(), h_x0_lumi, h_y0_lumi, and MonitorElement::ShiftFillLast().

89  {
90 
91  LogInfo("BeamConditions") << "[BeamConditionsMonitor]:" << condBeamSpot << endl;
94 
95 }
double GetY() const
get Y beam position
double GetYError() const
get Y beam position Error
void ShiftFillLast(double y, double ye=0., int32_t xscale=1)
double GetX() const
get X beam position
double GetXError() const
get X beam position Error
void BeamConditionsMonitor::endRun ( const edm::Run r,
const edm::EventSetup c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 97 of file BeamConditionsMonitor.cc.

97  {
98 }

Member Data Documentation

edm::InputTag BeamConditionsMonitor::bsSrc_
private

Definition at line 61 of file BeamConditionsMonitor.h.

Referenced by BeamConditionsMonitor().

BeamSpotObjects BeamConditionsMonitor::condBeamSpot
private

Definition at line 70 of file BeamConditionsMonitor.h.

Referenced by analyze(), and endLuminosityBlock().

int BeamConditionsMonitor::countEvt_
private

Definition at line 66 of file BeamConditionsMonitor.h.

Referenced by analyze().

int BeamConditionsMonitor::countLumi_
private

Definition at line 67 of file BeamConditionsMonitor.h.

Referenced by beginLuminosityBlock().

DQMStore* BeamConditionsMonitor::dbe_
private

Definition at line 64 of file BeamConditionsMonitor.h.

Referenced by BeamConditionsMonitor(), and beginJob().

bool BeamConditionsMonitor::debug_
private

Definition at line 62 of file BeamConditionsMonitor.h.

Referenced by BeamConditionsMonitor().

MonitorElement* BeamConditionsMonitor::h_x0_lumi
private

Definition at line 73 of file BeamConditionsMonitor.h.

Referenced by beginJob(), and endLuminosityBlock().

MonitorElement* BeamConditionsMonitor::h_y0_lumi
private

Definition at line 74 of file BeamConditionsMonitor.h.

Referenced by beginJob(), and endLuminosityBlock().

std::string BeamConditionsMonitor::monitorName_
private

Definition at line 60 of file BeamConditionsMonitor.h.

Referenced by BeamConditionsMonitor(), and beginJob().

edm::ParameterSet BeamConditionsMonitor::parameters_
private