Fork me on GitHub

source: svn/trunk/Utilities/frog/Event_Electron.h@ 986

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

FROG 3.0

File size: 1.2 KB
Line 
1#ifndef _EVENT_ELECTRON_H__
2#define _EVENT_ELECTRON_H__
3
4#include "Base.h"
5
6namespace FROG{
7
8class Event_Electron : 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 17100;}
15 virtual bool isCompactible(){ return false; }
16
17 Event_Electron(){}
18 Event_Electron(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.