CMS 3D CMS Logo

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

#include <L1GtTriggerMaskVetoTechTrigConfigOnlineProd.h>

Inheritance diagram for L1GtTriggerMaskVetoTechTrigConfigOnlineProd:
L1ConfigOnlineProdBase< L1GtTriggerMaskVetoTechTrigRcd, L1GtTriggerMask > edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 L1GtTriggerMaskVetoTechTrigConfigOnlineProd (const edm::ParameterSet &)
 constructor More...
 
std::unique_ptr< L1GtTriggerMasknewObject (const std::string &objectKey) override
 public methods More...
 
 ~L1GtTriggerMaskVetoTechTrigConfigOnlineProd () override
 destructor More...
 
- Public Member Functions inherited from L1ConfigOnlineProdBase< L1GtTriggerMaskVetoTechTrigRcd, L1GtTriggerMask >
 L1ConfigOnlineProdBase (const edm::ParameterSet &)
 
virtual std::unique_ptr< L1GtTriggerMaskproduce (const L1GtTriggerMaskVetoTechTrigRcd &iRecord)
 
 ~L1ConfigOnlineProdBase () override
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
template<typename Record >
void updateFromMayConsumes (unsigned int iIndex, const Record &iRecord)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &) final
 
 ~ESProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
 ESProxyFactoryProducer (const ESProxyFactoryProducer &)=delete
 
const ESProxyFactoryProduceroperator= (const ESProxyFactoryProducer &)=delete
 
 ~ESProxyFactoryProducer () noexcept(false) override
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
void createKeyedProxies (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
 DataProxyProvider ()
 
 DataProxyProvider (const DataProxyProvider &)=delete
 
const ComponentDescriptiondescription () const
 
void fillRecordsNotAllowingConcurrentIOVs (std::set< EventSetupRecordKey > &recordsNotAllowingConcurrentIOVs) const
 
virtual void initConcurrentIOVs (EventSetupRecordKey const &key, unsigned int nConcurrentIOVs)
 
bool isUsingRecord (const EventSetupRecordKey &key) const
 
KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey, unsigned int iovIndex=0)
 
const DataProxyProvideroperator= (const DataProxyProvider &)=delete
 
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

- Static Public Member Functions inherited from edm::eventsetup::DataProxyProvider
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Types inherited from edm::ESProxyFactoryProducer
using EventSetupRecordKey = eventsetup::EventSetupRecordKey
 
- Protected Types inherited from edm::eventsetup::DataProxyProvider
using KeyedProxiesVector = std::vector< std::pair< DataKey, std::shared_ptr< DataProxy > >>
 
- Protected Member Functions inherited from L1ConfigOnlineProdBase< L1GtTriggerMaskVetoTechTrigRcd, L1GtTriggerMask >
bool getObjectKey (const L1GtTriggerMaskVetoTechTrigRcd &record, std::string &objectKey)
 
- Protected Member Functions inherited from edm::ESProducer
template<typename T >
auto setWhatProduced (T *iThis, const char *iLabel)
 
template<typename T >
auto setWhatProduced (T *iThis, const es::Label &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 EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string())
 
KeyedProxiesVector registerProxies (const EventSetupRecordKey &, unsigned int iovIndex) override
 
- Protected Member Functions inherited from edm::eventsetup::DataProxyProvider
template<class T >
void usingRecord ()
 
void usingRecordWithKey (const EventSetupRecordKey &key)
 
- Protected Attributes inherited from L1ConfigOnlineProdBase< L1GtTriggerMaskVetoTechTrigRcd, L1GtTriggerMask >
bool m_copyFromCondDB
 
cond::persistency::Session m_dbSession
 
bool m_forceGeneration
 
l1t::OMDSReader m_omdsReader
 

Detailed Description

Description: online producer for L1GtTriggerMaskVetoTechTrigRcd.

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 32 of file L1GtTriggerMaskVetoTechTrigConfigOnlineProd.h.

Constructor & Destructor Documentation

◆ L1GtTriggerMaskVetoTechTrigConfigOnlineProd()

L1GtTriggerMaskVetoTechTrigConfigOnlineProd::L1GtTriggerMaskVetoTechTrigConfigOnlineProd ( const edm::ParameterSet parSet)

constructor

Definition at line 25 of file L1GtTriggerMaskVetoTechTrigConfigOnlineProd.cc.

27  m_partitionNumber(parSet.getParameter<int>("PartitionNumber")) {
28  // empty
29 }

◆ ~L1GtTriggerMaskVetoTechTrigConfigOnlineProd()

L1GtTriggerMaskVetoTechTrigConfigOnlineProd::~L1GtTriggerMaskVetoTechTrigConfigOnlineProd ( )
override

destructor

Definition at line 32 of file L1GtTriggerMaskVetoTechTrigConfigOnlineProd.cc.

32  {
33  // empty
34 }

Member Function Documentation

◆ newObject()

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

public methods

Implements L1ConfigOnlineProdBase< L1GtTriggerMaskVetoTechTrigRcd, L1GtTriggerMask >.

Definition at line 38 of file L1GtTriggerMaskVetoTechTrigConfigOnlineProd.cc.

38  {
39  auto pL1GtTriggerMask = std::make_unique<L1GtTriggerMask>();
40 
41  // l1GtTriggerMaskVetoTechTrig: VETO_TT_FK key in GT_PARTITION_VETO_TT
42 
43  const std::string gtSchema = "CMS_GT";
44 
45  // SQL query:
46  //
47  // select * from CMS_GT.GT_PARTITION_VETO_TT WHERE GT_PARTITION_VETO_TT.ID = objectKey
48 
49  const std::vector<std::string>& columns = m_omdsReader.columnNames(gtSchema, "GT_PARTITION_VETO_TT");
50 
51  if (edm::isDebugEnabled()) {
52  for (std::vector<std::string>::const_iterator iter = columns.begin(); iter != columns.end(); iter++) {
53  LogTrace("L1GtTriggerMaskVetoTechTrigConfigOnlineProd") << (*iter) << std::endl;
54  }
55  }
56 
58  columns, gtSchema, "GT_PARTITION_VETO_TT", "GT_PARTITION_VETO_TT.ID", m_omdsReader.singleAttribute(objectKey));
59 
60  // check if query was successful
61  if (results.queryFailed()) {
62  edm::LogError("L1-O2O") << "Problem with L1GtTriggerMaskVetoTechTrigRcd key:" << objectKey;
63  return pL1GtTriggerMask;
64  }
65 
66  // mask for other partitions than m_partitionNumber set to 1 (algorithm masked)
67  int maskSize = columns.size() - 1; // table ID is also in columns
68  std::vector<bool> trigMaskBool(maskSize, false);
69  std::vector<unsigned int> trigMask(maskSize, 0);
70 
71  for (int i = 0; i < maskSize; i++) {
72  bool tMask = trigMaskBool[i];
73  results.fillVariable(columns[i + 1], tMask);
74  trigMask[i] = 0xFF & (~(static_cast<unsigned int>(tMask) << m_partitionNumber));
75  }
76 
77  // fill the record
78  pL1GtTriggerMask->setGtTriggerMask(trigMask);
79 
80  if (edm::isDebugEnabled()) {
81  std::ostringstream myCoutStream;
82  pL1GtTriggerMask->print(myCoutStream);
83  LogTrace("L1GtTriggerMaskVetoTechTrigConfigOnlineProd")
84  << "\nThe following L1GtTriggerMaskVetoTechTrigRcd record was read from OMDS: \n"
85  << myCoutStream.str() << "\n"
86  << std::endl;
87  }
88 
89  return pL1GtTriggerMask;
90 }

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

Member Data Documentation

◆ m_partitionNumber

int L1GtTriggerMaskVetoTechTrigConfigOnlineProd::m_partitionNumber
private

partition number

Definition at line 46 of file L1GtTriggerMaskVetoTechTrigConfigOnlineProd.h.

Referenced by newObject().

l1t::OMDSReader::QueryResults
Definition: OMDSReader.h:49
L1GtTriggerMaskVetoTechTrigConfigOnlineProd::m_partitionNumber
int m_partitionNumber
partition number
Definition: L1GtTriggerMaskVetoTechTrigConfigOnlineProd.h:46
mps_fire.i
i
Definition: mps_fire.py:355
L1ConfigOnlineProdBase< L1GtTriggerMaskVetoTechTrigRcd, L1GtTriggerMask >::m_omdsReader
l1t::OMDSReader m_omdsReader
Definition: L1ConfigOnlineProdBase.h:65
bookConverter.results
results
Definition: bookConverter.py:144
l1t::OMDSReader::singleAttribute
const QueryResults singleAttribute(const T &data) const
Definition: OMDSReader.h:259
L1ConfigOnlineProdBase< L1GtTriggerMaskVetoTechTrigRcd, L1GtTriggerMask >
l1t::OMDSReader::columnNames
std::vector< std::string > columnNames(const std::string &schemaName, const std::string &tableName)
Definition: OMDSReader.cc:138
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::LogError
Definition: MessageLogger.h:183
l1t::OMDSReader::basicQuery
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
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
mps_check.columns
columns
Definition: mps_check.py:244
edm::isDebugEnabled
bool isDebugEnabled()
Definition: MessageLogger.cc:71
LogTrace
#define LogTrace(id)
Definition: MessageLogger.h:671