91 if (forceGlobalParameters) {
94 if (doGlobalAutoSelection) {
95 if (CatMu.getParameter<
bool>(
"monitor")) {
100 if (CatEG.getParameter<
bool>(
"monitor")) {
105 if (CatIsoEG.getParameter<
bool>(
"monitor")) {
110 if (CatJet.getParameter<
bool>(
"monitor")) {
115 if (CatCenJet.getParameter<
bool>(
"monitor")) {
120 if (CatForJet.getParameter<
bool>(
"monitor")) {
125 if (CatTauJet.getParameter<
bool>(
"monitor")) {
130 if (CatETM.getParameter<
bool>(
"monitor")) {
135 if (CatETT.getParameter<
bool>(
"monitor")) {
140 if (CatHTM.getParameter<
bool>(
"monitor")) {
145 if (CatHTT.getParameter<
bool>(
"monitor")) {
166 if (CatMu.getParameter<
bool>(
"monitor")) {
169 if (CatEG.getParameter<
bool>(
"monitor")) {
172 if (CatIsoEG.getParameter<
bool>(
"monitor")) {
175 if (CatJet.getParameter<
bool>(
"monitor")) {
178 if (CatCenJet.getParameter<
bool>(
"monitor")) {
181 if (CatForJet.getParameter<
bool>(
"monitor")) {
184 if (CatTauJet.getParameter<
bool>(
"monitor")) {
187 if (CatETM.getParameter<
bool>(
"monitor")) {
190 if (CatETT.getParameter<
bool>(
"monitor")) {
193 if (CatHTM.getParameter<
bool>(
"monitor")) {
196 if (CatHTT.getParameter<
bool>(
"monitor")) {
203 if (CatBPTX.getParameter<
bool>(
"monitor")) {
207 if (CatMu.getParameter<
bool>(
"monitor")) {
216 if (CatEG.getParameter<
bool>(
"monitor")) {
225 if (CatIsoEG.getParameter<
bool>(
"monitor")) {
234 if (CatJet.getParameter<
bool>(
"monitor")) {
243 if (CatCenJet.getParameter<
bool>(
"monitor")) {
244 m_algoAutoSelect[
"CenJet"] = CatCenJet.getParameter<
bool>(
"doAutoSelection");
252 if (CatForJet.getParameter<
bool>(
"monitor")) {
253 m_algoAutoSelect[
"CatForJet"] = CatForJet.getParameter<
bool>(
"doAutoSelection");
261 if (CatTauJet.getParameter<
bool>(
"monitor")) {
262 m_algoAutoSelect[
"TauJet"] = CatTauJet.getParameter<
bool>(
"doAutoSelection");
270 if (CatETM.getParameter<
bool>(
"monitor")) {
279 if (CatETT.getParameter<
bool>(
"monitor")) {
288 if (CatHTM.getParameter<
bool>(
"monitor")) {
297 if (CatHTT.getParameter<
bool>(
"monitor")) {
320 cout <<
"[L1TSync_Offline] Called beginRun." << endl;
365 "WARNING_DB_INCORRECT_NBUNCHES");
372 string tCategory = (*i).first;
373 string tTrigger = (*i).second;
382 tCategory,
"min #Delta(" + tTrigger +
",Bunch)", maxNbins, -0.5,
double(maxNbins) - 0.5, 5, -2.5, 2.5);
387 ibooker.
book1D(tCategory,
"fraction of in sync: " + tTrigger, maxNbins, -0.5,
double(maxNbins) - 0.5);
398 cout <<
"[L1TSync_Offline] Called beginLuminosityBlock." << endl;
401 return std::make_shared<ltso::LSValid>();
407 cout <<
"[L1TSync_Offline] Called analyze." << endl;
412 if (currentLSValid) {
414 cout <<
"[L1TSync_Offline] -> currentLSValid=" << currentLSValid << endl;
422 if (gtEvmReadoutRecord.
isValid()) {
424 unsigned int lhcBeamMode = gtfeEvmWord.
beamMode();
441 if (lhcBeamMode !=
STABLE) {
442 currentLSValid =
false;
444 cout <<
"[L1TSync_Offline] -> currentLSValid=" << currentLSValid <<
"because beams mode not stable, being " 445 << lhcBeamMode << endl;
455 cout <<
"[L1TSync_Offline] -> currentLSValid=" << currentLSValid << endl;
471 if (gtReadoutRecordData.
isValid()) {
472 const vector<L1GtFdlWord>& gtFdlVectorData = gtReadoutRecordData->
gtFdlVector();
476 string tTrigger = (*i).second;
479 if (tTrigger !=
"Undefined" && tTrigger !=
"Undefined (Wrong Name)") {
480 bool beamSingleConfig =
false;
481 bool firedAlgo =
false;
482 unsigned int eventBx = ~0;
485 for (
unsigned int a = 0;
a < gtFdlVectorData.size();
a++) {
487 if (gtFdlVectorData[
a].bxInEvent() == 0) {
488 eventBx = gtFdlVectorData[
a].localBxNr();
489 if (gtFdlVectorData[
a].gtDecisionWord()[
m_algoBit[tTrigger]]) {
498 beamSingleConfig =
true;
501 beamSingleConfig =
true;
508 if (firedAlgo && !beamSingleConfig) {
509 int DifAlgoVsBunchStructure = 9999;
511 for (
unsigned int a = 0;
a < gtFdlVectorData.size();
a++) {
512 int bxFDL = gtFdlVectorData[
a].localBxNr();
513 int bxInEvent = gtFdlVectorData[
a].bxInEvent();
516 DifAlgoVsBunchStructure = -1 * bxInEvent;
562 bool firedAlgo =
false;
570 if (gtReadoutRecordData.
isValid()) {
571 const vector<L1GtFdlWord>& gtFdlVectorData = gtReadoutRecordData->
gtFdlVector();
573 for (
unsigned int a = 0;
a < gtFdlVectorData.size();
a++) {
575 if (gtFdlVectorData[
a].bxInEvent() == 0) {
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX)
T getParameter(std::string const &) const
void getBeamConfOffline(const edm::Event &)
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * m_ErrorMonitor
LuminosityBlockIndex index() const
L1TSync_Offline(const edm::ParameterSet &ps)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::map< TString, MonitorElement * > m_algoCertification
void setCurrentFolder(std::string const &fullpath)
const L1GtfeExtWord gtfeWord() const
get / set GTFE word (record) in the GT readout record
const std::vector< L1GtFdlWord > gtFdlVector() const
get the vector of L1GtFdlWord
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
void bookHistograms(DQMStore::IBooker &ibooker, const edm::Run &, const edm::EventSetup &) override
BeginRun.
edm::ParameterSet m_parameters
#define DEFINE_FWK_MODULE(type)
Abs< T >::type abs(const T &t)
LuminosityBlock const & getLuminosityBlock() const
void retrieveL1EventSetup(const edm::EventSetup &)
retrieve all the relevant L1 trigger event setup records and cache them to improve the speed ...
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
~L1TSync_Offline() override
std::map< TString, int > m_algoBit
std::map< std::string, bool > m_algoAutoSelect
bool bxConfig(unsigned iBx)
std::map< TString, MonitorElement * > m_algoVsBunchStructure
std::vector< bool > beam2
const cms_uint32_t lhcFillNumber() const
edm::EDGetTokenT< L1GlobalTriggerReadoutRecord > m_l1GtDataDaqInputTag
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
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
std::vector< bool > beam1
const cms_uint16_t beamMode() const
T const * product() const
std::shared_ptr< ltso::LSValid > globalBeginLuminosityBlock(edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c) const final
L1TBeamConfiguration m_beamConfig
std::map< TString, unsigned int > m_certLastLS