CMS 3D CMS Logo

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