00001 /* 00002 * hddm_s.h - DO NOT EDIT THIS FILE 00003 * 00004 * This file was generated automatically by hddm-c from the file 00005 * hddm/mc.xml 00006 * This header file defines the c structures that hold the data 00007 * described in the data model (from hddm/mc.xml). 00008 * Any program that needs access to the data described in the model 00009 * can include this header file, and make use of the input/output 00010 * services provided in hddm_s.c 00011 * 00012 * The hddm data model tool set was written by 00013 * Richard Jones, University of Connecticut. 00014 * 00015 * For more information see the following web site 00016 * 00017 * http://zeus.phys.uconn.edu/halld/datamodel/doc 00018 * 00019 */ 00020 00021 #include <stdlib.h> 00022 #include <stdio.h> 00023 #include <rpc/rpc.h> 00024 #include <string.h> 00025 #include <strings.h> 00026 #include <particleType.h> 00027 00028 #define MALLOC(N,S) malloc(N) 00029 #define FREE(P) free(P) 00030 00031 #ifndef SAW_s_Momentum_t 00032 #define SAW_s_Momentum_t 00033 00034 typedef struct { 00035 float E; 00036 float px; 00037 float py; 00038 float pz; 00039 } s_Momentum_t; 00040 #endif /* s_Momentum_t */ 00041 00042 #ifndef SAW_s_Properties_t 00043 #define SAW_s_Properties_t 00044 00045 typedef struct { 00046 int charge; 00047 float mass; 00048 } s_Properties_t; 00049 #endif /* s_Properties_t */ 00050 00051 #ifndef SAW_s_Beam_t 00052 #define SAW_s_Beam_t 00053 00054 typedef struct { 00055 Particle_t type; 00056 s_Momentum_t* momentum; 00057 s_Properties_t* properties; 00058 } s_Beam_t; 00059 #endif /* s_Beam_t */ 00060 00061 #ifndef SAW_s_Target_t 00062 #define SAW_s_Target_t 00063 00064 typedef struct { 00065 Particle_t type; 00066 s_Momentum_t* momentum; 00067 s_Properties_t* properties; 00068 } s_Target_t; 00069 #endif /* s_Target_t */ 00070 00071 #ifndef SAW_s_Product_t 00072 #define SAW_s_Product_t 00073 00074 typedef struct { 00075 int decayVertex; 00076 Particle_t type; 00077 s_Momentum_t* momentum; 00078 s_Properties_t* properties; 00079 } s_Product_t; 00080 00081 typedef struct { 00082 unsigned int mult; 00083 s_Product_t in[1]; 00084 } s_Products_t; 00085 #endif /* s_Product_t */ 00086 00087 #ifndef SAW_s_Origin_t 00088 #define SAW_s_Origin_t 00089 00090 typedef struct { 00091 float t; 00092 float vx; 00093 float vy; 00094 float vz; 00095 } s_Origin_t; 00096 #endif /* s_Origin_t */ 00097 00098 #ifndef SAW_s_Vertex_t 00099 #define SAW_s_Vertex_t 00100 00101 typedef struct { 00102 s_Products_t* products; 00103 s_Origin_t* origin; 00104 } s_Vertex_t; 00105 00106 typedef struct { 00107 unsigned int mult; 00108 s_Vertex_t in[1]; 00109 } s_Vertices_t; 00110 #endif /* s_Vertex_t */ 00111 00112 #ifndef SAW_s_Reaction_t 00113 #define SAW_s_Reaction_t 00114 00115 typedef struct { 00116 int type; 00117 float weight; 00118 s_Beam_t* beam; 00119 s_Target_t* target; 00120 s_Vertices_t* vertices; 00121 } s_Reaction_t; 00122 00123 typedef struct { 00124 unsigned int mult; 00125 s_Reaction_t in[1]; 00126 } s_Reactions_t; 00127 #endif /* s_Reaction_t */ 00128 00129 #ifndef SAW_s_PhysicsEvent_t 00130 #define SAW_s_PhysicsEvent_t 00131 00132 typedef struct { 00133 int eventNo; 00134 int runNo; 00135 s_Reactions_t* reactions; 00136 } s_PhysicsEvent_t; 00137 00138 typedef struct { 00139 unsigned int mult; 00140 s_PhysicsEvent_t in[1]; 00141 } s_PhysicsEvents_t; 00142 #endif /* s_PhysicsEvent_t */ 00143 00144 #ifndef SAW_s_HDDM_t 00145 #define SAW_s_HDDM_t 00146 00147 typedef struct { 00148 s_PhysicsEvents_t* physicsEvents; 00149 } s_HDDM_t; 00150 #endif /* s_HDDM_t */ 00151 00152 #ifdef __cplusplus 00153 extern "C" { 00154 #endif 00155 00156 s_HDDM_t* make_s_HDDM(); 00157 00158 s_PhysicsEvents_t* make_s_PhysicsEvents(int n); 00159 00160 s_Reactions_t* make_s_Reactions(int n); 00161 00162 s_Beam_t* make_s_Beam(); 00163 00164 s_Momentum_t* make_s_Momentum(); 00165 00166 s_Properties_t* make_s_Properties(); 00167 00168 s_Target_t* make_s_Target(); 00169 00170 s_Vertices_t* make_s_Vertices(int n); 00171 00172 s_Products_t* make_s_Products(int n); 00173 00174 s_Origin_t* make_s_Origin(); 00175 00176 #ifdef __cplusplus 00177 } 00178 #endif 00179 00180 #ifndef s_DocumentString 00181 #define s_DocumentString 00182 00183 extern char HDDM_s_DocumentString[]; 00184 00185 #ifdef INLINE_PREPEND_UNDERSCORES 00186 #define inline __inline 00187 #endif 00188 00189 #endif /* s_DocumentString */ 00190 00191 #ifndef HDDM_STREAM_INPUT 00192 #define HDDM_STREAM_INPUT -91 00193 #define HDDM_STREAM_OUTPUT -92 00194 00195 struct popNode_s { 00196 void* (*unpacker)(XDR*, struct popNode_s*); 00197 int inParent; 00198 int popListLength; 00199 struct popNode_s* popList[99]; 00200 }; 00201 typedef struct popNode_s popNode; 00202 00203 typedef struct { 00204 FILE* fd; 00205 int iomode; 00206 char* filename; 00207 XDR* xdrs; 00208 popNode* popTop; 00209 } s_iostream_t; 00210 00211 #endif /* HDDM_STREAM_INPUT */ 00212 00213 #ifdef __cplusplus 00214 extern "C" { 00215 #endif 00216 00217 s_HDDM_t* read_s_HDDM(s_iostream_t* fp); 00218 00219 int flush_s_HDDM(s_HDDM_t* this1,s_iostream_t* fp); 00220 00221 s_iostream_t* open_s_HDDM(char* filename); 00222 00223 s_iostream_t* init_s_HDDM(char* filename); 00224 00225 void close_s_HDDM(s_iostream_t* fp); 00226 00227 #ifdef __cplusplus 00228 } 00229 #endif 00230 00231 #if !defined HDDM_NULL 00232 extern int hddm_nullTarget; 00233 # define HDDM_NULL (void*)&hddm_nullTarget 00234 #endif
1.4.7