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