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
l1t::TriggerMenuXmlProducer Class Reference

#include <TriggerMenuXmlProducer.h>

Inheritance diagram for l1t::TriggerMenuXmlProducer:
edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

boost::shared_ptr< TriggerMenuproduceGtTriggerMenu (const L1TGlobalTriggerMenuRcd &)
 public methods More...
 
 TriggerMenuXmlProducer (const edm::ParameterSet &)
 constructor More...
 
 ~TriggerMenuXmlProducer ()
 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

Definition at line 42 of file TriggerMenuXmlProducer.h.

Constructor & Destructor Documentation

TriggerMenuXmlProducer::TriggerMenuXmlProducer ( const edm::ParameterSet parSet)

constructor

Definition at line 44 of file TriggerMenuXmlProducer.cc.

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

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

destructor

Definition at line 88 of file TriggerMenuXmlProducer.cc.

89 {
90 
91  // empty
92 
93 }

Member Function Documentation

boost::shared_ptr< TriggerMenu > TriggerMenuXmlProducer::produceGtTriggerMenu ( const L1TGlobalTriggerMenuRcd l1MenuRecord)

public methods

L1 GT parameters

get / set the number of physics trigger algorithms

get / set the additional number of physics trigger algorithms

get / set the number of technical triggers

get / set the number of L1 muons received by GT

get / set the number of L1 e/gamma objects received by GT

get / set the number of L1 isolated e/gamma objects received by GT

get / set the number of L1 central jets received by GT

get / set the number of L1 forward jets received by GT

get / set the number of L1 tau jets received by GT

get / set the number of L1 jet counts received by GT

hardware stuff

get / set the number of condition chips in GTL

get / set the number of pins on the GTL condition chips

get / set the correspondence "condition chip - GTL algorithm word" in the hardware

get / set the number of PSB boards in GT

get / set the number of bits for eta of calorimeter objects

get / set the number of bits for eta of muon objects

get / set WordLength

get / set one UnitLength

Definition at line 97 of file TriggerMenuXmlProducer.cc.

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

Referenced by TriggerMenuXmlProducer().

99 {
100 
101  // get the parameters needed from other records
102  const L1TGlobalStableParametersRcd& stableParametersRcd =
103  l1MenuRecord.getRecord<L1TGlobalStableParametersRcd>();
104 
105  edm::ESHandle<GlobalStableParameters> stableParameters;
106  stableParametersRcd.get(stableParameters);
107 
108  unsigned int numberConditionChips = stableParameters->gtNumberConditionChips();
109  unsigned int pinsOnConditionChip = stableParameters->gtPinsOnConditionChip();
110  std::vector<int> orderConditionChip = stableParameters->gtOrderConditionChip();
111  unsigned int numberPhysTriggers = stableParameters->gtNumberPhysTriggers();
112  unsigned int numberTechTriggers = stableParameters->gtNumberTechnicalTriggers();
113  unsigned int numberL1JetCounts = stableParameters->gtNumberL1JetCounts();
114 
115  LogDebug("l1t|Global")
116  << "\n\t numberConditionChips = " << numberConditionChips
117  << "\n\t pinsOnConditionChip = " << pinsOnConditionChip
118  << "\n\t orderConditionChip.size() = " << orderConditionChip.size()
119  << std::endl;
120  for( int i=0; i<int(orderConditionChip.size()); i++ ){
121  LogDebug("l1t|Global") << "\t\t " << i << "\t" << orderConditionChip[i] << std::endl;
122  }
123  LogDebug("l1t|Global")
124  << "\n\t numberPhysTriggers = " << numberPhysTriggers
125  << "\n\t numberTechTriggers = " << numberTechTriggers
126  << "\n\t numberL1JetCounts = " << numberL1JetCounts
127  << std::endl;
128 
129 
130 
131  // Added by DP 4/25/2014
132 
134  unsigned int gtNumberPhysTriggers = stableParameters->gtNumberPhysTriggers();
136  unsigned int gtNumberPhysTriggersExtended = stableParameters->gtNumberPhysTriggersExtended();
138  unsigned int gtNumberTechnicalTriggers = stableParameters->gtNumberTechnicalTriggers();
140  unsigned int gtNumberL1Mu = stableParameters->gtNumberL1Mu();
142  unsigned int gtNumberL1NoIsoEG = stableParameters->gtNumberL1NoIsoEG();
144  unsigned int gtNumberL1IsoEG = stableParameters->gtNumberL1IsoEG();
146  unsigned int gtNumberL1CenJet = stableParameters->gtNumberL1CenJet();
148  unsigned int gtNumberL1ForJet = stableParameters->gtNumberL1ForJet();
150  unsigned int gtNumberL1TauJet = stableParameters->gtNumberL1TauJet();
152  unsigned int gtNumberL1JetCounts = stableParameters->gtNumberL1JetCounts();
153 
155 
157  unsigned int gtNumberConditionChips = stableParameters->gtNumberConditionChips();
159  unsigned int gtPinsOnConditionChip = stableParameters->gtPinsOnConditionChip();
162  std::vector<int> gtOrderConditionChip = stableParameters->gtOrderConditionChip();
164  int gtNumberPsbBoards = stableParameters->gtNumberPsbBoards();
166  unsigned int gtIfCaloEtaNumberBits = stableParameters->gtIfCaloEtaNumberBits();
168  unsigned int gtIfMuEtaNumberBits = stableParameters->gtIfMuEtaNumberBits();
170  int gtWordLength = stableParameters->gtWordLength();
172  int gtUnitLength = stableParameters->gtUnitLength();
173 
174  std::cout
175  << "\n\t gtNumberPhysTriggers = " << gtNumberPhysTriggers
176  << "\n\t gtNumberPhysTriggersExtended = " << gtNumberPhysTriggersExtended
177  << "\n\t gtNumberTechnicalTriggers = " << gtNumberTechnicalTriggers
178  << "\n\t gtNumberL1Mu = " << gtNumberL1Mu
179  << "\n\t gtNumberL1NoIsoEG = " << gtNumberL1NoIsoEG
180  << "\n\t gtNumberL1IsoEG = " << gtNumberL1IsoEG
181  << "\n\t gtNumberL1CenJet = " << gtNumberL1CenJet
182  << "\n\t gtNumberL1ForJet = " << gtNumberL1ForJet
183  << "\n\t gtNumberL1TauJet = " << gtNumberL1TauJet
184  << "\n\t gtNumberL1JetCounts = " << gtNumberL1JetCounts
185  << "\n\t gtNumberConditionChips = " << gtNumberConditionChips
186  << "\n\t gtPinsOnConditionChip = " << gtPinsOnConditionChip
187  << "\n\t gtNumberPsbBoards = " << gtNumberPsbBoards
188  << "\n\t gtIfCaloEtaNumberBits = " << gtIfCaloEtaNumberBits
189  << "\n\t gtIfMuEtaNumberBits = " << gtIfMuEtaNumberBits
190  << "\n\t gtWordLength = " << gtWordLength
191  << "\n\t gtUnitLength = " << gtUnitLength
192  << std::endl;
193 
194  for( int i=0; i<int(gtOrderConditionChip.size()); i++ ){
195  std::cout << "\t\t " << i << "\t" << gtOrderConditionChip[i] << std::endl;
196  }
197 
198  // End add
199 
201 
202  gtXmlParser.setGtNumberConditionChips(numberConditionChips);
203  gtXmlParser.setGtPinsOnConditionChip(pinsOnConditionChip);
204  gtXmlParser.setGtOrderConditionChip(orderConditionChip);
205  gtXmlParser.setGtNumberPhysTriggers(numberPhysTriggers);
206  gtXmlParser.setGtNumberTechTriggers(numberTechTriggers);
207  gtXmlParser.setGtNumberL1JetCounts(numberL1JetCounts);
208 
209  gtXmlParser.parseXmlFile(m_defXmlFile, m_vmeXmlFile);
210 
211  // transfer the condition map and algorithm map from parser to L1uGtTriggerMenu
212 
213  boost::shared_ptr<TriggerMenu> pL1uGtTriggerMenu = boost::shared_ptr<TriggerMenu>(
214  new TriggerMenu(gtXmlParser.gtTriggerMenuName(), numberConditionChips,
215  gtXmlParser.vecMuonTemplate(),
216  gtXmlParser.vecCaloTemplate(),
217  gtXmlParser.vecEnergySumTemplate(),
218  gtXmlParser.vecJetCountsTemplate(),
219  gtXmlParser.vecCastorTemplate(),
220  gtXmlParser.vecHfBitCountsTemplate(),
221  gtXmlParser.vecHfRingEtSumsTemplate(),
222  gtXmlParser.vecBptxTemplate(),
223  gtXmlParser.vecExternalTemplate(),
224  gtXmlParser.vecCorrelationTemplate(),
225  gtXmlParser.corMuonTemplate(),
226  gtXmlParser.corCaloTemplate(),
227  gtXmlParser.corEnergySumTemplate()) );
228 
229 
230  pL1uGtTriggerMenu->setGtTriggerMenuInterface(gtXmlParser.gtTriggerMenuInterface());
231  pL1uGtTriggerMenu->setGtTriggerMenuImplementation(gtXmlParser.gtTriggerMenuImplementation());
232  pL1uGtTriggerMenu->setGtScaleDbKey(gtXmlParser.gtScaleDbKey());
233 
234  pL1uGtTriggerMenu->setGtAlgorithmMap(gtXmlParser.gtAlgorithmMap());
235  pL1uGtTriggerMenu->setGtAlgorithmAliasMap(gtXmlParser.gtAlgorithmAliasMap());
236  pL1uGtTriggerMenu->setGtTechnicalTriggerMap(gtXmlParser.gtTechnicalTriggerMap());
237 
238  //LogDebug("L1TGlobalConfig")
239  //<< "\n\nReturning L1 Trigger Menu!"
240  //<< "\n\n"
241  //<< std::endl;
242 
243  return pL1uGtTriggerMenu ;
244 }
#define LogDebug(id)
const std::string & gtScaleDbKey() const
menu associated scale key
int i
Definition: DBlmapReader.cc:9
const std::vector< std::vector< CorrelationTemplate > > & vecCorrelationTemplate() const
void setGtNumberL1JetCounts(const unsigned int &)
std::string m_vmeXmlFile
XML file for Global Trigger VME configuration (vme.xml)
std::string m_defXmlFile
XML file for Global Trigger menu (def.xml)
const std::vector< std::vector< L1GtHfBitCountsTemplate > > & vecHfBitCountsTemplate() const
const AlgorithmMap & gtAlgorithmAliasMap() const
get / set the algorithm map (by alias)
void setGtOrderConditionChip(const std::vector< int > &)
const std::vector< std::vector< EnergySumTemplate > > & corEnergySumTemplate() const
void setGtNumberPhysTriggers(const unsigned int &)
void parseXmlFile(const std::string &defXmlFile, const std::string &vmeXmlFile)
parse def.xml and vme.xml files
const AlgorithmMap & gtTechnicalTriggerMap() const
get / set the technical trigger map
void get(HolderT &iHolder) const
const std::vector< std::vector< CaloTemplate > > & vecCaloTemplate() const
const std::string & gtTriggerMenuInterface() const
get / set the trigger menu names
const std::vector< std::vector< EnergySumTemplate > > & vecEnergySumTemplate() const
const std::string & gtTriggerMenuName() const
const std::vector< std::vector< MuonTemplate > > & vecMuonTemplate() const
get / set the vectors containing the conditions
void setGtPinsOnConditionChip(const unsigned int &)
const std::string & gtTriggerMenuImplementation() const
const std::vector< std::vector< L1GtJetCountsTemplate > > & vecJetCountsTemplate() const
void setGtNumberConditionChips(const unsigned int &)
tuple cout
Definition: gather_cfg.py:121
const std::vector< std::vector< L1GtCastorTemplate > > & vecCastorTemplate() const
const std::vector< std::vector< L1GtExternalTemplate > > & vecExternalTemplate() const
const std::vector< std::vector< CaloTemplate > > & corCaloTemplate() const
const std::vector< std::vector< MuonTemplate > > & corMuonTemplate() const
void setGtNumberTechTriggers(const unsigned int &)
const AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
const std::vector< std::vector< L1GtHfRingEtSumsTemplate > > & vecHfRingEtSumsTemplate() const
const std::vector< std::vector< L1GtBptxTemplate > > & vecBptxTemplate() const

Member Data Documentation

std::string l1t::TriggerMenuXmlProducer::m_defXmlFile
private

XML file for Global Trigger menu (def.xml)

Definition at line 63 of file TriggerMenuXmlProducer.h.

Referenced by TriggerMenuXmlProducer().

std::string l1t::TriggerMenuXmlProducer::m_vmeXmlFile
private

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

Definition at line 66 of file TriggerMenuXmlProducer.h.

Referenced by TriggerMenuXmlProducer().