test
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 = 3; // number of value_types per station
13  static const int TOTAL_UNITS = UNITS * STATIONS;
14 
15 
19 
21  _buffer[0] = s1a;_buffer[1] = s1b;_buffer[2] = s1c;_buffer[3] = s2a;_buffer[4] = s2b;_buffer[5] = s2c;_buffer[6] = s3a;_buffer[7] = s3b;_buffer[8] = s3c;_buffer[9] = s4a;_buffer[10] = s4b;_buffer[11] = s4c;
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)
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