CMS 3D CMS Logo

Public Member Functions | Private Member Functions | Private Attributes

CastorElectronicsSim Class Reference

#include <CastorElectronicsSim.h>

List of all members.

Public Member Functions

void analogToDigital (CaloSamples &linearFrame, CastorDataFrame &result)
 CastorElectronicsSim (CastorAmplifier *amplifier, const CastorCoderFactory *coderFactory)
void newEvent ()
 Things that need to be initialized every event.
void setRandomEngine (CLHEP::HepRandomEngine &engine)
 ~CastorElectronicsSim ()

Private Member Functions

template<class Digi >
void convert (CaloSamples &frame, Digi &result)

Private Attributes

CastorAmplifiertheAmplifier
const CastorCoderFactorytheCoderFactory
CLHEP::RandFlat * theRandFlat
int theStartingCapId

Detailed Description

Definition at line 16 of file CastorElectronicsSim.h.


Constructor & Destructor Documentation

CastorElectronicsSim::CastorElectronicsSim ( CastorAmplifier amplifier,
const CastorCoderFactory coderFactory 
)

Definition at line 9 of file CastorElectronicsSim.cc.

  : theAmplifier(amplifier),
    theCoderFactory(coderFactory),
    theRandFlat(0),
    theStartingCapId(0)
{
}
CastorElectronicsSim::~CastorElectronicsSim ( )

Definition at line 18 of file CastorElectronicsSim.cc.

References theRandFlat.

{
  delete theRandFlat;
}

Member Function Documentation

void CastorElectronicsSim::analogToDigital ( CaloSamples linearFrame,
CastorDataFrame result 
)

Definition at line 37 of file CastorElectronicsSim.cc.

References query::result.

                                                                                     {
  convert<CastorDataFrame>(lf, result);
}
template<class Digi >
void CastorElectronicsSim::convert ( CaloSamples frame,
Digi &  result 
) [private]
void CastorElectronicsSim::newEvent ( )

Things that need to be initialized every event.

Definition at line 41 of file CastorElectronicsSim.cc.

References CastorAmplifier::setStartingCapId(), theAmplifier, theRandFlat, and theStartingCapId.

                                    {
  // pick a new starting Capacitor ID
  theStartingCapId = theRandFlat->fireInt(4);
  theAmplifier->setStartingCapId(theStartingCapId);
}
void CastorElectronicsSim::setRandomEngine ( CLHEP::HepRandomEngine &  engine)

Definition at line 24 of file CastorElectronicsSim.cc.

References theRandFlat.

Referenced by CastorDigiProducer::CastorDigiProducer().

{
  theRandFlat = new CLHEP::RandFlat(engine);
}

Member Data Documentation

Definition at line 32 of file CastorElectronicsSim.h.

Referenced by convert(), and newEvent().

Definition at line 33 of file CastorElectronicsSim.h.

Referenced by convert().

CLHEP::RandFlat* CastorElectronicsSim::theRandFlat [private]

Definition at line 34 of file CastorElectronicsSim.h.

Referenced by newEvent(), setRandomEngine(), and ~CastorElectronicsSim().

Definition at line 36 of file CastorElectronicsSim.h.

Referenced by convert(), and newEvent().