CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
L1GtTriggerMaskAlgoTrigConfigOnlineProd Class Reference

#include <L1GtTriggerMaskAlgoTrigConfigOnlineProd.h>

Inheritance diagram for L1GtTriggerMaskAlgoTrigConfigOnlineProd:
L1ConfigOnlineProdBase< L1GtTriggerMaskAlgoTrigRcd, L1GtTriggerMask > edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 L1GtTriggerMaskAlgoTrigConfigOnlineProd (const edm::ParameterSet &)
 constructor More...
 
std::unique_ptr< L1GtTriggerMasknewObject (const std::string &objectKey) override
 public methods More...
 
 ~L1GtTriggerMaskAlgoTrigConfigOnlineProd () override
 destructor More...
 
- Public Member Functions inherited from L1ConfigOnlineProdBase< L1GtTriggerMaskAlgoTrigRcd, L1GtTriggerMask >
 L1ConfigOnlineProdBase (const edm::ParameterSet &)
 
virtual std::unique_ptr< L1GtTriggerMaskproduce (const L1GtTriggerMaskAlgoTrigRcd &iRecord)
 
 ~L1ConfigOnlineProdBase () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer ()(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval) override
 overrides DataProxyProvider method More...
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- 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 () noexcept(false)
 

Private Attributes

int m_partitionNumber
 partition number More...
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > KeyedProxies
 
typedef std::vector< EventSetupRecordKeyKeys
 
typedef std::map< EventSetupRecordKey, KeyedProxiesRecordProxies
 
- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from L1ConfigOnlineProdBase< L1GtTriggerMaskAlgoTrigRcd, L1GtTriggerMask >
bool getObjectKey (const L1GtTriggerMaskAlgoTrigRcd &record, std::string &objectKey)
 
- Protected Member Functions inherited from edm::ESProducer
 ESProducer (const ESProducer &)=delete
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &iLabel={})
 
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const std::string &iLabel)
 
template<typename T , typename TDecorator >
auto setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord >
auto setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={})
 
template<typename T , typename TReturn , typename TRecord , typename TArg >
ESConsumesCollectorT< TRecord > setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={})
 
- Protected Member Functions inherited from edm::ESProxyFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
void registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override
 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 L1ConfigOnlineProdBase< L1GtTriggerMaskAlgoTrigRcd, L1GtTriggerMask >
bool m_copyFromCondDB
 
cond::persistency::Session m_dbSession
 
bool m_forceGeneration
 
l1t::OMDSReader m_omdsReader
 

Detailed Description

Description: online producer for L1GtTriggerMaskAlgoTrigRcd.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 32 of file L1GtTriggerMaskAlgoTrigConfigOnlineProd.h.

Constructor & Destructor Documentation

L1GtTriggerMaskAlgoTrigConfigOnlineProd::L1GtTriggerMaskAlgoTrigConfigOnlineProd ( const edm::ParameterSet parSet)

constructor

Definition at line 27 of file L1GtTriggerMaskAlgoTrigConfigOnlineProd.cc.

L1GtTriggerMaskAlgoTrigConfigOnlineProd::~L1GtTriggerMaskAlgoTrigConfigOnlineProd ( )
override

destructor

Definition at line 37 of file L1GtTriggerMaskAlgoTrigConfigOnlineProd.cc.

37  {
38 
39  // empty
40 
41 }

Member Function Documentation

std::unique_ptr< L1GtTriggerMask > L1GtTriggerMaskAlgoTrigConfigOnlineProd::newObject ( const std::string &  objectKey)
overridevirtual

public methods

Implements L1ConfigOnlineProdBase< L1GtTriggerMaskAlgoTrigRcd, L1GtTriggerMask >.

Definition at line 45 of file L1GtTriggerMaskAlgoTrigConfigOnlineProd.cc.

References l1t::OMDSReader::basicQuery(), l1t::OMDSReader::columnNames(), mps_check::columns, DEFINE_FWK_EVENTSETUP_MODULE, l1t::OMDSReader::QueryResults::fillVariable(), mps_fire::i, edm::isDebugEnabled(), LogTrace, L1ConfigOnlineProdBase< L1GtTriggerMaskAlgoTrigRcd, L1GtTriggerMask >::m_omdsReader, m_partitionNumber, l1t::OMDSReader::QueryResults::queryFailed(), mps_update::results, l1t::OMDSReader::singleAttribute(), and AlCaHLTBitMon_QueryRunRegistry::string.

46  {
47 
48  auto pL1GtTriggerMask = std::make_unique<L1GtTriggerMask>();
49 
50  // l1GtTriggerMaskAlgoTrig: FINOR_ALGO_FK key in GT_PARTITION_FINOR_ALGO
51 
52  const std::string gtSchema = "CMS_GT";
53 
54  // SQL query:
55  // select * from CMS_GT.GT_PARTITION_FINOR_ALGO WHERE GT_PARTITION_FINOR_ALGO.ID = objectKey
56 
57  const std::vector<std::string>& columns = m_omdsReader.columnNames(
58  gtSchema, "GT_PARTITION_FINOR_ALGO");
59 
60  if (edm::isDebugEnabled()) {
61  for (std::vector<std::string>::const_iterator iter = columns.begin(); iter != columns.end(); iter++) {
62  LogTrace("L1GtTriggerMaskAlgoTrigConfigOnlineProd") << ( *iter ) << std::endl;
63 
64  }
65  }
66 
68  columns, gtSchema, "GT_PARTITION_FINOR_ALGO", "GT_PARTITION_FINOR_ALGO.ID",
69  m_omdsReader.singleAttribute(objectKey));
70 
71  // check if query was successful
72  if (results.queryFailed()) {
73  edm::LogError("L1-O2O") << "Problem with L1GtTriggerMaskAlgoTrigRcd key:" << objectKey;
74  return pL1GtTriggerMask;
75  }
76 
77  // mask for other partitions than m_partitionNumber set to 1 (algorithm masked)
78  int maskSize = columns.size() - 1; // table ID is also in columns
79  std::vector<bool> trigMaskBool(maskSize, false);
80  std::vector<unsigned int> trigMask(maskSize, 0);
81 
82  for (int i = 0; i < maskSize; i++) {
83  bool tMask = trigMaskBool[i];
84  results.fillVariable(columns[i + 1], tMask);
85  trigMask[i] = 0xFF & (~( static_cast<unsigned int> (tMask) << m_partitionNumber ));
86  }
87 
88  // fill the record
89  pL1GtTriggerMask->setGtTriggerMask(trigMask);
90 
91  if (edm::isDebugEnabled()) {
92  std::ostringstream myCoutStream;
93  pL1GtTriggerMask->print(myCoutStream);
94  LogTrace("L1GtTriggerMaskAlgoTrigConfigOnlineProd")
95  << "\nThe following L1GtTriggerMaskAlgoTrigRcd record was read from OMDS: \n"
96  << myCoutStream.str() << "\n" << std::endl;
97  }
98 
99  return pL1GtTriggerMask;
100 }
bool isDebugEnabled()
bool fillVariable(const std::string &columnName, T &outputVariable) const
Definition: OMDSReader.h:311
const QueryResults singleAttribute(const T &data) const
Definition: OMDSReader.h:295
std::vector< std::string > columnNames(const std::string &schemaName, const std::string &tableName)
Definition: OMDSReader.cc:165
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
#define LogTrace(id)

Member Data Documentation

int L1GtTriggerMaskAlgoTrigConfigOnlineProd::m_partitionNumber
private

partition number

Definition at line 50 of file L1GtTriggerMaskAlgoTrigConfigOnlineProd.h.

Referenced by newObject().