21{
   24 
   26 
   27  try {
   28 
   29    JParser<> zap(
"Example program to test fixed length array class.");
 
   30 
   32 
   33    zap(argc, argv);
   34  }
   35  catch(const exception &error) {
   36    FATAL(error.what() << endl);
 
   37  }
   38 
   39 
   40  {
   41    
   42    
   43    
   44  }
   45 
   46  {
   47    const int i0 = 1;
   48 
   50 
   52  }
   53 
   54  {
   55    const int i0 = 1;
   56    const int i1 = 2;
   57 
   59 
   62  }
   63 
   64 
   65  {
   66    const int N = 9;
   67 
   69    typedef JArray<N-1, 
int>       JArray2_t;
 
   70  
   72    
   73    for (JArray1_t::iterator i = 
array.begin(); i != 
array.end(); ++i) {
 
   75    }
   76 
   77    if (
debug >= debug_t) {
 
   78      cout << "input        A    ";
   79      copy(
array.begin(), 
array.end(), ostream_iterator<int>(cout, 
" "));
 
   80      cout << endl;
   81    }      
   82 
   83    {
   85 
   86      for (int i = 0; i != N; ++i) {
   88      }
   89    }
   90 
   91    {
   92      JArray2_t buffer = 
array.pop_front();
 
   93     
   94      if (
debug >= debug_t) {
 
   95        cout << "pop_front "; 
   96        copy(buffer.begin(), buffer.end(), ostream_iterator<int>(cout, 
" "));
 
   97        cout << endl;
   98      }
   99 
  100      for (int i = 0; i != N-1; ++i) {
  102      }
  103    }
  104 
  105    {
  106      JArray1_t buffer(
array.pop_back(), 
array[N-1]);
 
  107 
  109    }
  110 
  111    {
  112      JArray2_t buffer = 
array.pop_back();
 
  113      
  114      if (
debug >= debug_t) {
 
  115        cout << "pop_back  ";
  116        copy(buffer.begin(), buffer.end(), ostream_iterator<int>(cout, 
" "));
 
  117        cout << endl;
  118      }
  119 
  120      for (int i = 0; i != N-1; ++i) {
  122      }
  123    }
  124  }
  125 
  126  {
  128 
  130 
  131    if (
debug >= debug_t) {
 
  132      copy(p3.begin(), p3.end(), ostream_iterator<int>(cout, 
" "));
 
  133      cout << endl;
  134    }
  135 
  137 
  139 
  140    if (
debug >= debug_t) {
 
  141      copy(p2.begin(), p2.end(), ostream_iterator<int>(cout, 
" "));
 
  142      cout << endl;
  143    }
  144 
  146 
  148 
  149    if (
debug >= debug_t) {
 
  150      copy(
p1.begin(), 
p1.end(), ostream_iterator<int>(cout, 
" "));
 
  151      cout << endl;
  152    }
  153 
  155 
  156    
  157  }
  158 
  159  {
  161 
  163    key.second.first = 1;
 
  164 
  165    int i = 2;
  166 
  168 
  169    if (
debug >= debug_t) {
 
  170      copy(
array.begin(), 
array.end(), ostream_iterator<int>(cout, 
" "));
 
  171      cout << endl;
  172    }
  173 
  177 
  180 
  182  }
  183 
  184  return 0;
  185}
#define ASSERT(A,...)
Assert macro.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
std::vector< T >::difference_type distance(typename std::vector< T >::const_iterator first, typename PhysicsEvent::const_iterator< T > second)
Specialisation of STL distance.
 
Utility class to parse command line options.
 
void copy(const Head &from, JHead &to)
Copy header from from to to.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).