SimElectronics Class Reference

#include <SimElectronics.h>

Inheritance diagram for SimElectronics:
SimQieElectronics SimVaElectronics SimQiePerfectElectronics SimVaTimedElectronics

List of all members.

Public Member Functions

 SimElectronics (VldContext context, TRandom *random=NULL)
virtual ~SimElectronics (void)
void SetRandom (TRandom *random)
UInt_t GetNumberOfDigits (void)
SimDigitListGetDigits (void)
SimDigitGetDigit (int i)
void AddDigit (SimDigit &dig)
void AddSignal (DigiSignal *s)
virtual void Reset (const VldContext &newContext)
virtual void ReadoutDetector (SimPmtList &)
virtual Int_t GetDigitsAfterFETrigger () const
virtual Float_t GetAdcsAfterFETrigger () const
virtual Int_t GetDigitsAfterSpars () const
virtual Float_t GetAdcsAfterSpars () const
virtual void Print (Option_t *option="") const
virtual void Config (Registry &config)

Protected Member Functions

virtual void AddDigitsAfterFETrigger (Int_t in)
 Random number generator.
virtual void AddAdcsAfterFETrigger (Float_t in)
virtual void AddDigitsAfterSpars (Int_t in)
virtual void AddAdcsAfterSpars (Float_t in)

Protected Attributes

VldContext fContext
TRandom * fRandom

Private Member Functions

 ClassDef (SimElectronics, 1)

Private Attributes

SimDigitList fDigits
std::vector< DigiSignal * > fSignals
Int_t fDigitsAfterFETrigger
Int_t fDigitsAfterSpars
Float_t fAdcsAfterFETrigger
Float_t fAdcsAfterSpars

Detailed Description

Definition at line 28 of file SimElectronics.h.


Constructor & Destructor Documentation

SimElectronics::SimElectronics ( VldContext  context,
TRandom *  random = NULL 
)

Definition at line 8 of file SimElectronics.cxx.

00009   : fContext(context),
00010     fRandom(random)
00011 {
00012   if(random == NULL) fRandom = gRandom;
00013   this->Reset(context);
00014 }

virtual SimElectronics::~SimElectronics ( void   )  [inline, virtual]

Definition at line 32 of file SimElectronics.h.

00032 {};


Member Function Documentation

virtual void SimElectronics::AddAdcsAfterFETrigger ( Float_t  in  )  [inline, protected, virtual]
virtual void SimElectronics::AddAdcsAfterSpars ( Float_t  in  )  [inline, protected, virtual]
void SimElectronics::AddDigit ( SimDigit dig  ) 

Definition at line 41 of file SimElectronics.cxx.

References SimDigit::AsString(), fDigits, Msg::kVerbose, and MSG.

Referenced by SimVaElectronics::ReadoutPmt(), SimQieElectronics::ReadoutPmt(), and SimVaTimedElectronics::ReadoutPmt().

00042 {
00043   fDigits.push_back(digit); 
00044   MSG("DetSim",Msg::kVerbose) 
00045     << "SimElectronics read out digit: " 
00046     << digit.AsString() << std::endl;;
00047 }

virtual void SimElectronics::AddDigitsAfterFETrigger ( Int_t  in  )  [inline, protected, virtual]

Random number generator.

Definition at line 66 of file SimElectronics.h.

References fDigitsAfterFETrigger.

Referenced by SimVaElectronics::ReadoutPmt(), SimQieElectronics::ReadoutPmt(), and SimVaTimedElectronics::ReadoutPmt().

00066 { fDigitsAfterFETrigger+=in; };

virtual void SimElectronics::AddDigitsAfterSpars ( Int_t  in  )  [inline, protected, virtual]
void SimElectronics::AddSignal ( DigiSignal s  )  [inline]

Definition at line 41 of file SimElectronics.h.

References fSignals.

Referenced by SimVaElectronics::ReadoutPmt(), SimQieElectronics::ReadoutPmt(), and SimVaTimedElectronics::ReadoutPmt().

00041 { fSignals.push_back(s); };

SimElectronics::ClassDef ( SimElectronics  ,
 
) [private]
void SimElectronics::Config ( Registry config  )  [virtual]

Reimplemented in SimQieElectronics, SimVaElectronics, and SimVaTimedElectronics.

Definition at line 70 of file SimElectronics.cxx.

Referenced by SimDetector::Config().

00071 {
00072   // Modify the configuration.
00073   //
00074   // Use this method to set static members with the class configuration.
00075 }

virtual Float_t SimElectronics::GetAdcsAfterFETrigger (  )  const [inline, virtual]

Definition at line 50 of file SimElectronics.h.

References fAdcsAfterFETrigger.

00050 { return fAdcsAfterFETrigger; };

virtual Float_t SimElectronics::GetAdcsAfterSpars (  )  const [inline, virtual]

Definition at line 52 of file SimElectronics.h.

References fAdcsAfterSpars.

Referenced by SimDetector::CompileStats().

00052 { return fAdcsAfterSpars; };

SimDigit& SimElectronics::GetDigit ( int  i  )  [inline]

Definition at line 39 of file SimElectronics.h.

References fDigits.

00039 { return fDigits[i]; };

SimDigitList& SimElectronics::GetDigits ( void   )  [inline]

Definition at line 38 of file SimElectronics.h.

References fDigits.

Referenced by SimDetector::SimulateElectronics().

00038 { return fDigits; };

virtual Int_t SimElectronics::GetDigitsAfterFETrigger (  )  const [inline, virtual]

Definition at line 49 of file SimElectronics.h.

References fDigitsAfterFETrigger.

Referenced by SimDetector::CompileStats().

00049 { return fDigitsAfterFETrigger; };

virtual Int_t SimElectronics::GetDigitsAfterSpars (  )  const [inline, virtual]

Definition at line 51 of file SimElectronics.h.

References fDigitsAfterSpars.

Referenced by SimDetector::CompileStats().

00051 { return fDigitsAfterSpars; };

UInt_t SimElectronics::GetNumberOfDigits ( void   )  [inline]

Definition at line 37 of file SimElectronics.h.

References fDigits.

00037 { return fDigits.size(); };

void SimElectronics::Print ( Option_t *  option = ""  )  const [virtual]

Reimplemented in SimQieElectronics, SimQiePerfectElectronics, SimVaElectronics, and SimVaTimedElectronics.

Definition at line 64 of file SimElectronics.cxx.

Referenced by SimDetector::Print().

00065 {
00066   printf("  SimElectronics: Dummy Electronics.\n");
00067 }

void SimElectronics::ReadoutDetector ( SimPmtList  )  [virtual]

Reimplemented in SimQieElectronics, SimVaElectronics, and SimVaTimedElectronics.

Definition at line 49 of file SimElectronics.cxx.

References Msg::kError, and MSG.

Referenced by SimDetector::SimulateElectronics().

00050 {
00051   // Read out the detector. 
00052   // It is the Electronics job to read out only those 
00053   // PMTs which are wired to the electronics type in question
00054   // (for mixed cases like CalDet).
00055   // Results are SimDigits: to enter a valid SimDigit,
00056   // use SimElectronics::AddDigit(digit);
00057 
00058   MSG("DetSim",Msg::kError) << "Error: SimElectronics() is a base class."
00059                             << " Detector is not being read out! " << endl;
00060 }

void SimElectronics::Reset ( const VldContext newContext  )  [virtual]

Reimplemented in SimQieElectronics.

Definition at line 23 of file SimElectronics.cxx.

References fAdcsAfterFETrigger, fAdcsAfterSpars, fContext, fDigits, fDigitsAfterFETrigger, fDigitsAfterSpars, and fSignals.

Referenced by SimDetector::Reset().

00024 {
00025   // Do anything that needs doing to reset the electronics
00026   // between events.
00027   // This also should activate the update of any database tables
00028   // that the class uses.
00029 
00030   fContext = context;
00031   fDigits.clear();
00032   for(UInt_t i = 0; i<fSignals.size(); i++) delete fSignals[i];
00033   fSignals.clear();
00034 
00035   fDigitsAfterFETrigger = 0;
00036   fDigitsAfterSpars = 0;
00037   fAdcsAfterFETrigger = 0;
00038   fAdcsAfterSpars = 0;
00039 }

void SimElectronics::SetRandom ( TRandom *  random  ) 

Definition at line 17 of file SimElectronics.cxx.

References fRandom.

00018 {
00019   if(random) fRandom = random;
00020   else fRandom = gRandom;
00021 }


Member Data Documentation

Definition at line 77 of file SimElectronics.h.

Referenced by AddAdcsAfterFETrigger(), GetAdcsAfterFETrigger(), and Reset().

Definition at line 78 of file SimElectronics.h.

Referenced by GetAdcsAfterSpars(), and Reset().

Definition at line 69 of file SimElectronics.h.

Referenced by AddDigit(), GetDigit(), GetDigits(), GetNumberOfDigits(), and Reset().

Definition at line 75 of file SimElectronics.h.

Referenced by AddDigitsAfterFETrigger(), GetDigitsAfterFETrigger(), and Reset().

Definition at line 76 of file SimElectronics.h.

Referenced by AddDigitsAfterSpars(), GetDigitsAfterSpars(), and Reset().

TRandom* SimElectronics::fRandom [protected]
std::vector<DigiSignal*> SimElectronics::fSignals [private]

Definition at line 73 of file SimElectronics.h.

Referenced by AddSignal(), and Reset().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1