CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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...
 
virtual boost::shared_ptr
< L1GtTriggerMask
newObject (const std::string &objectKey)
 public methods More...
 
 ~L1GtTriggerMaskVetoTechTrigConfigOnlineProd ()
 destructor More...
 
- Public Member Functions inherited from L1ConfigOnlineProdBase< L1GtTriggerMaskVetoTechTrigRcd, L1GtTriggerMask >
 L1ConfigOnlineProdBase (const edm::ParameterSet &)
 
boost::shared_ptr
< L1GtTriggerMask
produce (const L1GtTriggerMaskVetoTechTrigRcd &iRecord)
 
 ~L1ConfigOnlineProdBase ()
 
- 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 ()
 

Private Attributes

int m_partitionNumber
 partition number More...
 

Additional Inherited Members

- Public Types inherited from edm::eventsetup::DataProxyProvider
typedef std::vector< std::pair
< DataKey, boost::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 L1ConfigOnlineProdBase< L1GtTriggerMaskVetoTechTrigRcd, L1GtTriggerMask >
bool getObjectKey (const L1GtTriggerMaskVetoTechTrigRcd &record, boost::shared_ptr< L1GtTriggerMask > data, std::string &objectKey)
 
- 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 L1ConfigOnlineProdBase< L1GtTriggerMaskVetoTechTrigRcd, L1GtTriggerMask >
bool m_copyFromCondDB
 
cond::DbConnection m_dbConnection
 
cond::DbSession 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

$Date$ $Revision$

Definition at line 34 of file L1GtTriggerMaskVetoTechTrigConfigOnlineProd.h.

Constructor & Destructor Documentation

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

destructor

Definition at line 37 of file L1GtTriggerMaskVetoTechTrigConfigOnlineProd.cc.

37  {
38 
39  // empty
40 
41 }

Member Function Documentation

boost::shared_ptr< L1GtTriggerMask > L1GtTriggerMaskVetoTechTrigConfigOnlineProd::newObject ( const std::string &  objectKey)
virtual

public methods

Implements L1ConfigOnlineProdBase< L1GtTriggerMaskVetoTechTrigRcd, L1GtTriggerMask >.

Definition at line 45 of file L1GtTriggerMaskVetoTechTrigConfigOnlineProd.cc.

References l1t::OMDSReader::basicQuery(), l1t::OMDSReader::columnNames(), l1t::OMDSReader::QueryResults::fillVariable(), i, edm::isDebugEnabled(), LogTrace, L1ConfigOnlineProdBase< L1GtTriggerMaskVetoTechTrigRcd, L1GtTriggerMask >::m_omdsReader, m_partitionNumber, l1t::OMDSReader::QueryResults::queryFailed(), python.entryComment::results, and l1t::OMDSReader::singleAttribute().

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

Member Data Documentation

int L1GtTriggerMaskVetoTechTrigConfigOnlineProd::m_partitionNumber
private

partition number

Definition at line 52 of file L1GtTriggerMaskVetoTechTrigConfigOnlineProd.h.

Referenced by newObject().