Main Page
Namespaces
Classes
Package Documentation
SimDataFormats
SimHitMaker
src
CaloSlaveSD.cc
Go to the documentation of this file.
1
// File: CaloSlaveSD.cc
3
// Date: 10.02
4
// Description: Persistent component of Sensitive Detector class for
5
// calorimeters
6
// Modifications:
8
9
#include "
SimDataFormats/SimHitMaker/interface/CaloSlaveSD.h
"
10
11
#include <iostream>
12
13
CaloSlaveSD::CaloSlaveSD
(
std::string
n
) : name_(n) {
14
15
LogDebug
(
"HitBuildInfo"
) <<
"CaloSlaveSD Called with name "
<< n <<
"\n"
;
16
17
}
18
19
CaloSlaveSD::~CaloSlaveSD
() {}
20
21
void
CaloSlaveSD::Initialize
() {
22
23
LogDebug
(
"HitBuildInfo"
) <<
" initialize CaloSlaveSD "
<<
name_
<<
"\n"
;
24
hits_
.clear();
25
}
26
27
bool
CaloSlaveSD::format
() {
28
29
LogDebug
(
"HitBuildInfo"
) <<
" CaloSlaveSD "
<<
name_
<<
"formatting "
30
<<
hits_
.size() <<
" hits."
;
31
return
true
;
32
}
33
34
bool
CaloSlaveSD::processHits
(uint32_t unitID,
double
eDepEM,
double
eDepHad,
35
double
tSlice,
int
tkID, uint16_t
depth
) {
36
37
PCaloHit
aCal =
PCaloHit
(unitID, eDepEM, eDepHad, tSlice, tkID, depth);
38
LogDebug
(
"HitBuildInfo"
) <<
" Sent Hit "
<< aCal <<
" to ROU "
<<
name_
;
39
hits_
.push_back(aCal);
40
return
true
;
41
}
42
43
void
CaloSlaveSD::Clean
() {
44
45
LogDebug
(
"HitBuildIndo"
) <<
"CaloSlaveSD "
<<
name_
<<
" cleaning the collection"
;
46
Collection
().swap(
hits_
);
47
48
}
49
50
void
CaloSlaveSD::ReserveMemory
(
unsigned
int
size
) {
51
52
if
(
hits_
.capacity() <
size
)
hits_
.reserve(size);
53
54
}
LogDebug
#define LogDebug(id)
Definition:
MessageLogger.h:601
findQualityFiles.size
size
Write out results.
Definition:
findQualityFiles.py:441
CaloSlaveSD::processHits
virtual bool processHits(uint32_t, double, double, double, int, uint16_t depth=0)
Definition:
CaloSlaveSD.cc:34
CaloSlaveSD::Initialize
virtual void Initialize()
Definition:
CaloSlaveSD.cc:21
PCaloHit
Definition:
PCaloHit.h:8
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
CaloSlaveSD::~CaloSlaveSD
virtual ~CaloSlaveSD()
Definition:
CaloSlaveSD.cc:19
CaloSlaveSD::Clean
virtual void Clean()
Definition:
CaloSlaveSD.cc:43
CaloSlaveSD::ReserveMemory
virtual void ReserveMemory(unsigned int size)
Definition:
CaloSlaveSD.cc:50
CaloSlaveSD::hits_
Collection hits_
Definition:
CaloSlaveSD.h:37
CaloSlaveSD::CaloSlaveSD
CaloSlaveSD(std::string)
Definition:
CaloSlaveSD.cc:13
gen::n
int n
Definition:
Cascade2Hadronizer.cc:79
CaloSlaveSD::name_
std::string name_
Definition:
CaloSlaveSD.h:40
CaloSlaveSD::format
virtual bool format()
Definition:
CaloSlaveSD.cc:27
CaloSlaveSD.h
CaloSlaveSD::Collection
std::vector< PCaloHit > Collection
Definition:
CaloSlaveSD.h:19
egammaForCoreTracking_cff.depth
depth
Definition:
egammaForCoreTracking_cff.py:29
Generated for CMSSW Reference Manual by
1.8.11