CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PhiMemoryImage.h
Go to the documentation of this file.
1 #ifndef __PHIMEMORYIMAGE_
2 #define __PHIMEMORYIMAGE_
3 
5 
6  public:
7 
8  typedef unsigned long int value_type;
10 
11  static const int STATIONS = 4; // number of stations;
12  static const int UNITS = 2; // number of value_types per station
13  static const int TOTAL_UNITS = UNITS * STATIONS;
14 
15 
19 
20  PhiMemoryImage (int z,int o,int tw, int th,int fo, int fi, int si,int se){
21  _buffer[0] = z;_buffer[1] = o;_buffer[2] = tw;_buffer[3] = th;_buffer[4] = fo;_buffer[5] = fi;_buffer[6] = si;_buffer[7] = se;
22  }
23 
26 
27  void SetBit (int station, int bitNumber, bool value = true);
28  bool GetBit (int station, int bitNumber) const;
29 
30  void BitShift (int nBits); // nBits > 0 executes << nbits, nBits <0 is >> nBits
31  void Print();
32 
33  void SetBuff(int chunk, int value){_buffer[chunk] = value;}
34 
35  void printbuff();
36 
37  // const PhiMemoryImage::value_type & operator [] (int index) const
38 // {return _buffer[index];}
39 
41  {return _buffer[index];}
42 
43 
44  private:
45 
48 
49 };
50 
51 #endif
void CopyFromBuffer(PhiMemoryImage::value_ptr rhs, int offset)
functions///
void SetBit(int station, int bitNumber, bool value=true)
static const int STATIONS
void BitShift(int nBits)
static const int UNITS
PhiMemoryImage::value_type & operator[](int index)
PhiMemoryImage(int z, int o, int tw, int th, int fo, int fi, int si, int se)
void SetBuff(int chunk, int value)
bool GetBit(int station, int bitNumber) const
PhiMemoryImage()
constructors///
PhiMemoryImage::value_type _buffer[PhiMemoryImage::TOTAL_UNITS]
unsigned long int value_type
Definition: PhiMemoryImage.h:8
PhiMemoryImage::value_type * value_ptr
Definition: PhiMemoryImage.h:9
static const int TOTAL_UNITS