#include <Cache.h>
Public Member Functions | |
| Cache () | |
| Cache (unsigned int autoclear_limit) | |
| ~Cache () | |
| void | AddToCache (Process::Process_t prs, double e, double de_dx) |
| bool | Retrieve (Process::Process_t prs, double e, double &de_dx) const |
| void | ClearCache (void) |
| void | Print (const Option_t *opt) const |
Private Attributes | |
| map< int, CacheBuffer * > | fCache |
Friends | |
| ostream & | operator<< (ostream &stream, const Cache &cache) |
________________________________________________________________________________________
Costas Andreopoulos <C.V.Andreopoulos@rl.ac.uk> CCLRC, Rutherford Lab. December 10, 2003 _________________________________________________________________________________________
Definition at line 26 of file Cache.h.
|
|
Definition at line 31 of file Cache.cxx. References fCache. 00032 {
00033 typedef map<int, CacheBuffer *>::value_type cache_pair;
00034
00035 fCache.insert( cache_pair( (int) Process::eIonization, new CacheBuffer ) );
00036 fCache.insert( cache_pair( (int) Process::eBremsstrahlung, new CacheBuffer ) );
00037 fCache.insert( cache_pair( (int) Process::ePairProduction, new CacheBuffer ) );
00038 fCache.insert( cache_pair( (int) Process::eNuclearInteraction, new CacheBuffer ) );
00039 }
|
|
|
Definition at line 41 of file Cache.cxx. References fCache. 00042 {
00043 typedef map<int, CacheBuffer *>::value_type cache_pair;
00044
00045 fCache.insert(cache_pair((int) Process::eIonization, new CacheBuffer(autoclear)));
00046 fCache.insert(cache_pair((int) Process::eBremsstrahlung, new CacheBuffer(autoclear)));
00047 fCache.insert(cache_pair((int) Process::ePairProduction, new CacheBuffer(autoclear)));
00048 fCache.insert(cache_pair((int) Process::eNuclearInteraction, new CacheBuffer(autoclear)));
00049 }
|
|
|
Definition at line 51 of file Cache.cxx. References fCache. 00052 {
00053 map<int, CacheBuffer *>::iterator buf_iter;
00054 for(buf_iter = fCache.begin(); buf_iter != fCache.end(); ++buf_iter)
00055 delete buf_iter->second;
00056 fCache.clear();
00057 }
|
|
||||||||||||||||
|
Definition at line 59 of file Cache.cxx. References fCache. Referenced by MuEnergyLoss::dE_dx(). 00060 {
00061 map<int, CacheBuffer *>::iterator iter = fCache.find( (int) prs );
00062
00063 iter->second->AddToCache(e, de_dx);
00064 }
|
|
|
Definition at line 73 of file Cache.cxx. References fCache. 00074 {
00075 map<int, CacheBuffer *>::iterator buf_iter;
00076 for(buf_iter = fCache.begin(); buf_iter != fCache.end(); ++buf_iter)
00077 buf_iter->second->ClearCache();
00078 }
|
|
|
Definition at line 80 of file Cache.cxx. 00081 {
00082 cout << *this;
00083 }
|
|
||||||||||||||||
|
Definition at line 66 of file Cache.cxx. References fCache. Referenced by MuEnergyLoss::dE_dx(). 00067 {
00068 map<int, CacheBuffer *>::const_iterator iter = fCache.find( (int) prs );
00069
00070 return iter->second->Retrieve(e, de_dx);
00071 }
|
|
||||||||||||
|
Definition at line 20 of file Cache.cxx. 00021 {
00022 map<int, CacheBuffer *>::const_iterator buf_iter;
00023 for(buf_iter = cache.fCache.begin(); buf_iter != cache.fCache.end(); ++buf_iter) {
00024 stream << "**** " << Process::AsString( (Process::Process_t) buf_iter->first) << endl;
00025 stream << *(buf_iter->second);
00026 }
00027 stream << endl;
00028 return stream;
00029 }
|
|
|
Definition at line 43 of file Cache.h. Referenced by AddToCache(), Cache(), ClearCache(), Retrieve(), and ~Cache(). |
1.3.9.1