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 ()
 
 ESProducer (const ESProducer &)=delete
 
ESProxyIndex const * getTokenIndices (unsigned int iIndex) const
 
ESRecordIndex const * getTokenRecordIndices (unsigned int iIndex) const
 
bool hasMayConsumes () const noexcept
 
size_t numberOfTokenIndices (unsigned int iIndex) const
 
ESProducer const & operator= (const ESProducer &)=delete
 
SerialTaskQueueChainqueue ()
 
template<typename Record >
std::optional< std::vector< ESProxyIndex > > updateFromMayConsumes (unsigned int iIndex, const Record &iRecord) const
 
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

std::string m_defXmlFile
 XML file for Global Trigger menu (def.xml) More...
 
edm::ESGetToken< L1GtStableParameters, L1GtStableParametersRcdm_getToken
 
std::string m_vmeXmlFile
 XML file for Global Trigger VME configuration (vme.xml) 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 edm::ESProducer
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 >
auto setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TArg &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::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)
 

Detailed Description

Description: ESProducer for the L1 Trigger Menu from an XML file .
Implementation: <TODO: enter implementation details>

Author
: Vasile Mihai Ghete - HEPHY Vienna

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 36 of file L1GtTriggerMenuXmlProducer.h.

Constructor & Destructor Documentation

◆ L1GtTriggerMenuXmlProducer()

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

constructor

Definition at line 42 of file L1GtTriggerMenuXmlProducer.cc.

References DeadROC_duringRun::f1, DeadROC_duringRun::f2, edm::ParameterSet::getParameter(), m_defXmlFile, m_getToken, m_vmeXmlFile, produceGtTriggerMenu(), edm::ESProducer::setWhatProduced(), and AlCaHLTBitMon_QueryRunRegistry::string.

42  {
43  // tell the framework what data is being produced
45 
46  // now do what ever other initialization is needed
47 
48  // directory in /data/Luminosity for the trigger menu
49  std::string menuDir = parSet.getParameter<std::string>("TriggerMenuLuminosity");
50 
51  // def.xml file
52  std::string defXmlFileName = parSet.getParameter<std::string>("DefXmlFile");
53 
54  edm::FileInPath f1("L1TriggerConfig/L1GtConfigProducers/data/Luminosity/" + menuDir + "/" + defXmlFileName);
55 
56  m_defXmlFile = f1.fullPath();
57 
58  // vme.xml file
59  std::string vmeXmlFileName = parSet.getParameter<std::string>("VmeXmlFile");
60 
61  if (!vmeXmlFileName.empty()) {
62  edm::FileInPath f2("L1TriggerConfig/L1GtConfigProducers/data/Luminosity/" + menuDir + "/" + vmeXmlFileName);
63 
64  m_vmeXmlFile = f2.fullPath();
65  }
66 
67  edm::LogInfo("L1GtConfigProducers") << "\n\nL1 Trigger Menu: "
68  << "\n\n def.xml file: \n " << m_defXmlFile << "\n\n vme.xml file: \n "
69  << m_vmeXmlFile << "\n\n"
70  << std::endl;
71 }
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
std::string m_vmeXmlFile
XML file for Global Trigger VME configuration (vme.xml)
edm::ESGetToken< L1GtStableParameters, L1GtStableParametersRcd > m_getToken
Log< level::Info, false > LogInfo
std::unique_ptr< L1GtTriggerMenu > produceGtTriggerMenu(const L1GtTriggerMenuRcd &)
public methods
std::string m_defXmlFile
XML file for Global Trigger menu (def.xml)

◆ ~L1GtTriggerMenuXmlProducer()

L1GtTriggerMenuXmlProducer::~L1GtTriggerMenuXmlProducer ( )
override

destructor

Definition at line 74 of file L1GtTriggerMenuXmlProducer.cc.

74  {
75  // empty
76 }

Member Function Documentation

◆ produceGtTriggerMenu()

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

public methods

L1 GT parameters

Definition at line 81 of file L1GtTriggerMenuXmlProducer.cc.

References L1GtTriggerMenuXmlParser::corCaloTemplate(), L1GtTriggerMenuXmlParser::corEnergySumTemplate(), L1GtTriggerMenuXmlParser::corMuonTemplate(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getHandle(), L1GtTriggerMenuXmlParser::gtAlgorithmAliasMap(), L1GtTriggerMenuXmlParser::gtAlgorithmMap(), L1GtStableParameters::gtNumberConditionChips(), L1GtStableParameters::gtNumberL1JetCounts(), L1GtStableParameters::gtNumberPhysTriggers(), L1GtStableParameters::gtNumberTechnicalTriggers(), L1GtStableParameters::gtOrderConditionChip(), L1GtStableParameters::gtPinsOnConditionChip(), L1GtTriggerMenuXmlParser::gtScaleDbKey(), L1GtTriggerMenuXmlParser::gtTechnicalTriggerMap(), L1GtTriggerMenuXmlParser::gtTriggerMenuImplementation(), L1GtTriggerMenuXmlParser::gtTriggerMenuInterface(), L1GtTriggerMenuXmlParser::gtTriggerMenuName(), m_defXmlFile, m_getToken, 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().

82  {
83  // get the parameters needed from other records
84  edm::ESHandle<L1GtStableParameters> stableParameters = l1MenuRecord.getHandle(m_getToken);
85 
86  unsigned int numberConditionChips = stableParameters->gtNumberConditionChips();
87  unsigned int pinsOnConditionChip = stableParameters->gtPinsOnConditionChip();
88  std::vector<int> orderConditionChip = stableParameters->gtOrderConditionChip();
89  unsigned int numberPhysTriggers = stableParameters->gtNumberPhysTriggers();
90  unsigned int numberTechTriggers = stableParameters->gtNumberTechnicalTriggers();
91  unsigned int numberL1JetCounts = stableParameters->gtNumberL1JetCounts();
92 
94 
95  gtXmlParser.setGtNumberConditionChips(numberConditionChips);
96  gtXmlParser.setGtPinsOnConditionChip(pinsOnConditionChip);
97  gtXmlParser.setGtOrderConditionChip(orderConditionChip);
98  gtXmlParser.setGtNumberPhysTriggers(numberPhysTriggers);
99  gtXmlParser.setGtNumberTechTriggers(numberTechTriggers);
100  gtXmlParser.setGtNumberL1JetCounts(numberL1JetCounts);
101 
102  gtXmlParser.parseXmlFile(m_defXmlFile, m_vmeXmlFile);
103 
104  // transfer the condition map and algorithm map from parser to L1GtTriggerMenu
105 
106  auto pL1GtTriggerMenu = std::make_unique<L1GtTriggerMenu>(gtXmlParser.gtTriggerMenuName(),
107  numberConditionChips,
108  gtXmlParser.vecMuonTemplate(),
109  gtXmlParser.vecCaloTemplate(),
110  gtXmlParser.vecEnergySumTemplate(),
111  gtXmlParser.vecJetCountsTemplate(),
112  gtXmlParser.vecCastorTemplate(),
113  gtXmlParser.vecHfBitCountsTemplate(),
114  gtXmlParser.vecHfRingEtSumsTemplate(),
115  gtXmlParser.vecBptxTemplate(),
116  gtXmlParser.vecExternalTemplate(),
117  gtXmlParser.vecCorrelationTemplate(),
118  gtXmlParser.corMuonTemplate(),
119  gtXmlParser.corCaloTemplate(),
120  gtXmlParser.corEnergySumTemplate());
121 
122  pL1GtTriggerMenu->setGtTriggerMenuInterface(gtXmlParser.gtTriggerMenuInterface());
123  pL1GtTriggerMenu->setGtTriggerMenuImplementation(gtXmlParser.gtTriggerMenuImplementation());
124  pL1GtTriggerMenu->setGtScaleDbKey(gtXmlParser.gtScaleDbKey());
125 
126  pL1GtTriggerMenu->setGtAlgorithmMap(gtXmlParser.gtAlgorithmMap());
127  pL1GtTriggerMenu->setGtAlgorithmAliasMap(gtXmlParser.gtAlgorithmAliasMap());
128  pL1GtTriggerMenu->setGtTechnicalTriggerMap(gtXmlParser.gtTechnicalTriggerMap());
129 
130  //LogDebug("L1GtConfigProducers")
131  //<< "\n\nReturning L1 Trigger Menu!"
132  //<< "\n\n"
133  //<< std::endl;
134 
135  return pL1GtTriggerMenu;
136 }
const std::string & gtScaleDbKey() const
menu associated scale key
unsigned int gtNumberL1JetCounts() const
get / set the number of L1 jet counts received by GT
const std::string & gtTriggerMenuInterface() const
get / set the trigger menu names
void setGtPinsOnConditionChip(const unsigned int &)
const std::vector< std::vector< L1GtJetCountsTemplate > > & vecJetCountsTemplate() const
unsigned int gtNumberConditionChips() const
hardware stuff
const AlgorithmMap & gtAlgorithmAliasMap() const
get / set the algorithm map (by alias)
void setGtNumberPhysTriggers(const unsigned int &)
const std::vector< std::vector< L1GtCastorTemplate > > & vecCastorTemplate() const
const AlgorithmMap & gtTechnicalTriggerMap() const
get / set the technical trigger map
std::string m_vmeXmlFile
XML file for Global Trigger VME configuration (vme.xml)
const std::vector< std::vector< L1GtCorrelationTemplate > > & vecCorrelationTemplate() const
const std::vector< std::vector< L1GtExternalTemplate > > & vecExternalTemplate() const
const std::vector< std::vector< L1GtMuonTemplate > > & corMuonTemplate() const
const std::vector< std::vector< L1GtCaloTemplate > > & vecCaloTemplate() const
void parseXmlFile(const std::string &defXmlFile, const std::string &vmeXmlFile)
parse def.xml and vme.xml files
ESHandle< ProductT > getHandle(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESGetToken< L1GtStableParameters, L1GtStableParametersRcd > m_getToken
void setGtNumberConditionChips(const unsigned int &)
unsigned int gtPinsOnConditionChip() const
get / set the number of pins on the GTL condition chips
const std::vector< std::vector< L1GtCaloTemplate > > & corCaloTemplate() const
const std::string & gtTriggerMenuName() const
const std::vector< std::vector< L1GtBptxTemplate > > & vecBptxTemplate() const
const std::string & gtTriggerMenuImplementation() const
const AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
const std::vector< std::vector< L1GtEnergySumTemplate > > & vecEnergySumTemplate() const
const std::vector< std::vector< L1GtMuonTemplate > > & vecMuonTemplate() const
get / set the vectors containing the conditions
const std::vector< std::vector< L1GtHfRingEtSumsTemplate > > & vecHfRingEtSumsTemplate() const
void setGtNumberTechTriggers(const unsigned int &)
void setGtOrderConditionChip(const std::vector< int > &)
std::string m_defXmlFile
XML file for Global Trigger menu (def.xml)
unsigned int gtNumberTechnicalTriggers() const
get / set the number of technical triggers
const std::vector< int > & gtOrderConditionChip() const
const std::vector< std::vector< L1GtHfBitCountsTemplate > > & vecHfBitCountsTemplate() const
unsigned int gtNumberPhysTriggers() const
get / set the number of physics trigger algorithms
const std::vector< std::vector< L1GtEnergySumTemplate > > & corEnergySumTemplate() const
void setGtNumberL1JetCounts(const unsigned int &)

Member Data Documentation

◆ m_defXmlFile

std::string L1GtTriggerMenuXmlProducer::m_defXmlFile
private

XML file for Global Trigger menu (def.xml)

Definition at line 51 of file L1GtTriggerMenuXmlProducer.h.

Referenced by L1GtTriggerMenuXmlProducer(), and produceGtTriggerMenu().

◆ m_getToken

edm::ESGetToken<L1GtStableParameters, L1GtStableParametersRcd> L1GtTriggerMenuXmlProducer::m_getToken
private

◆ m_vmeXmlFile

std::string L1GtTriggerMenuXmlProducer::m_vmeXmlFile
private

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

Definition at line 54 of file L1GtTriggerMenuXmlProducer.h.

Referenced by L1GtTriggerMenuXmlProducer(), and produceGtTriggerMenu().