PAASS
Software suite to Acquire and Analyze Data from Pixie16
|
Class derived from ScanInterface to handle UI for the scan. More...
#include <UtkScanInterface.hpp>
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 Unpacker * | GetCore () |
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_="") |
![]() | |
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 () |
fileInformation * | GetFileInfo () |
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 | |
![]() | |
void | AddOption (optionExt opt_) |
Pointer to class derived from Unpacker class. More... | |
virtual void | ExtraArguments () |
virtual void | CmdHelp (const std::string &prefix_="") |
![]() | |
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< optionExt > | baseOpts |
Vector of all command line options. More... | |
std::vector< optionExt > | userOpts |
Base level command line options for the scan. More... | |
std::string | optstr |
User added command line options. More... | |
Unpacker * | core |
Class derived from ScanInterface to handle UI for the scan.
Definition at line 11 of file UtkScanInterface.hpp.
UtkScanInterface::UtkScanInterface | ( | ) |
Default constructor.
Definition at line 14 of file UtkScanInterface.cpp.
UtkScanInterface::~UtkScanInterface | ( | ) |
Destructor.
Definition at line 19 of file UtkScanInterface.cpp.
|
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.
Reimplemented from ScanInterface.
Definition at line 65 of file UtkScanInterface.hpp.
|
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).
[in] | prefix_ | String to append at the start of any output. |
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).
[in] | prefix_ | String to append at the start of any output. |
Definition at line 52 of file UtkScanInterface.cpp.
|
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.
[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.
|
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.
[in] | cmd_ | The command to interpret. |
[out] | arg_ | Vector or arguments to the user command. |
Reimplemented from ScanInterface.
Definition at line 32 of file UtkScanInterface.cpp.
|
virtual |
Peform any last minute initialization before processing data. /return Nothing.
Reimplemented from ScanInterface.
Definition at line 111 of file UtkScanInterface.cpp.
|
virtual |
Return a pointer to the Unpacker object to use for data unpacking. If no object has been initialized, create a new one.
Reimplemented from ScanInterface.
Definition at line 135 of file UtkScanInterface.cpp.
|
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.
Reimplemented from ScanInterface.
Definition at line 77 of file UtkScanInterface.hpp.
|
virtual |
Initialize the map file, the config file, the processor handler, and add all of the required processors.
[in] | prefix_ | String to append to the beginning of system output. |
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.
|
inlinevirtual |
Initialize the root output.
[in] | fname_ | Filename of the output root file. |
[in] | overwrite_ | Set to true to overwrite the output file. |
Reimplemented from ScanInterface.
Definition at line 45 of file UtkScanInterface.hpp.
|
virtual |
Receive various status notifications from the scan.
[in] | code_ | The notification code passed from ScanInterface methods. |
Reimplemented from ScanInterface.
Definition at line 118 of file UtkScanInterface.cpp.
|
virtual |
SyntaxStr is used to print a linux style usage message to the screen.
[in] | name_ | The name of the program. |
Reimplemented from ScanInterface.
Definition at line 59 of file UtkScanInterface.cpp.
|
private |
Definition at line 89 of file UtkScanInterface.hpp.
|
private |
Set to true when the initialization process successfully completes.
Definition at line 90 of file UtkScanInterface.hpp.