CMS 3D CMS Logo

BeamMonitorBx.h
Go to the documentation of this file.
1 #ifndef BeamMonitorBx_H
2 #define BeamMonitorBx_H
3 
10 // C++
11 #include <string>
12 // CMS
19 #include <fstream>
20 
21 //
22 // class declaration
23 //
24 
26 public:
29 
31  ~BeamMonitorBx() override;
32 
33  typedef int BxNum;
34  typedef std::map<BxNum, reco::BeamSpot> BeamSpotMapBx;
35 
36 protected:
37  // BeginJob
38  void beginJob() override;
39 
40  // BeginRun
41  void beginRun(const edm::Run& r, const edm::EventSetup& c) override;
42 
43  void analyze(const edm::Event& e, const edm::EventSetup& c) override;
44 
45  void beginLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& context) override;
46 
47  void endLuminosityBlock(const edm::LuminosityBlock& lumiSeg, const edm::EventSetup& c) override;
48  // EndRun
49  void endRun(const edm::Run& r, const edm::EventSetup& c) override;
50 
51 private:
52  void FitAndFill(const edm::LuminosityBlock& lumiSeg, int&, int&, int&);
53  void BookTables(int, std::map<std::string, std::string>&, std::string);
54  void BookTrendHistos(bool, int, std::map<std::string, std::string>&, std::string, const TString&, const TString&);
55  void FillTables(int, int, std::map<std::string, std::string>&, reco::BeamSpot&, std::string);
56  void FillTrendHistos(int, int, std::map<std::string, std::string>&, reco::BeamSpot&, const TString&);
57  void weight(BeamSpotMapBx&, const BeamSpotMapBx&);
58  void weight(double& mean, double& meanError, const double& val, const double& valError);
59  void formatFitTime(char*, const std::time_t&);
60 
63  edm::InputTag bsSrc_; // beam spot
64 
65  int fitNLumi_;
67  bool debug_;
68 
71 
72  unsigned int countBx_;
73  int countEvt_; //counter
74  int countLumi_; //counter
77  int lastlumi_; // previous LS processed
78  int nextlumi_; // next LS of Fit
79  int firstlumi_; // first LS with good fit
81  std::time_t refBStime[2];
82 
84  bool processed_;
85  // ----------member data ---------------------------
86  BeamSpotMapBx fbspotMap; //for weighted beam spots of each bunch
87  std::map<std::string, std::string> varMap;
88  std::map<std::string, std::string> varMap1;
89  // MonitorElements:
90  std::map<TString, MonitorElement*> hs; // Tables
91  std::map<TString, MonitorElement*> hst; // Trending Histos
92 
93  //Test
94  // MonitorElement * h_x0;
95 
96  //
97  std::time_t tmpTime;
98  std::time_t refTime;
99  std::time_t startTime;
101 };
102 
103 #endif
BeamMonitorBx::endLuminosityBlock
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c) override
Definition: BeamMonitorBx.cc:178
BeamMonitorBx::processed_
bool processed_
Definition: BeamMonitorBx.h:84
BeamMonitorBx::BeamMonitorBx
BeamMonitorBx(const edm::ParameterSet &)
Definition: BeamMonitorBx.cc:54
BeamMonitorBx::FitAndFill
void FitAndFill(const edm::LuminosityBlock &lumiSeg, int &, int &, int &)
Definition: BeamMonitorBx.cc:328
BeamMonitorBx::countGoodFit_
int countGoodFit_
Definition: BeamMonitorBx.h:80
SiStripPI::mean
Definition: SiStripPayloadInspectorHelper.h:169
BeamMonitorBx::~BeamMonitorBx
~BeamMonitorBx() override
Definition: BeamMonitorBx.cc:83
BeamMonitorBx::startTime
std::time_t startTime
Definition: BeamMonitorBx.h:99
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
BeamMonitorBx::lastlumi_
int lastlumi_
Definition: BeamMonitorBx.h:77
BeamMonitorBx::fbspotMap
BeamSpotMapBx fbspotMap
Definition: BeamMonitorBx.h:86
BeamMonitorBx::endRun
void endRun(const edm::Run &r, const edm::EventSetup &c) override
Definition: BeamMonitorBx.cc:566
DQMStore.h
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
BeamMonitorBx::beginLuminosityBlock
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context) override
Definition: BeamMonitorBx.cc:127
EDAnalyzer.h
BeamMonitorBx::bsSrc_
edm::InputTag bsSrc_
Definition: BeamMonitorBx.h:63
BeamMonitorBx::beginRun
void beginRun(const edm::Run &r, const edm::EventSetup &c) override
Definition: BeamMonitorBx.cc:120
edm::EDAnalyzer
Definition: EDAnalyzer.h:28
BeamMonitorBx::monitorName_
std::string monitorName_
Definition: BeamMonitorBx.h:62
BeamMonitorBx::ftimestamp
edm::TimeValue_t ftimestamp
Definition: BeamMonitorBx.h:100
BeamMonitorBx::FillTrendHistos
void FillTrendHistos(int, int, std::map< std::string, std::string > &, reco::BeamSpot &, const TString &)
Definition: BeamMonitorBx.cc:470
BeamMonitorBx
Definition: BeamMonitorBx.h:25
dqm::legacy::DQMStore
Definition: DQMStore.h:727
BeamMonitorBx::hs
std::map< TString, MonitorElement * > hs
Definition: BeamMonitorBx.h:90
reco::BeamSpot
Definition: BeamSpot.h:21
BeamMonitorBx::refBStime
std::time_t refBStime[2]
Definition: BeamMonitorBx.h:81
BeamMonitorBx::countBx_
unsigned int countBx_
Definition: BeamMonitorBx.h:72
BeamMonitorBx::theBeamFitter
BeamFitter * theBeamFitter
Definition: BeamMonitorBx.h:70
BeamFitter
Definition: BeamFitter.h:41
BeamMonitorBx::endLumiOfBSFit_
int endLumiOfBSFit_
Definition: BeamMonitorBx.h:76
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
BeamMonitorBx::dbe_
DQMStore * dbe_
Definition: BeamMonitorBx.h:69
BeamMonitorBx::firstlumi_
int firstlumi_
Definition: BeamMonitorBx.h:79
edm::ParameterSet
Definition: ParameterSet.h:47
BeamMonitorBx::BeamSpotMapBx
std::map< BxNum, reco::BeamSpot > BeamSpotMapBx
Definition: BeamMonitorBx.h:34
Event.h
BeamMonitorBx::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition: BeamMonitorBx.h:27
BeamMonitorBx::beginLumiOfBSFit_
int beginLumiOfBSFit_
Definition: BeamMonitorBx.h:75
BeamMonitorBx::countEvt_
int countEvt_
Definition: BeamMonitorBx.h:73
BeamMonitorBx::analyze
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: BeamMonitorBx.cc:158
BeamMonitorBx::refTime
std::time_t refTime
Definition: BeamMonitorBx.h:98
BeamMonitorBx::countLumi_
int countLumi_
Definition: BeamMonitorBx.h:74
BeamMonitorBx::resetFitNLumi_
int resetFitNLumi_
Definition: BeamMonitorBx.h:66
edm::EventSetup
Definition: EventSetup.h:58
BeamMonitorBx::parameters_
edm::ParameterSet parameters_
Definition: BeamMonitorBx.h:61
BeamMonitorBx::beginJob
void beginJob() override
Definition: BeamMonitorBx.cc:86
alignCSCRings.r
r
Definition: alignCSCRings.py:93
BeamMonitorBx::tmpTime
std::time_t tmpTime
Definition: BeamMonitorBx.h:97
BeamMonitorBx::debug_
bool debug_
Definition: BeamMonitorBx.h:67
BeamMonitorBx::BookTables
void BookTables(int, std::map< std::string, std::string > &, std::string)
Definition: BeamMonitorBx.cc:190
BeamMonitorBx::nextlumi_
int nextlumi_
Definition: BeamMonitorBx.h:78
heppy_batch.val
val
Definition: heppy_batch.py:351
BeamMonitorBx::formatFitTime
void formatFitTime(char *, const std::time_t &)
Definition: BeamMonitorBx.cc:28
Frameworkfwd.h
BeamMonitorBx::fitNLumi_
int fitNLumi_
Definition: BeamMonitorBx.h:65
BeamMonitorBx::varMap
std::map< std::string, std::string > varMap
Definition: BeamMonitorBx.h:87
BeamMonitorBx::weight
void weight(BeamSpotMapBx &, const BeamSpotMapBx &)
Definition: BeamMonitorBx.cc:506
BeamMonitorBx::BookTrendHistos
void BookTrendHistos(bool, int, std::map< std::string, std::string > &, std::string, const TString &, const TString &)
Definition: BeamMonitorBx.cc:214
BeamMonitorBx::varMap1
std::map< std::string, std::string > varMap1
Definition: BeamMonitorBx.h:88
BeamFitter.h
ParameterSet.h
BeamMonitorBx::DQMStore
dqm::legacy::DQMStore DQMStore
Definition: BeamMonitorBx.h:28
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
BeamMonitorBx::FillTables
void FillTables(int, int, std::map< std::string, std::string > &, reco::BeamSpot &, std::string)
Definition: BeamMonitorBx.cc:450
edm::Event
Definition: Event.h:73
BeamMonitorBx::hst
std::map< TString, MonitorElement * > hst
Definition: BeamMonitorBx.h:91
BeamMonitorBx::BxNum
int BxNum
Definition: BeamMonitorBx.h:33
BeamMonitorBx::resetHistos_
bool resetHistos_
Definition: BeamMonitorBx.h:83
edm::InputTag
Definition: InputTag.h:15
edm::TimeValue_t
unsigned long long TimeValue_t
Definition: Timestamp.h:28
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37