11 #ifndef __Pulsar_TargetDuration_h
12 #define __Pulsar_TargetDuration_h
14 #include "Pulsar/TimeIntegrate.h"
19 class TimeIntegrate::TargetDuration :
20 public Integrate<Archive>::RangePolicy
25 TargetDuration (
double seconds = 0.0) { duration = seconds; }
27 void set_duration (
double seconds) { duration = seconds; }
28 double get_duration ()
const {
return duration; }
31 void initialize (Integrate<Archive>*, Archive*);
34 unsigned get_nrange () {
return ranges.size(); }
36 void get_range (
unsigned irange,
unsigned& start,
unsigned& stop)
38 start = ranges[irange].first;
39 stop = ranges[irange].second;
45 std::vector< std::pair<unsigned,unsigned> > ranges;