6 using namespace l1extra;
7 using namespace trigger;
21 hltMenuChanged_ =
true;
28 while (!l1Plotters.empty())
delete l1Plotters.back(), l1Plotters.pop_back();
29 while (!caloPlotters.empty())
delete caloPlotters.back(), caloPlotters.pop_back();
30 while (!trackPlotters.empty())
delete trackPlotters.back(), trackPlotters.pop_back();
31 while (!pathPlotters.empty())
delete pathPlotters.back(), pathPlotters.pop_back();
32 while (!litePathPlotters.empty())
delete litePathPlotters.back(), litePathPlotters.pop_back();
42 if ( HLTCP_.init(iRun, iSetup, hltProcessName_, hltMenuChanged_) ) {
43 if ( hltMenuChanged_ ) {
46 std::cout <<
"Trigger menu '" << HLTCP_.tableName() <<
"'" << std::endl;
47 HLTCP_.dump(
"Triggers");
49 std::cout << std::endl <<
"Configuration of '" << moduleName_ <<
"' for trigger menu '" << HLTCP_.tableName() <<
"'" << std::endl;
50 for (
unsigned int i = 0;
i < config_.size(); ++
i ) {
53 std::cout << matching_.dump() << std::endl << std::endl;
55 unsigned int npars = 14;
56 npars += countParameters(matching_);
57 for (
unsigned int i = 0;
i < config_.size(); ++
i ) {
58 npars += countParameters(config_[
i]);
61 std::cout <<
"--> Number of parameters: " << npars << std::endl;
62 std::cout << std::endl <<
"Event content need by this module: " << std::endl;
64 std::vector<edm::InputTag> evtcontent;
65 for (
unsigned int i = 0;
i < config_.size(); ++
i ) {
66 searchEventContent(evtcontent, config_[
i]);
68 searchEventContent(evtcontent, matching_);
70 for (std::vector<edm::InputTag>::const_iterator iter = evtcontent.begin(); iter != evtcontent.end(); ++iter) {
71 std::cout <<
" " << iter->encode() << std::endl;
76 edm::LogWarning(
"HLTTauDQMOfflineSource") <<
"HLT config extraction failure with process name '" << hltProcessName_ <<
"'";
87 if (counterEvt_ > prescaleEvt_) {
92 std::map<int,LVColl> refC;
95 for ( std::vector<edm::ParameterSet>::const_iterator iter = refObjects_.begin(); iter != refObjects_.end(); ++iter ) {
96 int objID = iter->getUntrackedParameter<
int>(
"matchObjectID");
100 std::map<int,LVColl>::iterator it;
104 if ( it == refC.end() ) {
105 refC.insert(std::pair<int,LVColl>(15,*collHandle));
107 it->second.insert(it->second.end(),collHandle->begin(),collHandle->end());
109 }
else if (
std::abs(objID) == 11 ) {
111 if ( it == refC.end() ) {
112 refC.insert(std::pair<int,LVColl>(11,*collHandle));
114 it->second.insert(it->second.end(),collHandle->begin(),collHandle->end());
116 }
else if (
std::abs(objID) == 13 ) {
118 if ( it == refC.end() ) {
119 refC.insert(std::pair<int,LVColl>(13,*collHandle));
121 it->second.insert(it->second.end(),collHandle->begin(),collHandle->end());
124 it = refC.find(objID);
125 if ( it == refC.end() ) {
126 refC.insert(std::pair<int,LVColl>(objID,*collHandle));
128 it->second.insert(it->second.end(),collHandle->begin(),collHandle->end());
136 for (
unsigned int i = 0;
i < pathPlotters.size(); ++
i ) {
137 if (pathPlotters[
i]->isValid()) pathPlotters[
i]->
analyze(iEvent,iSetup,refC);
141 for (
unsigned int i = 0;
i < litePathPlotters.size(); ++
i ) {
142 if (litePathPlotters[
i]->isValid()) litePathPlotters[
i]->
analyze(iEvent,iSetup,refC);
146 for (
unsigned int i = 0;
i < l1Plotters.size(); ++
i ) {
147 if (l1Plotters[
i]->isValid()) l1Plotters[
i]->
analyze(iEvent,iSetup,refC);
151 for (
unsigned int i = 0;
i < caloPlotters.size(); ++
i ) {
152 if (caloPlotters[
i]->isValid()) caloPlotters[
i]->
analyze(iEvent,iSetup,refC);
156 for (
unsigned int i = 0;
i < trackPlotters.size(); ++
i ) {
157 if (trackPlotters[
i]->isValid()) trackPlotters[
i]->
analyze(iEvent,iSetup,refC);
179 config_ = pset.
getParameter<std::vector<edm::ParameterSet> >(
"MonitorSetup");
186 doRefAnalysis_ = matching_.getUntrackedParameter<
bool>(
"doMatching");
187 refObjects_ = matching_.getUntrackedParameter<std::vector<edm::ParameterSet> >(
"matchFilters");
190 while (!l1Plotters.empty())
delete l1Plotters.back(), l1Plotters.pop_back();
191 while (!caloPlotters.empty())
delete caloPlotters.back(), caloPlotters.pop_back();
192 while (!trackPlotters.empty())
delete trackPlotters.back(), trackPlotters.pop_back();
193 while (!pathPlotters.empty())
delete pathPlotters.back(), pathPlotters.pop_back();
194 while (!litePathPlotters.empty())
delete litePathPlotters.back(), litePathPlotters.pop_back();
197 automation_.AutoCompleteConfig( config_, HLTCP_ );
200 for (
unsigned int i = 0;
i < config_.size(); ++
i ) {
203 configtype = config_[
i].getUntrackedParameter<
std::string>(
"ConfigType");
206 << e.
what() << std::endl;
209 if (configtype ==
"L1") {
211 l1Plotters.push_back(
new HLTTauDQML1Plotter(config_[
i],NPtBins_,NEtaBins_,NPhiBins_,EtMax_,doRefAnalysis_,L1MatchDr_,dqmBaseFolder_));
216 }
else if (configtype ==
"Calo") {
218 caloPlotters.push_back(
new HLTTauDQMCaloPlotter(config_[
i],NPtBins_,NEtaBins_,NPhiBins_,EtMax_,doRefAnalysis_,HLTMatchDr_,dqmBaseFolder_));
223 }
else if (configtype ==
"Track") {
225 trackPlotters.push_back(
new HLTTauDQMTrkPlotter(config_[
i],NPtBins_,NEtaBins_,NPhiBins_,EtMax_,doRefAnalysis_,HLTMatchDr_,dqmBaseFolder_));
230 }
else if (configtype ==
"Path") {
237 }
else if (configtype ==
"LitePath") {
239 litePathPlotters.push_back(
new HLTTauDQMLitePathPlotter(config_[
i],NPtBins_,NEtaBins_,NPhiBins_,EtMax_,doRefAnalysis_,HLTMatchDr_,dqmBaseFolder_));
249 unsigned int num = 0;
250 const std::map<std::string,edm::ParameterSetEntry>& tmppset = pset.
psetTable();
251 for ( std::map<std::string,edm::ParameterSetEntry>::const_iterator iter = tmppset.begin(); iter != tmppset.end(); ++iter ) {
252 num += countParameters(iter->second.pset());
254 const std::map<std::string,edm::VParameterSetEntry>& tmpvpset = pset.
vpsetTable();
255 for ( std::map<std::string,edm::VParameterSetEntry>::const_iterator iter = tmpvpset.begin(); iter != tmpvpset.end(); ++iter ) {
256 const std::vector<edm::ParameterSet>& tmpvec = iter->second.vpset();
257 for ( std::vector<edm::ParameterSet>::const_iterator iter2 = tmpvec.begin(); iter2 != tmpvec.end(); ++iter2 ) {
258 num += countParameters(*iter2);
261 num += pset.
tbl().size();
266 for (std::map< std::string, edm::Entry >::const_iterator
i = pset.
tbl().begin(),
e = pset.
tbl().end();
i !=
e; ++
i) {
268 std::vector<edm::InputTag>::iterator iter =
std::find(eventContent.begin(), eventContent.end(),
i->second.getInputTag());
269 if (iter == eventContent.end()) {
270 eventContent.push_back(
i->second.getInputTag());
274 for (std::map< std::string, edm::ParameterSetEntry >::const_iterator
i = pset.
psetTable().begin(),
e = pset.
psetTable().end();
i !=
e; ++
i) {
275 searchEventContent(eventContent,
i->second.pset());
277 for (std::map< std::string, edm::VParameterSetEntry >::const_iterator
i = pset.
vpsetTable().begin(),
e = pset.
vpsetTable().end();
i !=
e; ++
i) {
278 std::vector<edm::ParameterSet> vpset =
i->second.vpset();
279 for (std::vector<edm::ParameterSet>::const_iterator iter = vpset.begin(); iter != vpset.end(); ++iter) {
280 searchEventContent(eventContent, *iter);
virtual char const * what() const
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
void endLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &c)
DQM Client Diagnostic.
HLTTauDQMOfflineSource(const edm::ParameterSet &)
void searchEventContent(std::vector< edm::InputTag > &eventContent, const edm::ParameterSet &pset)
void analyze(const edm::Event &e, const edm::EventSetup &c)
Fake Analyze.
void endRun(const edm::Run &r, const edm::EventSetup &c)
EndRun.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
~HLTTauDQMOfflineSource()
psettable const & psetTable() const
void processPSet(const edm::ParameterSet &pset)
void beginRun(const edm::Run &r, const edm::EventSetup &c)
BeginRun.
vpsettable const & vpsetTable() const
void beginLuminosityBlock(const edm::LuminosityBlock &lumiSeg, const edm::EventSetup &context)
Luminosity Block.
unsigned int countParameters(const edm::ParameterSet &pset)
table const & tbl() const