CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L1TSync_Offline.h
Go to the documentation of this file.
1 #ifndef DQMOffline_L1Trigger_L1TSync_Offline_h
2 #define DQMOffline_L1Trigger_L1TSync_Offline_h
3 
4 /*
5  * \class L1TSync_Offline
6  *
7  *
8  * Description: offline DQM module for L1Trigger/bunchStructure synchronization
9  *
10  * Implementation:
11  * <TODO: enter implementation details>
12  *
13  * \author: Pietro Vischia - LIP Lisbon pietro.vischia@gmail.com
14  *
15  * Changelog:
16  * 2012/08/10 11:01:01: First creation. Dummy module with actual code commented.
17  *
18  * Todo:
19  * - implement the module in offline
20  * - check if there are user includes specific for offline/online that should be changed
21  *
22  *
23  */
24 
25 // System include files
26 #include <memory>
27 #include <unistd.h>
28 
29 // User include files
36 
38 
43 
44 //L1 includes and dataformats
48 
49 #include <TString.h>
50 
51 #include <iostream>
52 #include <fstream>
53 #include <string>
54 #include <vector>
55 
56 // Forward declarations
57 
58 // Class declaration
60 
61  public:
62 
63  enum BeamMode{
64  NOMODE=1,
65  SETUP=2,
70  RAMP=7,
72  QUEEZE=9,
73  ADJUST=10,
74  STABLE=11,
79  INJDUMP=16,
81  ABORT=18,
82  CYCLING=19,
83  WBDUMP=20,
84  NOBEAM=21
85  };
86 
87  enum Errors{
88  UNKNOWN = 1,
95  };
96 
97 
98  public:
99  // Constructor
101  // Destructor
102  virtual ~L1TSync_Offline();
103 
104  protected:
105 
106  void analyze (const edm::Event& e, const edm::EventSetup& c); // Analyze
107  void beginJob(); // BeginJob
108  void endJob (void); // EndJob
109  void beginRun(const edm::Run& run, const edm::EventSetup& iSetup);
110  void endRun (const edm::Run& run, const edm::EventSetup& iSetup);
111 
112  virtual void beginLuminosityBlock(edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c);
113 // no lumi block // virtual void endLuminosityBlock (edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c);
114 
115 
116  // Private Methods
117  private:
118 
119  void getBeamConfOffline(const edm::Event&);
120 // no lumi block // void doFractionInSync(bool iForce=false, bool iBad=false);
121 // no lumi block // void certifyLSBlock (std::string iTrigger, int iInitLs, int iEndLs ,float iValue);
122 
123  // Variables
124  private:
125 
126  DQMStore * dbe; // The DQM Service Handle
127 
128  // Input parameters
130 
131  // ROOT output filename
133 
134  // bool
135  bool m_verbose;
138 
139  // Int
141  unsigned int m_currentLS; // Current LS
142  //unsigned int m_eventLS;
143  unsigned int m_lhcFill; //
144 
145  // Vectors
146  L1TBeamConfiguration m_beamConfig; // Current Bunch Structure
147 
148  // Const Vectors
149  const std::vector< std::vector<int> >* ListsPrescaleFactors; // Collection os all sets of prescales
150 
151  // Maps
152  std::map<TString,int> m_algoBit;
153  std::map<TString,unsigned int> m_certFirstLS; // First uncertified LS
154  std::map<TString,unsigned int> m_certLastLS; // Last uncertified LS
155  std::map<TString,MonitorElement*> m_algoCertification;
156  std::map<TString,MonitorElement*> m_algoVsBunchStructure;
157  std::map<std::string,bool> m_algoAutoSelect; // Map of categories to monitor
158  std::map<std::string,std::string> m_selectedTriggers; // Map of what trigger to monitor for each category
159 
160  // MonitorElement
162 
163  // Input tags
166 
167 };
168 
169 #endif
void getBeamConfOffline(const edm::Event &)
void beginRun(const edm::Run &run, const edm::EventSetup &iSetup)
BeginRun.
std::map< TString, unsigned int > m_certLastLS
MonitorElement * m_ErrorMonitor
L1TSync_Offline(const edm::ParameterSet &ps)
std::map< std::string, std::string > m_selectedTriggers
std::map< TString, unsigned int > m_certFirstLS
edm::ParameterSet m_parameters
virtual void beginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
std::map< TString, int > m_algoBit
std::string m_outputFile
unsigned int m_lhcFill
virtual ~L1TSync_Offline()
void analyze(const edm::Event &e, const edm::EventSetup &c)
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1GtDataDaqInputTag
std::map< TString, MonitorElement * > m_algoCertification
unsigned int m_currentLS
std::map< std::string, bool > m_algoAutoSelect
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > m_l1GtEvmSource
L1TBeamConfiguration m_beamConfig
const std::vector< std::vector< int > > * ListsPrescaleFactors
std::map< TString, MonitorElement * > m_algoVsBunchStructure
Definition: Run.h:41
void endRun(const edm::Run &run, const edm::EventSetup &iSetup)