00001 #include "CPPFORT/lccah.h"
00002
00003 #include "lcio.h"
00004 #include "IMPL/CalorimeterHitImpl.h"
00005
00006 using namespace lcio ;
00007
00008
00009 PTRTYPE lccahcreate(){
00010 CalorimeterHitImpl* hit = new CalorimeterHitImpl ;
00011 return C2F_POINTER( LCObject*, hit ) ;
00012 }
00013 int lccahdelete( PTRTYPE calhit ) {
00014 CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
00015 delete hit ;
00016 return LCIO::SUCCESS ;
00017 }
00018 int lccahid( PTRTYPE calhit ) {
00019 CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
00020 return hit->id() ;
00021 }
00022
00023 int lccahgetcellid0( PTRTYPE calhit ) {
00024 CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
00025 return hit->getCellID0() ;
00026 }
00027 int lccahgetcellid1( PTRTYPE calhit ) {
00028 CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
00029 return hit->getCellID1() ;
00030 }
00031 float lccahgetenergy( PTRTYPE calhit ) {
00032 CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
00033 return hit->getEnergy() ;
00034 }
00035 float lccahgetenergyerr( PTRTYPE calhit ) {
00036 CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
00037 return hit->getEnergyError() ;
00038 }
00039 float lccahgettime( PTRTYPE calhit ) {
00040 CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
00041 return hit->getTime() ;
00042 }
00043 int lccahgetposition( PTRTYPE calhit, float *pos) {
00044 CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
00045 for(int i=0;i<3; *pos++ = hit->getPosition()[i++] ) ;
00046 return LCIO::SUCCESS ;
00047 }
00048 int lccahgettype( PTRTYPE calhit ) {
00049 CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
00050 return hit->getType() ;
00051 }
00052
00053 PTRTYPE lccahgetrawhit( PTRTYPE calhit ) {
00054 CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
00055 return C2F_POINTER( LCObject*, hit->getRawHit() ) ;
00056 }
00057
00058 int lccahsetcellid0( PTRTYPE calhit, int id0) {
00059 CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
00060 hit->setCellID0( id0 ) ;
00061 return LCIO::SUCCESS ;
00062 }
00063 int lccahsetcellid1( PTRTYPE calhit, int id1) {
00064 CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
00065 hit->setCellID1( id1 ) ;
00066 return LCIO::SUCCESS ;
00067 }
00068 int lccahsetenergy( PTRTYPE calhit, float en) {
00069 CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
00070 hit->setEnergy( en ) ;
00071 return LCIO::SUCCESS ;
00072 }
00073 int lccahsetenergyerr( PTRTYPE calhit, float enerr) {
00074 CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
00075 hit->setEnergyError( enerr ) ;
00076 return LCIO::SUCCESS ;
00077 }
00078 int lccahsettime( PTRTYPE calhit, float time) {
00079 CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
00080 hit->setTime( time ) ;
00081 return LCIO::SUCCESS ;
00082 }
00083 int lccahsetposition( PTRTYPE calhit, float pos[3]) {
00084 CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
00085 hit->setPosition( pos ) ;
00086 return LCIO::SUCCESS ;
00087 }
00088 int lccahsettype( PTRTYPE calhit, int type) {
00089 CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
00090 hit->setType( type ) ;
00091 return LCIO::SUCCESS ;
00092 }
00093 int lccahsetrawhit(PTRTYPE calhit, PTRTYPE rawHit) {
00094 CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
00095 hit->setRawHit( f2c_pointer<LCObject,LCObject>( rawHit ) ) ;
00096 return LCIO::SUCCESS ;
00097 }
00098