Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages

SctApi::ScanControlRODHisto Class Reference

Control a histogram on a ROD. More...

#include <SctApiHisto.h>

Inheritance diagram for SctApi::ScanControlRODHisto:

Inheritance graph
[legend]
Collaboration diagram for SctApi::ScanControlRODHisto:

Collaboration graph
[legend]

Public Types

typedef std::pair< std::pair<
int, int >, std::pair< int,
int > > 
TrapBuffers

Public Member Functions

 ScanControlRODHisto (SctApi &api, boost::shared_ptr< Scan > aScan, boost::shared_ptr< ScanEx > aScanEx)
void startHistogramming ()
 Check possible and start.

void initialisePolling ()
 Setup variables after starting histogramming?

void reportEventErrors ()
 Report on event errors found in slaves.

TrapBuffers getTrapBuffers (const RodLabel rlabel, int dsp)
 Return head and tail of iframe and xframe buffers.

unsigned int getProcTime (const RodLabel rlabel, int dsp)
 Return the processing time for the last trigger.

void dumpHistoStatus (const RodLabel label, int dsp)
 Report on status of histogramming and event traps.

void reportTimeout ()
 Report on progress at timeout.

void nextBin ()
 Move to the next bin (not necessary).

bool checkScanComplete (bool &progressMade, bool &newBin)
 Is the scan complete?

void abort ()
 Signal that the next checkScanComplete should return true.

virtual bool checkScanCompleteROD (const RodLabel &rodLabel, bool &progressMade, bool &newBin, int &totalBin)
 Is this ROD scan complete?

void finishHistogram (bool success)
 Tidy up, read out and save histogram.

std::pair< RodLabel, unsigned
int > 
findModuleSlave (unsigned int mid)

Protected Member Functions

unsigned int getEventCounter (const RodLabel &rodLabel, int slave, bool fromMaster)
 Find the event counter on the ROD.

void readHistograms ()
 Read all module's histogram data.

scan_result_ptrs readHistogramData (UINT32 mid, int frame=0)
 Read histogram data.

char * readHistogramRawData (UINT32 mid, int frame=0)
void postScanModuleSetup ()
 Restore modules after scanning.

unsigned long * getHistogramChunk (RodLabel label, int slave, unsigned long offset, unsigned long size)
 This caches the result from sendData and allows indexing each bin individually.

unsigned long * getEventCountChunk (RodLabel label, int slave)
 Provides cache of data which will be the same for all modules.

bool checkDebugOption (int opt)
bool findNextSection ()

Protected Attributes

std::map< RodLabel, int > lastBin
std::map< RodLabel, int > lastEvent
std::map< RodLabel, bool > reportedFinished
boost::shared_ptr< Scan > scan
boost::shared_ptr< ScanExscanEx
int finalBin
int finalTrigger
int sectionStartBin
int sectionEndBin
int sectionEndTrigger
time_t scanStart
bool aborting

Detailed Description

Control a histogram on a ROD.

Definition at line 201 of file SctApiHisto.h.


Member Function Documentation

void SctApi::ScanControlRODHisto::abort  )  [virtual]
 

Signal that the next checkScanComplete should return true.

Implements SctApi::ScanControl.

Definition at line 2409 of file SctApiHisto.cxx.

bool SctApi::ScanControlRODHisto::checkScanComplete bool &  progressMade,
bool &  newBin
[virtual]
 

Is the scan complete?

Implements SctApi::ScanControl.

Definition at line 2355 of file SctApiHisto.cxx.

References checkScanCompleteROD().

Here is the call graph for this function:

bool SctApi::ScanControlRODHisto::checkScanCompleteROD const RodLabel &  rodLabel,
bool &  progressMade,
bool &  newBin,
int &  totalBin
[virtual]
 

Is this ROD scan complete?

Reimplemented in SctApi::ScanControlTIMHisto.

Definition at line 2449 of file SctApiHisto.cxx.

References SctApi::RodScanEx::bitFieldDSP, SctApi::RodScanEx::firstSlave, and getEventCounter().

Referenced by checkScanComplete().

Here is the call graph for this function:

void SctApi::ScanControlRODHisto::dumpHistoStatus const RodLabel  label,
int  dsp
 

Report on status of histogramming and event traps.

Definition at line 2822 of file SctApiHisto.cxx.

Referenced by SctApi::ScanControlAsyncHisto::nextBin(), and SctApi::ScanControlTIMHisto::nextBin().

void SctApi::ScanControlRODHisto::finishHistogram bool  success  )  [virtual]
 

Tidy up, read out and save histogram.

Implements SctApi::ScanControl.

Reimplemented in SctApi::ScanControlTIMHisto, and SctApi::ScanControlAsyncHisto.

Definition at line 2595 of file SctApiHisto.cxx.

References SctApi::RodScanEx::bitFieldDSP, postScanModuleSetup(), readHistograms(), and SctApi::useCCode().

Here is the call graph for this function:

unsigned long * SctApi::ScanControlRODHisto::getEventCountChunk RodLabel  label,
int  slave
[protected]
 

Provides cache of data which will be the same for all modules.

Definition at line 2120 of file SctApiHisto.cxx.

Referenced by readHistogramData().

unsigned int SctApi::ScanControlRODHisto::getEventCounter const RodLabel &  rodLabel,
int  slave,
bool  fromMaster
[protected]
 

Find the event counter on the ROD.

Parameters:
rodLabel Which ROD to read from
slave Which slave counter to read
fromMaster If true use the 16 bit copy, otherwise get 32bit from slave

Definition at line 2414 of file SctApiHisto.cxx.

Referenced by checkScanCompleteROD().

unsigned long * SctApi::ScanControlRODHisto::getHistogramChunk RodLabel  label,
int  slave,
unsigned long  offset,
unsigned long  size
[protected]
 

This caches the result from sendData and allows indexing each bin individually.

Definition at line 2066 of file SctApiHisto.cxx.

unsigned int SctApi::ScanControlRODHisto::getProcTime const RodLabel  rlabel,
int  dsp
 

Return the processing time for the last trigger.

Definition at line 2751 of file SctApiHisto.cxx.

Referenced by SctApi::ScanControlTIMHisto::nextBin().

ScanControlRODHisto::TrapBuffers SctApi::ScanControlRODHisto::getTrapBuffers const RodLabel  rlabel,
int  dsp
 

Return head and tail of iframe and xframe buffers.

Definition at line 2784 of file SctApiHisto.cxx.

Referenced by SctApi::ScanControlTIMHisto::nextBin().

void SctApi::ScanControlRODHisto::initialisePolling  )  [virtual]
 

Setup variables after starting histogramming?

Implements SctApi::ScanControl.

Definition at line 2180 of file SctApiHisto.cxx.

void SctApi::ScanControlRODHisto::nextBin  )  [virtual]
 

Move to the next bin (not necessary).

Implements SctApi::ScanControl.

Reimplemented in SctApi::ScanControlTIMHisto, and SctApi::ScanControlAsyncHisto.

Definition at line 2274 of file SctApiHisto.cxx.

void SctApi::ScanControlRODHisto::postScanModuleSetup  )  [protected]
 

Restore modules after scanning.

Definition at line 2739 of file SctApiHisto.cxx.

Referenced by finishHistogram().

scan_result_ptrs SctApi::ScanControlRODHisto::readHistogramData UINT32  mid,
int  frame = 0
[protected]
 

Read histogram data.

Definition at line 1352 of file SctApiHisto.cxx.

References ScanHeader::config, scan_result_ptrs::data, ScanHeader::dataType, ScanHeader::endTime, getEventCountChunk(), scan_result_ptrs::header, ScanHeader::length, ScanHeader::moduleName, scan_result_ptrs::nErrorEvents, scan_result_ptrs::nEvents, ScanHeader::npoints, ScanHeader::pntData, ScanHeader::pntErrors, ScanHeader::pntEvents, ScanHeader::pntPoints, scan_result_ptrs::points, ScanHeader::runNumber, ScanHeader::scanNumber, ScanHeader::scanType, ScanHeader::size, ScanHeader::startTime, ScanHeader::version, and ScanHeader::width.

Referenced by readHistograms().

Here is the call graph for this function:

void SctApi::ScanControlRODHisto::readHistograms  )  [protected]
 

Read all module's histogram data.

Definition at line 1225 of file SctApiHisto.cxx.

References scan_result_ptrs::data, scan_result_ptrs::header, scan_result_ptrs::nErrorEvents, scan_result_ptrs::nEvents, scan_result_ptrs::points, readHistogramData(), SctApi::readHistogramToFile(), SctApi::readHistogramToIS(), and ScanHeader::scanNumber.

Referenced by finishHistogram().

Here is the call graph for this function:

void SctApi::ScanControlRODHisto::reportEventErrors  )  [virtual]
 

Report on event errors found in slaves.

Implements SctApi::ScanControl.

Definition at line 2747 of file SctApiHisto.cxx.

void SctApi::ScanControlRODHisto::reportTimeout  )  [virtual]
 

Report on progress at timeout.

Implements SctApi::ScanControl.

Definition at line 2221 of file SctApiHisto.cxx.

void SctApi::ScanControlRODHisto::startHistogramming  )  [virtual]
 

Check possible and start.

Implements SctApi::ScanControl.

Reimplemented in SctApi::ScanControlTIMHisto, and SctApi::ScanControlAsyncHisto.

Definition at line 1867 of file SctApiHisto.cxx.

References SctApi::useCCode().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Thu Dec 15 21:16:46 2005 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5