PAASS
Software suite to Acquire and Analyze Data from Pixie16
PixieInterface Class Reference

#include <PixieInterface.h>

Collaboration diagram for PixieInterface:

Data Structures

class  Histogram
 

Public Types

enum  BootFlags {
  BootComm = 0x01, BootTrigger = 0x02, BootSignal = 0x04, BootDSP = 0x08,
  DownloadParameters = 0x10, ProgramFPGA = 0x20, SetDAC = 0x40, BootAll = 0x7f
}
 
typedef uint32_t word_t
 
typedef uint16_t halfword_t
 
typedef word_t stats_t[STAT_SIZE]
 

Public Member Functions

 PixieInterface (const char *fn)
 
 ~PixieInterface ()
 
bool ReadConfigurationFile (const char *fn)
 
std::string ParseModuleTypeTag (std::string value)
 Parses the input from configuration file for the ModuleType tag. More...
 
bool GetSlots (const char *slotF=NULL)
 
bool Init (bool offlineMode=false)
 
bool Boot (int mode=0x7f, bool useWorkingSetFile=false)
 
bool WriteSglModPar (const char *name, word_t val, int mod)
 
bool WriteSglModPar (const char *name, word_t val, int mod, word_t &pval)
 
bool ReadSglModPar (const char *name, word_t &val, int mod)
 
void PrintSglModPar (const char *name, int mod)
 
void PrintSglModPar (const char *name, int mod, word_t prev)
 
bool WriteSglChanPar (const char *name, double val, int mod, int chan)
 
bool WriteSglChanPar (const char *name, double val, int mod, int chan, double &pval)
 
bool ReadSglChanPar (const char *name, double &val, int mod, int chan)
 
void PrintSglChanPar (const char *name, int mod, int chan)
 
void PrintSglChanPar (const char *name, int mod, int chan, double prev)
 
bool SaveDSPParameters (const char *fn=NULL)
 
bool AcquireTraces (int mod)
 
bool ReadSglChanTrace (unsigned short *buf, unsigned long sz, unsigned short mod, unsigned short chan)
 
bool GetStatistics (unsigned short mod)
 
stats_tGetStatisticsData (void)
 
double GetInputCountRate (int mod, int chan)
 
double GetOutputCountRate (int mod, int chan)
 
double GetLiveTime (int mod, int chan)
 
double GetRealTime (int mod)
 
double GetProcessedEvents (int mod)
 
bool GetModuleInfo (const unsigned short &mod, unsigned short *rev, unsigned int *serNum, unsigned short *adcBits, unsigned short *adcMsps)
 
bool StartHistogramRun (unsigned short mode=NEW_RUN)
 
bool StartHistogramRun (unsigned short mod, unsigned short mode)
 
bool StartListModeRun (unsigned short listMode=LIST_MODE_RUN, unsigned short runMode=NEW_RUN)
 
bool StartListModeRun (unsigned short mod, unsigned short listMode, unsigned short runMode)
 
bool CheckRunStatus (void)
 
bool CheckRunStatus (int mod)
 
unsigned long CheckFIFOWords (unsigned short mod)
 
bool ReadFIFOWords (word_t *buf, unsigned long nWords, unsigned short mod, bool verbose=false)
 
bool EndRun (void)
 
bool EndRun (int mod)
 
bool RemovePresetRunLength (int mod)
 
bool ReadHistogram (word_t *hist, unsigned long sz, unsigned short mod, unsigned short ch)
 
bool AdjustOffsets (unsigned short mod)
 
unsigned short GetNumberCards (void) const
 
short GetSlotNumber (int mod) const
 
bool ToggleGain (int mod, int chan)
 
bool ToggleGood (int mod, int chan)
 
bool TogglePolarity (int mod, int chan)
 
bool ToggleTraceCapture (int mod, int chan)
 

Static Public Member Functions

static size_t GetNumberChannels (void)
 
static size_t GetTraceLength (void)
 

Static Public Attributes

static const size_t STAT_SIZE = N_DSP_PAR - DSP_IO_BORDER
 
static const size_t HISTO_SIZE = MAX_HISTOGRAM_LENGTH
 

Private Member Functions

bool ToggleChannelBit (int mod, int chan, const char *parameter, int bit)
 
std::string ConfigFileName (const std::string &type, const std::string &str)
 Convert a configuration string to be relative to PixieBaseDir unless it begins with a . More...
 
bool CheckError (bool exitOnError=false) const
 

Private Attributes

std::map< std::string, std::map< std::string, std::string > > configStrings
 
bool doneInit
 
unsigned short numberCards
 
unsigned short slotMap [MAX_MODULES]
 
stats_t statistics
 
int retval
 
Lock lock
 
std::queue< word_textraWords [MAX_MODULES]
 
char tmpName [nameSize]
 

Static Private Attributes

static const size_t MAX_MODULES = 14
 
static const size_t CONFIG_LINE_LENGTH = 80
 
static const size_t TRACE_LENGTH = RANDOMINDICES_LENGTH
 
static std::set< std::string > validConfigKeys
 
static const size_t nameSize =120
 

Detailed Description

Definition at line 55 of file PixieInterface.h.

Member Typedef Documentation

§ halfword_t

typedef uint16_t PixieInterface::halfword_t

Definition at line 65 of file PixieInterface.h.

§ stats_t

typedef word_t PixieInterface::stats_t[STAT_SIZE]

Definition at line 67 of file PixieInterface.h.

§ word_t

typedef uint32_t PixieInterface::word_t

Definition at line 64 of file PixieInterface.h.

Member Enumeration Documentation

§ BootFlags

Enumerator
BootComm 
BootTrigger 
BootSignal 
BootDSP 
DownloadParameters 
ProgramFPGA 
SetDAC 
BootAll 

Definition at line 154 of file PixieInterface.h.

Constructor & Destructor Documentation

§ PixieInterface()

PixieInterface::PixieInterface ( const char *  fn)

Definition at line 99 of file PixieInterface.cpp.

Here is the call graph for this function:

§ ~PixieInterface()

PixieInterface::~PixieInterface ( )

Definition at line 133 of file PixieInterface.cpp.

Here is the call graph for this function:

Member Function Documentation

§ AcquireTraces()

bool PixieInterface::AcquireTraces ( int  mod)

Definition at line 604 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ AdjustOffsets()

bool PixieInterface::AdjustOffsets ( unsigned short  mod)

Definition at line 875 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ Boot()

bool PixieInterface::Boot ( int  mode = 0x7f,
bool  useWorkingSetFile = false 
)

Definition at line 369 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ CheckError()

bool PixieInterface::CheckError ( bool  exitOnError = false) const
private

Definition at line 994 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ CheckFIFOWords()

unsigned long PixieInterface::CheckFIFOWords ( unsigned short  mod)
Here is the caller graph for this function:

§ CheckRunStatus() [1/2]

bool PixieInterface::CheckRunStatus ( void  )

Definition at line 713 of file PixieInterface.cpp.

Here is the caller graph for this function:

§ CheckRunStatus() [2/2]

bool PixieInterface::CheckRunStatus ( int  mod)

Definition at line 723 of file PixieInterface.cpp.

Here is the call graph for this function:

§ ConfigFileName()

string PixieInterface::ConfigFileName ( const std::string &  type,
const std::string &  str 
)
private

Convert a configuration string to be relative to PixieBaseDir unless it begins with a .

Definition at line 973 of file PixieInterface.cpp.

Here is the caller graph for this function:

§ EndRun() [1/2]

bool PixieInterface::EndRun ( void  )

Definition at line 811 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ EndRun() [2/2]

bool PixieInterface::EndRun ( int  mod)

Definition at line 830 of file PixieInterface.cpp.

Here is the call graph for this function:

§ GetInputCountRate()

double PixieInterface::GetInputCountRate ( int  mod,
int  chan 
)

Definition at line 646 of file PixieInterface.cpp.

Here is the caller graph for this function:

§ GetLiveTime()

double PixieInterface::GetLiveTime ( int  mod,
int  chan 
)

Definition at line 656 of file PixieInterface.cpp.

Here is the caller graph for this function:

§ GetModuleInfo()

bool PixieInterface::GetModuleInfo ( const unsigned short &  mod,
unsigned short *  rev,
unsigned int *  serNum,
unsigned short *  adcBits,
unsigned short *  adcMsps 
)

Definition at line 1003 of file PixieInterface.cpp.

Here is the caller graph for this function:

§ GetNumberCards()

unsigned short PixieInterface::GetNumberCards ( void  ) const
inline

Definition at line 149 of file PixieInterface.h.

Here is the caller graph for this function:

§ GetNumberChannels()

static size_t PixieInterface::GetNumberChannels ( void  )
inlinestatic

Definition at line 150 of file PixieInterface.h.

Here is the caller graph for this function:

§ GetOutputCountRate()

double PixieInterface::GetOutputCountRate ( int  mod,
int  chan 
)

Definition at line 651 of file PixieInterface.cpp.

Here is the caller graph for this function:

§ GetProcessedEvents()

double PixieInterface::GetProcessedEvents ( int  mod)

Definition at line 666 of file PixieInterface.cpp.

Here is the caller graph for this function:

§ GetRealTime()

double PixieInterface::GetRealTime ( int  mod)

Definition at line 661 of file PixieInterface.cpp.

Here is the caller graph for this function:

§ GetSlotNumber()

short PixieInterface::GetSlotNumber ( int  mod) const
inline

Definition at line 153 of file PixieInterface.h.

Here is the caller graph for this function:

§ GetSlots()

bool PixieInterface::GetSlots ( const char *  slotF = NULL)

Definition at line 309 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ GetStatistics()

bool PixieInterface::GetStatistics ( unsigned short  mod)

Definition at line 634 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ GetStatisticsData()

stats_t& PixieInterface::GetStatisticsData ( void  )
inline

Definition at line 118 of file PixieInterface.h.

Here is the call graph for this function:

§ GetTraceLength()

static size_t PixieInterface::GetTraceLength ( void  )
inlinestatic

Definition at line 151 of file PixieInterface.h.

Here is the caller graph for this function:

§ Init()

bool PixieInterface::Init ( bool  offlineMode = false)

Definition at line 359 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ ParseModuleTypeTag()

std::string PixieInterface::ParseModuleTypeTag ( std::string  value)

Parses the input from configuration file for the ModuleType tag.

Definition at line 146 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ PrintSglChanPar() [1/2]

void PixieInterface::PrintSglChanPar ( const char *  name,
int  mod,
int  chan 
)

Definition at line 570 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ PrintSglChanPar() [2/2]

void PixieInterface::PrintSglChanPar ( const char *  name,
int  mod,
int  chan,
double  prev 
)

Definition at line 581 of file PixieInterface.cpp.

Here is the call graph for this function:

§ PrintSglModPar() [1/2]

void PixieInterface::PrintSglModPar ( const char *  name,
int  mod 
)

Definition at line 515 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ PrintSglModPar() [2/2]

void PixieInterface::PrintSglModPar ( const char *  name,
int  mod,
word_t  prev 
)

Definition at line 527 of file PixieInterface.cpp.

Here is the call graph for this function:

§ ReadConfigurationFile()

bool PixieInterface::ReadConfigurationFile ( const char *  fn)

Definition at line 209 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ ReadFIFOWords()

bool PixieInterface::ReadFIFOWords ( word_t buf,
unsigned long  nWords,
unsigned short  mod,
bool  verbose = false 
)
Here is the caller graph for this function:

§ ReadHistogram()

bool PixieInterface::ReadHistogram ( word_t hist,
unsigned long  sz,
unsigned short  mod,
unsigned short  ch 
)

Definition at line 858 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ ReadSglChanPar()

bool PixieInterface::ReadSglChanPar ( const char *  name,
double &  val,
int  mod,
int  chan 
)

Definition at line 558 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ ReadSglChanTrace()

bool PixieInterface::ReadSglChanTrace ( unsigned short *  buf,
unsigned long  sz,
unsigned short  mod,
unsigned short  chan 
)

Definition at line 616 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ ReadSglModPar()

bool PixieInterface::ReadSglModPar ( const char *  name,
word_t val,
int  mod 
)

Definition at line 503 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ RemovePresetRunLength()

bool PixieInterface::RemovePresetRunLength ( int  mod)

Definition at line 842 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ SaveDSPParameters()

bool PixieInterface::SaveDSPParameters ( const char *  fn = NULL)

Definition at line 592 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ StartHistogramRun() [1/2]

bool PixieInterface::StartHistogramRun ( unsigned short  mode = NEW_RUN)

Definition at line 671 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ StartHistogramRun() [2/2]

bool PixieInterface::StartHistogramRun ( unsigned short  mod,
unsigned short  mode 
)

Definition at line 679 of file PixieInterface.cpp.

Here is the call graph for this function:

§ StartListModeRun() [1/2]

bool PixieInterface::StartListModeRun ( unsigned short  listMode = LIST_MODE_RUN,
unsigned short  runMode = NEW_RUN 
)

Definition at line 690 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ StartListModeRun() [2/2]

bool PixieInterface::StartListModeRun ( unsigned short  mod,
unsigned short  listMode,
unsigned short  runMode 
)

Definition at line 699 of file PixieInterface.cpp.

Here is the call graph for this function:

§ ToggleChannelBit()

bool PixieInterface::ToggleChannelBit ( int  mod,
int  chan,
const char *  parameter,
int  bit 
)
private

Definition at line 961 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ ToggleGain()

bool PixieInterface::ToggleGain ( int  mod,
int  chan 
)

Handy functions for manipulating CSRA/B

Definition at line 883 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ ToggleGood()

bool PixieInterface::ToggleGood ( int  mod,
int  chan 
)

Definition at line 888 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ TogglePolarity()

bool PixieInterface::TogglePolarity ( int  mod,
int  chan 
)

Definition at line 893 of file PixieInterface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ ToggleTraceCapture()

bool PixieInterface::ToggleTraceCapture ( int  mod,
int  chan 
)
Here is the caller graph for this function:

§ WriteSglChanPar() [1/2]

bool PixieInterface::WriteSglChanPar ( const char *  name,
double  val,
int  mod,
int  chan 
)

Definition at line 539 of file PixieInterface.cpp.

Here is the caller graph for this function:

§ WriteSglChanPar() [2/2]

bool PixieInterface::WriteSglChanPar ( const char *  name,
double  val,
int  mod,
int  chan,
double &  pval 
)

Definition at line 545 of file PixieInterface.cpp.

Here is the call graph for this function:

§ WriteSglModPar() [1/2]

bool PixieInterface::WriteSglModPar ( const char *  name,
word_t  val,
int  mod 
)

Definition at line 484 of file PixieInterface.cpp.

Here is the caller graph for this function:

§ WriteSglModPar() [2/2]

bool PixieInterface::WriteSglModPar ( const char *  name,
word_t  val,
int  mod,
word_t pval 
)

Definition at line 490 of file PixieInterface.cpp.

Here is the call graph for this function:

Field Documentation

§ CONFIG_LINE_LENGTH

const size_t PixieInterface::CONFIG_LINE_LENGTH = 80
staticprivate

Definition at line 177 of file PixieInterface.h.

§ configStrings

std::map<std::string, std::map<std::string, std::string> > PixieInterface::configStrings
private

Definition at line 185 of file PixieInterface.h.

§ doneInit

bool PixieInterface::doneInit
private

Definition at line 187 of file PixieInterface.h.

§ extraWords

std::queue<word_t> PixieInterface::extraWords[MAX_MODULES]
private

Definition at line 202 of file PixieInterface.h.

§ HISTO_SIZE

const size_t PixieInterface::HISTO_SIZE = MAX_HISTOGRAM_LENGTH
static

Definition at line 59 of file PixieInterface.h.

§ lock

Lock PixieInterface::lock
private

Definition at line 200 of file PixieInterface.h.

§ MAX_MODULES

const size_t PixieInterface::MAX_MODULES = 14
staticprivate

Definition at line 176 of file PixieInterface.h.

§ nameSize

const size_t PixieInterface::nameSize =120
staticprivate

Definition at line 206 of file PixieInterface.h.

§ numberCards

unsigned short PixieInterface::numberCards
private

Definition at line 194 of file PixieInterface.h.

§ retval

int PixieInterface::retval
private

Definition at line 199 of file PixieInterface.h.

§ slotMap

unsigned short PixieInterface::slotMap[MAX_MODULES]
private

Definition at line 195 of file PixieInterface.h.

§ STAT_SIZE

const size_t PixieInterface::STAT_SIZE = N_DSP_PAR - DSP_IO_BORDER
static

Definition at line 58 of file PixieInterface.h.

§ statistics

stats_t PixieInterface::statistics
private

Definition at line 197 of file PixieInterface.h.

§ tmpName

char PixieInterface::tmpName[nameSize]
private

Definition at line 207 of file PixieInterface.h.

§ TRACE_LENGTH

const size_t PixieInterface::TRACE_LENGTH = RANDOMINDICES_LENGTH
staticprivate

Definition at line 178 of file PixieInterface.h.

§ validConfigKeys

set< string > PixieInterface::validConfigKeys
staticprivate

Definition at line 184 of file PixieInterface.h.


The documentation for this class was generated from the following files: