CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
L1TSync Class Reference

#include <L1TSync.h>

Inheritance diagram for L1TSync:
edm::EDAnalyzer edm::EDConsumerBase

Public Types

enum  BeamMode {
  NOMODE =1, SETUP =2, INJPILOT =3, INJINTR =4,
  INJNOMN =5, PRERAMP =6, RAMP =7, FLATTOP =8,
  QUEEZE =9, ADJUST =10, STABLE =11, UNSTABLE =12,
  BEAMDUMP =13, RAMPDOWN =14, RECOVERY =15, INJDUMP =16,
  CIRCDUMP =17, ABORT =18, CYCLING =19, WBDUMP =20,
  NOBEAM =21
}
 
enum  Errors {
  UNKNOWN = 1, WARNING_DB_CONN_FAILED = 2, WARNING_DB_QUERY_FAILED = 3, WARNING_DB_INCORRECT_NBUNCHES = 4,
  ERROR_UNABLE_RETRIVE_PRODUCT = 5, ERROR_TRIGGERALIAS_NOTVALID = 6, ERROR_LSBLOCK_NOTVALID = 7
}
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 

Public Member Functions

 L1TSync (const edm::ParameterSet &ps)
 
virtual ~L1TSync ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndex indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndex > &) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 
void beginJob ()
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
 
void beginRun (const edm::Run &run, const edm::EventSetup &iSetup)
 BeginRun. More...
 
void endJob (void)
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &lumiBlock, edm::EventSetup const &c)
 
void endRun (const edm::Run &run, const edm::EventSetup &iSetup)
 
- Protected Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Member Functions

void certifyLSBlock (std::string iTrigger, int iInitLs, int iEndLs, float iValue)
 
void doFractionInSync (bool iForce=false, bool iBad=false)
 
void getBeamConfOMDS ()
 

Private Attributes

DQMStoredbe
 
const std::vector< std::vector
< int > > * 
ListsPrescaleFactors
 
std::map< std::string, bool > m_algoAutoSelect
 
std::map< TString, int > m_algoBit
 
std::map< TString,
MonitorElement * > 
m_algoCertification
 
std::map< TString,
MonitorElement * > 
m_algoVsBunchStructure
 
BeamConfiguration m_beamConfig
 
std::map< TString, unsigned int > m_certFirstLS
 
std::map< TString, unsigned int > m_certLastLS
 
unsigned int m_currentLS
 
bool m_currentLSValid
 
MonitorElementm_ErrorMonitor
 
edm::InputTag m_l1GtDataDaqInputTag
 
edm::InputTag m_l1GtEvmSource
 
unsigned int m_lhcFill
 
std::string m_outputFile
 
edm::ParameterSet m_parameters
 
bool * m_processedLS
 
int m_refPrescaleSet
 
edm::InputTag m_scalersSource
 
std::map< std::string,
std::string > 
m_selectedTriggers
 
bool m_verbose
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 

Detailed Description

Definition at line 41 of file L1TSync.h.

Member Enumeration Documentation

Enumerator
NOMODE 
SETUP 
INJPILOT 
INJINTR 
INJNOMN 
PRERAMP 
RAMP 
FLATTOP 
QUEEZE 
ADJUST 
STABLE 
UNSTABLE 
BEAMDUMP 
RAMPDOWN 
RECOVERY 
INJDUMP 
CIRCDUMP 
ABORT 
CYCLING 
WBDUMP 
NOBEAM 

Definition at line 45 of file L1TSync.h.

45  {
46  NOMODE=1,
47  SETUP=2,
48  INJPILOT=3,
49  INJINTR=4,
50  INJNOMN=5,
51  PRERAMP=6,
52  RAMP=7,
53  FLATTOP=8,
54  QUEEZE=9,
55  ADJUST=10,
56  STABLE=11,
57  UNSTABLE=12,
58  BEAMDUMP=13,
59  RAMPDOWN=14,
60  RECOVERY=15,
61  INJDUMP=16,
62  CIRCDUMP=17,
63  ABORT=18,
64  CYCLING=19,
65  WBDUMP=20,
66  NOBEAM=21
67  };
Enumerator
UNKNOWN 
WARNING_DB_CONN_FAILED 
WARNING_DB_QUERY_FAILED 
WARNING_DB_INCORRECT_NBUNCHES 
ERROR_UNABLE_RETRIVE_PRODUCT 
ERROR_TRIGGERALIAS_NOTVALID 
ERROR_LSBLOCK_NOTVALID 

Definition at line 69 of file L1TSync.h.

Constructor & Destructor Documentation

L1TSync::L1TSync ( const edm::ParameterSet ps)

Definition at line 45 of file L1TSync.cc.

References gather_cfg::cout, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), NULL, cppFunctionSkipper::operator, and AlCaHLTBitMon_QueryRunRegistry::string.

45  {
46 
47  m_parameters = pset;
48 
49  // Mapping parameter input variables
50  m_scalersSource = pset.getParameter <InputTag>("inputTagScalersResults");
51  m_l1GtDataDaqInputTag = pset.getParameter <InputTag>("inputTagL1GtDataDaq");
52  m_l1GtEvmSource = pset.getParameter <InputTag>("inputTagtEvmSource");
53  m_verbose = pset.getUntrackedParameter<bool> ("verbose",false);
54  m_refPrescaleSet = pset.getParameter <int> ("refPrescaleSet");
55 
56  // Getting which categories to monitor
57  ParameterSet Categories = pset.getParameter< ParameterSet >("Categories");
58 
59  bool forceGlobalParameters = Categories.getParameter<bool>("forceGlobalParameters");
60  bool doGlobalAutoSelection = Categories.getParameter<bool>("doGlobalAutoSelection");
61 
62  ParameterSet CatBPTX = Categories.getParameter<ParameterSet>("BPTX");
63  ParameterSet CatMu = Categories.getParameter<ParameterSet>("Mu");
64  ParameterSet CatEG = Categories.getParameter<ParameterSet>("EG");
65  ParameterSet CatIsoEG = Categories.getParameter<ParameterSet>("IsoEG");
66  ParameterSet CatJet = Categories.getParameter<ParameterSet>("Jet");
67  ParameterSet CatCenJet = Categories.getParameter<ParameterSet>("CenJet");
68  ParameterSet CatForJet = Categories.getParameter<ParameterSet>("ForJet");
69  ParameterSet CatTauJet = Categories.getParameter<ParameterSet>("TauJet");
70  ParameterSet CatETM = Categories.getParameter<ParameterSet>("ETT");
71  ParameterSet CatETT = Categories.getParameter<ParameterSet>("ETM");
72  ParameterSet CatHTT = Categories.getParameter<ParameterSet>("HTT");
73  ParameterSet CatHTM = Categories.getParameter<ParameterSet>("HTM");
74 
75  // --> Setting parameters related to which algos to monitor
76  // If global parameters are forced they take precedence over algo-by-algo parameters
77  if(forceGlobalParameters){
78 
79  // If global automatic selection if enable all categories set to be monitored will have
80  // their algos auto selected (the lowest prescale algo will be selected)
81  if(doGlobalAutoSelection){
82 
83  if(CatMu .getParameter<bool>("monitor")){m_algoAutoSelect["Mu"] = true;}else{m_algoAutoSelect["Mu"] = false;}
84  if(CatEG .getParameter<bool>("monitor")){m_algoAutoSelect["EG"] = true;}else{m_algoAutoSelect["EG"] = false;}
85  if(CatIsoEG .getParameter<bool>("monitor")){m_algoAutoSelect["IsoEG"] = true;}else{m_algoAutoSelect["IsoEG"] = false;}
86  if(CatJet .getParameter<bool>("monitor")){m_algoAutoSelect["Jet"] = true;}else{m_algoAutoSelect["Jet"] = false;}
87  if(CatCenJet.getParameter<bool>("monitor")){m_algoAutoSelect["CenJet"] = true;}else{m_algoAutoSelect["CenJet"] = false;}
88  if(CatForJet.getParameter<bool>("monitor")){m_algoAutoSelect["ForJet"] = true;}else{m_algoAutoSelect["ForJet"] = false;}
89  if(CatTauJet.getParameter<bool>("monitor")){m_algoAutoSelect["TauJet"] = true;}else{m_algoAutoSelect["TauJet"] = false;}
90  if(CatETM .getParameter<bool>("monitor")){m_algoAutoSelect["ETM"] = true;}else{m_algoAutoSelect["ETM"] = false;}
91  if(CatETT .getParameter<bool>("monitor")){m_algoAutoSelect["ETT"] = true;}else{m_algoAutoSelect["ETT"] = false;}
92  if(CatHTM .getParameter<bool>("monitor")){m_algoAutoSelect["HTM"] = true;}else{m_algoAutoSelect["HTM"] = false;}
93  if(CatHTT .getParameter<bool>("monitor")){m_algoAutoSelect["HTT"] = true;}else{m_algoAutoSelect["HTT"] = false;}
94 
95  // If global non-automatic selection is enable all categories set to be monitored will use
96  // user defined algos
97  }else{
98 
99  m_algoAutoSelect["Mu"] = false;
100  m_algoAutoSelect["EG"] = false;
101  m_algoAutoSelect["IsoEG"] = false;
102  m_algoAutoSelect["Jet"] = false;
103  m_algoAutoSelect["CenJet"] = false;
104  m_algoAutoSelect["ForJet"] = false;
105  m_algoAutoSelect["TauJet"] = false;
106  m_algoAutoSelect["ETM"] = false;
107  m_algoAutoSelect["ETT"] = false;
108  m_algoAutoSelect["HTM"] = false;
109  m_algoAutoSelect["HTT"] = false;
110 
111  if(CatMu .getParameter<bool>("monitor")){m_selectedTriggers["Mu"] = CatMu .getParameter<string>("algo");}
112  if(CatEG .getParameter<bool>("monitor")){m_selectedTriggers["EG"] = CatEG .getParameter<string>("algo");}
113  if(CatIsoEG .getParameter<bool>("monitor")){m_selectedTriggers["IsoEG"] = CatIsoEG .getParameter<string>("algo");}
114  if(CatJet .getParameter<bool>("monitor")){m_selectedTriggers["Jet"] = CatJet .getParameter<string>("algo");}
115  if(CatCenJet.getParameter<bool>("monitor")){m_selectedTriggers["CenJet"] = CatCenJet.getParameter<string>("algo");}
116  if(CatForJet.getParameter<bool>("monitor")){m_selectedTriggers["CatForJet"] = CatForJet.getParameter<string>("algo");}
117  if(CatTauJet.getParameter<bool>("monitor")){m_selectedTriggers["TauJet"] = CatTauJet.getParameter<string>("algo");}
118  if(CatETM .getParameter<bool>("monitor")){m_selectedTriggers["ETM"] = CatETM .getParameter<string>("algo");}
119  if(CatETT .getParameter<bool>("monitor")){m_selectedTriggers["ETT"] = CatETT .getParameter<string>("algo");}
120  if(CatHTM .getParameter<bool>("monitor")){m_selectedTriggers["HTM"] = CatHTM .getParameter<string>("algo");}
121  if(CatHTT .getParameter<bool>("monitor")){m_selectedTriggers["HTT"] = CatHTT .getParameter<string>("algo");}
122 
123  }
124 
125  // If we are using algo-by-algo parametes we get them and set what is needed
126  }else{
127 
128  if(CatBPTX.getParameter<bool>("monitor")){
129  m_selectedTriggers["BPTX"] = CatBPTX.getParameter<string>("algo");
130  }
131 
132  if(CatMu.getParameter<bool>("monitor")){
133  m_algoAutoSelect["Mu"] = CatMu.getParameter<bool>("doAutoSelection");
134  if(!m_algoAutoSelect["Mu"]){m_selectedTriggers["Mu"] = CatMu.getParameter<string>("algo");}
135  }else{m_algoAutoSelect["Mu"] = false;}
136 
137  if(CatEG.getParameter<bool>("monitor")){
138  m_algoAutoSelect["EG"] = CatEG.getParameter<bool>("doAutoSelection");
139  if(!m_algoAutoSelect["EG"]){m_selectedTriggers["EG"] = CatEG.getParameter<string>("algo");}
140  }else{m_algoAutoSelect["EG"] = false;}
141 
142  if(CatIsoEG.getParameter<bool>("monitor")){
143  m_algoAutoSelect["IsoEG"] = CatIsoEG.getParameter<bool>("doAutoSelection");
144  if(!m_algoAutoSelect["IsoEG"]){m_selectedTriggers["IsoEG"] = CatIsoEG.getParameter<string>("algo");}
145  }else{m_algoAutoSelect["IsoEG"] = false;}
146 
147  if(CatJet.getParameter<bool>("monitor")){
148  m_algoAutoSelect["Jet"] = CatJet.getParameter<bool>("doAutoSelection");
149  if(!m_algoAutoSelect["Jet"]){m_selectedTriggers["Jet"] = CatJet.getParameter<string>("algo");}
150  }else{m_algoAutoSelect["Jet"] = false;}
151 
152  if(CatCenJet.getParameter<bool>("monitor")){
153  m_algoAutoSelect["CenJet"] = CatCenJet.getParameter<bool>("doAutoSelection");
154  if(!m_algoAutoSelect["CenJet"]){m_selectedTriggers["CenJet"] = CatCenJet.getParameter<string>("algo");}
155  }else{m_algoAutoSelect["CenJet"] = false;}
156 
157  if(CatForJet.getParameter<bool>("monitor")){
158  m_algoAutoSelect["CatForJet"] = CatForJet.getParameter<bool>("doAutoSelection");
159  if(!m_algoAutoSelect["CatForJet"]){m_selectedTriggers["CatForJet"] = CatForJet.getParameter<string>("algo");}
160  }else{m_algoAutoSelect["CatForJet"] = false;}
161 
162  if(CatTauJet.getParameter<bool>("monitor")){
163  m_algoAutoSelect["TauJet"] = CatTauJet.getParameter<bool>("doAutoSelection");
164  if(!m_algoAutoSelect["TauJet"]){m_selectedTriggers["TauJet"] = CatTauJet.getParameter<string>("algo");}
165  }else{m_algoAutoSelect["TauJet"] = false;}
166 
167  if(CatETM.getParameter<bool>("monitor")){
168  m_algoAutoSelect["ETM"] = CatETM.getParameter<bool>("doAutoSelection");
169  if(!m_algoAutoSelect["ETM"]){m_selectedTriggers["ETM"] = CatETM.getParameter<string>("algo");}
170  }else{m_algoAutoSelect["ETM"] = false;}
171 
172  if(CatETT.getParameter<bool>("monitor")){
173  m_algoAutoSelect["ETT"] = CatETT.getParameter<bool>("doAutoSelection");
174  if(!m_algoAutoSelect["ETT"]){m_selectedTriggers["ETT"] = CatETT.getParameter<string>("algo");}
175  }else{m_algoAutoSelect["ETT"] = false;}
176 
177  if(CatHTM.getParameter<bool>("monitor")){
178  m_algoAutoSelect["HTM"] = CatHTM.getParameter<bool>("doAutoSelection");
179  if(!m_algoAutoSelect["HTM"]){m_selectedTriggers["HTM"] = CatHTM.getParameter<string>("algo");}
180  }else{m_algoAutoSelect["HTM"] = false;}
181 
182  if(CatHTT.getParameter<bool>("monitor")){
183  m_algoAutoSelect["HTT"] = CatHTT.getParameter<bool>("doAutoSelection");
184  if(!m_algoAutoSelect["HTT"]){m_selectedTriggers["HTT"] = CatHTT.getParameter<string>("algo");}
185  }else{m_algoAutoSelect["HTT"] = false;}
186 
187  }
188 
189 
190  if (pset.getUntrackedParameter < bool > ("dqmStore", false)) {
192  dbe->setVerbose(0);
193  }
194 
195  m_outputFile = pset.getUntrackedParameter < std::string > ("outputFile","");
196 
197  if (m_outputFile.size() != 0) {
198  std::cout << "L1T Monitoring histograms will be saved to " << m_outputFile.c_str() << std::endl;
199  }
200 
201  bool disable = pset.getUntrackedParameter < bool > ("disableROOToutput", false);
202  if (disable) {m_outputFile = "";}
203 
204  if (dbe != NULL) {dbe->setCurrentFolder("L1T/L1TSync");}
205 
206 }
T getParameter(std::string const &) const
int m_refPrescaleSet
Definition: L1TSync.h:119
edm::InputTag m_l1GtDataDaqInputTag
Definition: L1TSync.h:145
#define NULL
Definition: scimark2.h:8
std::map< std::string, std::string > m_selectedTriggers
Definition: L1TSync.h:137
DQMStore * dbe
Definition: L1TSync.h:107
bool m_verbose
Definition: L1TSync.h:114
edm::InputTag m_l1GtEvmSource
Definition: L1TSync.h:144
std::string m_outputFile
Definition: L1TSync.h:111
std::map< std::string, bool > m_algoAutoSelect
Definition: L1TSync.h:136
void setVerbose(unsigned level)
Definition: DQMStore.cc:398
edm::ParameterSet m_parameters
Definition: L1TSync.h:109
tuple cout
Definition: gather_cfg.py:121
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
edm::InputTag m_scalersSource
Definition: L1TSync.h:143
L1TSync::~L1TSync ( )
virtual

Definition at line 210 of file L1TSync.cc.

210 {}

Member Function Documentation

void L1TSync::analyze ( const edm::Event e,
const edm::EventSetup c 
)
protectedvirtual

Implements edm::EDAnalyzer.

Definition at line 433 of file L1TSync.cc.

References a, abs, L1GtfeExtWord::beamMode(), gather_cfg::cout, edm::Event::getByLabel(), i, edm::HandleBase::isValid(), and L1GtfeExtWord::lhcFillNumber().

433  {
434 
435  if(m_verbose){cout << "[L1TSync] Called analyze." << endl;}
436 
437  // We only start analyzing if current LS is still valid
438  if(m_currentLSValid){
439 
440  if(m_verbose){cout << "[L1TSync] -> m_currentLSValid=" << m_currentLSValid << endl;}
441 
442  // Retriving information from GT
444  iEvent.getByLabel(m_l1GtEvmSource, gtEvmReadoutRecord);
445 
446  // Determining beam mode and fill number
447  if(gtEvmReadoutRecord.isValid()){
448 
449  const L1GtfeExtWord& gtfeEvmWord = gtEvmReadoutRecord->gtfeWord();
450  unsigned int lhcBeamMode = gtfeEvmWord.beamMode(); // Updating beam mode
451 
452  if(m_lhcFill == 0){
453  m_lhcFill = gtfeEvmWord.lhcFillNumber(); // Getting LHC Fill Number from GT
454  getBeamConfOMDS(); // Getting Beam Configuration from OMDS
455  }
456 
457  if(lhcBeamMode != STABLE){m_currentLSValid = false;} // If Beams are not stable we invalidate this LS
458 
459  }else{
460  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(ERROR_UNABLE_RETRIVE_PRODUCT);
461  eCount++;
462  m_ErrorMonitor->getTH1()->SetBinContent(ERROR_UNABLE_RETRIVE_PRODUCT,eCount);
463  }
464  }else{
465  if(m_verbose){cout << "[L1TSync] -> m_currentLSValid=" << m_currentLSValid << endl;}
466  }
467 
468  //------------------------------------------------------------------------------
469  // If current LS is valid and Beam Configuration is Valid we analyse this event
470  //------------------------------------------------------------------------------
472 
473  // Getting Final Decision Logic (FDL) Data from GT
474  edm::Handle<L1GlobalTriggerReadoutRecord> gtReadoutRecordData;
475  iEvent.getByLabel(m_l1GtDataDaqInputTag, gtReadoutRecordData);
476 
477  if(gtReadoutRecordData.isValid()){
478 
479  const vector<L1GtFdlWord>& gtFdlVectorData = gtReadoutRecordData->gtFdlVector();
480 
481  // Running over selected triggers
482  for(map<string,string>::const_iterator i=m_selectedTriggers.begin() ; i!=m_selectedTriggers.end() ; i++){
483 
484  string tTrigger = (*i).second;
485 
486  // Analyse only defined triggers
487  if(tTrigger != "Undefined" && tTrigger != "Undefined (Wrong Name)"){
488 
489  bool beamSingleConfig = false; // Single beam configured for this event
490  bool firedAlgo = false; // Algo fired in this event
491  int eventBx = -1;
492 
493  // Running over FDL results to get which bits fired
494  for(unsigned int a=0 ; a<gtFdlVectorData.size() ; a++){
495 
496  // Selecting the FDL that triggered
497  if(gtFdlVectorData[a].bxInEvent() == 0){
498  eventBx = gtFdlVectorData[a].localBxNr();
499  if(gtFdlVectorData[a].gtDecisionWord()[ m_algoBit[tTrigger] ]){firedAlgo = true;}
500  }
501  }
502 
503  // Checking beam configuration
504  if( m_beamConfig.beam1[eventBx] && !m_beamConfig.beam2[eventBx]){beamSingleConfig = true;}
505  if(!m_beamConfig.beam1[eventBx] && m_beamConfig.beam2[eventBx]){beamSingleConfig = true;}
506 
507  // Analyse only if this trigger fired in this event
508  // NOTE: Veto cases where a single beam is configured since
509  // for this cases this could be a real-satelite bunch collision
510  // -> Calculate the minimum bx diference between this event and a configured bx
511  if(firedAlgo && !beamSingleConfig){
512 
513  int DifAlgoVsBunchStructure = 9999; // Majorated
514 
515  for(unsigned int a=0 ; a<gtFdlVectorData.size() ; a++){
516 
517  int bxFDL = gtFdlVectorData[a].localBxNr();
518  int bxInEvent = gtFdlVectorData[a].bxInEvent();
519 
520  if(m_beamConfig.bxConfig(bxFDL) && abs(bxInEvent)<abs(DifAlgoVsBunchStructure)){
521  DifAlgoVsBunchStructure = -1*bxInEvent;
522  }
523  }
524 
525  m_algoVsBunchStructure[tTrigger]->Fill(m_currentLS,DifAlgoVsBunchStructure);
526 
527  }
528  }
529  }
530  }
531  else{
532  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(ERROR_UNABLE_RETRIVE_PRODUCT);
533  eCount++;
534  m_ErrorMonitor->getTH1()->SetBinContent(ERROR_UNABLE_RETRIVE_PRODUCT,eCount);
535  }
536 
537  }
538 }
int i
Definition: DBlmapReader.cc:9
edm::InputTag m_l1GtDataDaqInputTag
Definition: L1TSync.h:145
unsigned int m_lhcFill
Definition: L1TSync.h:122
#define abs(x)
Definition: mlp_lapack.h:159
std::map< std::string, std::string > m_selectedTriggers
Definition: L1TSync.h:137
BeamConfiguration m_beamConfig
Definition: L1TSync.h:125
bool m_verbose
Definition: L1TSync.h:114
edm::InputTag m_l1GtEvmSource
Definition: L1TSync.h:144
int iEvent
Definition: GenABIO.cc:243
std::map< TString, MonitorElement * > m_algoVsBunchStructure
Definition: L1TSync.h:135
TH1 * getTH1(void) const
bool bxConfig(int iBx)
Definition: L1TOMDSHelper.h:28
bool isValid() const
Definition: HandleBase.h:76
const cms_uint32_t lhcFillNumber() const
void getBeamConfOMDS()
Definition: L1TSync.cc:545
bool m_currentLSValid
Definition: L1TSync.h:115
double a
Definition: hdecay.h:121
std::vector< bool > beam2
Definition: L1TOMDSHelper.h:38
tuple cout
Definition: gather_cfg.py:121
MonitorElement * m_ErrorMonitor
Definition: L1TSync.h:140
std::map< TString, int > m_algoBit
Definition: L1TSync.h:131
std::vector< bool > beam1
Definition: L1TOMDSHelper.h:37
const cms_uint16_t beamMode() const
unsigned int m_currentLS
Definition: L1TSync.h:120
void L1TSync::beginJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 214 of file L1TSync.cc.

References gather_cfg::cout, cppFunctionSkipper::operator, DQMStore::rmdir(), and DQMStore::setCurrentFolder().

214  {
215 
216  if (m_verbose){cout << "[L1TSync] Called beginJob." << endl;}
217 
218  // get hold of back-end interface
219  DQMStore *dbe = 0;
220  dbe = Service < DQMStore > ().operator->();
221 
222  if (dbe) {
223  dbe->setCurrentFolder("L1T/L1TSync");
224  dbe->rmdir("L1T/L1TSync");
225  }
226 
227 }
void rmdir(const std::string &fullpath)
Definition: DQMStore.cc:2535
DQMStore * dbe
Definition: L1TSync.h:107
bool m_verbose
Definition: L1TSync.h:114
tuple cout
Definition: gather_cfg.py:121
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
void L1TSync::beginLuminosityBlock ( edm::LuminosityBlock const &  lumiBlock,
edm::EventSetup const &  c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 321 of file L1TSync.cc.

References gather_cfg::cout, i, edm::LuminosityBlockBase::id(), and edm::LuminosityBlockID::luminosityBlock().

321  {
322 
323  if (m_verbose){cout << "[L1TSync] Called beginLuminosityBlock." << endl;}
324 
325  // If this LS is not the next to last one force closing of current LS blocks
326  // for certification
327  if(m_currentLS !=0 && m_currentLS+1 != lumiBlock.id().luminosityBlock()){
328 
329  if (m_verbose){
330  cout << "[L1TSync] None consecutive: doFractionInSync() - LAST="
331  << m_currentLS << " CURRENT=" << lumiBlock.id().luminosityBlock() << endl;
332  }
333  doFractionInSync(true,false);
334  }
335 
336  // Updating current LS number
337  m_currentLS = lumiBlock.id().luminosityBlock();
338 
339  // If this is the fist valid LS update first LS for certification
340  for(map<string,string>::const_iterator i=m_selectedTriggers.begin() ; i!=m_selectedTriggers.end() ; i++){
341 
342  string theTriggerAlias = (*i).second;
343  if(m_certFirstLS[theTriggerAlias]==0){m_certFirstLS[theTriggerAlias] = m_currentLS;}
344 
345  }
346 
347  // A LS will be valid if:
348  // * BeamMode == STABLE for all events monitored
349  m_currentLSValid = true;
350 
351 }
int i
Definition: DBlmapReader.cc:9
void doFractionInSync(bool iForce=false, bool iBad=false)
Definition: L1TSync.cc:625
std::map< std::string, std::string > m_selectedTriggers
Definition: L1TSync.h:137
std::map< TString, unsigned int > m_certFirstLS
Definition: L1TSync.h:132
bool m_verbose
Definition: L1TSync.h:114
bool m_currentLSValid
Definition: L1TSync.h:115
tuple cout
Definition: gather_cfg.py:121
unsigned int m_currentLS
Definition: L1TSync.h:120
void L1TSync::beginRun ( const edm::Run run,
const edm::EventSetup iSetup 
)
protectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 245 of file L1TSync.cc.

References gather_cfg::cout, edm::EventSetup::get(), L1TMenuHelper::getLUSOTrigger(), L1GtTriggerMenu::gtAlgorithmAliasMap(), i, relval_steps::menu, edm::ESHandle< class >::product(), L1TMenuHelper::testAlgos(), and pat::UNKNOWN.

245  {
246 
247  if (m_verbose){cout << "[L1TSync] Called beginRun." << endl;}
248 
249  // Initializing variables
250  int maxNbins = 2501;
251 
252  // Reseting run dependent variables
253  m_lhcFill = 0;
254  m_currentLS = 0;
255  m_certFirstLS.clear();
256  m_certLastLS .clear();
257 
258  // Getting Trigger menu from GT
260  iSetup.get<L1GtTriggerMenuRcd>().get(menuRcd);
261  const L1GtTriggerMenu* menu = menuRcd.product();
262 
263  // Filling Alias-Bit Map
264  for (CItAlgo algo = menu->gtAlgorithmAliasMap().begin(); algo!=menu->gtAlgorithmAliasMap().end(); ++algo){
265  m_algoBit[(algo->second).algoAlias()] = (algo->second).algoBitNumber();
266  }
267 
268  // Getting fill number for this run
269  //Handle<ConditionsInRunBlock> runConditions;
270  //iRun.getByType(runConditions);
271  //int lhcFillNumber = runConditions->lhcFillNumber;
272  //
273  //ESHandle<L1GtPrescaleFactors> l1GtPfAlgo;
274  //iSetup.get<L1GtPrescaleFactorsAlgoTrigRcd>().get(l1GtPfAlgo);
275  //const L1GtPrescaleFactors* m_l1GtPfAlgo = l1GtPfAlgo.product();
276 
277  L1TMenuHelper myMenuHelper = L1TMenuHelper(iSetup);
278 
280 
281  map<string,string> tAutoSelTrig = myMenuHelper.getLUSOTrigger(m_algoAutoSelect,m_refPrescaleSet);
282  m_selectedTriggers.insert(tAutoSelTrig.begin(),tAutoSelTrig.end());
283 
284  // Initializing DQM Monitor Elements
285  dbe->setCurrentFolder("L1T/L1TSync");
286  m_ErrorMonitor = dbe->book1D("ErrorMonitor","ErrorMonitor",7,0,7);
287  m_ErrorMonitor->setBinLabel(UNKNOWN ,"UNKNOWN");
288  m_ErrorMonitor->setBinLabel(WARNING_DB_CONN_FAILED ,"WARNING_DB_CONN_FAILED"); // Errors from L1TOMDSHelper
289  m_ErrorMonitor->setBinLabel(WARNING_DB_QUERY_FAILED ,"WARNING_DB_QUERY_FAILED"); // Errors from L1TOMDSHelper
290  m_ErrorMonitor->setBinLabel(WARNING_DB_INCORRECT_NBUNCHES,"WARNING_DB_INCORRECT_NBUNCHES"); // Errors from L1TOMDSHelper
291  m_ErrorMonitor->setBinLabel(ERROR_UNABLE_RETRIVE_PRODUCT ,"ERROR_UNABLE_RETRIVE_PRODUCT");
292  m_ErrorMonitor->setBinLabel(ERROR_TRIGGERALIAS_NOTVALID ,"ERROR_TRIGGERALIAS_NOTVALID");
293  m_ErrorMonitor->setBinLabel(ERROR_LSBLOCK_NOTVALID ,"ERROR_LSBLOCK_NOTVALID");
294 
295  // Looping over selected triggers
296  for(map<string,string>::const_iterator i=m_selectedTriggers.begin() ; i!=m_selectedTriggers.end() ; i++){
297 
298  string tCategory = (*i).first;
299  string tTrigger = (*i).second;
300 
301  // Initializing LS blocks for certification
302  m_certFirstLS[(*i).second] = 0;
303  m_certLastLS [(*i).second] = 0;
304 
305  // Initializing DQM Monitors
306  dbe->setCurrentFolder("L1T/L1TSync/AlgoVsBunchStructure/");
307  m_algoVsBunchStructure[tTrigger] = dbe->book2D(tCategory,"min #Delta("+tTrigger+",Bunch)",maxNbins,-0.5,double(maxNbins)-0.5,5,-2.5,2.5);
308  m_algoVsBunchStructure[tTrigger] ->setAxisTitle("Lumi Section" ,1);
309 
310  dbe->setCurrentFolder("L1T/L1TSync/Certification/");
311  m_algoCertification[tTrigger] = dbe->book1D(tCategory, "fraction of in sync: "+tTrigger,maxNbins,-0.5,double(maxNbins)-0.5);
312  m_algoCertification[tTrigger] ->setAxisTitle("Lumi Section" ,1);
313 
314  }
315 
316 }
int m_refPrescaleSet
Definition: L1TSync.h:119
int i
Definition: DBlmapReader.cc:9
std::map< TString, unsigned int > m_certLastLS
Definition: L1TSync.h:133
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:722
std::map< std::string, std::string > testAlgos(std::map< std::string, std::string >)
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)
unsigned int m_lhcFill
Definition: L1TSync.h:122
std::map< std::string, std::string > m_selectedTriggers
Definition: L1TSync.h:137
DQMStore * dbe
Definition: L1TSync.h:107
std::map< TString, unsigned int > m_certFirstLS
Definition: L1TSync.h:132
bool m_verbose
Definition: L1TSync.h:114
AlgorithmMap::const_iterator CItAlgo
iterators through map containing the algorithms
std::map< std::string, bool > m_algoAutoSelect
Definition: L1TSync.h:136
std::map< std::string, std::string > getLUSOTrigger(std::map< std::string, bool > iCategories, int IndexRefPrescaleFactors)
std::map< TString, MonitorElement * > m_algoVsBunchStructure
Definition: L1TSync.h:135
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
tuple cout
Definition: gather_cfg.py:121
MonitorElement * m_ErrorMonitor
Definition: L1TSync.h:140
std::map< TString, MonitorElement * > m_algoCertification
Definition: L1TSync.h:134
const AlgorithmMap & gtAlgorithmAliasMap() const
get / set the algorithm map (by alias)
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:850
std::map< TString, int > m_algoBit
Definition: L1TSync.h:131
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:434
unsigned int m_currentLS
Definition: L1TSync.h:120
void L1TSync::certifyLSBlock ( std::string  iTrigger,
int  iInitLs,
int  iEndLs,
float  iValue 
)
private

Definition at line 736 of file L1TSync.cc.

References python.rootplot.utilities::ls().

736  {
737 
738  // Finding correct bins in the histogram for this block
739  int binInit = m_algoCertification[iTrigger]->getTH1()->FindBin(iInitLs);
740  int binEnd = m_algoCertification[iTrigger]->getTH1()->FindBin(iEndLs);
741 
742  for(int ls=binInit ; ls<=binEnd ; ls++){
743  m_algoCertification[iTrigger]->setBinContent(ls,iValue);
744  }
745 
746 }
std::map< TString, MonitorElement * > m_algoCertification
Definition: L1TSync.h:134
void L1TSync::doFractionInSync ( bool  iForce = false,
bool  iBad = false 
)
private

Definition at line 625 of file L1TSync.cc.

References a, gather_cfg::cout, edm::ParameterSet::getParameter(), i, and python.rootplot.utilities::ls().

625  {
626 
627  for(map<string,string>::const_iterator i=m_selectedTriggers.begin() ; i!=m_selectedTriggers.end() ; i++){
628 
629  string theCategory = (*i).first;
630  string theTriggerAlias = (*i).second;
631 
632  // Caching frequently used values from maps
633  unsigned int fLS = m_certFirstLS[theTriggerAlias];
634  unsigned int lLS = m_certLastLS [theTriggerAlias];
635 
636  // Checking validity of the trigger alias and of the LS block
637  bool triggerAlias_isValid = theTriggerAlias != "Undefined" && theTriggerAlias != "Undefined (Wrong Name)";
638  bool lsBlock_exists = !(fLS == 0 && lLS == 0);
639  bool lsBlock_isValid = fLS <= lLS && fLS > 0 && lLS > 0;
640 
641  if(triggerAlias_isValid && lsBlock_exists && lsBlock_isValid){
642 
643  // If we are forced to close blocks and mark them bad
644  if(iForce && iBad){
645  certifyLSBlock(theTriggerAlias,fLS,lLS,-1);
646  m_certFirstLS[theTriggerAlias] = 0;
647  m_certLastLS [theTriggerAlias] = 0;
648  }
649 
650  // If we are not forced to mark bad, we check if we have enough statistics
651  else{
652 
653  // Getting events with 0 bx difference between BPTX and Algo for current LS
654  double CountSync = 0;
655  double CountAll = 0;
656 
657  // Adding all entries for current LS block
658  for(unsigned int ls=fLS ; ls<=lLS ; ls++){
659 
660  CountSync += m_algoVsBunchStructure[theTriggerAlias]->getBinContent(ls+1,3);
661  for(int a=1 ; a<6 ; a++){
662  CountAll += m_algoVsBunchStructure[theTriggerAlias]->getBinContent(ls+1,a);
663  }
664  }
665 
666  if(m_verbose){
667  cout << "Alias = " << theTriggerAlias
668  << " InitLS=" << fLS
669  << " EndLS=" << lLS
670  << " Events=" << CountAll ;
671  }
672 
673  if(iForce ||
674  CountAll >= m_parameters.getParameter<ParameterSet>("Categories")
675  .getParameter<ParameterSet>(theCategory)
676  .getParameter<int>("CertMinEvents")){
677 
678  if(m_verbose){cout << " <--------------- Enough Statistics: ";}
679 
680 
681  // Calculating fraction of in time
682  double fraction = 0;
683  if(CountAll >0){fraction = CountSync/CountAll;}
684 
685  // This is to avoid having an entry equal to zero and thus
686  // disregarded by the automatic tests
687  if(fraction==0){fraction=0.000001;}
688 
689  certifyLSBlock(theTriggerAlias,fLS,lLS,fraction);
690  m_certFirstLS[theTriggerAlias] = 0;
691  m_certLastLS [theTriggerAlias] = 0;
692  }
693 
694  if(m_verbose){cout << endl;}
695 
696  }
697  }
698 
699  // A problem was found. We report it and set a not physical vale (-1) to the certification plot
700  else{
701 
702  // If trigger alias is not valid report it to m_ErrorMonitor
703  if(!triggerAlias_isValid){
704  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(ERROR_TRIGGERALIAS_NOTVALID);
705  eCount++;
706  m_ErrorMonitor->getTH1()->SetBinContent(ERROR_TRIGGERALIAS_NOTVALID,eCount);
707  certifyLSBlock(theTriggerAlias,fLS,lLS,-1);
708  m_certFirstLS[theTriggerAlias] = 0;
709  m_certLastLS [theTriggerAlias] = 0;
710  }
711 
712  // If LS Block is not valid report it to m_ErrorMonitor
713  if(lsBlock_exists && !lsBlock_isValid){
714  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(ERROR_LSBLOCK_NOTVALID);
715  eCount++;
716  m_ErrorMonitor->getTH1()->SetBinContent(ERROR_LSBLOCK_NOTVALID,eCount);
717  certifyLSBlock(theTriggerAlias,fLS,lLS,-1);
718  m_certFirstLS[theTriggerAlias] = 0;
719  m_certLastLS [theTriggerAlias] = 0;
720  }
721 
722  }
723  }
724 
725 }
T getParameter(std::string const &) const
int i
Definition: DBlmapReader.cc:9
std::map< TString, unsigned int > m_certLastLS
Definition: L1TSync.h:133
std::map< std::string, std::string > m_selectedTriggers
Definition: L1TSync.h:137
std::map< TString, unsigned int > m_certFirstLS
Definition: L1TSync.h:132
bool m_verbose
Definition: L1TSync.h:114
void certifyLSBlock(std::string iTrigger, int iInitLs, int iEndLs, float iValue)
Definition: L1TSync.cc:736
std::map< TString, MonitorElement * > m_algoVsBunchStructure
Definition: L1TSync.h:135
TH1 * getTH1(void) const
edm::ParameterSet m_parameters
Definition: L1TSync.h:109
double a
Definition: hdecay.h:121
tuple cout
Definition: gather_cfg.py:121
MonitorElement * m_ErrorMonitor
Definition: L1TSync.h:140
void L1TSync::endJob ( void  )
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 231 of file L1TSync.cc.

References gather_cfg::cout.

231  {
232 
233  if (m_verbose){cout << "[L1TSync] Called endJob." << endl;}
234 
235  if (m_outputFile.size() != 0 && dbe)
237 
238  return;
239 
240 }
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
Definition: DQMStore.cc:2118
DQMStore * dbe
Definition: L1TSync.h:107
bool m_verbose
Definition: L1TSync.h:114
std::string m_outputFile
Definition: L1TSync.h:111
tuple cout
Definition: gather_cfg.py:121
void L1TSync::endLuminosityBlock ( edm::LuminosityBlock const &  lumiBlock,
edm::EventSetup const &  c 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 357 of file L1TSync.cc.

References gather_cfg::cout, and i.

357  {
358 
359  if(m_verbose){cout << "[L1TSync] Called endLuminosityBlock." << endl;}
360 
361  if(m_verbose){
362  cout << "[L1TSync] m_currentLSValid : " << m_currentLSValid << endl;
363  cout << "[L1TSync] m_beamConfig.isValid(): " << m_beamConfig.isValid() << endl;
364  }
365 
366  for(map<string,string>::const_iterator i=m_selectedTriggers.begin() ; i!=m_selectedTriggers.end() ; i++){
367 
368  // Update last LS for certification
369  string theTriggerAlias = (*i).second;
370  m_certLastLS[theTriggerAlias] = m_currentLS;
371 
372  }
373 
374  // If this LS is valid (i.e. all events recorded with stable beams)
376 
377  if(m_verbose){cout << "[L1TSync] Regular call: doFractionInSync()" << endl;}
378  doFractionInSync(false,false);
379 
380  }
381  // If this LS is not valid it can be in the following context:
382  // * We still hadn't stable beam (no need to certify nothing
383  // * Beam just got unstable or dumped (we may have a complete block of data do certify)
384  else{
385 
386  //-> First we close all blocks from certFirstLS[] to m_currentLS-1
387  for(map<string,string>::const_iterator i=m_selectedTriggers.begin() ; i!=m_selectedTriggers.end() ; i++){
388 
389  string theTriggerAlias = (*i).second;
390 
391  int fLs = m_certFirstLS[theTriggerAlias];
392  int lLS = m_certLastLS [theTriggerAlias];
393 
394  // If this is a single LS block we do nothing (in this step)
395  if(fLs == lLS){
396  m_certFirstLS[theTriggerAlias] = 0;
397  m_certLastLS [theTriggerAlias] = 0;
398  }
399  // If block is multi LS then we remove the current LS
400  else{
401  m_certLastLS [theTriggerAlias] = m_currentLS-1;
402  }
403 
404  }
405  doFractionInSync(true,false);
406 
407  //-> Second we mark this single LS bad for all triggers
408  for(map<string,string>::const_iterator i=m_selectedTriggers.begin() ; i!=m_selectedTriggers.end() ; i++){
409  string theTriggerAlias = (*i).second;
410  m_certFirstLS[theTriggerAlias] = m_currentLS;
411  m_certLastLS [theTriggerAlias] = m_currentLS;
412  }
413  doFractionInSync(true,true);
414 
415  if(m_verbose){cout << "[L1TSync] Error call: doFractionInSync()" << endl;}
416 
417  }
418 
419 }
int i
Definition: DBlmapReader.cc:9
std::map< TString, unsigned int > m_certLastLS
Definition: L1TSync.h:133
void doFractionInSync(bool iForce=false, bool iBad=false)
Definition: L1TSync.cc:625
std::map< std::string, std::string > m_selectedTriggers
Definition: L1TSync.h:137
BeamConfiguration m_beamConfig
Definition: L1TSync.h:125
std::map< TString, unsigned int > m_certFirstLS
Definition: L1TSync.h:132
bool m_verbose
Definition: L1TSync.h:114
bool m_currentLSValid
Definition: L1TSync.h:115
tuple cout
Definition: gather_cfg.py:121
unsigned int m_currentLS
Definition: L1TSync.h:120
void L1TSync::endRun ( const edm::Run run,
const edm::EventSetup iSetup 
)
protectedvirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 422 of file L1TSync.cc.

References gather_cfg::cout.

422  {
423 
424  if(m_verbose){cout << "[L1TSync] Called endRun." << endl;}
425 
426  // When the run end for closing of the LS certification blocks and evaluation
427  // of synchronization for that block
428  doFractionInSync(true,false);
429 
430 }
void doFractionInSync(bool iForce=false, bool iBad=false)
Definition: L1TSync.cc:625
bool m_verbose
Definition: L1TSync.h:114
tuple cout
Definition: gather_cfg.py:121
void L1TSync::getBeamConfOMDS ( )
private

Definition at line 545 of file L1TSync.cc.

References gather_cfg::cout, L1TOMDSHelper::NO_ERROR, pat::UNKNOWN, L1TOMDSHelper::WARNING_DB_CONN_FAILED, and L1TOMDSHelper::WARNING_DB_QUERY_FAILED.

545  {
546 
547  //Getting connection paremeters
548  string oracleDB = m_parameters.getParameter<string>("oracleDB");
549  string pathCondDB = m_parameters.getParameter<string>("pathCondDB");
550 
551  // Connecting to OMDS
552  L1TOMDSHelper myOMDSHelper = L1TOMDSHelper();
553  int conError;
554  myOMDSHelper.connect(oracleDB,pathCondDB,conError);
555 
556  if(conError == L1TOMDSHelper::NO_ERROR){
557 
558  if(m_verbose){cout << "[L1TSync] Connected to DB with no error." << endl;}
559 
560  int errorRetrive;
561  m_beamConfig = myOMDSHelper.getBeamConfiguration(m_lhcFill,errorRetrive);
562 
563  if(errorRetrive == L1TOMDSHelper::NO_ERROR){
564  if(m_verbose){
565  cout << "[L1TSync] Retriving LHC Bunch Structure: NO_ERROR" << endl;
566  cout << "[L1TSync] -> LHC Bunch Structure valid=" << m_beamConfig.m_valid << " nBunches=" << m_beamConfig.nCollidingBunches << endl;
567  }
568  }
569  else if(errorRetrive == L1TOMDSHelper::WARNING_DB_CONN_FAILED){
570 
571  if(m_verbose){cout << "[L1TSync] Retriving LHC Bunch Structure: WARNING_DB_CONN_FAILED" << endl;}
572 
573  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(WARNING_DB_INCORRECT_NBUNCHES);
574  eCount++;
575  m_ErrorMonitor->getTH1()->SetBinContent(WARNING_DB_INCORRECT_NBUNCHES,eCount);
576  }
577  else if(errorRetrive == L1TOMDSHelper::WARNING_DB_QUERY_FAILED){
578 
579  if(m_verbose){cout << "[L1TSync] Retriving LHC Bunch Structure: WARNING_DB_QUERY_FAILED" << endl;}
580 
581  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(WARNING_DB_QUERY_FAILED);
582  eCount++;
583  m_ErrorMonitor->getTH1()->SetBinContent(WARNING_DB_QUERY_FAILED,eCount);
584  }
585  else{
586 
587  if(m_verbose){cout << "[L1TSync] Retriving LHC Bunch Structure: UNKNOWN" << endl;}
588 
589  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(UNKNOWN);
590  eCount++;
591  m_ErrorMonitor->getTH1()->SetBinContent(UNKNOWN,eCount);
592  }
593 
594  }else{
595 
597 
598  if(m_verbose){cout << "[L1TSync] Connect to DB: WARNING_DB_CONN_FAILED" << endl;}
599 
600  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(WARNING_DB_CONN_FAILED);
601  eCount++;
602  m_ErrorMonitor->getTH1()->SetBinContent(WARNING_DB_CONN_FAILED,eCount);
603  }else{
604 
605  if(m_verbose){cout << "[L1TSync] Connect to DB: UNKNOWN" << endl;}
606 
607  int eCount = m_ErrorMonitor->getTH1()->GetBinContent(UNKNOWN);
608  eCount++;
609  m_ErrorMonitor->getTH1()->SetBinContent(UNKNOWN,eCount);
610  }
611 
612  }
613 
614 }
T getParameter(std::string const &) const
unsigned int m_lhcFill
Definition: L1TSync.h:122
BeamConfiguration m_beamConfig
Definition: L1TSync.h:125
bool m_verbose
Definition: L1TSync.h:114
TH1 * getTH1(void) const
edm::ParameterSet m_parameters
Definition: L1TSync.h:109
tuple cout
Definition: gather_cfg.py:121
MonitorElement * m_ErrorMonitor
Definition: L1TSync.h:140

Member Data Documentation

DQMStore* L1TSync::dbe
private

Definition at line 107 of file L1TSync.h.

const std::vector< std::vector<int> >* L1TSync::ListsPrescaleFactors
private

Definition at line 128 of file L1TSync.h.

std::map<std::string,bool> L1TSync::m_algoAutoSelect
private

Definition at line 136 of file L1TSync.h.

std::map<TString,int> L1TSync::m_algoBit
private

Definition at line 131 of file L1TSync.h.

std::map<TString,MonitorElement*> L1TSync::m_algoCertification
private

Definition at line 134 of file L1TSync.h.

std::map<TString,MonitorElement*> L1TSync::m_algoVsBunchStructure
private

Definition at line 135 of file L1TSync.h.

BeamConfiguration L1TSync::m_beamConfig
private

Definition at line 125 of file L1TSync.h.

std::map<TString,unsigned int> L1TSync::m_certFirstLS
private

Definition at line 132 of file L1TSync.h.

std::map<TString,unsigned int> L1TSync::m_certLastLS
private

Definition at line 133 of file L1TSync.h.

unsigned int L1TSync::m_currentLS
private

Definition at line 120 of file L1TSync.h.

bool L1TSync::m_currentLSValid
private

Definition at line 115 of file L1TSync.h.

MonitorElement* L1TSync::m_ErrorMonitor
private

Definition at line 140 of file L1TSync.h.

edm::InputTag L1TSync::m_l1GtDataDaqInputTag
private

Definition at line 145 of file L1TSync.h.

edm::InputTag L1TSync::m_l1GtEvmSource
private

Definition at line 144 of file L1TSync.h.

unsigned int L1TSync::m_lhcFill
private

Definition at line 122 of file L1TSync.h.

std::string L1TSync::m_outputFile
private

Definition at line 111 of file L1TSync.h.

edm::ParameterSet L1TSync::m_parameters
private

Definition at line 109 of file L1TSync.h.

bool* L1TSync::m_processedLS
private

Definition at line 116 of file L1TSync.h.

int L1TSync::m_refPrescaleSet
private

Definition at line 119 of file L1TSync.h.

edm::InputTag L1TSync::m_scalersSource
private

Definition at line 143 of file L1TSync.h.

std::map<std::string,std::string> L1TSync::m_selectedTriggers
private

Definition at line 137 of file L1TSync.h.

bool L1TSync::m_verbose
private

Definition at line 114 of file L1TSync.h.