Last change
on this file since 2582 was 2322, checked in by cmv, 23 years ago |
- passage xxstream.h en xxstream
- compile avec gcc_3.2, gcc_2.96 et cxx
En 3.2 le seek from ::end semble marcher (voir Eval/COS/pbseekios.cc)
rz+cmv 11/2/2003
|
File size:
1.0 KB
|
Rev | Line | |
---|
[1205] | 1 | #include <stdio.h>
|
---|
| 2 | #include <stdlib.h>
|
---|
| 3 | #include "math.h"
|
---|
[2322] | 4 | #include <iostream>
|
---|
[1205] | 5 | #include <string>
|
---|
| 6 |
|
---|
| 7 | // Pour le test
|
---|
| 8 | #include "histinit.h"
|
---|
| 9 | #include "histos.h"
|
---|
| 10 | #include "histos2.h"
|
---|
| 11 | #include "psighand.h"
|
---|
| 12 |
|
---|
| 13 |
|
---|
| 14 | #include "fmath.h"
|
---|
| 15 | #include "nbrandom.h"
|
---|
| 16 |
|
---|
| 17 | void tdcr(AnyDataObj * obj)
|
---|
| 18 | {
|
---|
| 19 | Histo & h = *(dynamic_cast<Histo *>(obj));
|
---|
| 20 | h.Print();
|
---|
| 21 | }
|
---|
| 22 |
|
---|
| 23 | int main(int narg, char* arg[])
|
---|
| 24 | {
|
---|
| 25 |
|
---|
| 26 | SophyaInit();
|
---|
| 27 | SophyaConfigureSignalhandling(true,true,true);
|
---|
| 28 | try {
|
---|
| 29 | Histo *h;
|
---|
| 30 | float x;
|
---|
| 31 |
|
---|
| 32 |
|
---|
| 33 | h = new Histo(0., 200., 100); // Creation histo (AVEC new )
|
---|
| 34 | for(int i=0; i<100; i++) // Remplissage d'histo
|
---|
| 35 | { x = (2*i+1.); h->Add(x, x*(200.-x)); }
|
---|
| 36 | cout << " Appel tdcr(histo) " << endl;
|
---|
| 37 | tdcr(h);
|
---|
| 38 | cout << " Appel tdcr(histo2D) " << endl;
|
---|
| 39 | Histo2D * h2 = new Histo2D(0., 1., 10, 0., 1., 10);
|
---|
| 40 | tdcr(h2);
|
---|
| 41 | // cout << " Appel tdcr(NULL) " << endl;
|
---|
| 42 | // tdcr(NULL);
|
---|
| 43 | cout << " End --- exit .... " << endl;
|
---|
| 44 | }
|
---|
| 45 | catch (PThrowable & exc) {
|
---|
| 46 | cerr << " catched Exception " << exc.Msg() << endl;
|
---|
| 47 | }
|
---|
| 48 | catch (...) {
|
---|
| 49 | cerr << " catched unknown (...) exception " << endl;
|
---|
| 50 | }
|
---|
| 51 | }
|
---|
| 52 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.