/* * hddm_r.h - DO NOT EDIT THIS FILE * * This file was generated automatically by hddm-c from the file * rest.xml * This header file defines the c structures that hold the data * described in the data model (from rest.xml). * * The hddm data model tool set was written by * Richard Jones, University of Connecticut. * * For more information see the following web site * * http://zeus.phys.uconn.edu/halld/datamodel/doc * */ #include #include #include #include #include #include #include typedef char* string_t; // use this alias for string-valued attributes /* Note to users: The option MALLOC_FREE_WITH_MEMCHECK * was created for debugging this hddm library, but it * is also useful for finding memory leaks in user * code. To use it, replace malloc(n) everywhere in * your code with MALLOC(n,"some descriptive string") * and free(p) with FREE(p) and include this header * and compile with -DMALLOC_FREE_WITH_MEMCHECK set. * Any attempt to malloc memory already malloc'ed or * to free memory that has not yet been malloc'ed is * immediately flagged with an error message. A call * to checkpoint() anywhere in the user code reports * any memory that has been malloc'ed not freed. */ #if defined MALLOC_FREE_WITH_MEMCHECK # include # define MALLOC(N,S) (checkin(malloc(N),S)) # define FREE(P) (checkout(P),free(P)) #else # define MALLOC(N,S) malloc(N) # define FREE(P) free(P) #endif #ifndef SAW_r_Comment_t #define SAW_r_Comment_t typedef struct { string_t text; } r_Comment_t; typedef struct { unsigned int mult; r_Comment_t in[1]; } r_Comments_t; #endif /* r_Comment_t */ #ifndef SAW_r_Origin_t #define SAW_r_Origin_t typedef struct { float t; float vx; float vy; float vz; } r_Origin_t; #endif /* r_Origin_t */ #ifndef SAW_r_Momentum_t #define SAW_r_Momentum_t typedef struct { float E; float px; float py; float pz; } r_Momentum_t; #endif /* r_Momentum_t */ #ifndef SAW_r_Product_t #define SAW_r_Product_t typedef struct { int32_t id; int32_t parentId; int32_t pdgtype; r_Momentum_t* momentum; } r_Product_t; typedef struct { unsigned int mult; r_Product_t in[1]; } r_Products_t; #endif /* r_Product_t */ #ifndef SAW_r_Vertex_t #define SAW_r_Vertex_t typedef struct { r_Origin_t* origin; r_Products_t* products; } r_Vertex_t; typedef struct { unsigned int mult; r_Vertex_t in[1]; } r_Vertices_t; #endif /* r_Vertex_t */ #ifndef SAW_r_Reaction_t #define SAW_r_Reaction_t typedef struct { float Ebeam; string_t jtag; Particle_t targetType; int32_t type; float weight; r_Vertices_t* vertices; } r_Reaction_t; typedef struct { unsigned int mult; r_Reaction_t in[1]; } r_Reactions_t; #endif /* r_Reaction_t */ #ifndef SAW_r_TaggerHit_t #define SAW_r_TaggerHit_t typedef struct { float E; string_t jtag; float t; } r_TaggerHit_t; typedef struct { unsigned int mult; r_TaggerHit_t in[1]; } r_TaggerHits_t; #endif /* r_TaggerHit_t */ #ifndef SAW_r_CalorimeterCluster_t #define SAW_r_CalorimeterCluster_t typedef struct { float E; float Eerr; float Ezcorr; string_t jtag; float t; float terr; float tzcorr; float x; float xerr; float xycorr; float xzcorr; float y; float yerr; float yzcorr; float z; float zerr; } r_CalorimeterCluster_t; typedef struct { unsigned int mult; r_CalorimeterCluster_t in[1]; } r_CalorimeterClusters_t; #endif /* r_CalorimeterCluster_t */ #ifndef SAW_r_TrackFit_t #define SAW_r_TrackFit_t typedef struct { int32_t Ndof; float chisq; float e11; float e12; float e13; float e14; float e15; float e22; float e23; float e24; float e25; float e33; float e34; float e35; float e44; float e45; float e55; float px; float py; float pz; float t0; int32_t t0det; float t0err; float x0; float y0; float z0; } r_TrackFit_t; #endif /* r_TrackFit_t */ #ifndef SAW_r_DEdxDC_t #define SAW_r_DEdxDC_t typedef struct { int32_t NsampleCDC; int32_t NsampleFDC; float dEdxCDC; float dEdxFDC; float dxCDC; float dxFDC; } r_DEdxDC_t; #endif /* r_DEdxDC_t */ #ifndef SAW_r_ChargedTrack_t #define SAW_r_ChargedTrack_t typedef struct { int32_t candidateId; string_t jtag; Particle_t ptype; r_TrackFit_t* trackFit; r_DEdxDC_t* dEdxDC; } r_ChargedTrack_t; typedef struct { unsigned int mult; r_ChargedTrack_t in[1]; } r_ChargedTracks_t; #endif /* r_ChargedTrack_t */ #ifndef SAW_r_StartHit_t #define SAW_r_StartHit_t typedef struct { float dE; string_t jtag; int32_t sector; float t; } r_StartHit_t; typedef struct { unsigned int mult; r_StartHit_t in[1]; } r_StartHits_t; #endif /* r_StartHit_t */ #ifndef SAW_r_TofPoint_t #define SAW_r_TofPoint_t typedef struct { float dE; float dEerr; float dEtcorr; float dExcorr; float dEycorr; string_t jtag; float t; float terr; float x; float xerr; float xtcorr; float xycorr; float y; float yerr; float ytcorr; float z; float zerr; } r_TofPoint_t; typedef struct { unsigned int mult; r_TofPoint_t in[1]; } r_TofPoints_t; #endif /* r_TofPoint_t */ #ifndef SAW_r_RFtime_t #define SAW_r_RFtime_t typedef struct { string_t jtag; float tsync; float tsyncerr; } r_RFtime_t; #endif /* r_RFtime_t */ #ifndef SAW_r_Trigger_t #define SAW_r_Trigger_t typedef struct { bool_t L1a; bool_t L1b; bool_t L1c; string_t jtag; } r_Trigger_t; #endif /* r_Trigger_t */ #ifndef SAW_r_ReconstructedPhysicsEvent_t #define SAW_r_ReconstructedPhysicsEvent_t typedef struct { int32_t eventNo; int32_t runNo; r_Comments_t* comments; r_Reactions_t* reactions; r_TaggerHits_t* taggerHits; r_CalorimeterClusters_t* calorimeterClusters; r_ChargedTracks_t* chargedTracks; r_StartHits_t* startHits; r_TofPoints_t* tofPoints; r_RFtime_t* RFtime; r_Trigger_t* trigger; } r_ReconstructedPhysicsEvent_t; #endif /* r_ReconstructedPhysicsEvent_t */ #ifndef SAW_r_HDDM_t #define SAW_r_HDDM_t typedef struct { r_ReconstructedPhysicsEvent_t* reconstructedPhysicsEvent; } r_HDDM_t; #endif /* r_HDDM_t */ #ifdef __cplusplus extern "C" { #endif r_HDDM_t* make_r_HDDM(); r_ReconstructedPhysicsEvent_t* make_r_ReconstructedPhysicsEvent(); r_Comments_t* make_r_Comments(int n); r_Reactions_t* make_r_Reactions(int n); r_Vertices_t* make_r_Vertices(int n); r_Origin_t* make_r_Origin(); r_Products_t* make_r_Products(int n); r_Momentum_t* make_r_Momentum(); r_TaggerHits_t* make_r_TaggerHits(int n); r_CalorimeterClusters_t* make_r_CalorimeterClusters(int n); r_ChargedTracks_t* make_r_ChargedTracks(int n); r_TrackFit_t* make_r_TrackFit(); r_DEdxDC_t* make_r_DEdxDC(); r_StartHits_t* make_r_StartHits(int n); r_TofPoints_t* make_r_TofPoints(int n); r_RFtime_t* make_r_RFtime(); r_Trigger_t* make_r_Trigger(); #ifdef __cplusplus } #endif #ifndef r_DocumentString #define r_DocumentString extern char HDDM_r_DocumentString[]; #ifdef INLINE_PREPEND_UNDERSCORES #define inline __inline #endif #endif /* r_DocumentString */ #ifndef HDDM_STREAM_INPUT #define HDDM_STREAM_INPUT -91 #define HDDM_STREAM_OUTPUT -92 struct popNode_s { void* (*unpacker)(XDR*, struct popNode_s*); int inParent; int popListLength; struct popNode_s* popList[99]; }; typedef struct popNode_s popNode; typedef struct { FILE* fd; int iomode; int lerrno; char* filename; XDR* xdrs; popNode* popTop; } r_iostream_t; #endif /* HDDM_STREAM_INPUT */ #ifdef __cplusplus extern "C" { #endif r_HDDM_t* read_r_HDDM(r_iostream_t* fp); int skip_r_HDDM(r_iostream_t* fp, int nskip); int flush_r_HDDM(r_HDDM_t* this1,r_iostream_t* fp); r_iostream_t* open_r_HDDM(char* filename); r_iostream_t* init_r_HDDM(char* filename); void close_r_HDDM(r_iostream_t* fp); #ifdef __cplusplus } #endif #if !defined HDDM_NULL extern int hddm_r_nullTarget; # define HDDM_NULL (void*)&hddm_r_nullTarget #endif