Main Page
Namespaces
Classes
Package Documentation
src
DQM
SiPixelPhase1Common
interface
AbstractHistogram.h
Go to the documentation of this file.
1
#ifndef SiPixel_AbstractHistogram_h
2
#define SiPixel_AbstractHistogram_h
3
// -*- C++ -*-
4
//
5
// Package: SiPixelPhase1Common
6
// Class: AbstractHistogram
7
//
8
// This is a spaceholder for a histogram in 0, 1, or 2 Dimensions. May or may
9
// not be backed by a TH1 or similar. May not be there at all and created on
10
// demand. Mainly designed as a value in std::map.
11
//
12
// Original Author: Marcel Schneider
13
//
14
15
#include "
DQMServices/Core/interface/MonitorElement.h
"
16
#include "
DQM/SiPixelPhase1Common/interface/GeometryInterface.h
"
17
#include <vector>
18
#include <utility>
19
#include <cassert>
20
21
struct
AbstractHistogram
{
22
23
int
count
= 0;
// how many things where inserted already. For concat.
24
MonitorElement
*
me
=
nullptr
;
25
TH1*
th1
=
nullptr
;
26
// This is needed for re-grouping, which happens for counters and harvesting
27
// This is always an iq out of GeometryInterface::allModules
28
GeometryInterface::InterestingQuantities
iq_sample
;
29
30
~AbstractHistogram
() {
31
// if both are set the ME should own the TH1
32
if
(th1 && !me) {
33
//std::cout << "+++ Deleting " << th1->GetTitle() << "\n";
34
delete
th1
;
35
}
36
};
37
38
};
39
40
41
#endif
GeometryInterface::InterestingQuantities
Definition:
GeometryInterface.h:45
AbstractHistogram
Definition:
AbstractHistogram.h:21
AbstractHistogram::me
MonitorElement * me
Definition:
AbstractHistogram.h:24
AbstractHistogram::iq_sample
GeometryInterface::InterestingQuantities iq_sample
Definition:
AbstractHistogram.h:28
AbstractHistogram::th1
TH1 * th1
Definition:
AbstractHistogram.h:25
AbstractHistogram::count
int count
Definition:
AbstractHistogram.h:23
GeometryInterface.h
AbstractHistogram::~AbstractHistogram
~AbstractHistogram()
Definition:
AbstractHistogram.h:30
MonitorElement
Definition:
MonitorElement.h:37
MonitorElement.h
Generated for CMSSW Reference Manual by
1.8.11