CMS 3D CMS Logo

L1TSync.h
Go to the documentation of this file.
1 #ifndef L1TSync_H
2 #define L1TSync_H
3 
4 /*
5  * \file L1TSync.h
6  *
7  * \author J. Pela
8  *
9 */
10 
11 // system include files
12 #include <memory>
13 #include <unistd.h>
14 
15 // user include files
22 
24 
28 
30 
31 //DataFormats
34 
36 
38 
39 #include <TString.h>
40 
41 #include <iostream>
42 #include <fstream>
43 #include <string>
44 #include <vector>
45 
46 class L1TSync : public DQMOneEDAnalyzer<edm::one::WatchLuminosityBlocks> {
47 public:
48  enum BeamMode {
49  NOMODE = 1,
50  SETUP = 2,
51  INJPILOT = 3,
52  INJINTR = 4,
53  INJNOMN = 5,
54  PRERAMP = 6,
55  RAMP = 7,
56  FLATTOP = 8,
57  QUEEZE = 9,
58  ADJUST = 10,
59  STABLE = 11,
60  UNSTABLE = 12,
61  BEAMDUMP = 13,
62  RAMPDOWN = 14,
63  RECOVERY = 15,
64  INJDUMP = 16,
65  CIRCDUMP = 17,
66  ABORT = 18,
67  CYCLING = 19,
68  WBDUMP = 20,
69  NOBEAM = 21
70  };
71 
72  enum Errors {
73  UNKNOWN = 1,
80  };
81 
82 public:
83  L1TSync(const edm::ParameterSet& ps); // Constructor
84  ~L1TSync() override; // Destructor
85 
86 protected:
87  void analyze(const edm::Event& e, const edm::EventSetup& c) override; // Analyze
88 
89  void beginLuminosityBlock(edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c) override;
90  void endLuminosityBlock(edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c) override;
91  void bookHistograms(DQMStore::IBooker& ibooker, const edm::Run&, const edm::EventSetup&) override;
92  void dqmBeginRun(edm::Run const&, edm::EventSetup const&) override;
93 
94  // Private Methods
95 private:
96  void getBeamConfOMDS();
97  void doFractionInSync(bool iForce = false, bool iBad = false);
98  void certifyLSBlock(std::string iTrigger, int iInitLs, int iEndLs, float iValue);
99 
100  // Variables
101 private:
103 
104  std::string m_outputFile; // file name for ROOT ouput
105 
106  // bool
107  bool m_verbose;
110 
111  // Int
113  unsigned int m_currentLS; // Current LS
114  //unsigned int m_eventLS;
115  unsigned int m_lhcFill; //
116 
117  // Vectors
118  BeamConfiguration m_beamConfig; // Current Bunch Structure
119 
120  // Const Vectors
121  const std::vector<std::vector<int> >* ListsPrescaleFactors; // Collection os all sets of prescales
122 
123  // Maps
124  std::map<TString, int> m_algoBit;
125  std::map<TString, unsigned int> m_certFirstLS; // First uncertified LS
126  std::map<TString, unsigned int> m_certLastLS; // Last uncertified LS
127  std::map<TString, MonitorElement*> m_algoCertification;
128  std::map<TString, MonitorElement*> m_algoVsBunchStructure;
129  std::map<std::string, bool> m_algoAutoSelect; // Map of categories to monitor
130  std::map<std::string, std::string> m_selectedTriggers; // Map of what trigger to monitor for each category
131 
132  // MonitorElement
134 
135  // Input tags
138 
140 };
141 
142 #endif
L1TSync::m_parameters
edm::ParameterSet m_parameters
Definition: L1TSync.h:102
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
L1TSync::m_verbose
bool m_verbose
Definition: L1TSync.h:107
L1TSync::m_certFirstLS
std::map< TString, unsigned int > m_certFirstLS
Definition: L1TSync.h:125
MessageLogger.h
L1TSync::INJINTR
Definition: L1TSync.h:52
L1TSync::endLuminosityBlock
void endLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c) override
Definition: L1TSync.cc:420
L1TSync::BEAMDUMP
Definition: L1TSync.h:61
L1TSync::m_l1GtDataDaqInputTag
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1GtDataDaqInputTag
Definition: L1TSync.h:137
L1TSync::INJPILOT
Definition: L1TSync.h:51
L1TSync::NOMODE
Definition: L1TSync.h:49
ESHandle.h
L1TSync::PRERAMP
Definition: L1TSync.h:54
L1TSync::m_outputFile
std::string m_outputFile
Definition: L1TSync.h:104
L1TSync::doFractionInSync
void doFractionInSync(bool iForce=false, bool iBad=false)
Definition: L1TSync.cc:675
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord >
LuminosityBlock.h
L1TSync::beginLuminosityBlock
void beginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c) override
Definition: L1TSync.cc:385
L1TSync::m_beamConfig
BeamConfiguration m_beamConfig
Definition: L1TSync.h:118
L1TSync::m_algoBit
std::map< TString, int > m_algoBit
Definition: L1TSync.h:124
L1TSync::m_ErrorMonitor
MonitorElement * m_ErrorMonitor
Definition: L1TSync.h:133
L1TSync::CIRCDUMP
Definition: L1TSync.h:65
DQMOneEDAnalyzer
Definition: DQMOneEDAnalyzer.h:20
DQMStore.h
L1TSync::ListsPrescaleFactors
const std::vector< std::vector< int > > * ListsPrescaleFactors
Definition: L1TSync.h:121
EDAnalyzer.h
L1TSync::RAMP
Definition: L1TSync.h:55
L1TSync::dqmBeginRun
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
BeginRun.
Definition: L1TSync.cc:304
L1TSync::m_currentLS
unsigned int m_currentLS
Definition: L1TSync.h:113
DQMOneEDAnalyzer.h
L1TSync::m_currentLSValid
bool m_currentLSValid
Definition: L1TSync.h:108
L1TSync::SETUP
Definition: L1TSync.h:50
L1TSync::certifyLSBlock
void certifyLSBlock(std::string iTrigger, int iInitLs, int iEndLs, float iValue)
Definition: L1TSync.cc:778
L1TSync::bookHistograms
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override
Definition: L1TSync.cc:311
L1TSync
Definition: L1TSync.h:46
L1TSync::INJDUMP
Definition: L1TSync.h:64
dqm::legacy::DQMStore::IBooker
dqm::implementation::IBooker IBooker
Definition: DQMStore.h:729
MakerMacros.h
L1TSync::WBDUMP
Definition: L1TSync.h:68
L1GlobalTriggerEvmReadoutRecord.h
L1TSync::BeamMode
BeamMode
Definition: L1TSync.h:48
L1TSync::ABORT
Definition: L1TSync.h:66
L1TSync::RAMPDOWN
Definition: L1TSync.h:62
Service.h
L1TSync::WARNING_DB_CONN_FAILED
Definition: L1TSync.h:74
L1GtUtils
Definition: L1GtUtils.h:66
L1TSync::m_algoCertification
std::map< TString, MonitorElement * > m_algoCertification
Definition: L1TSync.h:127
L1TSync::WARNING_DB_INCORRECT_NBUNCHES
Definition: L1TSync.h:76
L1TSync::m_selectedTriggers
std::map< std::string, std::string > m_selectedTriggers
Definition: L1TSync.h:130
L1TSync::NOBEAM
Definition: L1TSync.h:69
L1TSync::RECOVERY
Definition: L1TSync.h:63
L1TSync::UNSTABLE
Definition: L1TSync.h:60
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1TSync::STABLE
Definition: L1TSync.h:59
L1TSync::m_lhcFill
unsigned int m_lhcFill
Definition: L1TSync.h:115
L1TSync::QUEEZE
Definition: L1TSync.h:57
edm::ParameterSet
Definition: ParameterSet.h:36
Event.h
L1TSync::m_processedLS
bool * m_processedLS
Definition: L1TSync.h:109
L1TSync::ERROR_TRIGGERALIAS_NOTVALID
Definition: L1TSync.h:78
L1TSync::ERROR_UNABLE_RETRIVE_PRODUCT
Definition: L1TSync.h:77
L1TSync::m_l1GtEvmSource
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > m_l1GtEvmSource
Definition: L1TSync.h:136
L1TSync::Errors
Errors
Definition: L1TSync.h:72
L1TSync::FLATTOP
Definition: L1TSync.h:56
edm::EventSetup
Definition: EventSetup.h:57
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
L1TSync::~L1TSync
~L1TSync() override
Definition: L1TSync.cc:300
L1TSync::m_l1GtUtils
L1GtUtils m_l1GtUtils
Definition: L1TSync.h:139
L1TSync::L1TSync
L1TSync(const edm::ParameterSet &ps)
Definition: L1TSync.cc:40
L1TSync::ERROR_LSBLOCK_NOTVALID
Definition: L1TSync.h:79
L1TSync::INJNOMN
Definition: L1TSync.h:53
L1TSync::m_algoVsBunchStructure
std::map< TString, MonitorElement * > m_algoVsBunchStructure
Definition: L1TSync.h:128
BeamConfiguration
Definition: L1TOMDSHelper.h:19
L1TSync::m_refPrescaleSet
int m_refPrescaleSet
Definition: L1TSync.h:112
L1TSync::getBeamConfOMDS
void getBeamConfOMDS()
Definition: L1TSync.cc:595
Frameworkfwd.h
L1GtUtils.h
L1TSync::m_algoAutoSelect
std::map< std::string, bool > m_algoAutoSelect
Definition: L1TSync.h:129
L1TSync::CYCLING
Definition: L1TSync.h:67
L1TSync::ADJUST
Definition: L1TSync.h:58
L1TSync::m_certLastLS
std::map< TString, unsigned int > m_certLastLS
Definition: L1TSync.h:126
ParameterSet.h
edm::Event
Definition: Event.h:73
L1TSync::analyze
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: L1TSync.cc:482
L1TSync::UNKNOWN
Definition: L1TSync.h:73
L1GlobalTriggerReadoutRecord.h
L1TSync::WARNING_DB_QUERY_FAILED
Definition: L1TSync.h:75
L1TOMDSHelper.h
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37