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
LogDebug
(
"HitBuildInfo"
) <<
"CaloSlaveSD Called with name "
<< n <<
"\n"
;
15
}
16
17
CaloSlaveSD::~CaloSlaveSD
() {}
18
19
void
CaloSlaveSD::Initialize
() {
20
LogDebug
(
"HitBuildInfo"
) <<
" initialize CaloSlaveSD "
<<
name_
<<
"\n"
;
21
hits_
.clear();
22
}
23
24
bool
CaloSlaveSD::format
() {
25
LogDebug
(
"HitBuildInfo"
) <<
" CaloSlaveSD "
<<
name_
<<
"formatting "
<<
hits_
.size() <<
" hits."
;
26
return
true
;
27
}
28
29
bool
CaloSlaveSD::processHits
(uint32_t unitID,
double
eDepEM,
double
eDepHad,
double
tSlice,
int
tkID, uint16_t
depth
) {
30
PCaloHit
aCal =
PCaloHit
(unitID, eDepEM, eDepHad, tSlice, tkID, depth);
31
LogDebug
(
"HitBuildInfo"
) <<
" Sent Hit "
<< aCal <<
" to ROU "
<<
name_
;
32
hits_
.push_back(aCal);
33
return
true
;
34
}
35
36
void
CaloSlaveSD::Clean
() {
37
LogDebug
(
"HitBuildIndo"
) <<
"CaloSlaveSD "
<<
name_
<<
" cleaning the collection"
;
38
Collection
().swap(
hits_
);
39
}
40
41
void
CaloSlaveSD::ReserveMemory
(
unsigned
int
size
) {
42
if
(
hits_
.capacity() <
size
)
43
hits_
.reserve(size);
44
}
LogDebug
#define LogDebug(id)
Definition:
MessageLogger.h:670
findQualityFiles.size
size
Write out results.
Definition:
findQualityFiles.py:443
CaloSlaveSD::processHits
virtual bool processHits(uint32_t, double, double, double, int, uint16_t depth=0)
Definition:
CaloSlaveSD.cc:29
CaloSlaveSD::Initialize
virtual void Initialize()
Definition:
CaloSlaveSD.cc:19
PCaloHit
Definition:
PCaloHit.h:8
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
CaloSlaveSD::~CaloSlaveSD
virtual ~CaloSlaveSD()
Definition:
CaloSlaveSD.cc:17
CaloSlaveSD::Clean
virtual void Clean()
Definition:
CaloSlaveSD.cc:36
CaloSlaveSD::ReserveMemory
virtual void ReserveMemory(unsigned int size)
Definition:
CaloSlaveSD.cc:41
CaloSlaveSD::hits_
Collection hits_
Definition:
CaloSlaveSD.h:36
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:39
CaloSlaveSD::format
virtual bool format()
Definition:
CaloSlaveSD.cc:24
CaloSlaveSD.h
CaloSlaveSD::Collection
std::vector< PCaloHit > Collection
Definition:
CaloSlaveSD.h:18
egammaForCoreTracking_cff.depth
depth
Definition:
egammaForCoreTracking_cff.py:29
Generated for CMSSW Reference Manual by
1.8.11