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  * $Date: 2011/08/02 15:49:48 $
8  * $Revision: 1.8 $
9  * \author J. Pela
10  *
11 */
12 
13 // system include files
14 #include <memory>
15 #include <unistd.h>
16 
17 // user include files
24 
26 
31 
33 
34 #include <TString.h>
35 
36 #include <iostream>
37 #include <fstream>
38 #include <string>
39 #include <vector>
40 
41 class L1TSync : public edm::EDAnalyzer {
42 
43  public:
44 
45  enum BeamMode{
46  NOMODE=1,
47  SETUP=2,
52  RAMP=7,
54  QUEEZE=9,
55  ADJUST=10,
56  STABLE=11,
61  INJDUMP=16,
63  ABORT=18,
64  CYCLING=19,
65  WBDUMP=20,
66  NOBEAM=21
67  };
68 
69  enum Errors{
70  UNKNOWN = 1,
77  };
78 
79 
80  public:
81 
82  L1TSync(const edm::ParameterSet& ps); // Constructor
83  virtual ~L1TSync(); // Destructor
84 
85  protected:
86 
87  void analyze (const edm::Event& e, const edm::EventSetup& c); // Analyze
88  void beginJob(); // BeginJob
89  void endJob (void); // EndJob
90  void beginRun(const edm::Run& run, const edm::EventSetup& iSetup);
91  void endRun (const edm::Run& run, const edm::EventSetup& iSetup);
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 
96 
97  // Private Methods
98  private:
99 
100  void getBeamConfOMDS();
101  void doFractionInSync(bool iForce=false, bool iBad=false);
102  void certifyLSBlock (std::string iTrigger, int iInitLs, int iEndLs ,float iValue);
103 
104  // Variables
105  private:
106 
107  DQMStore * dbe; // The DQM Service Handle
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
143  edm::InputTag m_scalersSource; // Where to get L1 Scalers
146 
147 };
148 
149 #endif
int m_refPrescaleSet
Definition: L1TSync.h:119
void beginJob()
Definition: L1TSync.cc:214
std::map< TString, unsigned int > m_certLastLS
Definition: L1TSync.h:133
edm::InputTag m_l1GtDataDaqInputTag
Definition: L1TSync.h:145
void doFractionInSync(bool iForce=false, bool iBad=false)
Definition: L1TSync.cc:625
L1TSync(const edm::ParameterSet &ps)
Definition: L1TSync.cc:45
unsigned int m_lhcFill
Definition: L1TSync.h:122
std::map< std::string, std::string > m_selectedTriggers
Definition: L1TSync.h:137
BeamMode
Definition: L1TSync.h:45
BeamConfiguration m_beamConfig
Definition: L1TSync.h:125
DQMStore * dbe
Definition: L1TSync.h:107
virtual void beginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
Definition: L1TSync.cc:321
void analyze(const edm::Event &e, const edm::EventSetup &c)
Definition: L1TSync.cc:433
std::map< TString, unsigned int > m_certFirstLS
Definition: L1TSync.h:132
bool m_verbose
Definition: L1TSync.h:114
edm::InputTag m_l1GtEvmSource
Definition: L1TSync.h:144
std::string m_outputFile
Definition: L1TSync.h:111
std::map< std::string, bool > m_algoAutoSelect
Definition: L1TSync.h:136
bool * m_processedLS
Definition: L1TSync.h:116
void certifyLSBlock(std::string iTrigger, int iInitLs, int iEndLs, float iValue)
Definition: L1TSync.cc:736
std::map< TString, MonitorElement * > m_algoVsBunchStructure
Definition: L1TSync.h:135
void endJob(void)
Definition: L1TSync.cc:231
virtual void endLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
Definition: L1TSync.cc:357
edm::ParameterSet m_parameters
Definition: L1TSync.h:109
void getBeamConfOMDS()
Definition: L1TSync.cc:545
void endRun(const edm::Run &run, const edm::EventSetup &iSetup)
Definition: L1TSync.cc:422
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:210
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup)
BeginRun.
Definition: L1TSync.cc:245
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:69
Definition: Run.h:36
edm::InputTag m_scalersSource
Definition: L1TSync.h:143
unsigned int m_currentLS
Definition: L1TSync.h:120