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::ESProductResolverFactoryProducer edm::eventsetup::ESProductResolverProvider

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 ()
 
 ESProducer (const ESProducer &)=delete
 
 ESProducer (ESProducer &&)=delete
 
ESResolverIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProduceroperator= (const ESProducer &)=delete
 
ESProduceroperator= (ESProducer &&)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESResolverIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
void updateLookup (eventsetup::ESRecordsToProductResolverIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProductResolverFactoryProducer
 ESProductResolverFactoryProducer ()
 
 ESProductResolverFactoryProducer (const ESProductResolverFactoryProducer &)=delete
 
const ESProductResolverFactoryProduceroperator= (const ESProductResolverFactoryProducer &)=delete
 
 ~ESProductResolverFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
void createKeyedResolvers (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
const ComponentDescriptiondescription () const
 
 ESProductResolverProvider ()
 
 ESProductResolverProvider (const ESProductResolverProvider &)=delete
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedResolverskeyedResolvers (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const ESProductResolverProvideroperator= (const ESProductResolverProvider &)=delete
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~ESProductResolverProvider () noexcept(false)
 

Private Attributes

int m_partitionNumber
 partition number More...
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::ESProductResolverFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::ESProductResolverProvider
using KeyedResolversVector = std::vector< std::pair< DataKey, std::shared_ptr< ESProductResolver > >>
 
- Protected Member Functions inherited from L1ConfigOnlineProdBase< L1GtTriggerMaskAlgoTrigRcd, L1GtTriggerMask >
bool getObjectKey (const L1GtTriggerMaskAlgoTrigRcd &record, std::string &objectKey)
 
- Protected Member Functions inherited from edm::ESProducer
ESConsumesInfoconsumesInfoPushBackNew ()
 
unsigned int consumesInfoSize () const
 
template<typename CallbackT , typename TList , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>> iCallback, const TList *, const TRecord *iRecord, const es::Label &iLabel)
 
template<typename CallbackT , typename TRecord >
void registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>>, const eventsetup::produce::Null *, const TRecord *, const es::Label &)
 
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 TDecorator >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TDecorator &iDec, const es::Label &iLabel={})
 
template<typename TFunc >
auto setWhatProduced (TFunc &&func, const es::Label &iLabel={})
 
template<typename TReturn , typename TRecord , typename TFunc , typename TDecorator >
ESConsumesCollectorT< TRecord > setWhatProduced (TFunc &&func, TDecorator &&iDec, const es::Label &iLabel={})
 
void usesResources (std::vector< std::string > const &)
 
- Protected Member Functions inherited from edm::ESProductResolverFactoryProducer
template<class TFactory >
void registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string())
 
virtual void registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ESProductResolverFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedResolversVector registerResolvers (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::ESProductResolverProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 
- Protected Attributes inherited from L1ConfigOnlineProdBase< L1GtTriggerMaskAlgoTrigRcd, L1GtTriggerMask >
std::optional< edm::ESConsumesCollectorT< L1GtTriggerMaskAlgoTrigRcd > > m_consumesCollector
 
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::L1GtTriggerMaskAlgoTrigConfigOnlineProd ( const edm::ParameterSet parSet)

◆ ~L1GtTriggerMaskAlgoTrigConfigOnlineProd()

L1GtTriggerMaskAlgoTrigConfigOnlineProd::~L1GtTriggerMaskAlgoTrigConfigOnlineProd ( )
override

destructor

Definition at line 32 of file L1GtTriggerMaskAlgoTrigConfigOnlineProd.cc.

32  {
33  // empty
34 }

Member Function Documentation

◆ newObject()

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

public methods

Implements L1ConfigOnlineProdBase< L1GtTriggerMaskAlgoTrigRcd, L1GtTriggerMask >.

Definition at line 38 of file L1GtTriggerMaskAlgoTrigConfigOnlineProd.cc.

References l1t::OMDSReader::basicQuery(), l1t::OMDSReader::columnNames(), mps_check::columns, mps_fire::i, edm::isDebugEnabled(), LogTrace, L1ConfigOnlineProdBase< L1GtTriggerMaskAlgoTrigRcd, L1GtTriggerMask >::m_omdsReader, m_partitionNumber, L1TriggerKeyDummy_cfi::objectKey, mysort::results, l1t::OMDSReader::singleAttribute(), and AlCaHLTBitMon_QueryRunRegistry::string.

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

Member Data Documentation

◆ m_partitionNumber

int L1GtTriggerMaskAlgoTrigConfigOnlineProd::m_partitionNumber
private

partition number

Definition at line 46 of file L1GtTriggerMaskAlgoTrigConfigOnlineProd.h.

Referenced by newObject().