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

#include <Skeleton.hpp>

Inheritance diagram for skeletonScanner:
Collaboration diagram for skeletonScanner:

Public Member Functions

 skeletonScanner ()
 Default constructor. More...
 
 ~skeletonScanner ()
 Destructor. 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 void IdleTask ()
 
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 ()
 
- 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 Attributes

bool init
 

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 40 of file Skeleton.hpp.

Constructor & Destructor Documentation

§ skeletonScanner()

skeletonScanner::skeletonScanner ( )

Default constructor.

Definition at line 62 of file Skeleton.cpp.

Here is the caller graph for this function:

§ ~skeletonScanner()

skeletonScanner::~skeletonScanner ( )

Destructor.

Definition at line 67 of file Skeleton.cpp.

Member Function Documentation

§ AddEvent()

bool skeletonScanner::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
False.

Reimplemented from ScanInterface.

Definition at line 203 of file Skeleton.cpp.

§ ArgHelp()

void skeletonScanner::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 138 of file Skeleton.cpp.

Here is the call graph for this function:

§ CmdHelp()

void skeletonScanner::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 125 of file Skeleton.cpp.

§ ExtraArguments()

void skeletonScanner::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 108 of file Skeleton.cpp.

§ ExtraCommands()

bool skeletonScanner::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 80 of file Skeleton.cpp.

§ FinalInitialization()

void skeletonScanner::FinalInitialization ( )
virtual

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

Reimplemented from ScanInterface.

Definition at line 172 of file Skeleton.cpp.

§ GetCore()

Unpacker * skeletonScanner::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 193 of file Skeleton.cpp.

Here is the caller graph for this function:

§ IdleTask()

virtual void skeletonScanner::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 93 of file Skeleton.hpp.

§ Initialize()

bool skeletonScanner::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 161 of file Skeleton.cpp.

§ InitRootOutput()

virtual bool skeletonScanner::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 112 of file Skeleton.hpp.

Here is the call graph for this function:

§ Notify()

void skeletonScanner::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 180 of file Skeleton.cpp.

§ ProcessEvents()

bool skeletonScanner::ProcessEvents ( )
virtual

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

Returns
False.

Reimplemented from ScanInterface.

Definition at line 217 of file Skeleton.cpp.

§ SyntaxStr()

void skeletonScanner::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 152 of file Skeleton.cpp.

Field Documentation

§ init

bool skeletonScanner::init
private

Definition at line 140 of file Skeleton.hpp.


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