15 std::shared_ptr< L1GctChannelMask >
24 "GCT_MASKS.CONFIG_KEY",
28 edm::LogError(
"L1-O2O" ) <<
"Problem with L1GctChannelMask EM mask for key " << objectKey;
29 return std::shared_ptr< L1GctChannelMask >() ;
41 "GCT_MASKS.CONFIG_KEY",
45 edm::LogError(
"L1-O2O" ) <<
"Problem with L1GctChannelMask region mask for key " << objectKey;
46 return std::shared_ptr< L1GctChannelMask >() ;
52 std::vector< std::string > rgnMaskCols;
53 rgnMaskCols.push_back(
"RCT_CRATE_0_RGN_MASK");
54 rgnMaskCols.push_back(
"RCT_CRATE_1_RGN_MASK");
55 rgnMaskCols.push_back(
"RCT_CRATE_2_RGN_MASK");
56 rgnMaskCols.push_back(
"RCT_CRATE_3_RGN_MASK");
57 rgnMaskCols.push_back(
"RCT_CRATE_4_RGN_MASK");
58 rgnMaskCols.push_back(
"RCT_CRATE_5_RGN_MASK");
59 rgnMaskCols.push_back(
"RCT_CRATE_6_RGN_MASK");
60 rgnMaskCols.push_back(
"RCT_CRATE_7_RGN_MASK");
61 rgnMaskCols.push_back(
"RCT_CRATE_8_RGN_MASK");
62 rgnMaskCols.push_back(
"RCT_CRATE_9_RGN_MASK");
63 rgnMaskCols.push_back(
"RCT_CRATE_10_RGN_MASK");
64 rgnMaskCols.push_back(
"RCT_CRATE_11_RGN_MASK");
65 rgnMaskCols.push_back(
"RCT_CRATE_12_RGN_MASK");
66 rgnMaskCols.push_back(
"RCT_CRATE_13_RGN_MASK");
67 rgnMaskCols.push_back(
"RCT_CRATE_14_RGN_MASK");
68 rgnMaskCols.push_back(
"RCT_CRATE_15_RGN_MASK");
69 rgnMaskCols.push_back(
"RCT_CRATE_16_RGN_MASK");
70 rgnMaskCols.push_back(
"RCT_CRATE_17_RGN_MASK");
77 "GCT_RGN_MASKS.CONFIG_KEY",
87 "GCT_MASKS.CONFIG_KEY",
91 edm::LogError(
"L1-O2O" ) <<
"Problem with L1GctChannelMask energy sum mask for key " << objectKey;
92 return std::shared_ptr< L1GctChannelMask >() ;
98 std::vector< std::string > esumMaskCols;
99 esumMaskCols.push_back(
"GCT_TET_MASK");
100 esumMaskCols.push_back(
"GCT_MET_MASK");
101 esumMaskCols.push_back(
"GCT_HT_MASK");
102 esumMaskCols.push_back(
"GCT_MHT_MASK");
109 "GCT_ESUM_MASKS.CONFIG_KEY",
114 auto masks = std::make_shared< L1GctChannelMask >();
117 for (
int i=0;
i<18;
i++) {
118 if ((emMask & (1<<
i)) != 0) masks->maskEmCrate(
i);
122 for (
unsigned irct=0; irct<18; irct++) {
123 std::stringstream rgnCol;
124 rgnCol <<
"RCT_CRATE_" <<
std::dec << irct <<
"_RGN_MASK";
128 for (
unsigned irgn=0; irgn<22; ++irgn) {
129 if ((mask & (1<<irgn)) != 0) {
130 edm::LogError(
"L1-O2O" ) <<
"Masked region, but no O2O code!";
137 int tetMask, metMask, htMask, mhtMask ;
138 esumMaskResults.
fillVariable(
"GCT_TET_MASK", tetMask ) ;
139 esumMaskResults.
fillVariable(
"GCT_MET_MASK", metMask ) ;
141 esumMaskResults.
fillVariable(
"GCT_MHT_MASK", mhtMask ) ;
143 for (
int ieta=0; ieta<22; ieta++) {
144 if ((tetMask & (1<<ieta)) != 0) masks->maskTotalEt(ieta);
145 if ((metMask & (1<<ieta)) != 0) masks->maskMissingEt(ieta);
146 if ((htMask & (1<<ieta)) != 0) masks->maskTotalHt(ieta);
147 if ((mhtMask & (1<<ieta)) != 0) masks->maskMissingHt(ieta);
bool fillVariable(const std::string &columnName, T &outputVariable) const
const QueryResults singleAttribute(const T &data) const
L1GctChannelMaskOnlineProd(const edm::ParameterSet &iConfig)
const QueryResults basicQuery(const std::vector< std::string > &columnNames, const std::string &schemaName, const std::string &tableName, const std::string &conditionLHS="", const QueryResults conditionRHS=QueryResults(), const std::string &conditionRHSName="")
l1t::OMDSReader m_omdsReader
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
std::shared_ptr< L1GctChannelMask > newObject(const std::string &objectKey) override
~L1GctChannelMaskOnlineProd() override