CMS 3D CMS Logo

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 = 3; // number of value_types per station
13  static const int TOTAL_UNITS = UNITS * STATIONS;
14 
15 
19 
20  PhiMemoryImage (value_type s1a,value_type s1b,value_type s1c,
21  value_type s2a, value_type s2b, value_type s2c,
22  value_type s3a, value_type s3b, value_type s3c,
23  value_type s4a,value_type s4b, value_type s4c){
24  _buffer[0] = s1a;_buffer[1] = s1b;_buffer[2] = s1c;
25  _buffer[3] = s2a;_buffer[4] = s2b;_buffer[5] = s2c;
26  _buffer[6] = s3a;_buffer[7] = s3b;_buffer[8] = s3c;
27  _buffer[9] = s4a;_buffer[10] = s4b;_buffer[11] = s4c;
28  }
29 
32 
33  void SetBit (int station, int bitNumber, bool value = true);
34  bool GetBit (int station, int bitNumber) const;
35 
36  void BitShift (int nBits); // nBits > 0 executes << nbits, nBits <0 is >> nBits
37  void Print();
38 
39  void SetBuff(int chunk, int value){_buffer[chunk] = value;}
40 
41  void printbuff();
42 
43  // const PhiMemoryImage::value_type & operator [] (int index) const
44  // {return _buffer[index];}
45 
47  {return _buffer[index];}
48 
49 
50  private:
51 
54 
55 };
56 
57 #endif
void CopyFromBuffer(PhiMemoryImage::value_ptr rhs, int offset)
functions///
void SetBit(int station, int bitNumber, bool value=true)
static const int STATIONS
Definition: value.py:1
void BitShift(int nBits)
PhiMemoryImage(value_type s1a, value_type s1b, value_type s1c, value_type s2a, value_type s2b, value_type s2c, value_type s3a, value_type s3b, value_type s3c, value_type s4a, value_type s4b, value_type s4c)
static const int UNITS
PhiMemoryImage::value_type & operator[](int index)
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