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

#include <scope.hpp>

Inheritance diagram for scopeScanner:
Collaboration diagram for scopeScanner:

Public Member Functions

 scopeScanner (int mod=0, int chan=0)
 Default constructor. More...
 
 ~scopeScanner ()
 Destructor. More...
 
int GetDelay ()
 Set the time delay between traces (in seconds). More...
 
size_t GetNumEvents ()
 Return the maximum number of events to store. More...
 
void SetDelay (int delay)
 Set the number of seconds to wait between drawing of traces. More...
 
void SetNumEvents (size_t num_)
 Set the maximum number of events to store. More...
 
void StopACQ ()
 Stop the run. More...
 
void StartACQ ()
 Star the run. More...
 
virtual bool ExtraCommands (const std::string &cmd_, std::vector< std::string > &args_)
 
virtual void ExtraArguments ()
 
virtual void CmdHelp (const std::string &prefix_="")
 
virtual void ArgHelp ()
 
virtual void SyntaxStr (char *name_)
 
virtual bool Initialize (std::string prefix_="")
 
virtual void FinalInitialization ()
 
virtual bool InitRootOutput (std::string fname_, bool overwrite_=true)
 
virtual void Notify (const std::string &code_="")
 
virtual UnpackerGetCore ()
 
virtual bool AddEvent (XiaData *event_)
 
virtual bool ProcessEvents ()
 
void ClearEvents ()
 
- Public Member Functions inherited from RootScanner
 RootScanner ()
 
 ~RootScanner ()
 
TCanvas * GetCanvas ()
 
void IdleTask ()
 
void UpdateZoom (TVirtualPad *pad=gPad)
 
void ResetZoom (TVirtualPad *pad=gPad)
 
- Public Member Functions inherited from ScanInterface
 ScanInterface (Unpacker *core_=NULL)
 Default constructor. More...
 
virtual ~ScanInterface ()
 Default destructor. More...
 
bool IsInit ()
 Return true if the ScanInterface object has been initialized. More...
 
bool IsVerbose ()
 Return true if verbose output mode is enabled. More...
 
bool DebugMode ()
 Return true if debug mode is enabled. More...
 
bool DryRunMode ()
 Return true if dry run mode is enabled. More...
 
bool ShmMode ()
 Return true if shared memory mode is enabled. More...
 
bool BatchMode ()
 Return true if batch processing mode is enabled. More...
 
std::string GetMessageHeader ()
 Return the header string used to prefix output messages. More...
 
std::string GetProgramName ()
 Return the name of the program. More...
 
std::string GetSetupFilename ()
 
std::string GetOutputFilename ()
 
fileInformationGetFileInfo ()
 Return a pointer to a fileInformation object used to store file header info. More...
 
void SetProgramName (const std::string &head_)
 Set the header string used to prefix output messages. More...
 
bool SetVerboseMode (bool state_=true)
 Enable or disable verbose output mode. More...
 
bool SetDebugMode (bool state_=true)
 Enable or disable debug mode. More...
 
bool SetDryRunMode (bool state_=true)
 Enable or disable dry run mode. More...
 
bool SetShmMode (bool state_=true)
 Enable or disable shared memory mode. More...
 
bool SetBatchMode (bool state_=true)
 Enable or disable batch processing mode. More...
 
void RunControl ()
 Main scan control method. More...
 
void CmdControl ()
 Main command interpreter method. More...
 
bool Setup (int argc, char *argv[])
 Setup user options and initialize all required objects. More...
 
int Execute ()
 Run the program. More...
 
bool Close ()
 Shutdown cleanly. More...
 

Private Member Functions

TF1 * SetupFunc ()
 
void ResetGraph (unsigned int size_)
 
void Plot ()
 Plot the current event. More...
 

Private Attributes

unsigned int numAvgWaveforms_
 
unsigned int num_displayed
 The number of displayed traces. More...
 
size_t numEvents
 
float cfdF_
 The number of waveforms to store. More...
 
int cfdD_
 
int cfdL_
 
int fitLow_
 
int fitHigh_
 
int delay_
 
bool need_graph_update
 The number of seconds to wait between drawing traces. More...
 
bool resetGraph_
 Set to true if the graph range needs updated. More...
 
bool acqRun_
 
bool singleCapture_
 
bool init
 
bool running
 
bool performFit_
 
bool performCfd_
 
std::vector< int > x_vals
 
std::deque< ChannelEvent * > chanEvents_
 The buffer of waveforms to be plotted. More...
 
time_t last_trace
 The time of the last trace. More...
 
std::string saveFile_
 The name of the file to save a trace. More...
 
TGraph * graph
 The TGraph for plotting traces. More...
 
TLine * cfdLine
 
TF1 * cfdPol3
 
TF1 * cfdPol2
 
TH2F * hist
 The histogram containing the waveform frequencies. More...
 
TProfile * prof
 The profile of the average histogram. More...
 
TF1 * paulauskasFunc
 A TF1 of the Paulauskas Function (NIM A 737 (2014) 22) More...
 

Additional Inherited Members

- Protected Member Functions inherited from ScanInterface
void AddOption (optionExt opt_)
 Pointer to class derived from Unpacker class. More...
 
- Protected Attributes inherited from ScanInterface
std::string msgHeader
 
std::string progName
 The string to print before program output. More...
 
std::vector< option > longOpts
 The name of the program. More...
 
std::vector< optionExtbaseOpts
 Vector of all command line options. More...
 
std::vector< optionExtuserOpts
 Base level command line options for the scan. More...
 
std::string optstr
 User added command line options. More...
 
Unpackercore
 

Detailed Description

Definition at line 73 of file scope.hpp.

Constructor & Destructor Documentation

§ scopeScanner()

scopeScanner::scopeScanner ( int  mod = 0,
int  chan = 0 
)

Default constructor.

Definition at line 128 of file scope.cpp.

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

§ ~scopeScanner()

scopeScanner::~scopeScanner ( )

Destructor.

Definition at line 170 of file scope.cpp.

Member Function Documentation

§ AddEvent()

bool scopeScanner::AddEvent ( XiaData event_)
virtual

Add a channel event to the deque of events to send to the processors. This method should only be called from skeletonUnpacker::ProcessRawEvent().

Parameters
[in]event_The raw XiaData to add to the channel event deque.
Returns
True if events are ready to be processed and false otherwise.

: Renable this with the Helper functions.

Reimplemented from ScanInterface.

Definition at line 398 of file scope.cpp.

§ ArgHelp()

void scopeScanner::ArgHelp ( void  )
virtual

ArgHelp is used to allow a derived class to add a command line option to the main list of options. This method is called at the end of from the ::Setup method. Does nothing useful by default.

Returns
Nothing.

Reimplemented from ScanInterface.

Definition at line 485 of file scope.cpp.

Here is the call graph for this function:

§ ClearEvents()

void scopeScanner::ClearEvents ( )

Clear the event deque.

Returns
Nothing.

Definition at line 451 of file scope.cpp.

Here is the caller graph for this function:

§ CmdHelp()

void scopeScanner::CmdHelp ( const std::string &  prefix_ = "")
virtual

CmdHelp is used to allow a derived class to print a help statement about its own commands. This method is called whenever the user enters 'help' or 'h' into the interactive terminal (if available).

Parameters
[in]prefix_String to append at the start of any output. Not used by default.
Returns
Nothing.

Reimplemented from ScanInterface.

Definition at line 464 of file scope.cpp.

§ ExtraArguments()

void scopeScanner::ExtraArguments ( )
virtual

ExtraArguments is used to send command line arguments to classes derived from ScanInterface. This method should loop over the optionExt elements in the vector userOpts and check for those options which have been flagged as active by ::Setup(). This should be overloaded in the derived class.

Returns
Nothing.

Reimplemented from ScanInterface.

Definition at line 504 of file scope.cpp.

§ ExtraCommands()

bool scopeScanner::ExtraCommands ( const std::string &  cmd_,
std::vector< std::string > &  args_ 
)
virtual

ExtraCommands is used to send command strings to classes derived from ScanInterface. If ScanInterface receives an unrecognized command from the user, it will pass it on to the derived class.

Parameters
[in]cmd_The command to interpret.
[out]arg_Vector or arguments to the user command.
Returns
True if the command was recognized and false otherwise.

Reimplemented from ScanInterface.

Definition at line 518 of file scope.cpp.

Here is the call graph for this function:

§ FinalInitialization()

virtual void scopeScanner::FinalInitialization ( )
inlinevirtual

Peform any last minute initialization before processing data. /return Nothing.

Reimplemented from ScanInterface.

Definition at line 148 of file scope.hpp.

§ GetCore()

Unpacker * scopeScanner::GetCore ( )
virtual

Return a pointer to the Unpacker object to use for data unpacking. If no object has been initialized, create a new one.

Returns
Pointer to an Unpacker object.

Reimplemented from ScanInterface.

Definition at line 388 of file scope.cpp.

Here is the caller graph for this function:

§ GetDelay()

int scopeScanner::GetDelay ( )
inline

Set the time delay between traces (in seconds).

Definition at line 82 of file scope.hpp.

§ GetNumEvents()

size_t scopeScanner::GetNumEvents ( )
inline

Return the maximum number of events to store.

Definition at line 85 of file scope.hpp.

§ Initialize()

bool scopeScanner::Initialize ( std::string  prefix_ = "")
virtual

Initialize the map file, the config file, the processor handler, and add all of the required processors.

Parameters
[in]prefix_String to append to the beginning of system output.
Returns
True upon successfully initializing and false otherwise.

Reimplemented from ScanInterface.

Definition at line 359 of file scope.cpp.

§ InitRootOutput()

virtual bool scopeScanner::InitRootOutput ( std::string  fname_,
bool  overwrite_ = true 
)
inlinevirtual

Initialize the root output.

Parameters
[in]fname_Filename of the output root file.
[in]overwrite_Set to true if the user wishes to overwrite the output file.
Returns
True upon successfully opening the output file and false otherwise.

Reimplemented from ScanInterface.

Definition at line 155 of file scope.hpp.

Here is the call graph for this function:

§ Notify()

void scopeScanner::Notify ( const std::string &  code_ = "")
virtual

Receive various status notifications from the scan.

Parameters
[in]code_The notification code passed from ScanInterface methods.
Returns
Nothing.

Reimplemented from ScanInterface.

Definition at line 372 of file scope.cpp.

Here is the call graph for this function:

§ Plot()

void scopeScanner::Plot ( )
private

Plot the current event.

Renable the CFD with the proper functionality.

Definition at line 208 of file scope.cpp.

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

§ ProcessEvents()

bool scopeScanner::ProcessEvents ( )
virtual

Process all channel events read in from the rawEvent. This method should only be called from skeletonUnpacker::ProcessRawEvent().

Returns
True if events were processed and false otherwise.

Reimplemented from ScanInterface.

Definition at line 423 of file scope.cpp.

Here is the call graph for this function:

§ ResetGraph()

void scopeScanner::ResetGraph ( unsigned int  size_)
private

Definition at line 186 of file scope.cpp.

Here is the caller graph for this function:

§ SetDelay()

void scopeScanner::SetDelay ( int  delay)
inline

Set the number of seconds to wait between drawing of traces.

Definition at line 88 of file scope.hpp.

§ SetNumEvents()

void scopeScanner::SetNumEvents ( size_t  num_)
inline

Set the maximum number of events to store.

Definition at line 91 of file scope.hpp.

§ SetupFunc()

TF1 * scopeScanner::SetupFunc ( )
private

Definition at line 179 of file scope.cpp.

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

§ StartACQ()

void scopeScanner::StartACQ ( )
inline

Star the run.

Definition at line 97 of file scope.hpp.

§ StopACQ()

void scopeScanner::StopACQ ( )
inline

Stop the run.

Definition at line 94 of file scope.hpp.

§ SyntaxStr()

void scopeScanner::SyntaxStr ( char *  name_)
virtual

SyntaxStr is used to print a linux style usage message to the screen.

Parameters
[in]name_The name of the program.
Returns
Nothing.

Reimplemented from ScanInterface.

Definition at line 494 of file scope.cpp.

Field Documentation

§ acqRun_

bool scopeScanner::acqRun_
private

Definition at line 202 of file scope.hpp.

§ cfdD_

int scopeScanner::cfdD_
private

Definition at line 194 of file scope.hpp.

§ cfdF_

float scopeScanner::cfdF_
private

The number of waveforms to store.

Definition at line 193 of file scope.hpp.

§ cfdL_

int scopeScanner::cfdL_
private

Definition at line 195 of file scope.hpp.

§ cfdLine

TLine* scopeScanner::cfdLine
private

Definition at line 217 of file scope.hpp.

§ cfdPol2

TF1* scopeScanner::cfdPol2
private

Definition at line 219 of file scope.hpp.

§ cfdPol3

TF1* scopeScanner::cfdPol3
private

Definition at line 218 of file scope.hpp.

§ chanEvents_

std::deque<ChannelEvent*> scopeScanner::chanEvents_
private

The buffer of waveforms to be plotted.

Definition at line 210 of file scope.hpp.

§ delay_

int scopeScanner::delay_
private

Definition at line 198 of file scope.hpp.

§ fitHigh_

int scopeScanner::fitHigh_
private

Definition at line 197 of file scope.hpp.

§ fitLow_

int scopeScanner::fitLow_
private

Definition at line 196 of file scope.hpp.

§ graph

TGraph* scopeScanner::graph
private

The TGraph for plotting traces.

Definition at line 216 of file scope.hpp.

§ hist

TH2F* scopeScanner::hist
private

The histogram containing the waveform frequencies.

Definition at line 220 of file scope.hpp.

§ init

bool scopeScanner::init
private

Definition at line 204 of file scope.hpp.

§ last_trace

time_t scopeScanner::last_trace
private

The time of the last trace.

Definition at line 212 of file scope.hpp.

§ need_graph_update

bool scopeScanner::need_graph_update
private

The number of seconds to wait between drawing traces.

Definition at line 200 of file scope.hpp.

§ num_displayed

unsigned int scopeScanner::num_displayed
private

The number of displayed traces.

Definition at line 189 of file scope.hpp.

§ numAvgWaveforms_

unsigned int scopeScanner::numAvgWaveforms_
private

Definition at line 188 of file scope.hpp.

§ numEvents

size_t scopeScanner::numEvents
private

Definition at line 191 of file scope.hpp.

§ paulauskasFunc

TF1* scopeScanner::paulauskasFunc
private

A TF1 of the Paulauskas Function (NIM A 737 (2014) 22)

Definition at line 223 of file scope.hpp.

§ performCfd_

bool scopeScanner::performCfd_
private

Definition at line 207 of file scope.hpp.

§ performFit_

bool scopeScanner::performFit_
private

Definition at line 206 of file scope.hpp.

§ prof

TProfile* scopeScanner::prof
private

The profile of the average histogram.

Definition at line 221 of file scope.hpp.

§ resetGraph_

bool scopeScanner::resetGraph_
private

Set to true if the graph range needs updated.

Definition at line 201 of file scope.hpp.

§ running

bool scopeScanner::running
private

Definition at line 205 of file scope.hpp.

§ saveFile_

std::string scopeScanner::saveFile_
private

The name of the file to save a trace.

Definition at line 214 of file scope.hpp.

§ singleCapture_

bool scopeScanner::singleCapture_
private

Definition at line 203 of file scope.hpp.

§ x_vals

std::vector<int> scopeScanner::x_vals
private

Definition at line 209 of file scope.hpp.


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