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 
29 
31 
32 //DataFormats
35 
37 
39 
40 #include <TString.h>
41 
42 #include <iostream>
43 #include <fstream>
44 #include <string>
45 #include <vector>
46 
47 class L1TSync : public one::DQMEDAnalyzer<edm::one::WatchLuminosityBlocks> {
48 
49  public:
50 
51  enum BeamMode{
52  NOMODE=1,
53  SETUP=2,
58  RAMP=7,
60  QUEEZE=9,
61  ADJUST=10,
62  STABLE=11,
67  INJDUMP=16,
69  ABORT=18,
70  CYCLING=19,
71  WBDUMP=20,
72  NOBEAM=21
73  };
74 
75  enum Errors{
76  UNKNOWN = 1,
83  };
84 
85 
86  public:
87 
88  L1TSync(const edm::ParameterSet& ps); // Constructor
89  ~L1TSync() override; // Destructor
90 
91  protected:
92 
93  void analyze (const edm::Event& e, const edm::EventSetup& c) override; // Analyze
94 
95  void beginLuminosityBlock(edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c) override;
96  void endLuminosityBlock (edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c) override;
97  void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run&, const edm::EventSetup&) override;
98  void dqmBeginRun(edm::Run const&, edm::EventSetup const&) override;
99 
100 
101  // Private Methods
102  private:
103 
104  void getBeamConfOMDS();
105  void doFractionInSync(bool iForce=false, bool iBad=false);
106  void certifyLSBlock (std::string iTrigger, int iInitLs, int iEndLs ,float iValue);
107 
108  // Variables
109  private:
110 
112 
113  std::string m_outputFile; // file name for ROOT ouput
114 
115  // bool
116  bool m_verbose;
119 
120  // Int
122  unsigned int m_currentLS; // Current LS
123  //unsigned int m_eventLS;
124  unsigned int m_lhcFill; //
125 
126  // Vectors
127  BeamConfiguration m_beamConfig; // Current Bunch Structure
128 
129  // Const Vectors
130  const std::vector< std::vector<int> >* ListsPrescaleFactors; // Collection os all sets of prescales
131 
132  // Maps
133  std::map<TString,int> m_algoBit;
134  std::map<TString,unsigned int> m_certFirstLS; // First uncertified LS
135  std::map<TString,unsigned int> m_certLastLS; // Last uncertified LS
136  std::map<TString,MonitorElement*> m_algoCertification;
137  std::map<TString,MonitorElement*> m_algoVsBunchStructure;
138  std::map<std::string,bool> m_algoAutoSelect; // Map of categories to monitor
139  std::map<std::string,std::string> m_selectedTriggers; // Map of what trigger to monitor for each category
140 
141  // MonitorElement
143 
144  // Input tags
147 
149 };
150 
151 #endif
int m_refPrescaleSet
Definition: L1TSync.h:121
std::map< TString, unsigned int > m_certLastLS
Definition: L1TSync.h:135
void doFractionInSync(bool iForce=false, bool iBad=false)
Definition: L1TSync.cc:576
~L1TSync() override
Definition: L1TSync.cc:198
L1TSync(const edm::ParameterSet &ps)
Definition: L1TSync.cc:40
unsigned int m_lhcFill
Definition: L1TSync.h:124
std::map< std::string, std::string > m_selectedTriggers
Definition: L1TSync.h:139
BeamMode
Definition: L1TSync.h:51
void beginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c) override
Definition: L1TSync.cc:283
BeamConfiguration m_beamConfig
Definition: L1TSync.h:127
std::map< TString, unsigned int > m_certFirstLS
Definition: L1TSync.h:134
bool m_verbose
Definition: L1TSync.h:116
std::string m_outputFile
Definition: L1TSync.h:113
std::map< std::string, bool > m_algoAutoSelect
Definition: L1TSync.h:138
bool * m_processedLS
Definition: L1TSync.h:118
void certifyLSBlock(std::string iTrigger, int iInitLs, int iEndLs, float iValue)
Definition: L1TSync.cc:687
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override
Definition: L1TSync.cc:208
std::map< TString, MonitorElement * > m_algoVsBunchStructure
Definition: L1TSync.h:137
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1GtDataDaqInputTag
Definition: L1TSync.h:146
edm::ParameterSet m_parameters
Definition: L1TSync.h:111
void getBeamConfOMDS()
Definition: L1TSync.cc:496
void endLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c) override
Definition: L1TSync.cc:319
L1GtUtils m_l1GtUtils
Definition: L1TSync.h:148
bool m_currentLSValid
Definition: L1TSync.h:117
void analyze(const edm::Event &e, const edm::EventSetup &c) override
Definition: L1TSync.cc:384
MonitorElement * m_ErrorMonitor
Definition: L1TSync.h:142
std::map< TString, MonitorElement * > m_algoCertification
Definition: L1TSync.h:136
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > m_l1GtEvmSource
Definition: L1TSync.h:145
std::map< TString, int > m_algoBit
Definition: L1TSync.h:133
const std::vector< std::vector< int > > * ListsPrescaleFactors
Definition: L1TSync.h:130
Errors
Definition: L1TSync.h:75
Definition: Run.h:45
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
BeginRun.
Definition: L1TSync.cc:203
unsigned int m_currentLS
Definition: L1TSync.h:122