Fork me on GitHub

source: svn/trunk/Utilities/frog/Prim_Cylinder.h@ 585

Last change on this file since 585 was 583, checked in by cp3-support, 13 years ago

FROG 3.0

File size: 1.2 KB
RevLine 
[583]1#ifndef _FROG_Prim_CYLINDER_H__
2#define _FROG_Prim_CYLINDER_H__
3
4#include "Base.h"
5
6namespace FROG{
7
8class Prim_Cylinder : public BaseColl_Id {
9public :
10 float Radius;
11 float PosX; float PosY; float PosZ;
12 float LengthX; float LengthY; float LengthZ;
13 unsigned short NPhi;unsigned char Endcap;
14
15 virtual unsigned int chunkId(){ return 41040;}
16 virtual bool isCompactible(){ return true; }
17
18 Prim_Cylinder(){}
19 Prim_Cylinder(
20 unsigned int detId, float radius,
21 float posX, float posY, float posZ,
22 float lengthX, float lengthY, float lengthZ,
23 unsigned short nPhi=10, unsigned char endcap=0) :
24 BaseColl_Id(detId),
25 Radius(radius),
26 PosX(posX), PosY(posY), PosZ(posZ),
27 LengthX(lengthX), LengthY(lengthY), LengthZ(lengthZ),
28 NPhi(nPhi), Endcap(endcap){}
29
30 virtual ByteBuffer writeData(){
31 ByteBuffer toReturn(36);
32 toReturn.putUInt(detId_);
33 toReturn.putFloat(Radius);
34 toReturn.putFloat(PosX);
35 toReturn.putFloat(PosY);
36 toReturn.putFloat(PosZ);
37 toReturn.putFloat(LengthX);
38 toReturn.putFloat(LengthY);
39 toReturn.putFloat(LengthZ);
40 toReturn.putUShort(NPhi);
41 toReturn.putByte(Endcap);
42 return toReturn;
43 }
44};
45
46}//FROG Namespace
47#endif
Note: See TracBrowser for help on using the repository browser.