Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CacheBuffer.h

Go to the documentation of this file.
00001 
00015 #ifndef _CACHE_BUFFER_H_
00016 #define _CACHE_BUFFER_H_
00017 
00018 #include <map>
00019 #include <iostream>
00020 #include <TObject.h>
00021 
00022 using std::map;
00023 using std::ostream;
00024 using std::cout;
00025 using std::endl;
00026 
00027 class CacheBuffer : public TObject
00028 {
00029 public:
00030 
00031   friend class Cache;
00032   friend ostream & operator << (ostream & stream, const CacheBuffer & buffer);
00033   
00034 private:
00035 
00036   CacheBuffer();
00037   CacheBuffer(unsigned int autoclear_limit);
00038   ~CacheBuffer();
00039   
00040   void   AddToCache (double e, double  de_dx);
00041   bool   Retrieve   (double e, double& de_dx) const;
00042   void   ClearCache (void);
00043   void   Print      (const Option_t *) const;
00044 
00045   map<double, double>             fCache;
00046   map<double, double>::size_type  fCacheSize;
00047   unsigned int                    fAutoclearLimit;
00048   
00049   ClassDef(CacheBuffer, 1)
00050 };
00051 
00052 #endif  // _CACHE_BUFFER_H_

Generated on Mon Feb 15 11:06:26 2010 for loon by  doxygen 1.3.9.1