UVMArchive.h
1//-*-C++-*-
2/***************************************************************************
3 *
4 * Copyright (C) 2016 by Willem van Straten
5 * Licensed under the Academic Free License version 2.1
6 *
7 ***************************************************************************/
8
9// psrchive/Base/Formats/UVM/Pulsar/UVMArchive.h
10
11#ifndef __UVMArchive_h
12#define __UVMArchive_h
13
14#include "Pulsar/BasicArchive.h"
15#include "Pulsar/Agent.h"
16#include "Pulsar/Config.h"
17
18namespace Pulsar {
19
21 class UVMArchive : public BasicArchive {
22
23 public:
24
27
29 UVMArchive ();
30
32 UVMArchive (const UVMArchive& archive);
33
35 ~UVMArchive ();
36
38 const UVMArchive& operator = (const UVMArchive& archive);
39
41 UVMArchive (const Archive& archive);
42
44 void copy (const Archive& archive);
45
47 UVMArchive* clone () const;
48
50 virtual void load_header (const char* filename);
51
52 protected:
53
55 virtual Integration*
56 load_Integration (const char* filename, unsigned subint);
57
59 bool can_unload () const { return false; }
60
62 void unload_file (const char* filename) const { }
63
64 friend class Archive::Advocate<UVMArchive>;
65
67 class Agent : public Archive::Advocate<UVMArchive> {
68
69 public:
70
71 Agent () { }
72
74 bool advocate (const char* filename);
75
77 std::string get_name () { return "UVM"; }
78
80 std::string get_description ();
81
82 };
83
86
89
91 double period;
92
93 private:
94
96 void init ();
97 int program;
98
99 };
100
101
102}
103
104#endif
The primary interface to pulsar observational data.
Definition Archive.h:46
BasicArchive()
null constructor
Definition BasicArchive.C:18
Array of Profiles integrated over the same time interval.
Definition Integration.h:37
Configuration option.
Definition Config.h:69
bool advocate(const char *filename)
Advocate the use of TimerArchive to interpret filename.
Definition UVMArchive.C:262
std::string get_name()
Return the name of the TimerArchive plugin.
Definition UVMArchive.h:77
std::string get_description()
Return description of this plugin.
Definition UVMArchive.C:256
Loads UVM data files.
Definition UVMArchive.h:21
MJD epoch
The epoch of the observation.
Definition UVMArchive.h:88
UVMArchive * clone() const
Return a new copy-constructed UVMArchive instance.
Definition UVMArchive.C:87
void copy(const Archive &archive)
Copy all of the class attributes and the selected Integration data.
Definition UVMArchive.C:64
static Option< bool > include_offpulse_region
Load the phase bins identified as part of the off-pulse baseline.
Definition UVMArchive.h:26
double integration_length
The integration length.
Definition UVMArchive.h:85
void unload_file(const char *filename) const
Unload the UVMArchive (header and Integration data) to filename.
Definition UVMArchive.h:62
bool can_unload() const
The unload_file method is implemented.
Definition UVMArchive.h:59
double period
The folding period.
Definition UVMArchive.h:91
UVMArchive()
Default constructor.
Definition UVMArchive.C:36
~UVMArchive()
Destructor.
Definition UVMArchive.C:41
virtual void load_header(const char *filename)
Load the UVM header information from filename.
Definition UVMArchive.C:94
virtual Integration * load_Integration(const char *filename, unsigned subint)
Load the specified Integration from filename, returning new instance.
Definition UVMArchive.C:248
const UVMArchive & operator=(const UVMArchive &archive)
Assignment operator.
Defines the PSRCHIVE library.
Definition CalSource.h:17

Generated using doxygen 1.14.0