CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
CastorElectronicsSim Class Reference

#include <CastorElectronicsSim.h>

Public Member Functions

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

Private Member Functions

template<class Digi >
void convert (CaloSamples &frame, Digi &result, CLHEP::HepRandomEngine *)
 

Private Attributes

CastorAmplifiertheAmplifier
 
const CastorCoderFactorytheCoderFactory
 
int theStartingCapId
 

Detailed Description

Definition at line 19 of file CastorElectronicsSim.h.

Constructor & Destructor Documentation

◆ CastorElectronicsSim()

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

Definition at line 8 of file CastorElectronicsSim.cc.

9  : theAmplifier(amplifier), theCoderFactory(coderFactory), theStartingCapId(0) {}

◆ ~CastorElectronicsSim()

CastorElectronicsSim::~CastorElectronicsSim ( )

Definition at line 11 of file CastorElectronicsSim.cc.

11 {}

Member Function Documentation

◆ analogToDigital()

void CastorElectronicsSim::analogToDigital ( CLHEP::HepRandomEngine *  engine,
CaloSamples linearFrame,
CastorDataFrame result 
)

Definition at line 20 of file CastorElectronicsSim.cc.

20  {
21  convert<CastorDataFrame>(lf, result, engine);
22 }

References mps_fire::result.

◆ convert()

template<class Digi >
void CastorElectronicsSim::convert ( CaloSamples frame,
Digi &  result,
CLHEP::HepRandomEngine *  engine 
)
private

◆ newEvent()

void CastorElectronicsSim::newEvent ( CLHEP::HepRandomEngine *  engine)

Things that need to be initialized every event.

Definition at line 24 of file CastorElectronicsSim.cc.

24  {
25  // pick a new starting Capacitor ID
26  theStartingCapId = CLHEP::RandFlat::shootInt(engine, 4);
28 }

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

Member Data Documentation

◆ theAmplifier

CastorAmplifier* CastorElectronicsSim::theAmplifier
private

Definition at line 33 of file CastorElectronicsSim.h.

Referenced by convert(), and newEvent().

◆ theCoderFactory

const CastorCoderFactory* CastorElectronicsSim::theCoderFactory
private

Definition at line 34 of file CastorElectronicsSim.h.

Referenced by convert().

◆ theStartingCapId

int CastorElectronicsSim::theStartingCapId
private

Definition at line 36 of file CastorElectronicsSim.h.

Referenced by convert(), and newEvent().

CastorElectronicsSim::theAmplifier
CastorAmplifier * theAmplifier
Definition: CastorElectronicsSim.h:33
CastorElectronicsSim::theCoderFactory
const CastorCoderFactory * theCoderFactory
Definition: CastorElectronicsSim.h:34
CastorCoderFactory::coder
std::unique_ptr< CastorCoder > coder(const DetId &detId) const
user gets control of the pointer
Definition: CastorCoderFactory.cc:7
CastorElectronicsSim::theStartingCapId
int theStartingCapId
Definition: CastorElectronicsSim.h:36
CastorAmplifier::setStartingCapId
void setStartingCapId(int capId)
Definition: CastorAmplifier.h:23
CastorAmplifier::amplify
virtual void amplify(CaloSamples &linearFrame, CLHEP::HepRandomEngine *) const
Definition: CastorAmplifier.cc:19
amptDefault_cfi.frame
frame
Definition: amptDefault_cfi.py:12
mps_fire.result
result
Definition: mps_fire.py:303