CMS 3D CMS Logo

L1TOMDSHelper.h
Go to the documentation of this file.
1 #ifndef DQM_L1TMONITOR_L1TOMDSHELPER_H
2 #define DQM_L1TMONITOR_L1TOMDSHELPER_H
3 
5 
7 
8 // ROOT includes
9 #include "TString.h"
10 
11 // System includes
12 #include <memory>
13 #include <iostream>
14 #include <string>
15 #include <vector>
16 #include <map>
17 
18 // Simplified structure for single object conditions information
20 public:
22  m_valid = false;
24  }
25 
26  bool bxConfig(int iBx) {
27  if (beam1[iBx] && beam2[iBx]) {
28  return true;
29  } else {
30  return false;
31  }
32  }
33 
34  bool isValid() { return m_valid; }
35 
36  bool m_valid;
38  std::vector<bool> beam1;
39  std::vector<bool> beam2;
40 };
41 
42 // Simplified structure for single object conditions information
44  TString bitName; // Bit Name for which the fit refers to
45  TString fitFunction; // Fitting function (hard coded for now...)
46  float bitNumber; // Bit Number for which the fit refers to
47  float pm1, p0, p1, p2; // Fit parameters f(x)=pm1*x^(-1)+p0+p1*x+p2*x^2
48 };
49 
51 public:
53 
54 public:
55  L1TOMDSHelper();
56  ~L1TOMDSHelper(); // Destructor
57 
58  bool connect(std::string iOracleDB, std::string iPathCondDB, int &error);
59  std::map<std::string, WbMTriggerXSecFit> getWbMTriggerXsecFits(std::string iTable, int &error);
60  std::map<std::string, WbMTriggerXSecFit> getWbMAlgoXsecFits(int &error);
61  std::map<std::string, WbMTriggerXSecFit> getWbMTechXsecFits(int &error);
62  int getNumberCollidingBunches(int lhcFillNumber, int &error);
63  BeamConfiguration getBeamConfiguration(int lhcFillNumber, int &error);
64  std::vector<bool> getBunchStructure(int lhcFillNumber, int &error);
65  std::vector<float> getInitBunchLumi(int lhcFillNumber, int &error);
66  std::vector<double> getRelativeBunchLumi(int lhcFillNumber, int &error);
67 
69 
70 private:
73 
75 };
76 
77 #endif
L1TOMDSHelper
Definition: L1TOMDSHelper.h:50
BeamConfiguration::BeamConfiguration
BeamConfiguration()
Definition: L1TOMDSHelper.h:21
L1TOMDSHelper::Error
Error
Definition: L1TOMDSHelper.h:52
L1TOMDSHelper::m_omdsReader
l1t::OMDSReader * m_omdsReader
Definition: L1TOMDSHelper.h:74
BeamConfiguration::m_valid
bool m_valid
Definition: L1TOMDSHelper.h:36
L1TOMDSHelper::L1TOMDSHelper
L1TOMDSHelper()
Definition: L1TOMDSHelper.cc:9
L1TOMDSHelper::getNumberCollidingBunches
int getNumberCollidingBunches(int lhcFillNumber, int &error)
Definition: L1TOMDSHelper.cc:99
l1t::OMDSReader
Definition: OMDSReader.h:42
OMDSReader.h
WbMTriggerXSecFit::bitNumber
float bitNumber
Definition: L1TOMDSHelper.h:46
L1TOMDSHelper::getWbMAlgoXsecFits
std::map< std::string, WbMTriggerXSecFit > getWbMAlgoXsecFits(int &error)
Definition: L1TOMDSHelper.cc:89
WbMTriggerXSecFit::p0
float p0
Definition: L1TOMDSHelper.h:47
WbMTriggerXSecFit::p2
float p2
Definition: L1TOMDSHelper.h:47
L1TOMDSHelper::WARNING_DB_QUERY_FAILED
Definition: L1TOMDSHelper.h:52
relativeConstraints.error
error
Definition: relativeConstraints.py:53
L1TOMDSHelper::NO_ERROR
Definition: L1TOMDSHelper.h:52
L1TOMDSHelper::m_pathCondDB
std::string m_pathCondDB
Definition: L1TOMDSHelper.h:72
WbMTriggerXSecFit::fitFunction
TString fitFunction
Definition: L1TOMDSHelper.h:45
L1TOMDSHelper::getBunchStructure
std::vector< bool > getBunchStructure(int lhcFillNumber, int &error)
Definition: L1TOMDSHelper.cc:203
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
L1TOMDSHelper::getWbMTriggerXsecFits
std::map< std::string, WbMTriggerXSecFit > getWbMTriggerXsecFits(std::string iTable, int &error)
Definition: L1TOMDSHelper.cc:44
L1TOMDSHelper::enumToStringError
std::string enumToStringError(int)
Definition: L1TOMDSHelper.cc:333
L1TOMDSHelper::getBeamConfiguration
BeamConfiguration getBeamConfiguration(int lhcFillNumber, int &error)
Definition: L1TOMDSHelper.cc:143
WbMTriggerXSecFit::p1
float p1
Definition: L1TOMDSHelper.h:47
BeamConfiguration::bxConfig
bool bxConfig(int iBx)
Definition: L1TOMDSHelper.h:26
BeamConfiguration::nCollidingBunches
int nCollidingBunches
Definition: L1TOMDSHelper.h:37
L1TOMDSHelper::getRelativeBunchLumi
std::vector< double > getRelativeBunchLumi(int lhcFillNumber, int &error)
Definition: L1TOMDSHelper.cc:285
L1TOMDSHelper::WARNING_DB_CONN_FAILED
Definition: L1TOMDSHelper.h:52
L1TOMDSHelper::getInitBunchLumi
std::vector< float > getInitBunchLumi(int lhcFillNumber, int &error)
Definition: L1TOMDSHelper.cc:247
BeamConfiguration::isValid
bool isValid()
Definition: L1TOMDSHelper.h:34
WbMTriggerXSecFit::bitName
TString bitName
Definition: L1TOMDSHelper.h:44
BeamConfiguration
Definition: L1TOMDSHelper.h:19
L1TOMDSHelper::getWbMTechXsecFits
std::map< std::string, WbMTriggerXSecFit > getWbMTechXsecFits(int &error)
Definition: L1TOMDSHelper.cc:94
L1TOMDSHelper::connect
bool connect(std::string iOracleDB, std::string iPathCondDB, int &error)
Definition: L1TOMDSHelper.cc:15
Frameworkfwd.h
L1TOMDSHelper::~L1TOMDSHelper
~L1TOMDSHelper()
Definition: L1TOMDSHelper.cc:12
WbMTriggerXSecFit::pm1
float pm1
Definition: L1TOMDSHelper.h:47
WbMTriggerXSecFit
Definition: L1TOMDSHelper.h:43
BeamConfiguration::beam2
std::vector< bool > beam2
Definition: L1TOMDSHelper.h:39
L1TOMDSHelper::WARNING_DB_INCORRECT_NBUNCHES
Definition: L1TOMDSHelper.h:52
L1TOMDSHelper::m_oracleDB
std::string m_oracleDB
Definition: L1TOMDSHelper.h:71
BeamConfiguration::beam1
std::vector< bool > beam1
Definition: L1TOMDSHelper.h:38