source: Sophya/trunk/ArchTOIPipe/ProcWSophya/ring2cout.cc@ 2359

Last change on this file since 2359 was 2359, checked in by aubourg, 22 years ago

correction plein de betises dans ring2cout

File size: 2.1 KB
Line 
1// ArchTOIPipe (C) CEA/DAPNIA/SPP IN2P3/LAL
2// Eric Aubourg
3// Christophe Magneville
4// Reza Ansari
5// $Id: ring2cout.cc,v 1.3 2003-04-01 13:27:48 aubourg 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////////////////////////////////////////////////////////////////////////
15Ring2cout::Ring2cout(long n)
16 :totnscount(0), nRings(1)
17{
18 setNSamples(n);
19}
20
21Ring2cout::~Ring2cout()
22{
23}
24
25
26////////////////////////////////////////////////////////////////////////
27void Ring2cout::Print(::ostream & os)
28{
29}
30
31////////////////////////////////////////////////////////////////////////
32void 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////////////////////////////////////////////////////////////////////////
40void Ring2cout::run() {
41
42 cout << "///////////////////////////////// coucou !" << endl;
43
44
45
46//---------------------------------------------------------
47try {
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 wontNeedBefore(k*Nsamples);
58
59 cout << " ring " << k << endl;
60 for (int i=i; i< Nsamples;i++)
61 cout << ctheta[i] << " " << cphi[i]<< " " << val[i]<< endl;
62 totnscount++;
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}
75
76
77 return;
78}
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
Note: See TracBrowser for help on using the repository browser.