CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Attributes | Private Attributes
CaloSlaveSD Class Reference

#include <CaloSlaveSD.h>

Public Types

typedef std::vector< PCaloHitCollection
 
typedef Collection::const_iterator const_iterator
 
typedef Collection::iterator iterator
 

Public Member Functions

virtual const_iterator begin ()
 
 CaloSlaveSD (std::string)
 
virtual void Clean ()
 
virtual const_iterator end ()
 
virtual bool format ()
 
Collectionhits ()
 
virtual void Initialize ()
 
std::string name () const
 
virtual bool processHits (uint32_t, double, double, double, int, uint16_t depth=0)
 
virtual void ReserveMemory (unsigned int size)
 
std::string type ()
 
virtual ~CaloSlaveSD ()
 

Protected Attributes

Collection hits_
 

Private Attributes

std::string name_
 

Detailed Description

Definition at line 16 of file CaloSlaveSD.h.

Member Typedef Documentation

◆ Collection

typedef std::vector<PCaloHit> CaloSlaveSD::Collection

Definition at line 18 of file CaloSlaveSD.h.

◆ const_iterator

typedef Collection::const_iterator CaloSlaveSD::const_iterator

Definition at line 20 of file CaloSlaveSD.h.

◆ iterator

typedef Collection::iterator CaloSlaveSD::iterator

Definition at line 19 of file CaloSlaveSD.h.

Constructor & Destructor Documentation

◆ CaloSlaveSD()

CaloSlaveSD::CaloSlaveSD ( std::string  n)

Definition at line 13 of file CaloSlaveSD.cc.

13  : name_(n) {
14  LogDebug("HitBuildInfo") << "CaloSlaveSD Called with name " << n << "\n";
15 }

References LogDebug, and dqmiodumpmetadata::n.

◆ ~CaloSlaveSD()

CaloSlaveSD::~CaloSlaveSD ( )
virtual

Definition at line 17 of file CaloSlaveSD.cc.

17 {}

Member Function Documentation

◆ begin()

virtual const_iterator CaloSlaveSD::begin ( void  )
inlinevirtual

Definition at line 30 of file CaloSlaveSD.h.

30 { return hits_.begin(); }

References hits_.

◆ Clean()

void CaloSlaveSD::Clean ( )
virtual

Definition at line 36 of file CaloSlaveSD.cc.

36  {
37  LogDebug("HitBuildIndo") << "CaloSlaveSD " << name_ << " cleaning the collection";
38  Collection().swap(hits_);
39 }

References hits_, LogDebug, and name_.

◆ end()

virtual const_iterator CaloSlaveSD::end ( void  )
inlinevirtual

Definition at line 31 of file CaloSlaveSD.h.

31 { return hits_.end(); }

References hits_.

◆ format()

bool CaloSlaveSD::format ( )
virtual

Definition at line 24 of file CaloSlaveSD.cc.

24  {
25  LogDebug("HitBuildInfo") << " CaloSlaveSD " << name_ << "formatting " << hits_.size() << " hits.";
26  return true;
27 }

References hits_, LogDebug, and name_.

◆ hits()

Collection& CaloSlaveSD::hits ( void  )
inline

Definition at line 28 of file CaloSlaveSD.h.

28 { return hits_; }

References hits_.

◆ Initialize()

void CaloSlaveSD::Initialize ( )
virtual

Definition at line 19 of file CaloSlaveSD.cc.

19  {
20  LogDebug("HitBuildInfo") << " initialize CaloSlaveSD " << name_ << "\n";
21  hits_.clear();
22 }

References hits_, LogDebug, and name_.

◆ name()

std::string CaloSlaveSD::name ( void  ) const
inline

Definition at line 25 of file CaloSlaveSD.h.

25 { return name_; }

References name_.

Referenced by config.CFG::__str__(), and validation.Sample::digest().

◆ processHits()

bool CaloSlaveSD::processHits ( uint32_t  unitID,
double  eDepEM,
double  eDepHad,
double  tSlice,
int  tkID,
uint16_t  depth = 0 
)
virtual

Definition at line 29 of file CaloSlaveSD.cc.

29  {
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 }

References LEDCalibrationChannels::depth, hits_, LogDebug, and name_.

◆ ReserveMemory()

void CaloSlaveSD::ReserveMemory ( unsigned int  size)
virtual

Definition at line 41 of file CaloSlaveSD.cc.

41  {
42  if (hits_.capacity() < size)
43  hits_.reserve(size);
44 }

References hits_, and findQualityFiles::size.

◆ type()

std::string CaloSlaveSD::type ( )
inline

Definition at line 29 of file CaloSlaveSD.h.

29 { return "calo"; }

Member Data Documentation

◆ hits_

Collection CaloSlaveSD::hits_
protected

Definition at line 36 of file CaloSlaveSD.h.

Referenced by begin(), Clean(), end(), format(), hits(), Initialize(), processHits(), and ReserveMemory().

◆ name_

std::string CaloSlaveSD::name_
private

Definition at line 39 of file CaloSlaveSD.h.

Referenced by Clean(), format(), Initialize(), name(), and processHits().

dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
CaloSlaveSD::Collection
std::vector< PCaloHit > Collection
Definition: CaloSlaveSD.h:18
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:223
PCaloHit
Definition: PCaloHit.h:8
CaloSlaveSD::hits_
Collection hits_
Definition: CaloSlaveSD.h:36
CaloSlaveSD::name_
std::string name_
Definition: CaloSlaveSD.h:39
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443