ctools  2.0.0
 All Classes Namespaces Files Functions Variables Macros Pages
ctool_base Class Reference

[WHAT] tool More...

#include <ctool_base.hpp>

Inheritance diagram for ctool_base:
ctool GApplication

Public Member Functions

 ctool_base (void)
 Void constructor. More...
 
 ctool_base (int argc, char *argv[])
 Command line constructor. More...
 
 ctool_base (const ctool_base &app)
 Copy constructor. More...
 
virtual ~ctool_base (void)
 Destructor. More...
 
ctool_baseoperator= (const ctool_base &app)
 Assignment operator. More...
 
void clear (void)
 Clear [WHAT] tool. More...
 
void process (void)
 Process [what] tool. More...
 
void save (void)
 Save something. More...
 
- Public Member Functions inherited from ctool
 ctool (const std::string &name, const std::string &version)
 Name constructor. More...
 
 ctool (const std::string &name, const std::string &version, const GApplicationPars &pars)
 Application parameter constructor. More...
 
 ctool (const std::string &name, const std::string &version, int argc, char *argv[])
 Command line constructor. More...
 
 ctool (const ctool &app)
 Copy constructor. More...
 
virtual ~ctool (void)
 Destructor. More...
 
ctooloperator= (const ctool &app)
 Assignment operator. More...
 
virtual void run (void)
 Run ctool. More...
 
virtual void execute (void)
 Execute ctool. More...
 

Protected Member Functions

void init_members (void)
 Initialise class members. More...
 
void copy_members (const ctool_base &app)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 
void get_parameters (void)
 Get application parameters. More...
 
- Protected Member Functions inherited from ctool
void init_members (void)
 Initialise class members. More...
 
void copy_members (const ctool &app)
 Copy class members. More...
 
void free_members (void)
 Delete class members. More...
 
void sync_pfiles (void)
 Synchronise parameter files. More...
 
const bool & read_ahead (void) const
 Signal whether parameters should be read ahead. More...
 
void setup_observations (GObservations &obs, const bool &response=true, const bool &list=true, const bool &cube=true)
 Setup observation container. More...
 
void setup_models (GObservations &obs, const std::string &name="")
 Setup model container. More...
 
GEbounds create_ebounds (void)
 Create energy boundaries from user parameters. More...
 
GEnergies create_energies (void)
 Create energies from user parameters. More...
 
GSkyMap create_map (const GObservations &obs)
 Create a skymap from user parameters. More...
 
GCTAEventCube create_cube (const GObservations &obs)
 Create a CTA event cube from user parameters. More...
 
GCTAObservation create_cta_obs (void)
 Create a CTA observation from User parameters. More...
 
void require_inobs (const std::string &method)
 Throws exception if inobs parameter is not valid. More...
 
void require_inobs_nolist (const std::string &method)
 
void require_inobs_nocube (const std::string &method)
 Throws exception if inobs parameter is a counts cube. More...
 
GCTARoi get_roi (const GCTAPointing &pnt=GCTAPointing())
 Return RoI from User parameters. More...
 
GEbounds get_ebounds (void)
 Return energy boundaries from User parameters. More...
 
GGti get_gti (const GTimeReference &ref)
 Return Good Time Intervals from User parameter. More...
 
GCTAPointing get_pointing (void)
 Return CTA pointing from User parameters. More...
 
GSkyDir get_skydir (void)
 Return sky direction from User parameters. More...
 
std::string set_outfile_name (const std::string &filename)
 Set output file name. More...
 
bool is_stacked (void)
 Query user parameters for stacked analysis. More...
 
bool is_onoff (void)
 Query user parameters for On/Off analysis. More...
 
void log_parameters (const GChatter &chatter)
 Log application parameters. More...
 
void log_observations (const GChatter &chatter, const GObservations &obs, const std::string &what="Observation")
 Log observation container. More...
 
void log_models (const GChatter &chatter, const GModels &models, const std::string &what="Model")
 Log model container. More...
 
void set_response (GObservations &obs)
 Set response for all CTA observations in container. More...
 
std::vector< bool > set_edisp (GObservations &obs, const bool &edisp) const
 Set energy dispersion to CTA observations. More...
 
void restore_edisp (GObservations &obs, const std::vector< bool > &edisp) const
 Restore energy dispersion flags of CTA observations. More...
 
void set_obs_response (GCTAObservation *obs)
 Set response for CTA observation. More...
 
GObservations get_observations (const bool &get_response=true)
 Get observation container. More...
 
GSkyDir get_mean_pointing (const GObservations &obs)
 Derives mean pointing from CTA observations. More...
 
size_t get_current_rss (void)
 Get current resident set size (physical memory use) in Bytes. More...
 
std::string get_obs_header (const GObservation *obs) const
 Return observation header string. More...
 
GEnergies insert_energy_boundaries (const GEnergies &energies, const GCTAObservation &obs)
 Insert observation energy boundaries into list of energies. More...
 
std::vector< bool > cube_layer_usage (const GEbounds &cube_ebounds, const GEbounds &list_ebounds) const
 Determine the counts cube layer usage. More...
 
std::string get_gtiname (const std::string &filename, const std::string &evtname) const
 Get Good Time Intervals extension name. More...
 
void save_event_list (const GCTAObservation *obs, const std::string &infile, const std::string &evtname, const std::string &gtiname, const std::string &outfile) const
 Save event list into FITS file. More...
 
std::string warn_too_few_energies (const GEnergies &energies) const
 Set warning string if there are too few energies. More...
 
std::string warn_xml_suffix (const GFilename &filename) const
 Set warning string if file has no .xml suffix. More...
 
void provide_help (void) const
 Dump help text in the console. More...
 

Additional Inherited Members

- Protected Attributes inherited from ctool
bool m_read_ahead
 Read ahead output parameters. More...
 
bool m_use_xml
 Use XML file instead of FITS file for observations. More...
 

Detailed Description

[WHAT] tool

Todo:
Add tool description.

Definition at line 44 of file ctool_base.hpp.

Constructor & Destructor Documentation

ctool_base::ctool_base ( void  )

Void constructor.

Constructs empty [what] tool.

Definition at line 60 of file ctool_base.cpp.

References init_members().

ctool_base::ctool_base ( int  argc,
char *  argv[] 
)

Command line constructor.

Parameters
[in]argcNumber of arguments in command line.
[in]argvArray of command line arguments.

Constructs [what] tool using command line arguments for user parameter setting.

Definition at line 79 of file ctool_base.cpp.

References init_members().

ctool_base::ctool_base ( const ctool_base app)

Copy constructor.

Parameters
[in]app[WHAT] tool.

Constructs [what] tool from another [what] tool.

Definition at line 96 of file ctool_base.cpp.

References copy_members(), and init_members().

ctool_base::~ctool_base ( void  )
virtual

Destructor.

Destructs [what] tool.

Definition at line 114 of file ctool_base.cpp.

References free_members().

Member Function Documentation

void ctool_base::clear ( void  )
virtual

Clear [WHAT] tool.

Clears [what] tool.

Implements ctool.

Definition at line 173 of file ctool_base.cpp.

References free_members(), ctool::free_members(), init_members(), and ctool::init_members().

void ctool_base::copy_members ( const ctool_base app)
protected

Copy class members.

Parameters
[in]app[WHAT] tool.

Definition at line 250 of file ctool_base.cpp.

Referenced by ctool_base(), and operator=().

void ctool_base::free_members ( void  )
protected

Delete class members.

Definition at line 263 of file ctool_base.cpp.

Referenced by clear(), operator=(), and ~ctool_base().

void ctool_base::get_parameters ( void  )
protected

Get application parameters.

Todo:
Implement method

Definition at line 275 of file ctool_base.cpp.

References ctool::log_parameters().

Referenced by process().

void ctool_base::init_members ( void  )
protected

Initialise class members.

Definition at line 235 of file ctool_base.cpp.

Referenced by clear(), ctool_base(), and operator=().

ctool_base & ctool_base::operator= ( const ctool_base app)

Assignment operator.

Parameters
[in]app[WHAT] tool.
Returns
[WHAT] tool.

Assigns [what] tool.

Definition at line 138 of file ctool_base.cpp.

References copy_members(), free_members(), init_members(), and ctool::operator=().

void ctool_base::process ( void  )
virtual

Process [what] tool.

Implements ctool.

Definition at line 197 of file ctool_base.cpp.

References get_parameters().

void ctool_base::save ( void  )
virtual

Save something.

Saves something.

Implements ctool.

Definition at line 214 of file ctool_base.cpp.


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