11 #ifndef __Pulsar_ForEachProfile_h
12 #define __Pulsar_ForEachProfile_h
14 #include "Pulsar/Archive.h"
28 ForEachProfile (std::vector<std::string>& tokens) { parse(tokens); }
32 void parse (std::vector<std::string>& tokens);
35 template<
typename Method,
typename Argument>
36 void operator () (Archive* archive, Method method, Argument argument)
38 std::vector<unsigned> subint_i;
39 TextInterface::parse_indeces (subint_i, subint, archive->get_nsubint());
43 std::vector<unsigned> chan_i;
44 TextInterface::parse_indeces (chan_i, chan, archive->get_nchan());
48 std::vector<unsigned> pol_i;
49 TextInterface::parse_indeces (pol_i, pol, archive->get_npol());
53 for (
unsigned isub=0; isub < subint_i.size(); isub++)
54 for (
unsigned ipol=0; ipol < pol_i.size(); ipol++)
55 for (
unsigned ichan=0; ichan < chan_i.size(); ichan++)
57 Profile* profile = archive->get_Profile (subint_i[isub],
60 (profile->*method)(argument);