1 | // ArchTOIPipe (C) CEA/DAPNIA/SPP IN2P3/LAL
|
---|
2 | // Eric Aubourg
|
---|
3 | // Christophe Magneville
|
---|
4 | // Reza Ansari
|
---|
5 | // $Id: ring2cout.cc,v 1.2 2003-03-26 09:48:53 cecile Exp $
|
---|
6 |
|
---|
7 | #include "toimanager.h"
|
---|
8 | #include "pexceptions.h"
|
---|
9 | #include "ctimer.h"
|
---|
10 | #include "ring2cout.h"
|
---|
11 | // La valeur "Pi" doit etre celle de smathconst.h a cause du test sur theta
|
---|
12 | #include "smathconst.h"
|
---|
13 |
|
---|
14 | ////////////////////////////////////////////////////////////////////////
|
---|
15 | Ring2cout::Ring2cout(long n)
|
---|
16 | :totnscount(0), nRings(0)
|
---|
17 | {
|
---|
18 | setNSamples(n);
|
---|
19 | }
|
---|
20 |
|
---|
21 | Ring2cout::~Ring2cout()
|
---|
22 | {
|
---|
23 | }
|
---|
24 |
|
---|
25 |
|
---|
26 | ////////////////////////////////////////////////////////////////////////
|
---|
27 | void Ring2cout::Print(::ostream & os)
|
---|
28 | {
|
---|
29 | }
|
---|
30 |
|
---|
31 | ////////////////////////////////////////////////////////////////////////
|
---|
32 | void Ring2cout::init() {
|
---|
33 | cout << "Ring2cout::init" << endl;
|
---|
34 | declareInput("Theta"); // input index 0
|
---|
35 | declareInput("Phi"); // input index 1
|
---|
36 | declareInput("Phase"); // input index 2
|
---|
37 | }
|
---|
38 |
|
---|
39 | ////////////////////////////////////////////////////////////////////////
|
---|
40 | void Ring2cout::run() {
|
---|
41 |
|
---|
42 | cout << "///////////////////////////////// coucou !" << endl;
|
---|
43 |
|
---|
44 |
|
---|
45 |
|
---|
46 | //---------------------------------------------------------
|
---|
47 | try {
|
---|
48 | uint_4 mSnRead=0, mSnFilled=0, BadCoorRange=0;
|
---|
49 | double ctheta[Nsamples],cphi[Nsamples],val[Nsamples];
|
---|
50 |
|
---|
51 | for (int k=0; k<nRings; k++) {
|
---|
52 |
|
---|
53 | getData(0,k*Nsamples,Nsamples,ctheta);
|
---|
54 | getData(1,k*Nsamples,Nsamples,cphi);
|
---|
55 | getData(2,k*Nsamples,Nsamples,val);
|
---|
56 | mSnRead ++;
|
---|
57 |
|
---|
58 | cout << " ring " << k << endl;
|
---|
59 | for (int i=i; i< Nsamples;i++)
|
---|
60 | cout << ctheta << " " << cphi<< " " << val<< endl;
|
---|
61 | totnscount++;
|
---|
62 |
|
---|
63 | }
|
---|
64 |
|
---|
65 | cout<<"RING2Toi::run: Samples Read "<<mSnRead
|
---|
66 | <<" Filled "<<mSnFilled
|
---|
67 | <<" BadCoorRange="<<BadCoorRange<<endl;
|
---|
68 |
|
---|
69 | //---------------------------------------------------------
|
---|
70 | } catch (PException & exc) {
|
---|
71 | cout<<"Ring2cout: Catched Exception "<<(string)typeid(exc).name()
|
---|
72 | <<"\n .... Msg= "<<exc.Msg()<<endl;
|
---|
73 | }
|
---|
74 |
|
---|
75 |
|
---|
76 | return;
|
---|
77 | }
|
---|
78 |
|
---|
79 |
|
---|
80 |
|
---|
81 |
|
---|
82 |
|
---|
83 |
|
---|
84 |
|
---|
85 |
|
---|
86 |
|
---|
87 |
|
---|
88 |
|
---|
89 |
|
---|
90 |
|
---|
91 |
|
---|
92 |
|
---|
93 |
|
---|
94 |
|
---|
95 |
|
---|