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...
 
bool m_newXMLGrammar
 
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

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 validate-o2o-wbm::f1, validate-o2o-wbm::f2, edm::FileInPath::fullPath(), edm::ParameterSet::getParameter(), m_defXmlFile, m_newXMLGrammar, 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  m_newXMLGrammar = parSet.getParameter<bool>("newGrammar");
79 
80 
81  edm::LogInfo("L1TGlobal")
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
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 91 of file TriggerMenuXmlProducer.cc.

92 {
93 
94  // empty
95 
96 }

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

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 100 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::gtScales(), l1t::TriggerMenuXmlParser::gtTriggerMenuImplementation(), l1t::TriggerMenuXmlParser::gtTriggerMenuInterface(), l1t::TriggerMenuXmlParser::gtTriggerMenuName(), i, LogDebug, l1t::TriggerMenuXmlParser::parseXmlFile(), l1t::TriggerMenuXmlParser::parseXmlFileV2(), l1t::TriggerMenuXmlParser::setGtNumberConditionChips(), l1t::TriggerMenuXmlParser::setGtNumberPhysTriggers(), l1t::TriggerMenuXmlParser::setGtOrderConditionChip(), l1t::TriggerMenuXmlParser::setGtPinsOnConditionChip(), TriggerMenu_cff::TriggerMenu, l1t::TriggerMenuXmlParser::vecCaloTemplate(), l1t::TriggerMenuXmlParser::vecCorrelationTemplate(), l1t::TriggerMenuXmlParser::vecEnergySumTemplate(), l1t::TriggerMenuXmlParser::vecExternalTemplate(), and l1t::TriggerMenuXmlParser::vecMuonTemplate().

Referenced by TriggerMenuXmlProducer().

102 {
103 
104  // get the parameters needed from other records
105  const L1TGlobalStableParametersRcd& stableParametersRcd =
106  l1MenuRecord.getRecord<L1TGlobalStableParametersRcd>();
107 
108  edm::ESHandle<GlobalStableParameters> 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 
117 
118  LogDebug("l1t|Global")
119  << "\n\t numberConditionChips = " << numberConditionChips
120  << "\n\t pinsOnConditionChip = " << pinsOnConditionChip
121  << "\n\t orderConditionChip.size() = " << orderConditionChip.size()
122  << std::endl;
123  for( int i=0; i<int(orderConditionChip.size()); i++ ){
124  LogDebug("l1t|Global") << "\t\t " << i << "\t" << orderConditionChip[i] << std::endl;
125  }
126  LogDebug("l1t|Global")
127  << "\n\t numberPhysTriggers = " << numberPhysTriggers
128 // << "\n\t numberTechTriggers = " << numberTechTriggers
129  << std::endl;
130 
131 
132 
133  // Added by DP 4/25/2014
134 
136  unsigned int gtNumberPhysTriggers = stableParameters->gtNumberPhysTriggers();
138  unsigned int gtNumberPhysTriggersExtended = stableParameters->gtNumberPhysTriggersExtended();
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();
151 
153 
155  unsigned int gtNumberConditionChips = stableParameters->gtNumberConditionChips();
157  unsigned int gtPinsOnConditionChip = stableParameters->gtPinsOnConditionChip();
160  std::vector<int> gtOrderConditionChip = stableParameters->gtOrderConditionChip();
162  int gtNumberPsbBoards = stableParameters->gtNumberPsbBoards();
164  unsigned int gtIfCaloEtaNumberBits = stableParameters->gtIfCaloEtaNumberBits();
166  unsigned int gtIfMuEtaNumberBits = stableParameters->gtIfMuEtaNumberBits();
168  int gtWordLength = stableParameters->gtWordLength();
170  int gtUnitLength = stableParameters->gtUnitLength();
171 
172  std::cout
173  << "\n\t gtNumberPhysTriggers = " << gtNumberPhysTriggers
174  << "\n\t gtNumberPhysTriggersExtended = " << gtNumberPhysTriggersExtended
175 // << "\n\t gtNumberTechnicalTriggers = " << gtNumberTechnicalTriggers
176  << "\n\t gtNumberL1Mu = " << gtNumberL1Mu
177  << "\n\t gtNumberL1NoIsoEG = " << gtNumberL1NoIsoEG
178  << "\n\t gtNumberL1IsoEG = " << gtNumberL1IsoEG
179  << "\n\t gtNumberL1CenJet = " << gtNumberL1CenJet
180  << "\n\t gtNumberL1ForJet = " << gtNumberL1ForJet
181  << "\n\t gtNumberL1TauJet = " << gtNumberL1TauJet
182  << "\n\t gtNumberConditionChips = " << gtNumberConditionChips
183  << "\n\t gtPinsOnConditionChip = " << gtPinsOnConditionChip
184  << "\n\t gtNumberPsbBoards = " << gtNumberPsbBoards
185  << "\n\t gtIfCaloEtaNumberBits = " << gtIfCaloEtaNumberBits
186  << "\n\t gtIfMuEtaNumberBits = " << gtIfMuEtaNumberBits
187  << "\n\t gtWordLength = " << gtWordLength
188  << "\n\t gtUnitLength = " << gtUnitLength
189  << std::endl;
190 
191  for( int i=0; i<int(gtOrderConditionChip.size()); i++ ){
192  std::cout << "\t\t " << i << "\t" << gtOrderConditionChip[i] << std::endl;
193  }
194 
195  // End add
196 
198 
199  gtXmlParser.setGtNumberConditionChips(numberConditionChips);
200  gtXmlParser.setGtPinsOnConditionChip(pinsOnConditionChip);
201  gtXmlParser.setGtOrderConditionChip(orderConditionChip);
202  gtXmlParser.setGtNumberPhysTriggers(numberPhysTriggers);
203 // gtXmlParser.setGtNumberTechTriggers(numberTechTriggers);
204 
205  if( !(m_newXMLGrammar) ) {
206  LogDebug("l1t|Global") << "Parsing old grammar file..." << std::endl;
207  gtXmlParser.parseXmlFile(m_defXmlFile, m_vmeXmlFile);
208  } else {
209  LogDebug("l1t|Global") << "Parsing new grammar file..." << std::endl;
210  gtXmlParser.parseXmlFileV2(m_defXmlFile);
211  }
212 
213  // transfer the condition map and algorithm map from parser to L1uGtTriggerMenu
214 
215  boost::shared_ptr<TriggerMenu> pL1uGtTriggerMenu = boost::shared_ptr<TriggerMenu>(
216  new TriggerMenu(gtXmlParser.gtTriggerMenuName(), numberConditionChips,
217  gtXmlParser.vecMuonTemplate(),
218  gtXmlParser.vecCaloTemplate(),
219  gtXmlParser.vecEnergySumTemplate(),
220  gtXmlParser.vecExternalTemplate(),
221  gtXmlParser.vecCorrelationTemplate(),
222  gtXmlParser.corMuonTemplate(),
223  gtXmlParser.corCaloTemplate(),
224  gtXmlParser.corEnergySumTemplate()) );
225 
226 
227  pL1uGtTriggerMenu->setGtTriggerMenuInterface(gtXmlParser.gtTriggerMenuInterface());
228  pL1uGtTriggerMenu->setGtTriggerMenuImplementation(gtXmlParser.gtTriggerMenuImplementation());
229  pL1uGtTriggerMenu->setGtScaleDbKey(gtXmlParser.gtScaleDbKey());
230  pL1uGtTriggerMenu->setGtScales(gtXmlParser.gtScales());
231 
232  pL1uGtTriggerMenu->setGtAlgorithmMap(gtXmlParser.gtAlgorithmMap());
233  pL1uGtTriggerMenu->setGtAlgorithmAliasMap(gtXmlParser.gtAlgorithmAliasMap());
234 // pL1uGtTriggerMenu->setGtTechnicalTriggerMap(gtXmlParser.gtTechnicalTriggerMap());
235 
236  //Dump what we have
237  // int verbose = 2
238  // pL1uGtTriggerMenu->print(std::cout,verbose);
239 
240  //LogDebug("L1TGlobalConfig")
241  //<< "\n\nReturning L1 Trigger Menu!"
242  //<< "\n\n"
243  //<< std::endl;
244 
245  return pL1uGtTriggerMenu ;
246 }
#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
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 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
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
const L1TGlobalScales & gtScales() const
menu associated scales
void setGtPinsOnConditionChip(const unsigned int &)
const std::string & gtTriggerMenuImplementation() const
void setGtNumberConditionChips(const unsigned int &)
tuple cout
Definition: gather_cfg.py:145
const std::vector< std::vector< CaloTemplate > > & corCaloTemplate() const
const std::vector< std::vector< MuonTemplate > > & corMuonTemplate() const
const AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
const std::vector< std::vector< ExternalTemplate > > & vecExternalTemplate() const
void parseXmlFileV2(const std::string &defXmlFile)

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().

bool l1t::TriggerMenuXmlProducer::m_newXMLGrammar
private

Definition at line 65 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 68 of file TriggerMenuXmlProducer.h.

Referenced by TriggerMenuXmlProducer().