00001
00014 #include "cfortran.h"
00015 #include "cpointer.h"
00016
00017
00018
00019
00022 int lcrdropenchain( PTRTYPE reader, void* filenamesv, const int nfiles, const int nchfilename );
00023
00024
00025
00028 int lcwriterunheader( PTRTYPE writer, const int irun, const char* detname, const char* descr,
00029 void* sdnamevec, const int nsubd, const int nchsubd) ;
00030
00033 PTRTYPE lcreadnextrunheader( PTRTYPE reader, int* irun, void* detname, void* descr,
00034 void* sdnamevec, int* nsubd, const int nchsubd) ;
00035
00036
00037
00040 int lcseteventheader( PTRTYPE event, const int irun, const int ievent,
00041 const int timestamp, const char* detname );
00042
00045 int lcgeteventheader( PTRTYPE event, int* irun, int* ievent, int* timestamp, void* detname );
00046
00049 int lcdumprunheader( PTRTYPE runheader ) ;
00050
00053 int lcdumpevent( PTRTYPE event ) ;
00054
00057 int lcdumpeventdetailed( PTRTYPE event ) ;
00058
00059
00060
00061
00064 int lcgetmcparticledata( PTRTYPE mcparticle, int* pdg, int* genstatus, int* simstatus
00065 , double* prodvtx, float* momentum, float* mass, float* charge,
00066 int* ndaughters ) ;
00067
00068
00071 int lcio2hepevt( PTRTYPE event ) ;
00072
00075 int hepevt2lcio( PTRTYPE event ) ;
00076
00077
00078
00079
00080
00083 int lcaddsimtrackerhit( PTRTYPE col, int cellID, double* pos, float dEdx,
00084 float time, PTRTYPE mcp ) ;
00085
00088 int lcgetsimtrackerhit( PTRTYPE col, int i, int* cellID, double* pos, float* dEdx,
00089 float* time, PTRTYPE* mcp ) ;
00090
00091
00092
00093
00097 PTRTYPE lcaddsimcalohit( PTRTYPE col, int cellID0, int cellID1, float energy, float* pos ) ;
00098
00101 PTRTYPE lcgetsimcalohit( PTRTYPE col, int i, int* cellID0, int* cellID1, float* energy,
00102 float* pos ) ;
00103
00106 int lcgetsimcalohitmccont( PTRTYPE hit, int i, PTRTYPE* mcp, float* energy, float* time,
00107 int* pdg ) ;
00108
00109
00112 PTRTYPE lcobjectvectorcreate( PTRTYPE* ocjectv, const int nobjv ) ;
00113
00116 PTRTYPE lcintvectorcreate( int* intv, const int nintv ) ;
00117
00120 PTRTYPE lcfloatvectorcreate( float* floatv, const int nfloatv ) ;
00121
00124 PTRTYPE lcstringvectorcreate( void* stringv, const int nstringv, const int nchstringv) ;
00125
00128 int lcgetintvector( PTRTYPE vector, int* intv, int* nintv ) ;
00129
00132 int lcgetfloatvector( PTRTYPE vector, float* floatv, int* nfloatv ) ;
00133
00136 int lcgetstringvector( PTRTYPE vector, void* stringv, int* nstringv, const int nchstringv) ;
00137
00138
00141 PTRTYPE intvectorcreate( int* intv, const int nintv ) ;
00142 int intvectordelete( PTRTYPE vector ) ;
00143
00146 PTRTYPE floatvectorcreate( float* floatv, const int nfloatv ) ;
00147 int floatvectordelete( PTRTYPE vector ) ;
00148
00151 PTRTYPE stringvectorcreate( void* stringv, const int nstringv, const int nchstringv) ;
00152 int stringvectordelete( PTRTYPE vector ) ;
00153
00156 PTRTYPE pointervectorcreate( PTRTYPE* pointerv, const int npointerv ) ;
00157 int pointervectordelete( PTRTYPE vector ) ;
00158
00159
00162 int getintvector( PTRTYPE vector, int* intv, int* nintv ) ;
00163
00166 int getfloatvector( PTRTYPE vector, float* floatv, int* nfloatv ) ;
00167
00170 int getstringvector( PTRTYPE vector, void* stringv, int* nstringv, const int nchstringv) ;
00171
00174 int getpointervector( PTRTYPE vector, PTRTYPE* pointerv, int* npointerv ) ;
00175
00176
00177
00178
00179
00180
00183 int lcsetparameters( const char* classname, PTRTYPE classp, const char* method,
00184 const char* key, PTRTYPE vecp) ;
00185
00186
00189 int lcgetparameters( const char* classname, PTRTYPE classp, const char* method,
00190 const char* key, PTRTYPE vecp) ;
00191
00192
00193
00194 extern "C"{
00195
00196 #define lcrdropenchain_STRV_A2 NUM_ELEM_ARG(3)
00197 FCALLSCFUN4(INT, lcrdropenchain, LCRDRDOPENCHAIN, lcrdropenchain,
00198 CFORTRANPNTR, STRINGV, INT, INT)
00199
00200
00201 #define lcwriterunheader_STRV_A5 NUM_ELEM_ARG(6)
00202 FCALLSCFUN7(INT, lcwriterunheader, LCWRITERUNHEADER, lcwriterunheader, CFORTRANPNTR, INT,
00203 STRING, STRING, STRINGV, INT, INT)
00204 #define lcreadnextrunheader_STRV_A3 NUM_ELEMS(1)
00205 #define lcreadnextrunheader_STRV_A4 NUM_ELEMS(1)
00206 #define lcreadnextrunheader_STRV_A5 NUM_ELEM_ARG(6)
00207 FCALLSCFUN7(CFORTRANPNTR, lcreadnextrunheader, LCREADNEXTRUNHEADER, lcreadnextrunheader,
00208 CFORTRANPNTR, INTV, PSTRINGV, PSTRINGV, PSTRINGV, INTV, INT)
00209
00210
00211 FCALLSCFUN5(INT, lcseteventheader, LCSETEVENTHEADER, lcseteventheader, CFORTRANPNTR,
00212 INT, INT, INT, STRING )
00213 #define lcgeteventheader_STRV_A5 NUM_ELEMS(1)
00214 FCALLSCFUN5(INT, lcgeteventheader, LCGETEVENTHEADER, lcgeteventheader, CFORTRANPNTR, INTV,
00215 INTV, INTV, PSTRINGV )
00216 FCALLSCFUN1(INT, lcdumprunheader, LCDUMPRUNHEADER, lcdumprunheader, CFORTRANPNTR )
00217 FCALLSCFUN1(INT, lcdumpevent, LCDUMPEVENT, lcdumpevent, CFORTRANPNTR )
00218 FCALLSCFUN1(INT, lcdumpeventdetailed, LCDUMPEVENTDETAILED, lcdumpeventdetailed,CFORTRANPNTR)
00219
00220
00221 FCALLSCFUN9(INT, lcgetmcparticledata, LCGETMCPARTICLEDATA, lcgetmcparticledata,
00222 CFORTRANPNTR , INTV , INTV , INTV, DOUBLEV , FLOATV , FLOATV , FLOATV , INTV )
00223 FCALLSCFUN1(INT, lcio2hepevt, LCIO2HEPEVT, lcio2hepevt , CFORTRANPNTR )
00224 FCALLSCFUN1(INT, hepevt2lcio, HEPEVT2LCIO, hepevt2lcio, CFORTRANPNTR )
00225
00226
00227 FCALLSCFUN6(INT, lcaddsimtrackerhit , LCADDSIMTRACKERHIT , lcaddsimtrackerhit,
00228 CFORTRANPNTR , INT , DOUBLEV , FLOAT , FLOAT , CFORTRANPNTR )
00229
00230 FCALLSCFUN7(INT, lcgetsimtrackerhit, LCGETSIMTRACKERHIT, lcgetsimtrackerhit,
00231 CFORTRANPNTR , INT , INTV , DOUBLEV , FLOATV , FLOATV , CFORTRANPNTRV )
00232
00233
00234 FCALLSCFUN5(CFORTRANPNTR, lcaddsimcalohit, LCADDSIMCALOHIT, lcaddsimcalohit,
00235 CFORTRANPNTR, INT , INT, FLOAT, FLOATV )
00236 FCALLSCFUN6(CFORTRANPNTR , lcgetsimcalohit, LCGETSIMCALOHIT, lcgetsimcalohit,
00237 CFORTRANPNTR , INT , INTV , INTV , FLOATV , FLOATV )
00238 FCALLSCFUN6(INT, lcgetsimcalohitmccont, LCGETSIMCALOHITMCCONT, lcgetsimcalohitmccont,
00239 CFORTRANPNTR , INT , CFORTRANPNTRV, FLOATV , FLOATV , INTV )
00240
00241 FCALLSCFUN2(CFORTRANPNTR, lcobjectvectorcreate, LCOBJECTVECTORCREATE , lcobjectvectorcreate,
00242 CFORTRANPNTRV, INT )
00243 FCALLSCFUN2(CFORTRANPNTR, lcintvectorcreate, LCINTVECTORCREATE , lcintvectorcreate,
00244 INTV, INT )
00245 FCALLSCFUN2(CFORTRANPNTR, lcfloatvectorcreate, LCFLOATVECTORCREATE , lcfloatvectorcreate,
00246 FLOATV, INT )
00247 #define lcstringvectorcreate_STRV_A1 NUM_ELEM_ARG(2)
00248 FCALLSCFUN3(CFORTRANPNTR, lcstringvectorcreate, LCSTRINGVECTORCREATE , lcstringvectorcreate,
00249 PSTRINGV, INT, INT )
00250
00251 FCALLSCFUN3(INT, lcgetintvector, LCGETINTVECTOR , lcgetintvector,
00252 CFORTRANPNTR , INTV, INTV )
00253 FCALLSCFUN3(INT, lcgetfloatvector, LCGETFLOATVECTOR , lcgetfloatvector,
00254 CFORTRANPNTR , FLOATV, INTV )
00255 #define lcgetstringvector_STRV_A2 NUM_ELEM_ARG(3)
00256 FCALLSCFUN4(INT, lcgetstringvector, LCGETSTRINGVECTOR , lcgetstringvector,
00257 CFORTRANPNTR , PSTRINGV, INTV, INT )
00258
00259
00260 FCALLSCFUN2(CFORTRANPNTR, intvectorcreate, INTVECTORCREATE , intvectorcreate,
00261 INTV, INT )
00262 FCALLSCFUN1(INT, intvectordelete, INTVECTORDELETE, intvectordelete,
00263 CFORTRANPNTR)
00264 FCALLSCFUN2(CFORTRANPNTR, floatvectorcreate, FLOATVECTORCREATE , floatvectorcreate,
00265 FLOATV, INT )
00266 FCALLSCFUN1(INT, floatvectordelete, FLOATVECTORDELETE, floatvectordelete,
00267 CFORTRANPNTR)
00268 #define stringvectorcreate_STRV_A1 NUM_ELEM_ARG(2)
00269 FCALLSCFUN3(CFORTRANPNTR, stringvectorcreate, STRINGVECTORCREATE , stringvectorcreate,
00270 PSTRINGV, INT, INT )
00271 FCALLSCFUN1(INT, stringvectordelete, STRINGVECTORDELETE, stringvectordelete,
00272 CFORTRANPNTR)
00273 FCALLSCFUN2(CFORTRANPNTR, pointervectorcreate, POINTERVECTORCREATE , pointervectorcreate,
00274 CFORTRANPNTRV, INT )
00275 FCALLSCFUN1(INT, pointervectordelete, POINTERVECTORDELETE, pointervectordelete,
00276 CFORTRANPNTR)
00277
00278 FCALLSCFUN3(INT, getintvector, GETINTVECTOR , getintvector,
00279 CFORTRANPNTR , INTV, INTV )
00280 FCALLSCFUN3(INT, getfloatvector, GETFLOATVECTOR , getfloatvector,
00281 CFORTRANPNTR , FLOATV, INTV )
00282 #define getstringvector_STRV_A2 NUM_ELEM_ARG(3)
00283 FCALLSCFUN4(INT, getstringvector, GETSTRINGVECTOR , getstringvector,
00284 CFORTRANPNTR , PSTRINGV, INTV, INT )
00285 FCALLSCFUN3(INT, getpointervector, GETPOINTERVECTOR , getpointervector,
00286 CFORTRANPNTR , CFORTRANPNTRV, INTV )
00287
00288
00289 FCALLSCFUN5(INT, lcsetparameters, LCSETPARAMETERS, lcsetparameters,
00290 STRING, CFORTRANPNTR, STRING, STRING, CFORTRANPNTR )
00291
00292 FCALLSCFUN5(INT, lcgetparameters, LCGETPARAMETERS, lcgetparameters,
00293 STRING, CFORTRANPNTR, STRING, STRING, CFORTRANPNTR )
00294
00295 }
00296