[2352] | 1 | // ArchTOIPipe (C) CEA/DAPNIA/SPP IN2P3/LAL
|
---|
| 2 | // Eric Aubourg
|
---|
| 3 | // Christophe Magneville
|
---|
| 4 | // Reza Ansari
|
---|
[2359] | 5 | // $Id: ring2cout.cc,v 1.3 2003-04-01 13:27:48 aubourg Exp $
|
---|
[2352] | 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 | ////////////////////////////////////////////////////////////////////////
|
---|
[2354] | 15 | Ring2cout::Ring2cout(long n)
|
---|
[2359] | 16 | :totnscount(0), nRings(1)
|
---|
[2352] | 17 | {
|
---|
[2354] | 18 | setNSamples(n);
|
---|
[2352] | 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 |
|
---|
[2354] | 42 | cout << "///////////////////////////////// coucou !" << endl;
|
---|
| 43 |
|
---|
| 44 |
|
---|
[2352] | 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 ++;
|
---|
[2359] | 57 | wontNeedBefore(k*Nsamples);
|
---|
[2352] | 58 |
|
---|
| 59 | cout << " ring " << k << endl;
|
---|
| 60 | for (int i=i; i< Nsamples;i++)
|
---|
[2359] | 61 | cout << ctheta[i] << " " << cphi[i]<< " " << val[i]<< endl;
|
---|
[2354] | 62 | totnscount++;
|
---|
[2352] | 63 |
|
---|
| 64 | }
|
---|
| 65 |
|
---|
| 66 | cout<<"RING2Toi::run: Samples Read "<<mSnRead
|
---|
| 67 | <<" Filled "<<mSnFilled
|
---|
| 68 | <<" BadCoorRange="<<BadCoorRange<<endl;
|
---|
| 69 |
|
---|
| 70 | //---------------------------------------------------------
|
---|
| 71 | } catch (PException & exc) {
|
---|
| 72 | cout<<"Ring2cout: Catched Exception "<<(string)typeid(exc).name()
|
---|
| 73 | <<"\n .... Msg= "<<exc.Msg()<<endl;
|
---|
| 74 | }
|
---|
[2354] | 75 |
|
---|
[2352] | 76 |
|
---|
[2354] | 77 | return;
|
---|
[2352] | 78 | }
|
---|
[2354] | 79 |
|
---|
| 80 |
|
---|
| 81 |
|
---|
| 82 |
|
---|
| 83 |
|
---|
| 84 |
|
---|
| 85 |
|
---|
| 86 |
|
---|
| 87 |
|
---|
| 88 |
|
---|
| 89 |
|
---|
| 90 |
|
---|
| 91 |
|
---|
| 92 |
|
---|
| 93 |
|
---|
| 94 |
|
---|
| 95 |
|
---|
| 96 |
|
---|