1 #ifndef CommonTools_Utils_ExpressionHisto_h 2 #define CommonTools_Utils_ExpressionHisto_h 45 bool fill(
const T& element,
double weight=1.0, uint32_t
i=0);
59 min(iConfig.
template getUntrackedParameter<double>(
"min")),
60 max(iConfig.
template getUntrackedParameter<double>(
"max")),
65 iConfig.
template getUntrackedParameter<bool>(
"lazyParsing",
false)) {
66 int32_t itemsToPlot = iConfig.template getUntrackedParameter<int32_t>(
"itemsToPlot", -1);
67 if (itemsToPlot <= 0) {
82 char buff[1024],baff[1024];
85 if (strstr(
name.c_str(),
"%d") != 0) {
86 snprintf(buff, 1024,
name.c_str(),
i+1);
88 snprintf(buff, 1024,
"%s [#%d]",
name.c_str(),
i+1);
93 snprintf(baff, 1024,
"%s [#%d]",
description.c_str(),
i+1);
106 else if (i <
nhistos)
hist[
i]->Fill(
function(element), weight );
def template(fileName, svg, replaceme="REPLACEME")
T * make(const Args &...args) const
make new ROOT object
ExpressionHisto(const edm::ParameterSet &iConfig)
bool fill(const T &element, double weight=1.0, uint32_t i=0)
void initialize(TFileDirectory &fs)