1#include "CommonTools/UtilAlgos/interface/TFileService.h"
2#include "FWCore/Framework/interface/one/EDAnalyzer.h"
3#include "FWCore/ServiceRegistry/interface/Service.h"
5#include "UserUtils/EDMUtils/interface/PluginAlias.hpp"
20 edm::Service<TFileService> fs;
21 std::map<std::string, TH1D*> _histmap;
22 std::map<std::string, TH2D*> _hist2dmap;
24 template<
typename ... Args>
26 BookHist1D(
const std::string& name, Args ... args )
28 _histmap[name] = fs->make<TH1D>( name.c_str(),
"", args ... );
29 return *( _histmap[name] );
33 template<
typename ... Args>
35 BookHist2D(
const std::string& name, Args ... args )
37 _hist2dmap[name] = fs->make<TH2D>( name.c_str(),
"", args ... );
38 return *( _hist2dmap[name] );
43 HasHist(
const std::string& x )
45 return _histmap.count( x );
50 HasHist2D(
const std::string & x )
52 return _hist2dmap.count( x );
57 Hist(
const std::string& x )
59 return *( _histmap[x] );
64 Hist2D(
const std::string& x )
66 return *( _hist2dmap[x] );
Definition: EDHistogramAnalyzer.hpp:14
class for reducing the verbosity of the various edm plugin calls.
Definition: PluginAlias.hpp:37