1 saw 1.1 /*-----------------------------------------------------------------------------
2 * Copyright (c) 1993 Southeastern Universities Research Association,
3 * Continuous Electron Beam Accelerator Facility
4 *
5 * This software was developed under a United States Government license
6 * described in the NOTICE file included as part of this distribution.
7 *
8 * Stephen A. Wood, 12000 Jefferson Ave., Newport News, VA 23606
9 * Email: saw@cebaf.gov Tel: (804) 249-7367 Fax: (804) 249-5800
10 *-----------------------------------------------------------------------------
11 *
12 * Description:
13 * Include file with prototypes for CTP routines.
14 *
15 * Author: Stephen Wood, CEBAF Hall C
16 *
17 * Revision History:
18 * $Log: th.h,v $
19 * Revision 1.4 1995/08/03 13:47:48 saw
20 * Add Error code for integer overflow
21 *
22 saw 1.1 * Revision 1.3 1994/11/07 14:40:22 saw
23 * Add error code S_TH_UNREG
24 *
25 * Revision 1.2 1994/09/27 20:34:46 saw
26 * Define STDERR to be stdout
27 *
28 * Revision 1.1 1993/05/11 15:10:08 saw
29 * Initial revision
30 *
31 */
32
33 #ifndef _TH_H
34 #define _TH_H
35 /* Variable registration */
36
37 typedef long thStatus; /* Return status type */
38
39 /* General booking routines */
40 thStatus thLoad(char *fname);
41 thStatus thOBook();
42 thStatus thBook();
43 saw 1.1
44
45 /* Test package routines */
46 typedef enum {
47 WALK_DISPLAY, WALK_CLEAR_FLAGS, WALK_CLEAR_SCALERS, WALK_EXECUTE,
48 WALK_REMOVE, WALK_INCREMENT_SCALERS} WALKOP;
49
50 thStatus thWalkTree(char *block_name, WALKOP walkop);
51 thStatus thExecuteTests(char *block_name);
52 thStatus thClearTestFlags(char *block_name);
53 thStatus thClearTestScalers(char *block_name);
54 thStatus thIncTestScalers(char *block_name);
55 /*#define thExecuteTests(block_name) thWalkTree(block_name,WALK_EXECUTE)*/
56 /*#define thIncTestScalers(block_name) \
57 thWalkTree(block_name,WALK_INCREMENT_SCALERS)*/
58 #define thDisplayTests(block_name) thWalkTree(block_name,WALK_DISPLAY)
59 #define thRemoveTests(block_name) thWalkTree(block_name,WALK_REMOVE)
60 /*#define thClearTestFlags(block_name) \
61 thWalkTree(block_name,WALK_CLEAR_FLAGS)*/
62 /*#define thClearTestScalers(block_name) \
63 thWalkTree(block_name,WALK_CLEAR_SCALERS)*/
64 saw 1.1 thStatus thExecuteGroup(char *group_name);
65 thStatus thClearGroup(char *group_name);
66 thStatus thClearScalersGroup(char *group_name);
67 thStatus thIncrementScalersGroup(char *group_name);
68
69 /* Histogram package routines */
70 thStatus thExecuteHists(char *block_name);
71 thStatus thClearHists(char *block_name);
72 int thGetHistID(char *name);
73 thStatus thHistAliasWrite(char *fname);
74
75 #ifndef S_SUCCESS
76 #define S_SUCCESS 0
77 #define S_FAILURE -1
78 #endif
79 #define S_TH_UNREG 1 /* Unregistered variable in test expression */
80 #define S_INTOVF 2
81
82 #endif
83 #define STDERR stdout
|