LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
lccah.cc
Go to the documentation of this file.
1 #include "CPPFORT/lccah.h"
2 
3 #include "lcio.h"
5 
6 using namespace lcio ;
7 
8 
10  CalorimeterHitImpl* hit = new CalorimeterHitImpl ;
11  return C2F_POINTER( LCObject*, hit ) ;
12 }
13 int lccahdelete( PTRTYPE calhit ) {
14  CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
15  delete hit ;
16  return LCIO::SUCCESS ;
17 }
18 int lccahid( PTRTYPE calhit ) {
19  CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
20  return hit->id() ;
21 }
22 
23 int lccahgetcellid0( PTRTYPE calhit ) {
24  CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
25  return hit->getCellID0() ;
26 }
27 int lccahgetcellid1( PTRTYPE calhit ) {
28  CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
29  return hit->getCellID1() ;
30 }
31 float lccahgetenergy( PTRTYPE calhit ) {
32  CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
33  return hit->getEnergy() ;
34 }
35 float lccahgetenergyerr( PTRTYPE calhit ) {
36  CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
37  return hit->getEnergyError() ;
38 }
39 float lccahgettime( PTRTYPE calhit ) {
40  CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
41  return hit->getTime() ;
42 }
43 int lccahgetposition( PTRTYPE calhit, float *pos) {
44  CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
45  for(int i=0;i<3; *pos++ = hit->getPosition()[i++] ) ;
46  return LCIO::SUCCESS ;
47 }
48 int lccahgettype( PTRTYPE calhit ) {
49  CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
50  return hit->getType() ;
51 }
52 
54  CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
55  return C2F_POINTER( LCObject*, hit->getRawHit() ) ;
56 }
57 
58 int lccahsetcellid0( PTRTYPE calhit, int id0) {
59  CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
60  hit->setCellID0( id0 ) ;
61  return LCIO::SUCCESS ;
62 }
63 int lccahsetcellid1( PTRTYPE calhit, int id1) {
64  CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
65  hit->setCellID1( id1 ) ;
66  return LCIO::SUCCESS ;
67 }
68 int lccahsetenergy( PTRTYPE calhit, float en) {
69  CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
70  hit->setEnergy( en ) ;
71  return LCIO::SUCCESS ;
72 }
73 int lccahsetenergyerr( PTRTYPE calhit, float enerr) {
74  CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
75  hit->setEnergyError( enerr ) ;
76  return LCIO::SUCCESS ;
77 }
78 int lccahsettime( PTRTYPE calhit, float time) {
79  CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
80  hit->setTime( time ) ;
81  return LCIO::SUCCESS ;
82 }
83 int lccahsetposition( PTRTYPE calhit, float pos[3]) {
84  CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
85  hit->setPosition( pos ) ;
86  return LCIO::SUCCESS ;
87 }
88 int lccahsettype( PTRTYPE calhit, int type) {
89  CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
90  hit->setType( type ) ;
91  return LCIO::SUCCESS ;
92 }
93 int lccahsetrawhit(PTRTYPE calhit, PTRTYPE rawHit) {
94  CalorimeterHitImpl* hit = f2c_pointer<CalorimeterHitImpl,LCObject>( calhit ) ;
95  hit->setRawHit( f2c_pointer<LCObject,LCObject>( rawHit ) ) ;
96  return LCIO::SUCCESS ;
97 }
98 
LCIO_DEPRECATED_CAPI float lccahgetenergyerr(PTRTYPE calhit)
Definition: lccah.cc:35
LCIO_DEPRECATED_CAPI int lccahsetposition(PTRTYPE calhit, float pos[3])
Definition: lccah.cc:83
LCIO_DEPRECATED_CAPI PTRTYPE lccahcreate()
Header file for the f77-wrapper functions of the CalorimeterHitImpl class.
Definition: lccah.cc:9
LCIO_DEPRECATED_CAPI int lccahgetcellid0(PTRTYPE calhit)
Definition: lccah.cc:23
LCIO_DEPRECATED_CAPI int lccahsetrawhit(PTRTYPE calhit, PTRTYPE rawHit)
Definition: lccah.cc:93
LCIO_DEPRECATED_CAPI int lccahsettime(PTRTYPE calhit, float time)
Definition: lccah.cc:78
LCIO_DEPRECATED_CAPI int lccahsetenergy(PTRTYPE calhit, float en)
Definition: lccah.cc:68
LCIO_DEPRECATED_CAPI int lccahid(PTRTYPE calhit)
Definition: lccah.cc:18
long PTRTYPE
Fortran interface - define the length of pointers this has to made machine independent ...
Definition: cpointer.h:12
LCIO_DEPRECATED_CAPI int lccahsetcellid0(PTRTYPE calhit, int id0)
Definition: lccah.cc:58
LCIO_DEPRECATED_CAPI int lccahgettype(PTRTYPE calhit)
Definition: lccah.cc:48
LCIO_DEPRECATED_CAPI int lccahgetposition(PTRTYPE calhit, float *)
Definition: lccah.cc:43
LCIO_DEPRECATED_CAPI float lccahgetenergy(PTRTYPE calhit)
Definition: lccah.cc:31
LCIO_DEPRECATED_CAPI int lccahsetcellid1(PTRTYPE calhit, int id1)
Definition: lccah.cc:63
LCIO_DEPRECATED_CAPI int lccahsetenergyerr(PTRTYPE calhit, float enerr)
Definition: lccah.cc:73
LCIO_DEPRECATED_CAPI float lccahgettime(PTRTYPE calhit)
Definition: lccah.cc:39
LCIO_DEPRECATED_CAPI int lccahgetcellid1(PTRTYPE calhit)
Definition: lccah.cc:27
LCIO_DEPRECATED_CAPI int lccahdelete(PTRTYPE calhit)
Definition: lccah.cc:13
LCIO_DEPRECATED_CAPI int lccahsettype(PTRTYPE calhit, int type)
Definition: lccah.cc:88
LCIO_DEPRECATED_CAPI PTRTYPE lccahgetrawhit(PTRTYPE calhit)
Definition: lccah.cc:53
#define C2F_POINTER(T, ptr)
Definition: cpointer.h:33