CMS 3D CMS Logo

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

#include <L1GtTriggerMenuXmlProducer.h>

Inheritance diagram for L1GtTriggerMenuXmlProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

 L1GtTriggerMenuXmlProducer (const edm::ParameterSet &)
 constructor More...
 
std::unique_ptr< L1GtTriggerMenuproduceGtTriggerMenu (const L1GtTriggerMenuRcd &)
 public methods More...
 
 ~L1GtTriggerMenuXmlProducer () override
 destructor More...
 
- 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

std::string m_defXmlFile
 XML file for Global Trigger menu (def.xml) More...
 
std::string m_vmeXmlFile
 XML file for Global Trigger VME configuration (vme.xml) 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 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 &)
 

Detailed Description

Description: ESProducer for the L1 Trigger Menu from an XML file .

Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

Definition at line 37 of file L1GtTriggerMenuXmlProducer.h.

Constructor & Destructor Documentation

L1GtTriggerMenuXmlProducer::L1GtTriggerMenuXmlProducer ( const edm::ParameterSet parSet)

constructor

Definition at line 45 of file L1GtTriggerMenuXmlProducer.cc.

References connectstrParser::f1, connectstrParser::f2, edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), m_defXmlFile, m_vmeXmlFile, produceGtTriggerMenu(), edm::ESProducer::setWhatProduced(), and AlCaHLTBitMon_QueryRunRegistry::string.

47 {
48  // tell the framework what data is being produced
50 
51 
52  // now do what ever other initialization is needed
53 
54 
55  // directory in /data/Luminosity for the trigger menu
56  std::string menuDir = parSet.getParameter<std::string>("TriggerMenuLuminosity");
57 
58 
59  // def.xml file
60  std::string defXmlFileName = parSet.getParameter<std::string>("DefXmlFile");
61 
62  edm::FileInPath f1("L1TriggerConfig/L1GtConfigProducers/data/Luminosity/" +
63  menuDir + "/" + defXmlFileName);
64 
65  m_defXmlFile = f1.fullPath();
66 
67 
68  // vme.xml file
69  std::string vmeXmlFileName = parSet.getParameter<std::string>("VmeXmlFile");
70 
71  if (!vmeXmlFileName.empty()) {
72  edm::FileInPath f2("L1TriggerConfig/L1GtConfigProducers/data/Luminosity/" +
73  menuDir + "/" + vmeXmlFileName);
74 
75  m_vmeXmlFile = f2.fullPath();
76 
77  }
78 
79  edm::LogInfo("L1GtConfigProducers")
80  << "\n\nL1 Trigger Menu: "
81  << "\n\n def.xml file: \n " << m_defXmlFile
82  << "\n\n vme.xml file: \n " << m_vmeXmlFile
83  << "\n\n"
84  << std::endl;
85 
86 }
T getParameter(std::string const &) const
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:124
std::string m_vmeXmlFile
XML file for Global Trigger VME configuration (vme.xml)
std::unique_ptr< L1GtTriggerMenu > produceGtTriggerMenu(const L1GtTriggerMenuRcd &)
public methods
std::string m_defXmlFile
XML file for Global Trigger menu (def.xml)
L1GtTriggerMenuXmlProducer::~L1GtTriggerMenuXmlProducer ( )
override

destructor

Definition at line 89 of file L1GtTriggerMenuXmlProducer.cc.

90 {
91 
92  // empty
93 
94 }

Member Function Documentation

std::unique_ptr< L1GtTriggerMenu > L1GtTriggerMenuXmlProducer::produceGtTriggerMenu ( const L1GtTriggerMenuRcd l1MenuRecord)

public methods

L1 GT parameters

Definition at line 100 of file L1GtTriggerMenuXmlProducer.cc.

References L1GtTriggerMenuXmlParser::corCaloTemplate(), L1GtTriggerMenuXmlParser::corEnergySumTemplate(), L1GtTriggerMenuXmlParser::corMuonTemplate(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::get(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), L1GtTriggerMenuXmlParser::gtAlgorithmAliasMap(), L1GtTriggerMenuXmlParser::gtAlgorithmMap(), L1GtTriggerMenuXmlParser::gtScaleDbKey(), L1GtTriggerMenuXmlParser::gtTechnicalTriggerMap(), L1GtTriggerMenuXmlParser::gtTriggerMenuImplementation(), L1GtTriggerMenuXmlParser::gtTriggerMenuInterface(), L1GtTriggerMenuXmlParser::gtTriggerMenuName(), m_defXmlFile, m_vmeXmlFile, L1GtTriggerMenuXmlParser::parseXmlFile(), L1GtTriggerMenuXmlParser::setGtNumberConditionChips(), L1GtTriggerMenuXmlParser::setGtNumberL1JetCounts(), L1GtTriggerMenuXmlParser::setGtNumberPhysTriggers(), L1GtTriggerMenuXmlParser::setGtNumberTechTriggers(), L1GtTriggerMenuXmlParser::setGtOrderConditionChip(), L1GtTriggerMenuXmlParser::setGtPinsOnConditionChip(), L1GtTriggerMenuXmlParser::vecBptxTemplate(), L1GtTriggerMenuXmlParser::vecCaloTemplate(), L1GtTriggerMenuXmlParser::vecCastorTemplate(), L1GtTriggerMenuXmlParser::vecCorrelationTemplate(), L1GtTriggerMenuXmlParser::vecEnergySumTemplate(), L1GtTriggerMenuXmlParser::vecExternalTemplate(), L1GtTriggerMenuXmlParser::vecHfBitCountsTemplate(), L1GtTriggerMenuXmlParser::vecHfRingEtSumsTemplate(), L1GtTriggerMenuXmlParser::vecJetCountsTemplate(), and L1GtTriggerMenuXmlParser::vecMuonTemplate().

Referenced by L1GtTriggerMenuXmlProducer().

102 {
103 
104  // get the parameters needed from other records
105  const L1GtStableParametersRcd& stableParametersRcd =
106  l1MenuRecord.getRecord<L1GtStableParametersRcd>();
107 
108  edm::ESHandle<L1GtStableParameters> stableParameters;
109  stableParametersRcd.get(stableParameters);
110 
111  unsigned int numberConditionChips = stableParameters->gtNumberConditionChips();
112  unsigned int pinsOnConditionChip = stableParameters->gtPinsOnConditionChip();
113  std::vector<int> orderConditionChip = stableParameters->gtOrderConditionChip();
114  unsigned int numberPhysTriggers = stableParameters->gtNumberPhysTriggers();
115  unsigned int numberTechTriggers = stableParameters->gtNumberTechnicalTriggers();
116  unsigned int numberL1JetCounts = stableParameters->gtNumberL1JetCounts();
117 
119 
120  gtXmlParser.setGtNumberConditionChips(numberConditionChips);
121  gtXmlParser.setGtPinsOnConditionChip(pinsOnConditionChip);
122  gtXmlParser.setGtOrderConditionChip(orderConditionChip);
123  gtXmlParser.setGtNumberPhysTriggers(numberPhysTriggers);
124  gtXmlParser.setGtNumberTechTriggers(numberTechTriggers);
125  gtXmlParser.setGtNumberL1JetCounts(numberL1JetCounts);
126 
127  gtXmlParser.parseXmlFile(m_defXmlFile, m_vmeXmlFile);
128 
129  // transfer the condition map and algorithm map from parser to L1GtTriggerMenu
130 
131  auto pL1GtTriggerMenu = std::make_unique<L1GtTriggerMenu>(
132  gtXmlParser.gtTriggerMenuName(), numberConditionChips,
133  gtXmlParser.vecMuonTemplate(),
134  gtXmlParser.vecCaloTemplate(),
135  gtXmlParser.vecEnergySumTemplate(),
136  gtXmlParser.vecJetCountsTemplate(),
137  gtXmlParser.vecCastorTemplate(),
138  gtXmlParser.vecHfBitCountsTemplate(),
139  gtXmlParser.vecHfRingEtSumsTemplate(),
140  gtXmlParser.vecBptxTemplate(),
141  gtXmlParser.vecExternalTemplate(),
142  gtXmlParser.vecCorrelationTemplate(),
143  gtXmlParser.corMuonTemplate(),
144  gtXmlParser.corCaloTemplate(),
145  gtXmlParser.corEnergySumTemplate());
146 
147 
148  pL1GtTriggerMenu->setGtTriggerMenuInterface(gtXmlParser.gtTriggerMenuInterface());
149  pL1GtTriggerMenu->setGtTriggerMenuImplementation(gtXmlParser.gtTriggerMenuImplementation());
150  pL1GtTriggerMenu->setGtScaleDbKey(gtXmlParser.gtScaleDbKey());
151 
152  pL1GtTriggerMenu->setGtAlgorithmMap(gtXmlParser.gtAlgorithmMap());
153  pL1GtTriggerMenu->setGtAlgorithmAliasMap(gtXmlParser.gtAlgorithmAliasMap());
154  pL1GtTriggerMenu->setGtTechnicalTriggerMap(gtXmlParser.gtTechnicalTriggerMap());
155 
156  //LogDebug("L1GtConfigProducers")
157  //<< "\n\nReturning L1 Trigger Menu!"
158  //<< "\n\n"
159  //<< std::endl;
160 
161  return pL1GtTriggerMenu ;
162 }
const std::string & gtTriggerMenuInterface() const
get / set the trigger menu names
const std::vector< std::vector< L1GtCaloTemplate > > & vecCaloTemplate() const
const std::string & gtScaleDbKey() const
menu associated scale key
const std::vector< std::vector< L1GtEnergySumTemplate > > & vecEnergySumTemplate() const
void setGtPinsOnConditionChip(const unsigned int &)
const AlgorithmMap & gtTechnicalTriggerMap() const
get / set the technical trigger map
const std::vector< std::vector< L1GtEnergySumTemplate > > & corEnergySumTemplate() const
const std::vector< std::vector< L1GtMuonTemplate > > & corMuonTemplate() const
void setGtNumberPhysTriggers(const unsigned int &)
const std::vector< std::vector< L1GtMuonTemplate > > & vecMuonTemplate() const
get / set the vectors containing the conditions
const std::string & gtTriggerMenuImplementation() const
const std::vector< std::vector< L1GtHfBitCountsTemplate > > & vecHfBitCountsTemplate() const
std::string m_vmeXmlFile
XML file for Global Trigger VME configuration (vme.xml)
const AlgorithmMap & gtAlgorithmAliasMap() const
get / set the algorithm map (by alias)
const std::vector< std::vector< L1GtHfRingEtSumsTemplate > > & vecHfRingEtSumsTemplate() const
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
const std::vector< std::vector< L1GtCastorTemplate > > & vecCastorTemplate() const
const std::vector< std::vector< L1GtJetCountsTemplate > > & vecJetCountsTemplate() const
const std::vector< std::vector< L1GtBptxTemplate > > & vecBptxTemplate() const
const AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
void parseXmlFile(const std::string &defXmlFile, const std::string &vmeXmlFile)
parse def.xml and vme.xml files
void setGtNumberConditionChips(const unsigned int &)
const std::vector< std::vector< L1GtCorrelationTemplate > > & vecCorrelationTemplate() const
const std::string & gtTriggerMenuName() const
void setGtNumberTechTriggers(const unsigned int &)
void setGtOrderConditionChip(const std::vector< int > &)
std::string m_defXmlFile
XML file for Global Trigger menu (def.xml)
const std::vector< std::vector< L1GtCaloTemplate > > & corCaloTemplate() const
const std::vector< std::vector< L1GtExternalTemplate > > & vecExternalTemplate() const
void setGtNumberL1JetCounts(const unsigned int &)

Member Data Documentation

std::string L1GtTriggerMenuXmlProducer::m_defXmlFile
private

XML file for Global Trigger menu (def.xml)

Definition at line 58 of file L1GtTriggerMenuXmlProducer.h.

Referenced by L1GtTriggerMenuXmlProducer(), and produceGtTriggerMenu().

std::string L1GtTriggerMenuXmlProducer::m_vmeXmlFile
private

XML file for Global Trigger VME configuration (vme.xml)

Definition at line 61 of file L1GtTriggerMenuXmlProducer.h.

Referenced by L1GtTriggerMenuXmlProducer(), and produceGtTriggerMenu().