pit_def.h File Reference

#include <vector>
#include <string>

Go to the source code of this file.

Defines

#define FILE_IN   "file_in.txt"
#define FILE_OUT   "file_out.txt"
#define DB_FILE_IN   "db_in.dat"
#define DB_FILE_OUT   "db_out.dat"
#define SUCCESS   0
#define FAILURE   1
#define ERROR_PHYSMEM_OPEN   -2
#define ERROR_PHYSMEM_TOOHIGH   -8
#define ERROR_PROTOCOL_DTSW   -16
#define ERROR_PROTOCOL_DATALENGTH   -32
#define ERROR_BAD_LENGTH_COMPARISON   -128
#define ERROR_BAD_REGISTER_WRITE   -256
#define ERROR_GENERIC_BUS_STATUS   -512
#define ERROR_PARITY_CHECK   -513
#define ERROR_BAD_DATABASE_ACCESS   -1024
#define NUMBER_HALF_STAVES   120
#define NUMBER_OPTIN   10
#define NUMBER_OPTICAL_LINKS   12
#define NUMBER_FO_CHANNELS   10
#define NUMBER_SIDES   2
#define NUMBER_SECTORS   10
#define NUMBER_HALF_STAVES_SECTOR   6
#define RORC_REVISION   -1
#define RORC_SERIAL   0
#define RORC_CHANNEL   1
#define PIT_GET_RDA_LSB   0x7fe00
#define PIT_GET_RDA_MSB   0x7fe01
#define PIT_GET_WRA_LSB   0x7fc00
#define PIT_GET_WRA_MSB   0x7fc01
#define PIT_GET_LEN   0x7f000
#define PIT_GET_RD_LEN   0x7e000
#define PIT_GET_WR_LEN   0x7e800
#define PIT_GET_CONTROL0   0xa
#define PIT_GET_CONTROL1   0x10b
#define PIT_GET_VERSION   0x0
#define PIT_GET_BUS_STATUS   0x4

Typedefs

typedef unsigned long int UInt32
typedef unsigned int UInt12
typedef unsigned int UInt28
typedef unsigned int UInt19
typedef unsigned int UInt8

Enumerations

enum  t_sideCoord { A, C }

Functions

UInt32 extractFromUInt32 (int offset, int bits, UInt32 input)
 global function to extract a certain number of bits from a 32 bit number used by the driver classes to do the bitwise operations
UInt32 insertIntoUInt32 (int offset, int bits, UInt32 data, UInt32 input)
 global function to replace a certain number of bits of a 32 bit number
void sleepMilli (long ms)
 function to sleep milli seconds
void sleepNano (long ns)
 gunction to sleep nano seconds
vector< string > strsplit (const string &inputStr, char separator=' ')


Define Documentation

#define DB_FILE_IN   "db_in.dat"

Definition at line 10 of file pit_def.h.

#define DB_FILE_OUT   "db_out.dat"

Definition at line 11 of file pit_def.h.

#define ERROR_BAD_DATABASE_ACCESS   -1024

Definition at line 23 of file pit_def.h.

#define ERROR_BAD_LENGTH_COMPARISON   -128

Definition at line 19 of file pit_def.h.

Referenced by pit_comm::PITReadBlock(), and pit_comm::PITWriteBlock().

#define ERROR_BAD_REGISTER_WRITE   -256

Definition at line 20 of file pit_def.h.

Referenced by pit_comm::PITDecodeComError(), pit_comm::PITSetControl0(), pit_comm::PITSetControl1(), pit_comm::PITSetLen(), pit_comm::PITSetRdA(), and pit_comm::PITSetWrA().

#define ERROR_GENERIC_BUS_STATUS   -512

Definition at line 21 of file pit_def.h.

Referenced by pit_comm::PITDecodeComError(), and pit_comm::PITReadBlock().

#define ERROR_PARITY_CHECK   -513

Definition at line 22 of file pit_def.h.

Referenced by pit_comm::PITDecodeComError(), and pit_comm::PITReadBlock().

#define ERROR_PHYSMEM_OPEN   -2

Definition at line 15 of file pit_def.h.

#define ERROR_PHYSMEM_TOOHIGH   -8

Definition at line 16 of file pit_def.h.

#define ERROR_PROTOCOL_DATALENGTH   -32

Definition at line 18 of file pit_def.h.

Referenced by pit_comm::PITDecodeComError().

#define ERROR_PROTOCOL_DTSW   -16

Definition at line 17 of file pit_def.h.

#define FAILURE   1

Definition at line 14 of file pit_def.h.

Referenced by pit_comm::pit_comm(), pit_comm::PITCheckCommStatus(), and pit_comm::PITDecodeRORCError().

#define FILE_IN   "file_in.txt"

Definition at line 8 of file pit_def.h.

#define FILE_OUT   "file_out.txt"

Definition at line 9 of file pit_def.h.

#define NUMBER_FO_CHANNELS   10

Definition at line 28 of file pit_def.h.

Referenced by pit_configuration::getFastorRequired(), pit_driver_opticalLink::getFoChannel(), pit_driver_opticalLink::pit_driver_opticalLink(), pit_driver_foChannel::readCounter(), pit_driver_procFpga::readTriggerMode(), pit_driver_opticalLink::refresh(), pit_configuration::setDefaultRequiredChannels(), pit_configuration::setRequired(), pit_driver_procFpga::writeTriggerMode(), and pit_driver_opticalLink::~pit_driver_opticalLink().

#define NUMBER_HALF_STAVES   120

Definition at line 25 of file pit_def.h.

Referenced by pit_configuration::openRequiredChannelsFile().

#define NUMBER_HALF_STAVES_SECTOR   6

Definition at line 32 of file pit_def.h.

Referenced by pit_configuration::dumpRequiredLinksToFile(), pit_configuration::getBoardNumber(), pit_configuration::getLinkNumber(), pit_configuration::printPitCoordinateTable(), and pit_configuration::setCoordinate().

#define NUMBER_OPTICAL_LINKS   12

Definition at line 27 of file pit_def.h.

Referenced by pit_configuration::dumpCoordinateTableToFile(), pit_configuration::getFastorRequired(), pit_driver_optinBoard::getOpticalLink(), pit_configuration::openCoordinateTableFile(), pit_driver_optinBoard::pit_driver_optinBoard(), pit_configuration::printRequiredChannelList(), pit_configuration::printSpdCoordinateTable(), pit_configuration::setCoordinate(), pit_configuration::setDefaultCoordinates(), pit_configuration::setDefaultRequiredChannels(), pit_configuration::setRequired(), simulate_values(), and pit_driver_optinBoard::~pit_driver_optinBoard().

#define NUMBER_OPTIN   10

Definition at line 26 of file pit_def.h.

Referenced by pit_configuration::dumpCoordinateTableToFile(), pit_configuration::getFastorRequired(), pit_driver::getOptinBoard(), pit_driver::pit_driver(), pit_configuration::printRequiredChannelList(), pit_configuration::printSpdCoordinateTable(), pit_driver_procFpga::readCounter(), pit_driver_procFpga::readCounterInGroup(), pit_driver_procFpga::readMaxCounter(), pit_driver_procFpga::readMinCountert(), pit_driver_procFpga::readRandomPeriod(), pit_driver_procFpga::readSettingRegister(), pit_driver_procFpga::readSignature(), pit_driver_procFpga::readStatusRegister(), pit_driver::refresh(), pit_configuration::setCoordinate(), pit_configuration::setDefaultCoordinates(), pit_configuration::setDefaultRequiredChannels(), pit_configuration::setRequired(), pit_driver_procFpga::writeCounter(), pit_driver_procFpga::writeMaxCounter(), pit_driver_procFpga::writeMinCounter(), pit_driver_procFpga::writeRandomPeriod(), pit_driver_procFpga::writeSettingRegister(), pit_driver_procFpga::writeSignature(), and pit_driver::~pit_driver().

#define NUMBER_SECTORS   10

Definition at line 31 of file pit_def.h.

Referenced by pit_configuration::dumpRequiredLinksToFile(), pit_configuration::getBoardNumber(), pit_configuration::getLinkNumber(), pit_configuration::printPitCoordinateTable(), and pit_configuration::setCoordinate().

#define NUMBER_SIDES   2

Definition at line 30 of file pit_def.h.

Referenced by pit_configuration::dumpRequiredLinksToFile(), and pit_configuration::setCoordinate().

#define PIT_GET_BUS_STATUS   0x4

Definition at line 50 of file pit_def.h.

Referenced by pit_comm::PITGetBusStatus().

#define PIT_GET_CONTROL0   0xa

Definition at line 47 of file pit_def.h.

Referenced by pit_comm::PITGetControl0(), and pit_comm::PITSetControl0().

#define PIT_GET_CONTROL1   0x10b

Definition at line 48 of file pit_def.h.

Referenced by pit_comm::PITGetControl1(), and pit_comm::PITSetControl1().

#define PIT_GET_LEN   0x7f000

Definition at line 44 of file pit_def.h.

Referenced by pit_comm::PITGetLen(), and pit_comm::PITSetLen().

#define PIT_GET_RD_LEN   0x7e000

Definition at line 45 of file pit_def.h.

Referenced by pit_comm::PITGetRdLen().

#define PIT_GET_RDA_LSB   0x7fe00

Definition at line 40 of file pit_def.h.

Referenced by pit_comm::PITGetRdA().

#define PIT_GET_RDA_MSB   0x7fe01

Definition at line 41 of file pit_def.h.

Referenced by pit_comm::PITGetRdA(), and pit_comm::PITSetRdA().

#define PIT_GET_VERSION   0x0

Definition at line 49 of file pit_def.h.

Referenced by pit_comm::PITCheckCommStatus(), and pit_comm::PITGetVersion().

#define PIT_GET_WR_LEN   0x7e800

Definition at line 46 of file pit_def.h.

Referenced by pit_comm::PITGetWrLen().

#define PIT_GET_WRA_LSB   0x7fc00

Definition at line 42 of file pit_def.h.

Referenced by pit_comm::PITGetWrA().

#define PIT_GET_WRA_MSB   0x7fc01

Definition at line 43 of file pit_def.h.

Referenced by pit_comm::PITGetWrA(), and pit_comm::PITSetWrA().

#define RORC_CHANNEL   1

Definition at line 38 of file pit_def.h.

Referenced by pit_comm::pit_comm().

#define RORC_REVISION   -1

Definition at line 36 of file pit_def.h.

Referenced by pit_comm::pit_comm().

#define RORC_SERIAL   0

Definition at line 37 of file pit_def.h.

Referenced by pit_comm::pit_comm().

#define SUCCESS   0

Definition at line 13 of file pit_def.h.

Referenced by pit_comm::PITCheckCommStatus(), and pit_comm::PITDecodeRORCError().


Typedef Documentation

typedef unsigned int UInt12

Definition at line 56 of file pit_def.h.

typedef unsigned int UInt19

Definition at line 58 of file pit_def.h.

typedef unsigned int UInt28

Definition at line 57 of file pit_def.h.

typedef unsigned long int UInt32

Definition at line 55 of file pit_def.h.

typedef unsigned int UInt8

Definition at line 59 of file pit_def.h.


Enumeration Type Documentation

enum t_sideCoord

Enumerator:
A 
C 

Definition at line 61 of file pit_def.h.


Function Documentation

UInt32 extractFromUInt32 ( int  offset,
int  bits,
UInt32  input 
)

global function to extract a certain number of bits from a 32 bit number used by the driver classes to do the bitwise operations

Parameters:
offset is the offset of the bits that we want to extract

Definition at line 15 of file pit_def.cpp.

Referenced by pit_driver_opticalLink::decodeLinkSetting(), pit_driver_opticalLink::decodeLinkStatus(), pit_comm::PITReadBlock(), pit_driver_procFpga::readTriggerMode(), and pit_driver_foChannel::refresh().

UInt32 insertIntoUInt32 ( int  offset,
int  bits,
UInt32  data,
UInt32  input 
)

global function to replace a certain number of bits of a 32 bit number

Parameters:
offset determines where to insert
bits the number of bits
data the value to inser
input the 32 bit register where to insert returns the input with the data inserted

Definition at line 32 of file pit_def.cpp.

Referenced by pit_driver_foChannel::forceHigh(), pit_driver_foChannel::setMask(), pit_driver_opticalLink::writeEnUdFastors(), pit_driver_opticalLink::writeFoMask(), pit_driver_opticalLink::writeLinkDelay(), pit_driver_opticalLink::writeSelfMaskingEnable(), pit_driver_procFpga::writeTriggerMode(), and pit_driver_opticalLink::writeUdfFoPattern().

void sleepMilli ( long  ms  ) 

function to sleep milli seconds

Definition at line 62 of file pit_def.cpp.

Referenced by main().

void sleepNano ( long  ns  ) 

gunction to sleep nano seconds

Definition at line 69 of file pit_def.cpp.

vector<string> strsplit ( const string &  inputStr,
char  separator = ' ' 
)

Definition at line 75 of file pit_def.cpp.


Generated on Sat Mar 29 22:55:55 2008 for pixelTrigger by  doxygen 1.5.0