emcTowerContainer Class Reference
[Interfaces, Tower calibration, Tower clustering]

#include <emcTowerContainer.h>

Inherited by emcTowerContainerT< T >, emcTowerContainerv1, emcTowerContainerv2, and emcTowerContainerv3.

Inheritance diagram for emcTowerContainer:

Inheritance graph
[legend]
List of all members.

Detailed Description

(ABC) Container of emcTowerContent objects.

This is the object you'll find in DSTs, as far as EMCAL towers are concerned.

Basic usage is as follows :

void loop(const emcTowerContainer& tc)
{
  for ( size_t i = 0; i < lc.size(); ++lc ) 
  {
    emcTowerContent* onetower = lc->getTower(i);
    // use then onetower's emcTowerContent interface...
  }
}

Note:
Do not mix getTower(index) and findTower(towerid) methods.

Definition at line 38 of file emcTowerContainer.h.

Public Member Functions

virtual ~emcTowerContainer ()
virtual emcTowerContent * addTower (unsigned int)
 Add a new (using default ctor) tower.
virtual emcTowerContent * addTower (unsigned int, const emcTowerContent &)
 Add a new (using copy ctor) tower.
virtual unsigned int capacity (void) const
 the size you'll never exceed for this object.
virtual emcTowerContainer * clone (void) const
 Make a copy of this object.
virtual emcTowerContainer * create (void) const
 Make an empty copy of this object (i.e. copy only the type).
virtual emcTowerContent * findTower (int) const
 Return a given tower (or 0 if not found) by its towerid.
virtual emcTowerContent * getTower (unsigned int) const
 Return a given tower (or 0 if not found) by its index.
virtual void identify (std::ostream &os=std::cout) const
virtual int isValid () const
virtual void print (std::ostream &os=std::cout, int level=0) const
virtual bool removeTower (unsigned int)
virtual bool resize (unsigned int)
 Set a new size for this container. Old data are lost.
virtual void Reset ()
virtual unsigned int size (void) const
 the actual size of the object.

Protected Member Functions

emcTowerContainer & operator= (const emcTowerContainer &)
 This one is protected on purpose.

Private Member Functions

void warning (const char *method) const


Constructor & Destructor Documentation

virtual emcTowerContainer::~emcTowerContainer (   )  [virtual]
 


Member Function Documentation

virtual emcTowerContent* emcTowerContainer::addTower (  unsigned int  ,
const emcTowerContent & 
)  [inline, virtual]
 

Add a new (using copy ctor) tower.

t must be of a compatible type, otherwise this will return 0.

Reimplemented in emcTowerContainerT< T >, emcTowerContainerv1, emcTowerContainerv2, and emcTowerContainerv3.

Definition at line 50 of file emcTowerContainer.h.

References warning().

virtual emcTowerContent* emcTowerContainer::addTower (  unsigned int   )  [inline, virtual]
 

Add a new (using default ctor) tower.

Reimplemented in emcTowerContainerT< T >, emcTowerContainerv1, emcTowerContainerv2, and emcTowerContainerv3.

Definition at line 45 of file emcTowerContainer.h.

References warning().

Referenced by mEmcCalibratorModulev2::event(), mEmcCalibratorModulev1::event(), emcPatch::event(), and emcPacketProcessorv1::process().

virtual unsigned int emcTowerContainer::capacity (  void   )  const [inline, virtual]
 

the size you'll never exceed for this object.

Reimplemented in emcTowerContainerT< T >, emcTowerContainerv1, emcTowerContainerv2, and emcTowerContainerv3.

Definition at line 55 of file emcTowerContainer.h.

References warning().

virtual emcTowerContainer* emcTowerContainer::clone (  void   )  const [inline, virtual]
 

Make a copy of this object.

Reimplemented in emcTowerContainerT< T >, emcTowerContainerv1, emcTowerContainerv2, and emcTowerContainerv3.

Definition at line 59 of file emcTowerContainer.h.

References warning().

Referenced by mEmcReCalibratorModulev1::event(), and mEmcCalibratorModulev1::event().

virtual emcTowerContainer* emcTowerContainer::create (  void   )  const [inline, virtual]
 

Make an empty copy of this object (i.e. copy only the type).

Reimplemented in emcTowerContainerT< T >, emcTowerContainerv1, emcTowerContainerv2, and emcTowerContainerv3.

Definition at line 63 of file emcTowerContainer.h.

References warning().

Referenced by mEmcCalibratorModulev2::event().

virtual emcTowerContent* emcTowerContainer::findTower (  int   )  const [inline, virtual]
 

Return a given tower (or 0 if not found) by its towerid.

Reimplemented in emcTowerContainerT< T >, emcTowerContainerv1, emcTowerContainerv2, and emcTowerContainerv3.

Definition at line 67 of file emcTowerContainer.h.

References warning().

virtual emcTowerContent* emcTowerContainer::getTower (  unsigned int   )  const [inline, virtual]
 

Return a given tower (or 0 if not found) by its index.

Reimplemented in emcTowerContainerT< T >, emcTowerContainerv1, emcTowerContainerv2, and emcTowerContainerv3.

Definition at line 71 of file emcTowerContainer.h.

References warning().

Referenced by mEmcCalibratorModulev2::changeToF(), ClassImp(), mEmcTOFCorr6Module::event(), mEmcTOFCorr5Module::event(), mEmcReCalibratorModulev1::event(), mEmcMaskDeadTowers::event(), mEmcApplyQAToSimu::event(), and histogram().

virtual void emcTowerContainer::identify (  std::ostream &  os = std::cout  )  const [virtual]
 

Reimplemented in emcTowerContainerT< T >, emcTowerContainerv1, emcTowerContainerv2, and emcTowerContainerv3.

Referenced by process_event().

int emcTowerContainer::isValid (   )  const [virtual]
 

Reimplemented in emcTowerContainerT< T >, emcTowerContainerv1, emcTowerContainerv2, and emcTowerContainerv3.

Definition at line 23 of file emcTowerContainer.C.

Referenced by mEmcTOFCorr6Module::event(), mEmcTOFCorr5Module::event(), and mEmcClusterizerv0::event().

emcTowerContainer & emcTowerContainer::operator= (  const emcTowerContainer &   )  [protected]
 

This one is protected on purpose.

See e.g. Scott Meyers' More Effective C++ Item 33.

Definition at line 16 of file emcTowerContainer.C.

virtual void emcTowerContainer::print (  std::ostream &  os = std::cout,
int  level = 0
)  const [virtual]
 

Referenced by process_event().

virtual bool emcTowerContainer::removeTower (  unsigned int   )  [inline, virtual]
 

Reimplemented in emcTowerContainerT< T >, emcTowerContainerv1, emcTowerContainerv2, and emcTowerContainerv3.

Definition at line 80 of file emcTowerContainer.h.

References warning().

void emcTowerContainer::Reset (   )  [virtual]
 

Reimplemented in emcTowerContainerT< T >, emcTowerContainerv1, emcTowerContainerv2, and emcTowerContainerv3.

Definition at line 50 of file emcTowerContainer.C.

Referenced by mEmcCalibratorModulev2::event(), mEmcCalibratorModulev1::event(), and emcPatch::event().

virtual bool emcTowerContainer::resize (  unsigned int   )  [inline, virtual]
 

Set a new size for this container. Old data are lost.

Reimplemented in emcTowerContainerT< T >, emcTowerContainerv1, emcTowerContainerv2, and emcTowerContainerv3.

Definition at line 84 of file emcTowerContainer.h.

References warning().

virtual unsigned int emcTowerContainer::size (  void   )  const [inline, virtual]
 

the actual size of the object.

Reimplemented in emcTowerContainerT< T >, emcTowerContainerv1, emcTowerContainerv2, and emcTowerContainerv3.

Definition at line 91 of file emcTowerContainer.h.

References warning().

Referenced by mEmcCalibratorModulev2::changeToF(), mEmcTOFCorr6Module::event(), mEmcTOFCorr5Module::event(), mEmcReCalibratorModulev1::event(), mEmcMaskDeadTowers::event(), mEmcApplyQAToSimu::event(), histogram(), and emcPacketProcessorv1::process().

void emcTowerContainer::warning (  const char *  method  )  const [inline, private]
 

Definition at line 102 of file emcTowerContainer.h.

Referenced by addTower(), capacity(), clone(), create(), findTower(), getTower(), removeTower(), resize(), and size().


The documentation for this class was generated from the following files: