ModelSelector Class Reference

#include <ModelSelector.h>

List of all members.

Public Member Functions

 ModelSelector ()
 ~ModelSelector ()
void SetModel (Process::Process_t proc, Model::Model_t model)
Model::Model_t GetModel (Process::Process_t proc) const

Private Attributes

map< int, int > fModelSelector

Friends

ostream & operator<< (ostream &stream, const ModelSelector &model)

Detailed Description

________________________________________________________________________________________

Id
ModelSelector.cxx,v 1.1 2004/01/05 16:11:13 costas Exp

________________________________________________________________________________________

Id
ModelSelector.h,v 1.1 2004/01/05 16:11:13 costas Exp

Definition at line 28 of file ModelSelector.h.


Constructor & Destructor Documentation

ModelSelector::ModelSelector (  ) 

Definition at line 32 of file ModelSelector.cxx.

References Model::eBetheBloch, Model::eBezrukovBugaev, Process::eBremsstrahlung, Process::eIonization, Model::eKokoulinPetrukhin, Process::eNuclearInteraction, Process::ePairProduction, Model::ePetrukhinShestakov, and fModelSelector.

00033 {
00034   typedef map<int, int>::value_type proc_model;
00035 
00036   fModelSelector.insert(proc_model( (int) Process::eIonization,
00037                                                         (int) Model::eBetheBloch) );
00038   fModelSelector.insert(proc_model( (int) Process::eBremsstrahlung,
00039                                                 (int) Model::ePetrukhinShestakov) );
00040   fModelSelector.insert(proc_model( (int) Process::ePairProduction,
00041                                                  (int) Model::eKokoulinPetrukhin) );
00042   fModelSelector.insert(proc_model( (int) Process::eNuclearInteraction,
00043                                                     (int) Model::eBezrukovBugaev) );
00044 
00045 }

ModelSelector::~ModelSelector (  ) 

Definition at line 47 of file ModelSelector.cxx.

00048 {
00049   
00050 }


Member Function Documentation

Model::Model_t ModelSelector::GetModel ( Process::Process_t  proc  )  const

Definition at line 57 of file ModelSelector.cxx.

References Model::eNone, and fModelSelector.

00058 {
00059   if( fModelSelector.count( (int) proc ) == 1) {
00060      map<int, int>::const_iterator iter = fModelSelector.find((int)proc);
00061      int model = iter->second;
00062      return (Model::Model_t) model;
00063   }
00064   return Model::eNone;
00065 }

void ModelSelector::SetModel ( Process::Process_t  proc,
Model::Model_t  model 
)

Definition at line 52 of file ModelSelector.cxx.

References fModelSelector.

00053 {
00054   fModelSelector.insert( map<int, int>::value_type((int) proc, (int) model) );
00055 }  


Friends And Related Function Documentation

ostream& operator<< ( ostream &  stream,
const ModelSelector model 
) [friend]

Member Data Documentation

map<int, int> ModelSelector::fModelSelector [private]

Definition at line 42 of file ModelSelector.h.

Referenced by GetModel(), ModelSelector(), and SetModel().


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

Generated on 2 Nov 2017 for loon by  doxygen 1.6.1