CMS 3D CMS Logo

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