CMS 3D CMS Logo

Public Types | Public Member Functions | Protected Attributes | Private Attributes

CaloSlaveSD Class Reference

#include <CaloSlaveSD.h>

List of all members.

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

typedef Collection::const_iterator CaloSlaveSD::const_iterator

Definition at line 21 of file CaloSlaveSD.h.

typedef Collection::iterator CaloSlaveSD::iterator

Definition at line 20 of file CaloSlaveSD.h.


Constructor & Destructor Documentation

CaloSlaveSD::CaloSlaveSD ( std::string  n)

Definition at line 13 of file CaloSlaveSD.cc.

References LogDebug.

                                    : name_(n) {

  LogDebug("HitBuildInfo") << "CaloSlaveSD Called with name " << n << "\n";

}
CaloSlaveSD::~CaloSlaveSD ( ) [virtual]

Definition at line 19 of file CaloSlaveSD.cc.

{}

Member Function Documentation

virtual const_iterator CaloSlaveSD::begin ( void  ) [inline, virtual]

Definition at line 31 of file CaloSlaveSD.h.

References hits_.

{ return hits_.begin();}
void CaloSlaveSD::Clean ( ) [virtual]

Definition at line 43 of file CaloSlaveSD.cc.

References hits_, LogDebug, and name_.

Referenced by CaloSD::fillHits().

                        {

  LogDebug("HitBuildIndo") << "CaloSlaveSD " << name_ << " cleaning the collection";
  Collection().swap(hits_);

}
virtual const_iterator CaloSlaveSD::end ( void  ) [inline, virtual]

Definition at line 32 of file CaloSlaveSD.h.

References hits_.

{ return hits_.end();}
bool CaloSlaveSD::format ( ) [virtual]

Definition at line 27 of file CaloSlaveSD.cc.

References hits_, LogDebug, and name_.

                         {

  LogDebug("HitBuildInfo") << " CaloSlaveSD " << name_ << "formatting " 
                           << hits_.size() << " hits.";
  return true;
}
Collection& CaloSlaveSD::hits ( ) [inline]

Definition at line 29 of file CaloSlaveSD.h.

References hits_.

Referenced by CaloSD::fillHits().

{ return hits_; }
void CaloSlaveSD::Initialize ( ) [virtual]

Definition at line 21 of file CaloSlaveSD.cc.

References hits_, LogDebug, and name_.

Referenced by CaloSD::clearHits().

                             {

  LogDebug("HitBuildInfo") << " initialize CaloSlaveSD "<< name_ << "\n";
  hits_.clear();
}
std::string CaloSlaveSD::name ( void  ) const [inline]

Definition at line 26 of file CaloSlaveSD.h.

References name_.

Referenced by CaloSD::fillHits().

{ return name_; } 
bool CaloSlaveSD::processHits ( uint32_t  unitID,
double  eDepEM,
double  eDepHad,
double  tSlice,
int  tkID,
uint16_t  depth = 0 
) [virtual]

Definition at line 34 of file CaloSlaveSD.cc.

References hits_, LogDebug, and name_.

Referenced by CaloSD::saveHit().

                                                                       {
  
  PCaloHit aCal = PCaloHit (unitID, eDepEM, eDepHad, tSlice, tkID, depth);
  LogDebug("HitBuildInfo") <<" Sent Hit " << aCal << " to ROU " << name_;
  hits_.push_back(aCal);
  return true;
} 
void CaloSlaveSD::ReserveMemory ( unsigned int  size) [virtual]

Definition at line 50 of file CaloSlaveSD.cc.

References hits_, and findQualityFiles::size.

Referenced by CaloSD::update().

                                                 {
  
  if ( hits_.capacity() < size ) hits_.reserve(size);

}
std::string CaloSlaveSD::type ( ) [inline]

Definition at line 30 of file CaloSlaveSD.h.

{ return "calo"; }

Member Data Documentation

Definition at line 37 of file CaloSlaveSD.h.

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

std::string CaloSlaveSD::name_ [private]

Definition at line 40 of file CaloSlaveSD.h.

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