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
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...
 
boost::shared_ptr
< L1GtTriggerMenu
produceGtTriggerMenu (const L1GtTriggerMenuRcd &)
 public methods More...
 
 ~L1GtTriggerMenuXmlProducer ()
 destructor More...
 
- 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

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
< 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 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 &)
 

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

Constructor & Destructor Documentation

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

constructor

Definition at line 47 of file L1GtTriggerMenuXmlProducer.cc.

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

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

destructor

Definition at line 91 of file L1GtTriggerMenuXmlProducer.cc.

92 {
93 
94  // empty
95 
96 }

Member Function Documentation

boost::shared_ptr< L1GtTriggerMenu > L1GtTriggerMenuXmlProducer::produceGtTriggerMenu ( const L1GtTriggerMenuRcd l1MenuRecord)

public methods

L1 GT parameters

Definition at line 102 of file L1GtTriggerMenuXmlProducer.cc.

References L1GtTriggerMenuXmlParser::corCaloTemplate(), L1GtTriggerMenuXmlParser::corEnergySumTemplate(), L1GtTriggerMenuXmlParser::corMuonTemplate(), edm::eventsetup::EventSetupRecord::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().

104 {
105 
106  // get the parameters needed from other records
107  const L1GtStableParametersRcd& stableParametersRcd =
108  l1MenuRecord.getRecord<L1GtStableParametersRcd>();
109 
110  edm::ESHandle<L1GtStableParameters> stableParameters;
111  stableParametersRcd.get(stableParameters);
112 
113  unsigned int numberConditionChips = stableParameters->gtNumberConditionChips();
114  unsigned int pinsOnConditionChip = stableParameters->gtPinsOnConditionChip();
115  std::vector<int> orderConditionChip = stableParameters->gtOrderConditionChip();
116  unsigned int numberPhysTriggers = stableParameters->gtNumberPhysTriggers();
117  unsigned int numberTechTriggers = stableParameters->gtNumberTechnicalTriggers();
118  unsigned int numberL1JetCounts = stableParameters->gtNumberL1JetCounts();
119 
121 
122  gtXmlParser.setGtNumberConditionChips(numberConditionChips);
123  gtXmlParser.setGtPinsOnConditionChip(pinsOnConditionChip);
124  gtXmlParser.setGtOrderConditionChip(orderConditionChip);
125  gtXmlParser.setGtNumberPhysTriggers(numberPhysTriggers);
126  gtXmlParser.setGtNumberTechTriggers(numberTechTriggers);
127  gtXmlParser.setGtNumberL1JetCounts(numberL1JetCounts);
128 
129  gtXmlParser.parseXmlFile(m_defXmlFile, m_vmeXmlFile);
130 
131  // transfer the condition map and algorithm map from parser to L1GtTriggerMenu
132 
133  boost::shared_ptr<L1GtTriggerMenu> pL1GtTriggerMenu = boost::shared_ptr<L1GtTriggerMenu>(
134  new L1GtTriggerMenu(gtXmlParser.gtTriggerMenuName(), numberConditionChips,
135  gtXmlParser.vecMuonTemplate(),
136  gtXmlParser.vecCaloTemplate(),
137  gtXmlParser.vecEnergySumTemplate(),
138  gtXmlParser.vecJetCountsTemplate(),
139  gtXmlParser.vecCastorTemplate(),
140  gtXmlParser.vecHfBitCountsTemplate(),
141  gtXmlParser.vecHfRingEtSumsTemplate(),
142  gtXmlParser.vecBptxTemplate(),
143  gtXmlParser.vecExternalTemplate(),
144  gtXmlParser.vecCorrelationTemplate(),
145  gtXmlParser.corMuonTemplate(),
146  gtXmlParser.corCaloTemplate(),
147  gtXmlParser.corEnergySumTemplate()) );
148 
149 
150  pL1GtTriggerMenu->setGtTriggerMenuInterface(gtXmlParser.gtTriggerMenuInterface());
151  pL1GtTriggerMenu->setGtTriggerMenuImplementation(gtXmlParser.gtTriggerMenuImplementation());
152  pL1GtTriggerMenu->setGtScaleDbKey(gtXmlParser.gtScaleDbKey());
153 
154  pL1GtTriggerMenu->setGtAlgorithmMap(gtXmlParser.gtAlgorithmMap());
155  pL1GtTriggerMenu->setGtAlgorithmAliasMap(gtXmlParser.gtAlgorithmAliasMap());
156  pL1GtTriggerMenu->setGtTechnicalTriggerMap(gtXmlParser.gtTechnicalTriggerMap());
157 
158  //LogDebug("L1GtConfigProducers")
159  //<< "\n\nReturning L1 Trigger Menu!"
160  //<< "\n\n"
161  //<< std::endl;
162 
163  return pL1GtTriggerMenu ;
164 }
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
const std::vector< std::vector< L1GtCastorTemplate > > & vecCastorTemplate() const
const std::vector< std::vector< L1GtJetCountsTemplate > > & vecJetCountsTemplate() const
void get(HolderT &iHolder) 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 59 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 62 of file L1GtTriggerMenuXmlProducer.h.

Referenced by L1GtTriggerMenuXmlProducer(), and produceGtTriggerMenu().