CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 DQMEDAnalyzer {
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  virtual ~L1TSync(); // Destructor
90 
91  protected:
92 
93  void analyze (const edm::Event& e, const edm::EventSetup& c); // Analyze
94 
95  virtual void beginLuminosityBlock(edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c);
96  virtual void endLuminosityBlock (edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c);
97  virtual void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run&, const edm::EventSetup&) override;
98  virtual void dqmBeginRun(edm::Run const&, edm::EventSetup const&);
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(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
BeamConfiguration m_beamConfig
Definition: L1TSync.h:127
virtual void beginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
Definition: L1TSync.cc:283
void analyze(const edm::Event &e, const edm::EventSetup &c)
Definition: L1TSync.cc:384
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
virtual void dqmBeginRun(edm::Run const &, edm::EventSetup const &)
BeginRun.
Definition: L1TSync.cc:203
bool * m_processedLS
Definition: L1TSync.h:118
void certifyLSBlock(std::string iTrigger, int iInitLs, int iEndLs, float iValue)
Definition: L1TSync.cc:687
virtual 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
virtual void endLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
Definition: L1TSync.cc:319
edm::ParameterSet m_parameters
Definition: L1TSync.h:111
void getBeamConfOMDS()
Definition: L1TSync.cc:496
L1GtUtils m_l1GtUtils
Definition: L1TSync.h:148
bool m_currentLSValid
Definition: L1TSync.h:117
MonitorElement * m_ErrorMonitor
Definition: L1TSync.h:142
std::map< TString, MonitorElement * > m_algoCertification
Definition: L1TSync.h:136
virtual ~L1TSync()
Definition: L1TSync.cc:198
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:41
unsigned int m_currentLS
Definition: L1TSync.h:122