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 15 of file CaloSlaveSD.h.

Member Typedef Documentation

◆ Collection

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

Definition at line 17 of file CaloSlaveSD.h.

◆ const_iterator

typedef Collection::const_iterator CaloSlaveSD::const_iterator

Definition at line 19 of file CaloSlaveSD.h.

◆ iterator

typedef Collection::iterator CaloSlaveSD::iterator

Definition at line 18 of file CaloSlaveSD.h.

Constructor & Destructor Documentation

◆ CaloSlaveSD()

CaloSlaveSD::CaloSlaveSD ( std::string  n)

Definition at line 14 of file CaloSlaveSD.cc.

References LogDebug, and create_idmaps::n.

14  : name_(n) {
15  LogDebug("HitBuildInfo") << "CaloSlaveSD Called with name " << n << "\n";
16 }
std::string name_
Definition: CaloSlaveSD.h:38
#define LogDebug(id)

◆ ~CaloSlaveSD()

CaloSlaveSD::~CaloSlaveSD ( )
virtual

Definition at line 18 of file CaloSlaveSD.cc.

18 {}

Member Function Documentation

◆ begin()

virtual const_iterator CaloSlaveSD::begin ( void  )
inlinevirtual

Definition at line 29 of file CaloSlaveSD.h.

References hits_.

29 { return hits_.begin(); }
Collection hits_
Definition: CaloSlaveSD.h:35

◆ Clean()

void CaloSlaveSD::Clean ( )
virtual

Definition at line 37 of file CaloSlaveSD.cc.

References hits_, LogDebug, and name_.

37  {
38  LogDebug("HitBuildIndo") << "CaloSlaveSD " << name_ << " cleaning the collection";
39  Collection().swap(hits_);
40 }
Collection hits_
Definition: CaloSlaveSD.h:35
std::string name_
Definition: CaloSlaveSD.h:38
std::vector< PCaloHit > Collection
Definition: CaloSlaveSD.h:17
#define LogDebug(id)

◆ end()

virtual const_iterator CaloSlaveSD::end ( void  )
inlinevirtual

Definition at line 30 of file CaloSlaveSD.h.

References hits_.

30 { return hits_.end(); }
Collection hits_
Definition: CaloSlaveSD.h:35

◆ format()

bool CaloSlaveSD::format ( )
virtual

Definition at line 25 of file CaloSlaveSD.cc.

References hits_, LogDebug, and name_.

25  {
26  LogDebug("HitBuildInfo") << " CaloSlaveSD " << name_ << "formatting " << hits_.size() << " hits.";
27  return true;
28 }
Collection hits_
Definition: CaloSlaveSD.h:35
std::string name_
Definition: CaloSlaveSD.h:38
#define LogDebug(id)

◆ hits()

Collection& CaloSlaveSD::hits ( void  )
inline

Definition at line 27 of file CaloSlaveSD.h.

References hits_.

27 { return hits_; }
Collection hits_
Definition: CaloSlaveSD.h:35

◆ Initialize()

void CaloSlaveSD::Initialize ( )
virtual

Definition at line 20 of file CaloSlaveSD.cc.

References hits_, LogDebug, and name_.

20  {
21  LogDebug("HitBuildInfo") << " initialize CaloSlaveSD " << name_ << "\n";
22  hits_.clear();
23 }
Collection hits_
Definition: CaloSlaveSD.h:35
std::string name_
Definition: CaloSlaveSD.h:38
#define LogDebug(id)

◆ name()

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

Definition at line 24 of file CaloSlaveSD.h.

References name_.

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

24 { return name_; }
std::string name_
Definition: CaloSlaveSD.h:38

◆ processHits()

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

Definition at line 30 of file CaloSlaveSD.cc.

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

30  {
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 }
Collection hits_
Definition: CaloSlaveSD.h:35
std::string name_
Definition: CaloSlaveSD.h:38
#define LogDebug(id)

◆ ReserveMemory()

void CaloSlaveSD::ReserveMemory ( unsigned int  size)
virtual

Definition at line 42 of file CaloSlaveSD.cc.

References hits_, and findQualityFiles::size.

42  {
43  if (hits_.capacity() < size)
44  hits_.reserve(size);
45 }
size
Write out results.
Collection hits_
Definition: CaloSlaveSD.h:35

◆ type()

std::string CaloSlaveSD::type ( )
inline

Definition at line 28 of file CaloSlaveSD.h.

28 { return "calo"; }

Member Data Documentation

◆ hits_

Collection CaloSlaveSD::hits_
protected

Definition at line 35 of file CaloSlaveSD.h.

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

◆ name_

std::string CaloSlaveSD::name_
private

Definition at line 38 of file CaloSlaveSD.h.

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