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, 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 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

$Date$ $Revision$

Definition at line 40 of file L1GtTriggerMenuXmlProducer.h.

Constructor & Destructor Documentation

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

constructor

Definition at line 49 of file L1GtTriggerMenuXmlProducer.cc.

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

51 {
52  // tell the framework what data is being produced
54 
55 
56  // now do what ever other initialization is needed
57 
58 
59  // directory in /data/Luminosity for the trigger menu
60  std::string menuDir = parSet.getParameter<std::string>("TriggerMenuLuminosity");
61 
62 
63  // def.xml file
64  std::string defXmlFileName = parSet.getParameter<std::string>("DefXmlFile");
65 
66  edm::FileInPath f1("L1TriggerConfig/L1GtConfigProducers/data/Luminosity/" +
67  menuDir + "/" + defXmlFileName);
68 
69  m_defXmlFile = f1.fullPath();
70 
71 
72  // vme.xml file
73  std::string vmeXmlFileName = parSet.getParameter<std::string>("VmeXmlFile");
74 
75  if (vmeXmlFileName != "") {
76  edm::FileInPath f2("L1TriggerConfig/L1GtConfigProducers/data/Luminosity/" +
77  menuDir + "/" + vmeXmlFileName);
78 
79  m_vmeXmlFile = f2.fullPath();
80 
81  }
82 
83  edm::LogInfo("L1GtConfigProducers")
84  << "\n\nL1 Trigger Menu: "
85  << "\n\n def.xml file: \n " << m_defXmlFile
86  << "\n\n vme.xml file: \n " << m_vmeXmlFile
87  << "\n\n"
88  << std::endl;
89 
90 }
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 93 of file L1GtTriggerMenuXmlProducer.cc.

94 {
95 
96  // empty
97 
98 }

Member Function Documentation

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

public methods

L1 GT parameters

Definition at line 104 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().

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

Referenced by L1GtTriggerMenuXmlProducer(), and produceGtTriggerMenu().