| 1 |
#include <iostream> |
| 2 |
#include "pEvent.h" |
| 3 |
|
| 4 |
using std::cout; |
| 5 |
using std::endl; |
| 6 |
|
| 7 |
struct a{ |
| 8 |
int _ical; |
| 9 |
int _ical2; |
| 10 |
int _ipart; |
| 11 |
float _xin,_yin,_zin; |
| 12 |
// float _xout,_yout,_zout; |
| 13 |
float _erel; |
| 14 |
// float _time; |
| 15 |
// float _pathcal; |
| 16 |
// float _p0; |
| 17 |
}; |
| 18 |
union test { |
| 19 |
a adesc; |
| 20 |
char b[24]; |
| 21 |
}; |
| 22 |
|
| 23 |
int main(){ |
| 24 |
test prova; |
| 25 |
// pDetector pcal=pUtil::GetDet("CAL"); |
| 26 |
pEvent event; |
| 27 |
event.AddDetector("CAL"); |
| 28 |
for(int i=0; i<3; ++i){ |
| 29 |
prova.adesc._ipart=1+i; |
| 30 |
prova.adesc._ical=2+i; |
| 31 |
prova.adesc._ical2=22+i; |
| 32 |
prova.adesc._xin=3.+i; |
| 33 |
prova.adesc._yin=4.+i; |
| 34 |
prova.adesc._zin=5.+i; |
| 35 |
// prova.adesc._xout=6.+i; |
| 36 |
// prova.adesc._yout=7.+i; |
| 37 |
// prova.adesc._zout=8.+i; |
| 38 |
prova.adesc._erel=9.+i; |
| 39 |
// prova.adesc._time=10.+i; |
| 40 |
// prova.adesc._pathcal=11.+i; |
| 41 |
// prova.adesc._p0=12.+i; |
| 42 |
// pcal.AddHit(new pCalHit(prova.b)); |
| 43 |
// pcal.AddHit(pUtil::GetpHit(pcal.GetName(),prova.b)); |
| 44 |
event.AddHit("CAL",prova.b); |
| 45 |
|
| 46 |
} |
| 47 |
// event.AddDetector(pcal.GetName(),&pcal); |
| 48 |
// pcal.Print(); |
| 49 |
event.Print(); |
| 50 |
// pCalHit phit(prova.b); |
| 51 |
|
| 52 |
|
| 53 |
// phit.Print(); |
| 54 |
// cout << cid->GetIcas() << endl; |
| 55 |
// cout << phit.GetXin() << endl; |
| 56 |
// cout << phit.GetYin() << endl; |
| 57 |
// cout << phit.GetZin() << endl; |
| 58 |
// cout << phit.GetXout() << endl; |
| 59 |
// cout << phit.GetYout() << endl; |
| 60 |
// cout << phit.GetZout() << endl; |
| 61 |
// cout << phit.GetTime() << endl; |
| 62 |
// cout << phit.GetErel() << endl; |
| 63 |
// cout << phit.GetPath() << endl; |
| 64 |
// cout << phit.GetP0() << endl; |
| 65 |
// cout << phit.GetIpart() << endl; |
| 66 |
|
| 67 |
return 0; |
| 68 |
} |