test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
RCTObjectKeysOnlineProd Class Reference
Inheritance diagram for RCTObjectKeysOnlineProd:
L1ObjectKeysOnlineProdBase edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

virtual void fillObjectKeys (ReturnType pL1TriggerKey) override
 
 RCTObjectKeysOnlineProd (const edm::ParameterSet &)
 
 ~RCTObjectKeysOnlineProd ()
 
- Public Member Functions inherited from L1ObjectKeysOnlineProdBase
 L1ObjectKeysOnlineProdBase (const edm::ParameterSet &)
 
ReturnType produce (const L1TriggerKeyRcd &)
 
 ~L1ObjectKeysOnlineProdBase ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider ()
 

Additional Inherited Members

- Public Types inherited from L1ObjectKeysOnlineProdBase
typedef boost::shared_ptr
< L1TriggerKey
ReturnType
 
- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey,
edm::propagate_const
< std::shared_ptr< DataProxy > > > > 
KeyedProxies
 
typedef std::vector
< EventSetupRecordKey
Keys
 
typedef std::map
< EventSetupRecordKey,
KeyedProxies
RecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
void setWhatProduced (T *iThis, const es::Label &iLabel=es::Label())
 
template<typename T >
void setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
void setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
void setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label())
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
void setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label())
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string())
 
virtual void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList)
 override DataProxyProvider method More...
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
void eraseAll (const EventSetupRecordKey &iRecordKey)
 deletes all the Proxies in aStream More...
 
void invalidateProxies (const EventSetupRecordKey &iRecordKey)
 
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &)
 
- Protected Attributes inherited from L1ObjectKeysOnlineProdBase
l1t::OMDSReader m_omdsReader
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 32 of file RCTObjectKeysOnlineProd.cc.

Constructor & Destructor Documentation

RCTObjectKeysOnlineProd::RCTObjectKeysOnlineProd ( const edm::ParameterSet iConfig)

Definition at line 53 of file RCTObjectKeysOnlineProd.cc.

54  : L1ObjectKeysOnlineProdBase( iConfig )
55 {}
L1ObjectKeysOnlineProdBase(const edm::ParameterSet &)
RCTObjectKeysOnlineProd::~RCTObjectKeysOnlineProd ( )

Definition at line 58 of file RCTObjectKeysOnlineProd.cc.

59 {
60 
61  // do anything here that needs to be done at desctruction time
62  // (e.g. close files, deallocate resources etc.)
63 
64 }

Member Function Documentation

void RCTObjectKeysOnlineProd::fillObjectKeys ( ReturnType  pL1TriggerKey)
overridevirtual

Implements L1ObjectKeysOnlineProdBase.

Definition at line 73 of file RCTObjectKeysOnlineProd.cc.

References l1t::OMDSReader::basicQuery(), gather_cfg::cout, l1t::OMDSReader::QueryResults::fillVariable(), L1TriggerKey::kRCT, L1ObjectKeysOnlineProdBase::m_omdsReader, l1t::OMDSReader::QueryResults::numberRows(), l1t::OMDSReader::QueryResults::queryFailed(), reco::return(), l1t::OMDSReader::singleAttribute(), contentValuesCheck::ss, and AlCaHLTBitMon_QueryRunRegistry::string.

74 {
75  std::string rctKey = pL1TriggerKey->subsystemKey( L1TriggerKey::kRCT ) ;
76 
77  if( !rctKey.empty() )
78  {
79  std::string paremKey, scaleKey, ecalScaleKey , hcalScaleKey;
80  // SELECT RCT_PARAMETER FROM RCT_CONF WHERE RCT_CONF.RCT_KEY = rctKey
81  l1t::OMDSReader::QueryResults paremKeyResults =
82  m_omdsReader.basicQuery( "RCT_PARAMETER",
83  "CMS_RCT",
84  "RCT_CONF",
85  "RCT_CONF.RCT_KEY",
86  m_omdsReader.singleAttribute( rctKey ) );
87 
88 
89  if( paremKeyResults.queryFailed() ||
90  paremKeyResults.numberRows() != 1 ) // check query successful
91  {
92  edm::LogError( "L1-O2O" ) << "Problem with RCT Parameter key." ;
93  return ;
94  }
95 
96 
97  l1t::OMDSReader::QueryResults scaleKeyResults =
98  m_omdsReader.basicQuery( "L1T_SCALE_CALO_ET_THRESHOLD_ID",
99  "CMS_RCT",
100  "PAREM_CONF",
101  "PAREM_CONF.PAREM_KEY",
102  paremKeyResults ); // not null no need to check
103 
104  l1t::OMDSReader::QueryResults ecalKeyResults =
105  m_omdsReader.basicQuery("ECAL_CONF",
106  "CMS_RCT",
107  "RCT_CONF",
108  "RCT_CONF.RCT_KEY",
109  m_omdsReader.singleAttribute(rctKey));
110 
111  if( ecalKeyResults.queryFailed() ||
112  ecalKeyResults.numberRows() > 1 ) // check query successful)
113  {
114  edm::LogError( "L1-O2O" ) << "Problem with rct_conf.ecal_conf." ;
115  return ;
116  }
117  std::string ecalKey;
118  if(!ecalKeyResults.fillVariable(ecalKey))
119  ecalScaleKey = "NULL";
120  else { // fill variable not null
121 
122  if( ecalKey == "NULL")
123  ecalScaleKey = "NULL";
124  else if(ecalKey == "IDENTITY")
125  ecalScaleKey = "IDENTITY";
126  else { // not identity or null
127 
128 
129  l1t::OMDSReader::QueryResults ecalScaleKeyResults =
130  m_omdsReader.basicQuery( "ECAL_LUT_CONFIG_ID",
131  "CMS_RCT",
132  "ECAL_SCALE_KEY",
133  "ECAL_SCALE_KEY.ECAL_TAG",
134  ecalKeyResults);
135 
136  if( ecalScaleKeyResults.queryFailed() ||
137  ecalScaleKeyResults.numberRows() > 1 ) // check query successful)
138  {
139  std::cout << " nrows " << ecalScaleKeyResults.numberRows() <<std::endl;
140  edm::LogError( "L1-O2O" ) << "bad results from lut_config_id." ;
141  return ;
142  }
143  int ecalScaleTemp = -1;
144 
145  ecalScaleKeyResults.fillVariable( ecalScaleTemp );
146 
147 
148 
149 
150  std::stringstream ss;
151  ss << ecalScaleTemp;
152  ecalScaleKey = ss.str();
153  }
154  }
155 
156  l1t::OMDSReader::QueryResults hcalKeyResults =
157  m_omdsReader.basicQuery("HCAL_CONF",
158  "CMS_RCT",
159  "RCT_CONF",
160  "RCT_CONF.RCT_KEY",
161  m_omdsReader.singleAttribute(rctKey));
162 
163  if( hcalKeyResults.queryFailed() ||
164  hcalKeyResults.numberRows() > 1 ) // check query successful)
165  {
166  edm::LogError( "L1-O2O" ) << "Problem with rct_conf.hcal_conf." ;
167  return ;
168  }
169  std::string hcalKey;
170  if(!hcalKeyResults.fillVariable(hcalScaleKey))
171  hcalScaleKey = "NULL";
172 
173 
174 
175  paremKeyResults.fillVariable( paremKey ) ;
176  scaleKeyResults.fillVariable( scaleKey ) ;
177 
178 
179  pL1TriggerKey->add( "L1RCTParametersRcd",
180  "L1RCTParameters",
181  paremKey ) ;
182  pL1TriggerKey->add( "L1EmEtScaleRcd",
183  "L1CaloEtScale",
184  scaleKey ) ;
185  pL1TriggerKey->add( "L1CaloEcalScaleRcd",
186  "L1CaloEcalScale",
187  ecalScaleKey ) ;
188  pL1TriggerKey->add( "L1CaloHcalScaleRcd",
189  "L1CaloHcalScale",
190  hcalScaleKey ) ;
191  }
192 }
bool fillVariable(const std::string &columnName, T &outputVariable) const
Definition: OMDSReader.h:312
const QueryResults singleAttribute(const T &data) const
Definition: OMDSReader.h:296
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="")
Definition: OMDSReader.cc:86
return(e1-e2)*(e1-e2)+dp *dp
tuple cout
Definition: gather_cfg.py:145