Append.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2007 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/More/General/Pulsar/Append.h
10 
11 #ifndef _Pulsar_Append_H
12 #define _Pulsar_Append_H
13 
14 #include "Pulsar/Archive.h"
15 
16 namespace Pulsar {
17 
19  class Append : public Reference::Able {
20 
21  public:
22 
24  Append ();
25 
27  virtual void init (Archive* into) { }
28 
30  virtual void check (Archive* into, const Archive* from);
31 
33  void append (Archive* into, const Archive* from);
34 
35  bool must_match;
36 
37  bool ignore_phase;
38 
39  protected:
40 
42  virtual bool stop (Archive* into, const Archive* from);
43 
45  virtual const Archive::Match* get_mixable_policy (const Archive* into);
46 
48 
58  virtual void combine (Archive* into, Archive* from) = 0;
59 
60  /* Internal variables that may be set by combine method */
61  bool aligned;
62  bool equal_ephemerides;
63  bool equal_models;
64  bool insert_model;
65  };
66 
67 }
68 
69 #endif
70 
Append()
Default constructor.
Definition: Append.C:34
virtual Signal::Source get_type() const =0
Get the observation type (psr, cal)
virtual void check(Archive *into, const Archive *from)
Throw an exception if there is any reason to not call append.
Definition: Append.C:65
void append(Archive *into, const Archive *from)
Copy the data in 'from' to 'into'.
Definition: Append.C:85
Expert * expert()
Provide access to the expert interface.
Definition: Integration.C:162
const Match * get_mixable() const
Policy determines if data can be combined/integrated.
Definition: Archive_match.C:89
virtual unsigned get_nsubint() const =0
Get the number of sub-integrations stored in the file.
virtual const Archive::Match * get_mixable_policy(const Archive *into)
Return the policy used to verify that data are mixable.
Definition: Append.C:60
The primary interface to pulsar observational data.
Definition: Archive.h:45
virtual void insert(const Predictor *)=0
void copy(const Archive &)
Copy all base class attributes, Extensions, and Integrations.
Definition: Archive_copy.C:24
const Parameters * get_ephemeris() const
Return a pointer to the current archive ephemeris.
Definition: Archive.C:281
void set_zero_phase_aligned(bool flag)
Leading edge of phase bin zero = polyco predicted phase zero.
Definition: IntegrationExpert.h:122
bool has_model() const
Returns true if the Archive has a model.
Definition: Archive.h:330
Predictor * get_model()
Return a non-const pointer to the current phase predictor.
Definition: ArchiveExpert.h:84
virtual bool stop(Archive *into, const Archive *from)
Return true if there is a benign reason to stop.
Definition: Append.C:41
Integration * get_Integration(unsigned subint)
Return pointer to the specified Integration.
Definition: IntegrationManager.C:41
bool has_ephemeris() const
Return true if the Archive has an ephemeris.
Definition: Archive.h:321
bool zero_phase_aligned() const
Return true if all Integration::zero_phase_aligned flags are set.
Definition: ArchiveExpert.h:88
Policy used to determine if two archives match.
Definition: ArchiveMatch.h:25
Expert * expert()
Provide access to the expert interface.
Definition: Archive.C:40
virtual bool equals(const Parameters *that) const=0
virtual void init(Archive *into)
Initialize an archive for appending.
Definition: Append.h:37
virtual void combine(Archive *into, Archive *from)=0
Add the data in 'from' to 'into'.
virtual bool matches(const Predictor *) const=0
const Predictor * get_model() const
Return a pointer to the current phase predictor.
Definition: Archive.C:290
void update_model(const MJD &mjd)
Update the model.
Definition: ArchiveExpert.h:76
virtual Archive * clone() const =0
Return a new copy constructed instance equal to this.
Defines the PSRCHIVE library.
Definition: CalSource.h:17
bool standard_match(const Archive *arch, std::string &reason) const
Test if arch matches (enough for a pulsar - standard match)
Definition: Archive_match.C:34
void apply_model(Integration *subint, const Predictor *old=0)
Apply the current model to the Integration.
Definition: ArchiveExpert.h:72

Generated using doxygen 1.8.17