1 #ifndef DQMOnline_Trigger_HLTDQMHistColl_h 2 #define DQMOnline_Trigger_HLTDQMHistColl_h 35 template <
typename ObjType>
53 std::vector<std::unique_ptr<HLTDQMHist<ObjType> > >
histsPass_;
54 std::vector<std::unique_ptr<HLTDQMHist<ObjType> > >
histsTot_;
64 template <
typename ObjType>
78 template<
typename ObjType>
89 template<
typename ObjType>
99 edm::ParameterDescription<std::string>(
"vsVar",
"",
true))
or 103 edm::ParameterDescription<std::string>(
"nameSuffex",
"",
true) and
104 edm::ParameterDescription<std::string>(
"xVar",
"",
true) and
105 edm::ParameterDescription<std::string>(
"yVar",
"",
true));
107 desc.
ifValue(edm::ParameterDescription<std::string>(
"histType",
"1D",
true),
std::move(histDescCases));
113 template <
typename ObjType>
117 for(
auto& histConfig : histConfigs){
120 book1D(iBooker,histConfig);
121 }
else if(histType==
"2D"){
122 book2D(iBooker,histConfig);
124 throw cms::Exception(
"ConfigError")<<
" histType "<<histType<<
" not recognised"<<std::endl;
129 template <
typename ObjType>
132 auto binLowEdgesDouble = histConfig.
getParameter<std::vector<double> >(
"binLowEdges");
134 for(
double lowEdge : binLowEdgesDouble) binLowEdges.push_back(lowEdge);
138 binLowEdges.size()-1,&binLowEdges[0]);
139 std::unique_ptr<HLTDQMHist<ObjType> >
hist;
141 auto vsVarFunc = hltdqm::getUnaryFuncFloat<ObjType>(vsVar);
143 throw cms::Exception(
"ConfigError")<<
" vsVar "<<vsVar<<
" is giving null ptr (likely empty) in "<<__FILE__<<
","<<__LINE__<<std::endl;
146 hist = std::make_unique<HLTDQMHist1D<ObjType,float> >(mePass->getTH1(),vsVar,vsVarFunc,rangeCuts);
150 binLowEdges.size()-1,&binLowEdges[0]);
151 hist = std::make_unique<HLTDQMHist1D<ObjType,float> >(meTot->getTH1(),vsVar,vsVarFunc,rangeCuts);
156 template <
typename ObjType>
159 auto xBinLowEdgesDouble = histConfig.
getParameter<std::vector<double> >(
"xBinLowEdges");
160 auto yBinLowEdgesDouble = histConfig.
getParameter<std::vector<double> >(
"yBinLowEdges");
161 std::vector<float> xBinLowEdges;
162 std::vector<float> yBinLowEdges;
163 for(
double lowEdge : xBinLowEdgesDouble) xBinLowEdges.push_back(lowEdge);
164 for(
double lowEdge : yBinLowEdgesDouble) yBinLowEdges.push_back(lowEdge);
168 xBinLowEdges.size()-1,&xBinLowEdges[0],
169 yBinLowEdges.size()-1,&yBinLowEdges[0]);
170 std::unique_ptr<HLTDQMHist<ObjType> >
hist;
173 auto xVarFunc = hltdqm::getUnaryFuncFloat<ObjType>(xVar);
174 auto yVarFunc = hltdqm::getUnaryFuncFloat<ObjType>(yVar);
175 if(!xVarFunc || !yVarFunc) {
176 throw cms::Exception(
"ConfigError")<<
" xVar "<<xVar<<
" or yVar "<<yVar<<
" is giving null ptr (likely empty str passed)"<<std::endl;
182 hist = std::make_unique<HLTDQMHist2D<ObjType,float> >(
static_cast<TH2*
>(mePass->getTH1()),xVar,yVar,xVarFunc,yVarFunc,rangeCuts);
187 xBinLowEdges.size()-1,&xBinLowEdges[0],
188 yBinLowEdges.size()-1,&yBinLowEdges[0]);
190 hist = std::make_unique<HLTDQMHist2D<ObjType,float> >(
static_cast<TH2*
>(meTot->getTH1()),xVar,yVar,xVarFunc,yVarFunc,rangeCuts);
194 template <
typename ObjType>
HLTDQMFilterEffHists(const edm::ParameterSet &config, std::string baseHistName, std::string hltProcess)
T getParameter(std::string const &) const
ParameterDescriptionNode * ifValue(ParameterDescription< T > const &switchParameter, std::unique_ptr< ParameterDescriptionCases< T >> cases)
ParameterDescriptionBase * addVPSet(U const &iLabel, ParameterSetDescription const &validator, std::vector< ParameterSet > const &defaults)
The single EDProduct to be saved for each event (AOD case)
VarRangeCutColl< ObjType > rangeCuts_
def setup(process, global_tag, zero_tesla=False)
static edm::ParameterSetDescription makePSetDescriptionHistConfigs()
void book2D(DQMStore::IBooker &iBooker, const edm::ParameterSet &histConfig)
std::string baseHistName_
void book1D(DQMStore::IBooker &iBooker, const edm::ParameterSet &histConfig)
void setCurrentFolder(std::string const &fullpath)
std::vector< std::unique_ptr< HLTDQMHist< ObjType > > > histsPass_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
MonitorElement * book1D(Args &&...args)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< std::unique_ptr< HLTDQMHist< ObjType > > > histsTot_
MonitorElement * book2D(Args &&...args)
void bookHists(DQMStore::IBooker &iBooker, const std::vector< edm::ParameterSet > &histConfigs)
static edm::ParameterSetDescription makePSetDescription()
void fillHists(const ObjType &obj, const edm::Event &event, const edm::EventSetup &setup, const trigger::TriggerEvent &trigEvt)
bool passTrig(const float objEta, float objPhi, const trigger::TriggerEvent &trigEvt, const std::string &filterName, const std::string &processName)