CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RawCache.h
Go to the documentation of this file.
1 //
3 // RawCache.h
4 // -------
5 //
6 // Backup for RawMsgBuf messages containing raw FED data.
7 //
8 // Created on: Nov 16, 2011
9 // Andrei Spataru : aspataru@cern.ch
11 
12 #ifndef RAWCACHE_H_
13 #define RAWCACHE_H_
14 
16 
17 namespace evf {
18 
28 class RawCache {
29 public:
30 
34  static RawCache* getInstance();
35 
40  void initialise(unsigned int nMsgs, unsigned int cellSize);
41  virtual ~RawCache();
42 
48 
52  void releaseMsg(unsigned int fuResourceId);
53 
57  void printUsage() const;
58 
59 private:
61  RawCache();
62  int getFreeSlot() const;
63  void setFree(RawMsgBuf* rawCell);
64 
65 private:
68  unsigned int nMsgs_, cellSize_;
69  bool* slotUsage_;
70 };
71 
72 }
73 
74 #endif /* RAWCACHE_H_ */
bool * slotUsage_
Definition: RawCache.h:69
virtual ~RawCache()
Definition: RawCache.cc:56
RawMsgBuf * getMsgToWrite()
Definition: RawCache.cc:61
static RawCache * getInstance()
Definition: RawCache.cc:25
bool initialised_
Definition: RawCache.h:66
RawMsgBuf ** msgs_
Definition: RawCache.h:67
void printUsage() const
Definition: RawCache.cc:117
void releaseMsg(unsigned int fuResourceId)
Definition: RawCache.cc:77
void initialise(unsigned int nMsgs, unsigned int cellSize)
Definition: RawCache.cc:32
void setFree(RawMsgBuf *rawCell)
Definition: RawCache.cc:106
int getFreeSlot() const
Definition: RawCache.cc:99
unsigned int cellSize_
Definition: RawCache.h:68
unsigned int nMsgs_
Definition: RawCache.h:68
static RawCache * instance_
Definition: RawCache.h:60