CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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
35 
37 
40 
41 //L1 includes and dataformats
46 
48 
50 
51 #include <TString.h>
52 
53 #include <iostream>
54 #include <fstream>
55 #include <string>
56 #include <vector>
57 
58 // Forward declarations
59 
60 // Class declaration
61 namespace ltso {
62  struct LSValid {
63  bool lsIsValid = true;
64  };
65 } // namespace ltso
66 class L1TSync_Offline : public DQMOneEDAnalyzer<edm::LuminosityBlockCache<ltso::LSValid>> {
67 public:
68  enum BeamMode {
69  NOMODE = 1,
70  SETUP = 2,
71  INJPILOT = 3,
72  INJINTR = 4,
73  INJNOMN = 5,
74  PRERAMP = 6,
75  RAMP = 7,
76  FLATTOP = 8,
77  QUEEZE = 9,
78  ADJUST = 10,
79  STABLE = 11,
80  UNSTABLE = 12,
81  BEAMDUMP = 13,
82  RAMPDOWN = 14,
83  RECOVERY = 15,
84  INJDUMP = 16,
85  CIRCDUMP = 17,
86  ABORT = 18,
87  CYCLING = 19,
88  WBDUMP = 20,
89  NOBEAM = 21
90  };
91 
92  enum Errors {
93  UNKNOWN = 1,
100  };
101 
102 public:
103  // Constructor
105  // Destructor
106  ~L1TSync_Offline() override;
107 
108 protected:
109  void analyze(const edm::Event& e, const edm::EventSetup& c) override; // Analyze
110  std::shared_ptr<ltso::LSValid> globalBeginLuminosityBlock(edm::LuminosityBlock const& lumiBlock,
111  edm::EventSetup const& c) const final;
112  void globalEndLuminosityBlock(edm::LuminosityBlock const& lumiBlock, edm::EventSetup const& c) final {}
113  void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
114  void bookHistograms(DQMStore::IBooker& ibooker, const edm::Run&, const edm::EventSetup&) override;
115 
116  // Private Methods
117 private:
118  void getBeamConfOffline(const edm::Event&);
119  // no lumi block // void doFractionInSync(bool iForce=false, bool iBad=false);
120  // no lumi block // void certifyLSBlock (std::string iTrigger, int iInitLs, int iEndLs ,float iValue);
121 
122  // Variables
123 private:
124  // Input parameters
126 
127  // bool
128  bool m_verbose;
129 
130  // Int
132  //unsigned int m_eventLS;
133  unsigned int m_lhcFill; //
134 
135  // Vectors
136  L1TBeamConfiguration m_beamConfig; // Current Bunch Structure
137 
138  // Const Vectors
139  const std::vector<std::vector<int>>* ListsPrescaleFactors; // Collection os all sets of prescales
140 
141  // Maps
142  std::map<TString, int> m_algoBit;
143  std::map<TString, unsigned int> m_certFirstLS; // First uncertified LS
144  std::map<TString, unsigned int> m_certLastLS; // Last uncertified LS
145  std::map<TString, MonitorElement*> m_algoCertification;
146  std::map<TString, MonitorElement*> m_algoVsBunchStructure;
147  std::map<std::string, bool> m_algoAutoSelect; // Map of categories to monitor
148  std::map<std::string, std::string> m_selectedTriggers; // Map of what trigger to monitor for each category
149 
150  // MonitorElement
152 
153  // Input tags
158 
160 };
161 
162 #endif
void getBeamConfOffline(const edm::Event &)
L1TMenuHelper::Tokens m_helperTokens
const edm::EventSetup & c
MonitorElement * m_ErrorMonitor
L1TSync_Offline(const edm::ParameterSet &ps)
std::map< TString, MonitorElement * > m_algoCertification
const std::vector< std::vector< int > > * ListsPrescaleFactors
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override
BeginRun.
L1GtUtils m_l1GtUtils
edm::ParameterSet m_parameters
unsigned int m_lhcFill
~L1TSync_Offline() override
std::map< TString, int > m_algoBit
std::map< std::string, bool > m_algoAutoSelect
std::map< TString, MonitorElement * > m_algoVsBunchStructure
std::shared_ptr< ltso::LSValid > globalBeginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c) const final
void globalEndLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c) final
const edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd > m_menuToken
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1GtDataDaqInputTag
std::map< std::string, std::string > m_selectedTriggers
std::map< TString, unsigned int > m_certFirstLS
void analyze(const edm::Event &e, const edm::EventSetup &c) override
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > m_l1GtEvmSource
L1TBeamConfiguration m_beamConfig
std::map< TString, unsigned int > m_certLastLS
Definition: Run.h:45