00001 #include "CPPFORT/lctph.h"
00002
00003 #include "lcio.h"
00004 #include "IMPL/TPCHitImpl.h"
00005
00006 using namespace lcio ;
00007
00008 PTRTYPE lctphcreate(){
00009 TPCHitImpl* hit = new TPCHitImpl ;
00010 return C2F_POINTER( LCObject*, hit ) ;
00011 }
00012
00013 int lctphdelete( PTRTYPE hit ){
00014 TPCHitImpl* tph = f2c_pointer<TPCHitImpl,LCObject>( hit ) ;
00015 delete tph ;
00016 return LCIO::SUCCESS ;
00017 }
00018
00019 int lctphid( PTRTYPE hit ) {
00020 TPCHitImpl* tph = f2c_pointer<TPCHitImpl,LCObject>( hit ) ;
00021 return tph->id() ;
00022 }
00023
00024 int lctphgetcellid( PTRTYPE hit ){
00025 TPCHitImpl* tph = f2c_pointer<TPCHitImpl,LCObject>( hit ) ;
00026 return tph->getCellID() ;
00027 }
00028 float lctphgettime( PTRTYPE hit ){
00029 TPCHitImpl* tph = f2c_pointer<TPCHitImpl,LCObject>( hit ) ;
00030 return tph->getTime() ;
00031 }
00032
00033 float lctphgcharge( PTRTYPE hit ){
00034 TPCHitImpl* tph = f2c_pointer<TPCHitImpl,LCObject>( hit ) ;
00035 return tph->getCharge() ;
00036 }
00037 int lctphgetquality( PTRTYPE hit ) {
00038 TPCHitImpl* tph = f2c_pointer<TPCHitImpl,LCObject>( hit ) ;
00039 return tph->getQuality() ;
00040 }
00041
00042 int lctphgetnrawdatawords( PTRTYPE hit ) {
00043 TPCHitImpl* tph = f2c_pointer<TPCHitImpl,LCObject>( hit ) ;
00044 return tph->getNRawDataWords() ;
00045 }
00046 int lctphgetrawdataword( PTRTYPE hit, int i) {
00047 TPCHitImpl* tph = f2c_pointer<TPCHitImpl,LCObject>( hit ) ;
00048 return tph->getRawDataWord( i-1 ) ;
00049 }
00050
00051
00052 int lctphsetcellid( PTRTYPE hit, int id ){
00053 TPCHitImpl* tph = f2c_pointer<TPCHitImpl,LCObject>( hit ) ;
00054 tph->setCellID( id ) ;
00055 return LCIO::SUCCESS ;
00056 }
00057 int lctphsettime( PTRTYPE hit, float t ){
00058 TPCHitImpl* tph = f2c_pointer<TPCHitImpl,LCObject>( hit ) ;
00059 tph->setTime( t ) ;
00060 return LCIO::SUCCESS ;
00061 }
00062 int lctphsetcharge( PTRTYPE hit, float c ){
00063 TPCHitImpl* tph = f2c_pointer<TPCHitImpl,LCObject>( hit ) ;
00064 tph->setCharge( c ) ;
00065 return LCIO::SUCCESS ;
00066 }
00067 int lctphsetquality( PTRTYPE hit, int q ){
00068 TPCHitImpl* tph = f2c_pointer<TPCHitImpl,LCObject>( hit ) ;
00069 tph->setQuality( q ) ;
00070 return LCIO::SUCCESS ;
00071 }
00072 int lctphsetrawdata( PTRTYPE hit, int* rawData, int size ){
00073 TPCHitImpl* tph = f2c_pointer<TPCHitImpl,LCObject>( hit ) ;
00074 tph->setRawData( rawData, size ) ;
00075 return LCIO::SUCCESS ;
00076 }
00077
00078
00079
00080
00081
00082
00083
00084
00085