Class to unload PhaseSeries data in a Pulsar::Archive. More...

#include <Archiver.h>

Inheritance diagram for dsp::Archiver:
dsp::PhaseSeriesUnloader OwnStream Reference::Able Reference::HeapTracked

Public Member Functions

 Archiver ()
 Constructor.
 
 Archiver (const Archiver &)
 Copy constructor.
 
virtual ~Archiver ()
 Destructor.
 
Archiverclone () const
 Clone operator.
 
void set_archive_class (const std::string &archive_class_name)
 Set the name of the Pulsar::Archive class used to create new instances.
 
void set_force_archive_class (bool)
 
void set_command_line (const std::string &)
 Set the command line of the calling program.
 
void set_script (const std::vector< std::string > &jobs)
 Set the post-processing script.
 
void set_archive (Pulsar::Archive *archive)
 Set the Pulsar::Archive instance to which data will be added.
 
bool postprocess (Pulsar::Archive *archive)
 Execute any post-processing steps, return true if successful.
 
void set_minimum_integration_length (double seconds)
 Set the minimum integration length required to unload data.
 
Pulsar::Archiveget_archive ()
 Get the Pulsar::Archive instance to which all data were added.
 
bool has_archive () const
 
void add_extension (Pulsar::Archive::Extension *extension)
 Add a Pulsar::Archive::Extension to those added to the output archive.
 
void unload (const PhaseSeries *)
 Unloads all available data to a Pulsar::Archive instance.
 
void finish ()
 Perform any clean up tasks before completion.
 
unsigned get_npol (const PhaseSeries *phase) const
 Get the effective number of polarizations in the output archive.
 
void set (Pulsar::Archive *archive, const PhaseSeries *phase)
 Set the Pulsar::Archive with the PhaseSeries data.
 
void add (Pulsar::Archive *archive, const PhaseSeries *phase)
 Add the PhaseSeries data to the Pulsar::Archive instance.
 
void set_archive_dedispersed (bool _archive_dedispersed)
 
bool get_archive_dedispersed () const
 
void set_archive_software (std::string _archive_software)
 A dspReduction extension is added to the archive with this string.
 
std::string get_archive_software ()
 A dspReduction extension is added to the archive with this string.
 
void set_store_dynamic_extensions (bool flag)
 
void set_use_single_archive (bool flag)
 
void set_subints_per_file (unsigned nsub)
 
- Public Member Functions inherited from dsp::PhaseSeriesUnloader
 PhaseSeriesUnloader ()
 Constructor.
 
virtual ~PhaseSeriesUnloader ()
 Destructor.
 
virtual void partial (const PhaseSeries *)
 Handle partially completed PhaseSeries data.
 
virtual PhaseSeriesrecycle ()
 After unload, a different PhaseSeries may be available for use.
 
virtual std::string get_filename (const PhaseSeries *data) const
 Generate a filename using the current convention.
 
virtual void set_convention (FilenameConvention *)
 Set the filename convention.
 
virtual FilenameConventionget_convention ()
 
virtual void set_directory (const std::string &)
 Set the directory to which output data will be written. More...
 
virtual std::string get_directory () const
 
virtual void set_path_add_source (bool)
 place output files in a sub-directory named by source
 
virtual bool get_path_add_source () const
 
virtual void set_prefix (const std::string &)
 Set the prefix to be added to the front of filenames. More...
 
virtual std::string get_prefix () const
 
virtual void set_extension (const std::string &)
 Set the extension to be added to the end of filenames.
 
virtual std::string get_extension () const
 
- Public Member Functions inherited from OwnStream
 OwnStream (const OwnStream &)
 
const OwnStreamoperator= (const OwnStream &)
 
virtual void set_cout (std::ostream &) const
 
virtual void set_cerr (std::ostream &) const
 
- Public Member Functions inherited from Reference::Able
 Able (const Able &)
 
Ableoperator= (const Able &)
 
unsigned get_reference_count () const
 
- Public Member Functions inherited from Reference::HeapTracked
 HeapTracked (const HeapTracked &)
 
HeapTrackedoperator= (const HeapTracked &)
 
bool __is_on_heap () const
 

Static Public Attributes

static unsigned verbose = 1
 Verbose flag.
 

Protected Member Functions

void set (Pulsar::Integration *integration, const PhaseSeries *phase, unsigned isub=0, unsigned nsub=1)
 Set the Pulsar::Integration with the PhaseSeries data.
 
void set (Pulsar::Profile *profile, const PhaseSeries *phase, double scale, unsigned ichan, unsigned ipol, unsigned idim)
 Set the Pulsar::Profile with the specified subset of PhaseSeries data.
 
void set (Pulsar::Backend *)
 Set the Pulsar::Backend Extension.
 
void set (Pulsar::dspReduction *)
 Set the Pulsar::dspReduction Extension.
 
void pack (Pulsar::dspReduction *, Operation *)
 Set the Pulsar::dspReduction Extension.
 
void pack (Pulsar::Integration *)
 Pack any additional extensions in the Integration.
 
void set_coherent_dedispersion (Signal::State state, const Response *response)
 
void set (Pulsar::TwoBitStats *)
 Set the Pulsar::TwoBitStats Extension with the dsp::TwoBitCorrection.
 
void set (Pulsar::DigitiserCounts *dig_cnts, unsigned isub=0)
 Set the Pulsar::DigitiserCounts Extension with the dsp::HistUnpacker.
 
void set (Pulsar::Passband *)
 Set the Pulsar::Passband Extension with the dsp::Response.
 
void raw_to_central (unsigned ichan, Pulsar::MoreProfiles *moments, const Pulsar::Integration *means, const unsigned *hits)
 Convert raw moments to central moments of means. More...
 
Pulsar::Archivenew_Archive () const
 Generate a new Archive for output. More...
 
- Protected Member Functions inherited from Reference::Able
Handle__reference (bool active) const
 
void __dereference (bool auto_delete=true) const
 

Protected Attributes

double minimum_integration_length
 Minimum integration length required to unload data.
 
bool unload_profiles_with_zero_hits {true}
 Unload profiles with phase bins that have zero hits.
 
std::string command_line
 Command line of the calling program.
 
std::string archive_class_name
 Name of the Pulsar::Archive class used to create new instances.
 
bool force_archive_class
 do not allow the Input class to dicate the output archive file format
 
bool use_single_archive
 Store all output in a single archive.
 
Reference::To< Pulsar::Archivesingle_archive
 The Pulsar::Archive instance to which data will be added.
 
unsigned subints_per_file
 Number of subints per output Archive (0 implies no limit)
 
std::vector< std::string > script
 Commands used to process Archive data before unloading.
 
Reference::To< Pulsar::Interpreterinterpreter
 The script interpreter used to process Archive data before unloading.
 
Reference::To< const Responsepassband
 Response from which Passband Extension will be constructed.
 
Reference::To< const ExcisionUnpackerexcision_unpacker
 ExcisionUnpacker from which TwoBitStats Extension will be constructed.
 
Reference::To< const HistUnpackerhist_unpacker
 HistUnpacker from which DigitiserCounts Extension will be constructed.
 
Reference::To< SpectralKurtosisspectral_kurtosis
 SpectralKurtosis from which SpectralKurtosis Extension will be constructed.
 
std::vector< Reference::To< Pulsar::Archive::Extension > > extensions
 The Pulsar::Archive::Extension classes to be added to the output.
 
bool store_dynamic_extensions
 Output dynamic header information (mostly diagnostic statistics)
 
- Protected Attributes inherited from dsp::PhaseSeriesUnloader
Reference::To< FilenameConventionconvention
 The filename convention.
 
std::string directory
 The filename directory.
 
std::string prefix
 The filename prefix.
 
std::string extension
 The filename extension.
 
bool path_add_source
 Put each output file in a sub-directory named by source.
 

Additional Inherited Members

- Static Public Member Functions inherited from Reference::Able
static size_t get_instance_count ()
 
- Static Public Member Functions inherited from Reference::HeapTracked
static void * operator new (size_t size, void *ptr=0)
 
static void operator delete (void *location, void *ptr)
 
static void operator delete (void *location)
 
static size_t get_heap_queue_size ()
 

Detailed Description

Class to unload PhaseSeries data in a Pulsar::Archive.

Member Function Documentation

◆ new_Archive()

Pulsar::Archive * dsp::Archiver::new_Archive ( ) const
protected

Generate a new Archive for output.

Return a new Archive instance.

References Pulsar::Archive::getadd(), and Pulsar::Archive::new_Archive().

◆ raw_to_central()

void dsp::Archiver::raw_to_central ( unsigned  ichan,
Pulsar::MoreProfiles moments,
const Pulsar::Integration means,
const unsigned *  hits 
)
protected

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

Generated using doxygen 1.8.17