CMS 3D CMS Logo

L1GtTriggerMenuXmlProducer.cc
Go to the documentation of this file.
1 
15 // this class header
17 
18 // system include files
19 #include <memory>
20 
21 // user include files
22 // base class
24 
27 
30 
33 
36 
38 
39 // forward declarations
40 
41 // constructor(s)
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 }
72 
73 // destructor
75  // empty
76 }
77 
78 // member functions
79 
80 // method called to produce the data
81 std::unique_ptr<L1GtTriggerMenu> L1GtTriggerMenuXmlProducer::produceGtTriggerMenu(
82  const L1GtTriggerMenuRcd& l1MenuRecord) {
83  // get the parameters needed from other records
84  const L1GtStableParametersRcd& stableParametersRcd = l1MenuRecord.getRecord<L1GtStableParametersRcd>();
85 
86  edm::ESHandle<L1GtStableParameters> stableParameters;
87  stableParametersRcd.get(stableParameters);
88 
89  unsigned int numberConditionChips = stableParameters->gtNumberConditionChips();
90  unsigned int pinsOnConditionChip = stableParameters->gtPinsOnConditionChip();
91  std::vector<int> orderConditionChip = stableParameters->gtOrderConditionChip();
92  unsigned int numberPhysTriggers = stableParameters->gtNumberPhysTriggers();
93  unsigned int numberTechTriggers = stableParameters->gtNumberTechnicalTriggers();
94  unsigned int numberL1JetCounts = stableParameters->gtNumberL1JetCounts();
95 
97 
98  gtXmlParser.setGtNumberConditionChips(numberConditionChips);
99  gtXmlParser.setGtPinsOnConditionChip(pinsOnConditionChip);
100  gtXmlParser.setGtOrderConditionChip(orderConditionChip);
101  gtXmlParser.setGtNumberPhysTriggers(numberPhysTriggers);
102  gtXmlParser.setGtNumberTechTriggers(numberTechTriggers);
103  gtXmlParser.setGtNumberL1JetCounts(numberL1JetCounts);
104 
105  gtXmlParser.parseXmlFile(m_defXmlFile, m_vmeXmlFile);
106 
107  // transfer the condition map and algorithm map from parser to L1GtTriggerMenu
108 
109  auto pL1GtTriggerMenu = std::make_unique<L1GtTriggerMenu>(gtXmlParser.gtTriggerMenuName(),
110  numberConditionChips,
111  gtXmlParser.vecMuonTemplate(),
112  gtXmlParser.vecCaloTemplate(),
113  gtXmlParser.vecEnergySumTemplate(),
114  gtXmlParser.vecJetCountsTemplate(),
115  gtXmlParser.vecCastorTemplate(),
116  gtXmlParser.vecHfBitCountsTemplate(),
117  gtXmlParser.vecHfRingEtSumsTemplate(),
118  gtXmlParser.vecBptxTemplate(),
119  gtXmlParser.vecExternalTemplate(),
120  gtXmlParser.vecCorrelationTemplate(),
121  gtXmlParser.corMuonTemplate(),
122  gtXmlParser.corCaloTemplate(),
123  gtXmlParser.corEnergySumTemplate());
124 
125  pL1GtTriggerMenu->setGtTriggerMenuInterface(gtXmlParser.gtTriggerMenuInterface());
126  pL1GtTriggerMenu->setGtTriggerMenuImplementation(gtXmlParser.gtTriggerMenuImplementation());
127  pL1GtTriggerMenu->setGtScaleDbKey(gtXmlParser.gtScaleDbKey());
128 
129  pL1GtTriggerMenu->setGtAlgorithmMap(gtXmlParser.gtAlgorithmMap());
130  pL1GtTriggerMenu->setGtAlgorithmAliasMap(gtXmlParser.gtAlgorithmAliasMap());
131  pL1GtTriggerMenu->setGtTechnicalTriggerMap(gtXmlParser.gtTechnicalTriggerMap());
132 
133  //LogDebug("L1GtConfigProducers")
134  //<< "\n\nReturning L1 Trigger Menu!"
135  //<< "\n\n"
136  //<< std::endl;
137 
138  return pL1GtTriggerMenu;
139 }
edm::eventsetup::DependentRecordImplementation::getRecord
const DepRecordT getRecord() const
Definition: DependentRecordImplementation.h:50
L1GtTriggerMenu.h
L1GtTriggerMenuXmlParser::gtTriggerMenuName
const std::string & gtTriggerMenuName() const
Definition: L1GtTriggerMenuXmlParser.h:104
L1GtTriggerMenuXmlParser::parseXmlFile
void parseXmlFile(const std::string &defXmlFile, const std::string &vmeXmlFile)
parse def.xml and vme.xml files
Definition: L1GtTriggerMenuXmlParser.cc:179
L1GtTriggerMenuXmlProducer.h
L1GtTriggerMenuXmlProducer::m_defXmlFile
std::string m_defXmlFile
XML file for Global Trigger menu (def.xml)
Definition: L1GtTriggerMenuXmlProducer.h:50
MessageLogger.h
ESHandle.h
L1GtTriggerMenuXmlParser::vecBptxTemplate
const std::vector< std::vector< L1GtBptxTemplate > > & vecBptxTemplate() const
Definition: L1GtTriggerMenuXmlParser.h:161
L1GtTriggerMenuXmlParser::corCaloTemplate
const std::vector< std::vector< L1GtCaloTemplate > > & corCaloTemplate() const
Definition: L1GtTriggerMenuXmlParser.h:186
L1GtTriggerMenuXmlParser
Definition: L1GtTriggerMenuXmlParser.h:51
L1GtTriggerMenuRcd.h
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
L1GtTriggerMenuXmlParser::setGtOrderConditionChip
void setGtOrderConditionChip(const std::vector< int > &)
Definition: L1GtTriggerMenuXmlParser.cc:68
ESProducer.h
L1GtTriggerMenuXmlParser::corMuonTemplate
const std::vector< std::vector< L1GtMuonTemplate > > & corMuonTemplate() const
Definition: L1GtTriggerMenuXmlParser.h:181
L1GtTriggerMenuXmlParser::setGtNumberConditionChips
void setGtNumberConditionChips(const unsigned int &)
Definition: L1GtTriggerMenuXmlParser.cc:57
L1GtStableParametersRcd.h
L1GtTriggerMenuXmlParser::gtAlgorithmMap
const AlgorithmMap & gtAlgorithmMap() const
get / set the algorithm map (by name)
Definition: L1GtTriggerMenuXmlParser.h:198
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
L1GtTriggerMenuXmlParser::gtTriggerMenuImplementation
const std::string & gtTriggerMenuImplementation() const
Definition: L1GtTriggerMenuXmlParser.h:109
L1GtTriggerMenuXmlParser::vecHfRingEtSumsTemplate
const std::vector< std::vector< L1GtHfRingEtSumsTemplate > > & vecHfRingEtSumsTemplate() const
Definition: L1GtTriggerMenuXmlParser.h:154
L1GtTriggerMenuXmlParser::gtAlgorithmAliasMap
const AlgorithmMap & gtAlgorithmAliasMap() const
get / set the algorithm map (by alias)
Definition: L1GtTriggerMenuXmlParser.h:203
edm::FileInPath
Definition: FileInPath.h:64
L1GtTriggerMenuRcd
Definition: L1GtTriggerMenuRcd.h:32
L1GtTriggerMenuXmlParser::setGtNumberTechTriggers
void setGtNumberTechTriggers(const unsigned int &)
Definition: L1GtTriggerMenuXmlParser.cc:78
edm::ESHandle
Definition: DTSurvey.h:22
L1GtTriggerMenuXmlParser::corEnergySumTemplate
const std::vector< std::vector< L1GtEnergySumTemplate > > & corEnergySumTemplate() const
Definition: L1GtTriggerMenuXmlParser.h:191
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:103
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MessageDrop.h
edm::ParameterSet
Definition: ParameterSet.h:47
L1GtTriggerMenuXmlParser::vecHfBitCountsTemplate
const std::vector< std::vector< L1GtHfBitCountsTemplate > > & vecHfBitCountsTemplate() const
Definition: L1GtTriggerMenuXmlParser.h:147
DeadROC_duringRun.f2
f2
Definition: DeadROC_duringRun.py:220
L1GtTriggerMenuXmlParser::gtScaleDbKey
const std::string & gtScaleDbKey() const
menu associated scale key
Definition: L1GtTriggerMenuXmlParser.h:114
L1GtTriggerMenuXmlParser::setGtNumberL1JetCounts
void setGtNumberL1JetCounts(const unsigned int &)
Definition: L1GtTriggerMenuXmlParser.cc:83
L1GtTriggerMenuXmlParser::setGtPinsOnConditionChip
void setGtPinsOnConditionChip(const unsigned int &)
Definition: L1GtTriggerMenuXmlParser.cc:62
L1GtTriggerMenuXmlProducer::~L1GtTriggerMenuXmlProducer
~L1GtTriggerMenuXmlProducer() override
destructor
Definition: L1GtTriggerMenuXmlProducer.cc:74
L1GtTriggerMenuXmlParser::vecEnergySumTemplate
const std::vector< std::vector< L1GtEnergySumTemplate > > & vecEnergySumTemplate() const
Definition: L1GtTriggerMenuXmlParser.h:128
L1GtTriggerMenuXmlParser::vecMuonTemplate
const std::vector< std::vector< L1GtMuonTemplate > > & vecMuonTemplate() const
get / set the vectors containing the conditions
Definition: L1GtTriggerMenuXmlParser.h:119
L1GtStableParametersRcd
Definition: L1GtStableParametersRcd.h:39
L1GtTriggerMenuXmlProducer::produceGtTriggerMenu
std::unique_ptr< L1GtTriggerMenu > produceGtTriggerMenu(const L1GtTriggerMenuRcd &)
public methods
Definition: L1GtTriggerMenuXmlProducer.cc:81
L1GtTriggerMenuXmlParser::vecCaloTemplate
const std::vector< std::vector< L1GtCaloTemplate > > & vecCaloTemplate() const
Definition: L1GtTriggerMenuXmlParser.h:123
ModuleFactory.h
L1GtTriggerMenuXmlParser::vecJetCountsTemplate
const std::vector< std::vector< L1GtJetCountsTemplate > > & vecJetCountsTemplate() const
Definition: L1GtTriggerMenuXmlParser.h:135
L1GtTriggerMenuXmlProducer::m_vmeXmlFile
std::string m_vmeXmlFile
XML file for Global Trigger VME configuration (vme.xml)
Definition: L1GtTriggerMenuXmlProducer.h:53
L1GtTriggerMenuXmlParser::vecCastorTemplate
const std::vector< std::vector< L1GtCastorTemplate > > & vecCastorTemplate() const
Definition: L1GtTriggerMenuXmlParser.h:142
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
L1GtTriggerMenuXmlParser::vecCorrelationTemplate
const std::vector< std::vector< L1GtCorrelationTemplate > > & vecCorrelationTemplate() const
Definition: L1GtTriggerMenuXmlParser.h:173
L1GtTriggerMenuXmlParser::setGtNumberPhysTriggers
void setGtNumberPhysTriggers(const unsigned int &)
Definition: L1GtTriggerMenuXmlParser.cc:73
L1GtTriggerMenuXmlProducer::L1GtTriggerMenuXmlProducer
L1GtTriggerMenuXmlProducer(const edm::ParameterSet &)
constructor
Definition: L1GtTriggerMenuXmlProducer.cc:42
L1GtTriggerMenuXmlParser::gtTriggerMenuInterface
const std::string & gtTriggerMenuInterface() const
get / set the trigger menu names
Definition: L1GtTriggerMenuXmlParser.h:99
L1GtTriggerMenuXmlParser.h
L1GtTriggerMenuXmlParser::vecExternalTemplate
const std::vector< std::vector< L1GtExternalTemplate > > & vecExternalTemplate() const
Definition: L1GtTriggerMenuXmlParser.h:166
DeadROC_duringRun.f1
f1
Definition: DeadROC_duringRun.py:219
L1GtTriggerMenuXmlParser::gtTechnicalTriggerMap
const AlgorithmMap & gtTechnicalTriggerMap() const
get / set the technical trigger map
Definition: L1GtTriggerMenuXmlParser.h:208
L1GtStableParameters.h