Main Page   Namespace List   Compound List   File List   Namespace Members   Compound Members   File Members  

scind.hxx

Go to the documentation of this file.
00001 /*--------------------------------------------------------------------------*/
00078 /* This header file is equipped with documentation made in comments in a
00079 * format suitable for production of LaTeX or HTML documentation with the
00080 * doxygen software.
00081 * Editor tabular size: 4                                                    */
00082 /****************************************************************************/
00083 
00084 #ifndef _SCIND_H
00085 #define _SCIND_H
00086 
00087 #include <stdio.h>
00088 
00090 #include "iocount.h"    // count_t is defined there
00091 
00096 namespace sc {
00097 
00100 enum scwhat {
00101         HEAD,   
00102         DSI,    
00103         DESI,   
00104         AFLUX,  
00105         MOM     
00106 } ;
00107 
00110 inline int napcomb(int a) { return ((a)*(a)+(a))/2 ; }
00111 
00114 //#define LOGIDX
00115 
00116 /****************************************************************************/
00117 /*                     Declarations of local functions:                     */
00118 /****************************************************************************/
00119 
00139 const char * apername(int nchan, int index) ;
00140 //throw(std::out_of_range) 
00141 
00155 int ind_seqnum(int nchan, const char * name) ;
00156         
00199 void init(int maxndata, int maxnmeas, int nchan) ;
00200 //throw(std::out_of_range,std::bad_alloc) ;
00201 
00232 void chan_init(int chan, double bkgr, double deadtime = -1, double nonpois = -1,
00233         count_t * data = 0) ;
00234 //throw (std::out_of_range, std::domain_error) ;
00235 
00384 void compute(int ndata, int * ncorr, double microexp, bool isgen) ;
00385 //throw (std::domain_error, std::range_error, std::invalid_argument, std::out_of_range, sc::dataproblem) ;
00386 
00395 int getcurmeas() ;
00396 //throw (std::domain_error);
00397 
00407 void again() ;
00408 //throw() ;
00409 
00423 void done() ;
00424 
00472 void writeidx(FILE * f, scwhat what, const char * stamp, 
00473 const char * suffix = 0) ;
00474 //throw(std::domain_error, std::invalid_argument, sc::ioproblem) ;
00475 
00521 void avgmatrix(double ** matrix, int ncol, int nrow, 
00522         signed char * rowselect, signed char select, 
00523         double * avg, double * err2, int lag) ;
00524 //throw(std::bad_alloc, std::invalid_argument, sc::dataproblem) ;
00525 
00550 void average(bool isgen, int lag) ;
00551 //throw(std::bad_alloc, std::invalid_argument, sc::dataproblem) ;
00552 
00583 void writeavgidx(FILE * f, scwhat what, bool isgen, const char * stamp) ;
00584 //throw(std::domain_error, std::invalid_argument, sc::ioproblem) ;
00585 
00611 void writeavgflux(FILE * f, scwhat what, bool isgen, const char * stamp,
00612         bool write_nonpois = false) ;
00613 //throw(std::domain_error, std::invalid_argument, sc::ioproblem) ;
00614 
00664 void writemom(FILE * f, scwhat what, const char * stamp, 
00665 const char * suffix = 0) ;
00666 //throw(std::domain_error, std::invalid_argument, sc::ioproblem) ;
00667 
00681 double getidx(int meas, scwhat what, int i) ;
00682 //throw (std::domain_error,std::out_of_range,std::invalid_argument) ;
00683 
00694 double * getidxptr(int meas, scwhat what) ;
00695 
00710 double getavgidx(scwhat what, bool isgen, int i) ;
00711 //throw (std::domain_error,std::invalid_argument) ;
00712 
00724 double * getavgidxptr(scwhat what, bool isgen) ;
00725 
00737 double geter2idx(scwhat what, bool isgen, int i) ;
00738 //throw (std::domain_error,std::invalid_argument) ;
00739 
00751 double * geter2idxptr(scwhat what, bool isgen) ;
00752 
00761 double getmean(bool iscor, int i) ;
00762 //throw (std::domain_error) ;
00763 
00775 double getavgflux(bool isgen, int i) ;
00776 //throw (std::domain_error) ;
00777 
00791 double geter2flux(bool isgen, int i) ;
00792 //throw (std::domain_error) ;
00793 
00803 double getsig(int lag, int i) ;
00804 //throw (std::domain_error,std::invalid_argument) ;
00805 
00871 void stattest(int ndata, double microexp) ;
00872 //count_t * data, int n, double nonlin, double * scind) ;
00873 //throw (std::invalid_argument, sc::dataproblem) ;
00874 
00983 void statflux(int ndata, int * ncorr, double microexp, int k, 
00984         bool isfilt=false, double * nonpois = 0, double * avg = 0, double * er2 = 0) ;
00985 //throw (std::invalid_argument) ;
00986 
00987 
00990 const int DESIBIN = 3 ;
00991 
00994 const char IDXFMT[] = "%s%7.4f" ;
00996 const char IDXDLM[] = " " ;
00997 
01000 const char FLXFMT[] = "%s%7.2f" ;
01002 const char FLXDLM[] = " " ;
01003 
01006 const char MOMFMT[] = "%s%7.0f" ;
01008 const char MOMDLM[] = "\t" ;
01009 
01011 const int MODENORM = 0 ;
01013 const int MODEGEN  = 1 ;
01015 const int MODENO = -1 ;
01016 
01018 const int MAXLAG =0 ;
01019 
01020 }       // of namespace sc
01021 
01022 #endif

Generated on Wed Jan 16 00:40:06 2002 for MASS Software by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001