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

Class derived from ScanInterface to handle UI for the scan. More...

#include <UtkScanInterface.hpp>

Inheritance diagram for UtkScanInterface:
Collaboration diagram for UtkScanInterface:

Public Member Functions

 UtkScanInterface ()
 Default constructor. More...
 
 ~UtkScanInterface ()
 Destructor. More...
 
virtual bool ExtraCommands (const std::string &cmd_, std::vector< std::string > &args_)
 
virtual void ExtraArguments (int argc, char *argv[])
 
virtual bool Initialize (std::string prefix_="")
 
virtual bool InitRootOutput (std::string fname_, bool overwrite_=true)
 
virtual UnpackerGetCore ()
 
virtual void CmdHelp (void)
 
virtual void ArgHelp (void)
 
virtual void SyntaxStr (char *name_)
 
virtual void IdleTask (void)
 
virtual void FinalInitialization ()
 
virtual void Notify (const std::string &code_="")
 
- 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...
 
virtual bool AddEvent (XiaData *event_)
 
virtual bool ProcessEvents ()
 

Private Attributes

bool init_
 
std::string outputFname_
 Set to true when the initialization process successfully completes. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ScanInterface
void AddOption (optionExt opt_)
 Pointer to class derived from Unpacker class. More...
 
virtual void ExtraArguments ()
 
virtual void CmdHelp (const std::string &prefix_="")
 
- 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

Class derived from ScanInterface to handle UI for the scan.

Definition at line 11 of file UtkScanInterface.hpp.

Constructor & Destructor Documentation

§ UtkScanInterface()

UtkScanInterface::UtkScanInterface ( )

Default constructor.

Definition at line 14 of file UtkScanInterface.cpp.

§ ~UtkScanInterface()

UtkScanInterface::~UtkScanInterface ( )

Destructor.

Definition at line 19 of file UtkScanInterface.cpp.

Member Function Documentation

§ ArgHelp()

virtual void UtkScanInterface::ArgHelp ( void  )
inlinevirtual

ArgHelp is used to allow a derived class to print a help statment about its own command line arguments. This method is called at the end of the ScanInterface::help method.

Returns
Nothing.

Reimplemented from ScanInterface.

Definition at line 65 of file UtkScanInterface.hpp.

Here is the call graph for this function:

§ CmdHelp()

void UtkScanInterface::CmdHelp ( void  )
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.
Returns
Nothing.

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.

Definition at line 52 of file UtkScanInterface.cpp.

Here is the caller graph for this function:

§ ExtraArguments()

virtual void UtkScanInterface::ExtraArguments ( int  argc,
char *  argv[] 
)
inlinevirtual

ExtraArguments is used to send command line arguments to classes derived from ScanInterface. It has its own instance of getopts to look for its known parameters.

Parameters
[in]argc: The number of command line arguments
[in]argv[]: The arrary containing all command line arguments

Definition at line 33 of file UtkScanInterface.hpp.

Here is the call graph for this function:

§ ExtraCommands()

bool UtkScanInterface::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 32 of file UtkScanInterface.cpp.

§ FinalInitialization()

void UtkScanInterface::FinalInitialization ( )
virtual

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

Reimplemented from ScanInterface.

Definition at line 111 of file UtkScanInterface.cpp.

Here is the caller graph for this function:

§ GetCore()

Unpacker * UtkScanInterface::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 135 of file UtkScanInterface.cpp.

Here is the caller graph for this function:

§ IdleTask()

virtual void UtkScanInterface::IdleTask ( void  )
inlinevirtual

IdleTask is called whenever a scan is running in shared memory mode, and a spill has yet to be received. This method may be used to update things which need to be updated every so often (e.g. a root TCanvas) when working with a low data rate.

Returns
Nothing.

Reimplemented from ScanInterface.

Definition at line 77 of file UtkScanInterface.hpp.

Here is the call graph for this function:

§ Initialize()

bool UtkScanInterface::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.

The DetectorDriver constructor will load processors from the xml configuration file upon first call. The DeclarePlots function will instantiate the DetectorLibrary class which will read in the "map" of channels. Subsequently the raw histograms, the diagnostic histograms and the processors and analyzers plots are declared.

Note that in the PixieStd the Init function of DetectorDriver is called upon first buffer. This include reading in the calibration and walk correction factors.

Reimplemented from ScanInterface.

Definition at line 67 of file UtkScanInterface.cpp.

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

§ InitRootOutput()

virtual bool UtkScanInterface::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 to overwrite the output file.
Returns
True upon successfully opening the output file, false otherwise.

Reimplemented from ScanInterface.

Definition at line 45 of file UtkScanInterface.hpp.

Here is the call graph for this function:

§ Notify()

void UtkScanInterface::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 118 of file UtkScanInterface.cpp.

Here is the caller graph for this function:

§ SyntaxStr()

void UtkScanInterface::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 59 of file UtkScanInterface.cpp.

Here is the caller graph for this function:

Field Documentation

§ init_

bool UtkScanInterface::init_
private

Definition at line 89 of file UtkScanInterface.hpp.

§ outputFname_

std::string UtkScanInterface::outputFname_
private

Set to true when the initialization process successfully completes.

Definition at line 90 of file UtkScanInterface.hpp.


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