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

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

Definition at line 18 of file CaloSlaveSD.h.

typedef Collection::const_iterator CaloSlaveSD::const_iterator

Definition at line 20 of file CaloSlaveSD.h.

typedef Collection::iterator CaloSlaveSD::iterator

Definition at line 19 of file CaloSlaveSD.h.

Constructor & Destructor Documentation

CaloSlaveSD::CaloSlaveSD ( std::string  n)

Definition at line 13 of file CaloSlaveSD.cc.

References LogDebug.

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

Definition at line 17 of file CaloSlaveSD.cc.

17 {}

Member Function Documentation

virtual const_iterator CaloSlaveSD::begin ( void  )
inlinevirtual

Definition at line 30 of file CaloSlaveSD.h.

References hits_.

30 { return hits_.begin(); }
Collection hits_
Definition: CaloSlaveSD.h:36
void CaloSlaveSD::Clean ( )
virtual

Definition at line 36 of file CaloSlaveSD.cc.

References hits_, LogDebug, and name_.

Referenced by end().

36  {
37  LogDebug("HitBuildIndo") << "CaloSlaveSD " << name_ << " cleaning the collection";
38  Collection().swap(hits_);
39 }
#define LogDebug(id)
Collection hits_
Definition: CaloSlaveSD.h:36
std::string name_
Definition: CaloSlaveSD.h:39
std::vector< PCaloHit > Collection
Definition: CaloSlaveSD.h:18
virtual const_iterator CaloSlaveSD::end ( void  )
inlinevirtual

Definition at line 31 of file CaloSlaveSD.h.

References Clean(), hits_, ReserveMemory(), and findQualityFiles::size.

31 { return hits_.end(); }
Collection hits_
Definition: CaloSlaveSD.h:36
bool CaloSlaveSD::format ( )
virtual

Definition at line 24 of file CaloSlaveSD.cc.

References hits_, LogDebug, and name_.

Referenced by name().

24  {
25  LogDebug("HitBuildInfo") << " CaloSlaveSD " << name_ << "formatting " << hits_.size() << " hits.";
26  return true;
27 }
#define LogDebug(id)
Collection hits_
Definition: CaloSlaveSD.h:36
std::string name_
Definition: CaloSlaveSD.h:39
Collection& CaloSlaveSD::hits ( void  )
inline

Definition at line 28 of file CaloSlaveSD.h.

References hits_.

28 { return hits_; }
Collection hits_
Definition: CaloSlaveSD.h:36
void CaloSlaveSD::Initialize ( )
virtual

Definition at line 19 of file CaloSlaveSD.cc.

References hits_, LogDebug, and name_.

19  {
20  LogDebug("HitBuildInfo") << " initialize CaloSlaveSD " << name_ << "\n";
21  hits_.clear();
22 }
#define LogDebug(id)
Collection hits_
Definition: CaloSlaveSD.h:36
std::string name_
Definition: CaloSlaveSD.h:39
std::string CaloSlaveSD::name ( void  ) const
inline

Definition at line 25 of file CaloSlaveSD.h.

References egammaForCoreTracking_cff::depth, format(), name_, and processHits().

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

25 { return name_; }
std::string name_
Definition: CaloSlaveSD.h:39
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.

References hits_, LogDebug, and name_.

Referenced by name().

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 }
#define LogDebug(id)
Collection hits_
Definition: CaloSlaveSD.h:36
std::string name_
Definition: CaloSlaveSD.h:39
void CaloSlaveSD::ReserveMemory ( unsigned int  size)
virtual

Definition at line 41 of file CaloSlaveSD.cc.

References hits_, and findQualityFiles::size.

Referenced by end().

41  {
42  if (hits_.capacity() < size)
43  hits_.reserve(size);
44 }
size
Write out results.
Collection hits_
Definition: CaloSlaveSD.h:36
std::string CaloSlaveSD::type ( )
inline

Definition at line 29 of file CaloSlaveSD.h.

29 { return "calo"; }

Member Data Documentation

Collection CaloSlaveSD::hits_
protected

Definition at line 36 of file CaloSlaveSD.h.

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

std::string CaloSlaveSD::name_
private

Definition at line 39 of file CaloSlaveSD.h.

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