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