Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
SimG4CMS
Calo
src
HcalTestHistoManager.cc
Go to the documentation of this file.
1
// File: HcalTestHistoManager.cc
3
// Description: Histogram managing class in HcalTestAnalysis (HcalTest)
5
6
#include "
SimG4CMS/Calo/interface/HcalTestHistoManager.h
"
7
8
#include "
FWCore/PluginManager/interface/PluginManager.h
"
9
10
#include <iostream>
11
#include <cmath>
12
13
HcalTestHistoManager::HcalTestHistoManager
(
const
std::string
&
file
) :
14
tree
(0),
h
(0), kount(0) {
15
if
(
fs
.
isAvailable
()) {
16
h
=
new
HcalTestHistoClass
();
17
18
tree
=
fs
->
make
<TTree>(
"HcalTest"
,
"HcalTest"
);
19
tree
->SetAutoSave(10000);
20
tree
->Branch(
"HcalTestHisto"
,
"HcalTestHistoClass"
, &
h
);
21
edm::LogInfo
(
"HcalSim"
) <<
"HcalTestHistoManager:===>>> Book the Tree"
;
22
}
else
{
23
edm::LogInfo
(
"HcalSim"
) <<
"HcalTestHistoManager:===>>> No file provided"
;
24
}
25
}
26
27
HcalTestHistoManager::~HcalTestHistoManager
() {
28
29
edm::LogInfo
(
"HcalSim"
) <<
"============================================="
30
<<
"========================================\n"
31
<<
"=== HcalTestHistoManager: Start writing user "
32
<<
"histograms after "
<<
kount
<<
" events "
;
33
if
(
h
)
delete
h
;
34
}
35
36
void
HcalTestHistoManager::fillTree
(
HcalTestHistoClass
*
histos
) {
37
38
kount
++;
39
LogDebug
(
"HcalSim"
) <<
"HcalTestHistoManager: tree pointer for "
<<
kount
40
<<
" = "
<<
histos
;
41
if
(
tree
) {
42
h
=
histos
;
43
tree
->Fill();
44
}
45
}
LogDebug
#define LogDebug(id)
Definition:
MessageLogger.h:501
mergeVDriftHistosByStation.file
tuple file
Definition:
mergeVDriftHistosByStation.py:54
MainPageGenerator.tree
tuple tree
Definition:
MainPageGenerator.py:264
HcalTestHistoManager::kount
int kount
Definition:
HcalTestHistoManager.h:36
HcalTestHistoManager::HcalTestHistoManager
HcalTestHistoManager(const std::string &)
Definition:
HcalTestHistoManager.cc:13
TFileService::make
T * make(const Args &...args) const
make new ROOT object
Definition:
TFileService.h:64
HcalTestHistoManager::h
HcalTestHistoClass * h
Definition:
HcalTestHistoManager.h:35
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
HcalTestHistoManager::fs
edm::Service< TFileService > fs
Definition:
HcalTestHistoManager.h:33
edm::Service::isAvailable
bool isAvailable() const
Definition:
Service.h:46
HcalTestHistoManager.h
h
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition:
Activities.doc:4
edm::LogInfo
Definition:
MessageLogger.h:214
PluginManager.h
HcalTestHistoClass
Definition:
HcalTestHistoClass.h:16
mergeVDriftHistosByStation.histos
dictionary histos
Definition:
mergeVDriftHistosByStation.py:60
HcalTestHistoManager::tree
TTree * tree
Definition:
HcalTestHistoManager.h:34
HcalTestHistoManager::~HcalTestHistoManager
virtual ~HcalTestHistoManager()
Definition:
HcalTestHistoManager.cc:27
HcalTestHistoManager::fillTree
void fillTree(HcalTestHistoClass *histos)
Definition:
HcalTestHistoManager.cc:36
Generated for CMSSW Reference Manual by
1.8.5