1 | // ArchTOIPipe (C) CEA/DAPNIA/SPP IN2P3/LAL
|
---|
2 | // Eric Aubourg
|
---|
3 | // Christophe Magneville
|
---|
4 | // Reza Ansari
|
---|
5 | // $Id: ring2cout.cc,v 1.1 2003-03-24 11:07:00 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()
|
---|
16 | {
|
---|
17 | }
|
---|
18 |
|
---|
19 | Ring2cout::~Ring2cout()
|
---|
20 | {
|
---|
21 | }
|
---|
22 |
|
---|
23 |
|
---|
24 | ////////////////////////////////////////////////////////////////////////
|
---|
25 | void Ring2cout::Print(::ostream & os)
|
---|
26 | {
|
---|
27 | }
|
---|
28 |
|
---|
29 | ////////////////////////////////////////////////////////////////////////
|
---|
30 | void Ring2cout::init() {
|
---|
31 | cout << "Ring2cout::init" << endl;
|
---|
32 | declareInput("Theta"); // input index 0
|
---|
33 | declareInput("Phi"); // input index 1
|
---|
34 | declareInput("Phase"); // input index 2
|
---|
35 | }
|
---|
36 |
|
---|
37 | ////////////////////////////////////////////////////////////////////////
|
---|
38 | void Ring2cout::run() {
|
---|
39 |
|
---|
40 |
|
---|
41 | //---------------------------------------------------------
|
---|
42 | try {
|
---|
43 | uint_4 mSnRead=0, mSnFilled=0, BadCoorRange=0;
|
---|
44 | double ctheta[Nsamples],cphi[Nsamples],val[Nsamples];
|
---|
45 |
|
---|
46 | for (int k=0; k<nRings; k++) {
|
---|
47 |
|
---|
48 | getData(0,k*Nsamples,Nsamples,ctheta);
|
---|
49 | getData(1,k*Nsamples,Nsamples,cphi);
|
---|
50 | getData(2,k*Nsamples,Nsamples,val);
|
---|
51 | mSnRead ++;
|
---|
52 |
|
---|
53 | cout << " ring " << k << endl;
|
---|
54 | for (int i=i; i< Nsamples;i++)
|
---|
55 | cout << ctheta << " " << cphi<< " " << val<< endl;
|
---|
56 |
|
---|
57 | }
|
---|
58 |
|
---|
59 | cout<<"RING2Toi::run: Samples Read "<<mSnRead
|
---|
60 | <<" Filled "<<mSnFilled
|
---|
61 | <<" BadCoorRange="<<BadCoorRange<<endl;
|
---|
62 |
|
---|
63 | //---------------------------------------------------------
|
---|
64 | } catch (PException & exc) {
|
---|
65 | cout<<"Ring2cout: Catched Exception "<<(string)typeid(exc).name()
|
---|
66 | <<"\n .... Msg= "<<exc.Msg()<<endl;
|
---|
67 | }
|
---|
68 |
|
---|
69 | return;
|
---|
70 | }
|
---|