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 
36 #include <TString.h>
37 
38 #include <iostream>
39 #include <fstream>
40 #include <string>
41 #include <vector>
42 
43 class L1TSync : public edm::EDAnalyzer {
44 
45  public:
46 
47  enum BeamMode{
48  NOMODE=1,
49  SETUP=2,
54  RAMP=7,
56  QUEEZE=9,
57  ADJUST=10,
58  STABLE=11,
63  INJDUMP=16,
65  ABORT=18,
66  CYCLING=19,
67  WBDUMP=20,
68  NOBEAM=21
69  };
70 
71  enum Errors{
72  UNKNOWN = 1,
79  };
80 
81 
82  public:
83 
84  L1TSync(const edm::ParameterSet& ps); // Constructor
85  virtual ~L1TSync(); // Destructor
86 
87  protected:
88 
89  void analyze (const edm::Event& e, const edm::EventSetup& c); // Analyze
90  void beginJob(); // BeginJob
91  void endJob (void); // EndJob
92  void beginRun(const edm::Run& run, const edm::EventSetup& iSetup);
93  void endRun (const edm::Run& run, const edm::EventSetup& iSetup);
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 
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 
109  DQMStore * dbe; // The DQM Service Handle
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 
148 };
149 
150 #endif
int m_refPrescaleSet
Definition: L1TSync.h:121
void beginJob()
Definition: L1TSync.cc:208
std::map< TString, unsigned int > m_certLastLS
Definition: L1TSync.h:135
void doFractionInSync(bool iForce=false, bool iBad=false)
Definition: L1TSync.cc:619
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:47
BeamConfiguration m_beamConfig
Definition: L1TSync.h:127
DQMStore * dbe
Definition: L1TSync.h:109
virtual void beginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
Definition: L1TSync.cc:315
void analyze(const edm::Event &e, const edm::EventSetup &c)
Definition: L1TSync.cc:427
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:730
std::map< TString, MonitorElement * > m_algoVsBunchStructure
Definition: L1TSync.h:137
void endJob(void)
Definition: L1TSync.cc:225
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1GtDataDaqInputTag
Definition: L1TSync.h:146
virtual void endLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
Definition: L1TSync.cc:351
edm::ParameterSet m_parameters
Definition: L1TSync.h:111
void getBeamConfOMDS()
Definition: L1TSync.cc:539
void endRun(const edm::Run &run, const edm::EventSetup &iSetup)
Definition: L1TSync.cc:416
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:204
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > m_l1GtEvmSource
Definition: L1TSync.h:145
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup)
BeginRun.
Definition: L1TSync.cc:239
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:71
Definition: Run.h:41
unsigned int m_currentLS
Definition: L1TSync.h:122