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

Last change on this file since 2360 was 2360, checked in by cecile, 22 years ago

OK

File size: 2.1 KB
RevLine 
[2352]1// ArchTOIPipe (C) CEA/DAPNIA/SPP IN2P3/LAL
2// Eric Aubourg
3// Christophe Magneville
4// Reza Ansari
[2360]5// $Id: ring2cout.cc,v 1.4 2003-04-04 14:17:37 cecile 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////////////////////////////////////////////////////////////////////////
[2360]15Ring2cout::Ring2cout(long ns, long nr)
16 :totnscount(0)
[2352]17{
[2360]18 setNSamples(ns);
19 setNRings(nr);
[2352]20}
21
22Ring2cout::~Ring2cout()
23{
24}
25
26
27////////////////////////////////////////////////////////////////////////
28void Ring2cout::Print(::ostream & os)
29{
30}
31
32////////////////////////////////////////////////////////////////////////
33void Ring2cout::init() {
34 cout << "Ring2cout::init" << endl;
35 declareInput("Theta"); // input index 0
36 declareInput("Phi"); // input index 1
37 declareInput("Phase"); // input index 2
38}
39
40////////////////////////////////////////////////////////////////////////
41void Ring2cout::run() {
42
43//---------------------------------------------------------
44try {
45 uint_4 mSnRead=0, mSnFilled=0, BadCoorRange=0;
[2360]46
47 cout << " ring " << Nrings << " ns " << Nsamples<< endl;
[2352]48 double ctheta[Nsamples],cphi[Nsamples],val[Nsamples];
[2360]49 for (int k=0; k<Nrings; k++) {
[2352]50
51 getData(0,k*Nsamples,Nsamples,ctheta);
52 getData(1,k*Nsamples,Nsamples,cphi);
53 getData(2,k*Nsamples,Nsamples,val);
54 mSnRead ++;
55
[2360]56 for (int i=0; i< Nsamples;i++)
57 cout << Nrings << " " << k <<" " << i <<" " << ctheta[i] << " " << cphi[i]<< " " << val[i]<< endl;
58 totnscount+=Nsamples;
[2352]59
60 }
[2360]61
62 cout<<"RING2cout::run: Samples Read "<<mSnRead
[2352]63 <<" Filled "<<mSnFilled
64 <<" BadCoorRange="<<BadCoorRange<<endl;
65
66 //---------------------------------------------------------
67} catch (PException & exc) {
68 cout<<"Ring2cout: Catched Exception "<<(string)typeid(exc).name()
69 <<"\n .... Msg= "<<exc.Msg()<<endl;
70}
[2354]71
[2352]72
[2354]73 return;
[2352]74}
[2354]75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Note: See TracBrowser for help on using the repository browser.