Fork me on GitHub

source: svn/trunk/Utilities/frog/Event_Photon.h@ 584

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

FROG 3.0

File size: 1.2 KB
Line 
1#ifndef _FROG_EVENT_PHOTON_H__
2#define _FROG_EVENT_PHOTON_H__
3
4#include "Base.h"
5
6namespace FROG{
7
8class Event_Photon : public Base {
9public :
10 float p_, eta_, phi_, vx_, vy_, vz_, cx_, cy_, cz_;
11 unsigned int Components_CollEvtId_;
12 std::vector<unsigned int> Components_Vector_;
13
14 virtual unsigned int chunkId(){ return 16100;}
15 virtual bool isCompactible(){ return false; }
16
17 Event_Photon(){}
18 Event_Photon(float p, float eta, float phi, float vx, float vy, float vz, float cx, float cy, float cz):
19 p_(p),eta_(eta), phi_(phi), vx_(vx), vy_(vy), vz_(vz), cx_(cx), cy_(cy), cz_(cz){}
20
21 virtual ByteBuffer writeData(){
22 ByteBuffer toReturn(40+4*Components_Vector_.size());
23 toReturn.putFloat(p_);
24 toReturn.putFloat(eta_);
25 toReturn.putFloat(phi_);
26 toReturn.putFloat(vx_);
27 toReturn.putFloat(vy_);
28 toReturn.putFloat(vz_);
29 toReturn.putFloat(cx_);
30 toReturn.putFloat(cy_);
31 toReturn.putFloat(cz_);
32 if(Components_Vector_.size()>0){
33 toReturn.putUInt(Components_CollEvtId_);
34 for(unsigned int i=0;i<Components_Vector_.size();i++){
35 toReturn.putUInt(Components_Vector_[i]);
36 }
37 }
38 return toReturn;
39 }
40};
41
42}//FROG Namespace
43#endif
Note: See TracBrowser for help on using the repository browser.