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
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
dqm::impl::MonitorElement
Definition: MonitorElement.h:98
L1TSync_Offline::m_algoAutoSelect
std::map< std::string, bool > m_algoAutoSelect
Definition: L1TSync_Offline.h:147
L1TSync_Offline::m_algoBit
std::map< TString, int > m_algoBit
Definition: L1TSync_Offline.h:142
L1TSync_Offline::ABORT
Definition: L1TSync_Offline.h:86
MessageLogger.h
L1TSync_Offline::~L1TSync_Offline
~L1TSync_Offline() override
Definition: L1TSync_Offline.cc:312
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
L1TSync_Offline::QUEEZE
Definition: L1TSync_Offline.h:77
edm::Run
Definition: Run.h:45
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord >
LuminosityBlock.h
L1TSync_Offline::SETUP
Definition: L1TSync_Offline.h:70
L1TSync_Offline::ADJUST
Definition: L1TSync_Offline.h:78
L1TSync_Offline::BeamMode
BeamMode
Definition: L1TSync_Offline.h:68
L1TSync_Offline::INJPILOT
Definition: L1TSync_Offline.h:71
ltso::LSValid::lsIsValid
bool lsIsValid
Definition: L1TSync_Offline.h:63
DQMOneEDAnalyzer
Definition: DQMOneEDAnalyzer.h:20
DQMStore.h
L1TSync_Offline::m_algoVsBunchStructure
std::map< TString, MonitorElement * > m_algoVsBunchStructure
Definition: L1TSync_Offline.h:146
L1TSync_Offline::m_refPrescaleSet
int m_refPrescaleSet
Definition: L1TSync_Offline.h:131
L1TMenuHelper::Tokens
Definition: L1TMenuHelper.h:80
L1TSync_Offline::m_menuToken
const edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd > m_menuToken
Definition: L1TSync_Offline.h:156
L1TSync_Offline::m_l1GtDataDaqInputTag
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1GtDataDaqInputTag
Definition: L1TSync_Offline.h:155
ltso::LSValid
Definition: L1TSync_Offline.h:62
L1TSync_Offline::globalEndLuminosityBlock
void globalEndLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c) final
Definition: L1TSync_Offline.h:112
L1TSync_Offline::m_certFirstLS
std::map< TString, unsigned int > m_certFirstLS
Definition: L1TSync_Offline.h:143
L1TSync_Offline::m_selectedTriggers
std::map< std::string, std::string > m_selectedTriggers
Definition: L1TSync_Offline.h:148
DQMOneEDAnalyzer.h
L1TSync_Offline::WARNING_DB_INCORRECT_NBUNCHES
Definition: L1TSync_Offline.h:96
L1TSync_Offline::CYCLING
Definition: L1TSync_Offline.h:87
L1TSync_Offline::BEAMDUMP
Definition: L1TSync_Offline.h:81
L1TSync_Offline::m_l1GtEvmSource
edm::EDGetTokenT< L1GlobalTriggerEvmReadoutRecord > m_l1GtEvmSource
Definition: L1TSync_Offline.h:154
MakerMacros.h
L1TSync_Offline::WARNING_DB_CONN_FAILED
Definition: L1TSync_Offline.h:94
L1GlobalTriggerEvmReadoutRecord.h
L1TSync_Offline::m_beamConfig
L1TBeamConfiguration m_beamConfig
Definition: L1TSync_Offline.h:136
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:92
L1TSync_Offline::NOBEAM
Definition: L1TSync_Offline.h:89
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:69
L1TSync_Offline::m_certLastLS
std::map< TString, unsigned int > m_certLastLS
Definition: L1TSync_Offline.h:144
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:72
ltso
Definition: L1TSync_Offline.h:61
L1TSync_Offline::WBDUMP
Definition: L1TSync_Offline.h:88
L1TSync_Offline::RECOVERY
Definition: L1TSync_Offline.h:83
DQMEDAnalyzer.h
L1TSync_Offline::m_helperTokens
L1TMenuHelper::Tokens m_helperTokens
Definition: L1TSync_Offline.h:157
L1TBeamConfiguration.h
L1TSync_Offline::FLATTOP
Definition: L1TSync_Offline.h:76
L1TSync_Offline::UNKNOWN
Definition: L1TSync_Offline.h:93
edm::ParameterSet
Definition: ParameterSet.h:47
L1TSync_Offline::L1TSync_Offline
L1TSync_Offline(const edm::ParameterSet &ps)
Definition: L1TSync_Offline.cc:60
Event.h
L1TSync_Offline::m_ErrorMonitor
MonitorElement * m_ErrorMonitor
Definition: L1TSync_Offline.h:151
L1TSync_Offline::m_verbose
bool m_verbose
Definition: L1TSync_Offline.h:128
L1TSync_Offline::ERROR_LSBLOCK_NOTVALID
Definition: L1TSync_Offline.h:99
L1TSync_Offline::dqmBeginRun
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
Definition: L1TSync_Offline.cc:316
L1TSync_Offline
Definition: L1TSync_Offline.h:66
edm::EventSetup
Definition: EventSetup.h:58
L1TSync_Offline::ERROR_TRIGGERALIAS_NOTVALID
Definition: L1TSync_Offline.h:98
L1TSync_Offline::ListsPrescaleFactors
const std::vector< std::vector< int > > * ListsPrescaleFactors
Definition: L1TSync_Offline.h:139
edm::ESGetToken< L1GtTriggerMenu, L1GtTriggerMenuRcd >
L1TSync_Offline::bookHistograms
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override
BeginRun.
Definition: L1TSync_Offline.cc:320
L1TMenuHelper.h
L1TSync_Offline::RAMPDOWN
Definition: L1TSync_Offline.h:82
L1TSync_Offline::WARNING_DB_QUERY_FAILED
Definition: L1TSync_Offline.h:95
L1TSync_Offline::m_algoCertification
std::map< TString, MonitorElement * > m_algoCertification
Definition: L1TSync_Offline.h:145
L1TSync_Offline::CIRCDUMP
Definition: L1TSync_Offline.h:85
L1TSync_Offline::m_l1GtUtils
L1GtUtils m_l1GtUtils
Definition: L1TSync_Offline.h:159
L1TSync_Offline::INJNOMN
Definition: L1TSync_Offline.h:73
L1TSync_Offline::STABLE
Definition: L1TSync_Offline.h:79
Frameworkfwd.h
L1GtUtils.h
L1TSync_Offline::INJDUMP
Definition: L1TSync_Offline.h:84
dqm::implementation::IBooker
Definition: DQMStore.h:43
L1TSync_Offline::UNSTABLE
Definition: L1TSync_Offline.h:80
L1TSync_Offline::m_parameters
edm::ParameterSet m_parameters
Definition: L1TSync_Offline.h:125
L1TSync_Offline::RAMP
Definition: L1TSync_Offline.h:75
ParameterSet.h
L1TSync_Offline::ERROR_UNABLE_RETRIVE_PRODUCT
Definition: L1TSync_Offline.h:97
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
L1TSync_Offline::m_lhcFill
unsigned int m_lhcFill
Definition: L1TSync_Offline.h:133
edm::Event
Definition: Event.h:73
L1GlobalTriggerReadoutRecord.h
L1TSync_Offline::PRERAMP
Definition: L1TSync_Offline.h:74
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37