#include "Event.h"


class description - header file - source file
viewCVS header - viewCVS source

class Event: public TObject

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
Event(const Event&)
voidTObject::AbstractMethod(const char* method) const
Track*AddTrack(Float_t random, Float_t ptmin = 1)
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
voidBuild(Int_t ev, Int_t arg5 = 600, Float_t ptmin = 1)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidClear(Option_t* option = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
virtual voidTObject::Delete(Option_t* option = "")
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() const
virtual TObject*TObject::DrawClone(Option_t* option = "") const
virtual voidTObject::Dump() const
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
Float_tGetClosestDistance(Int_t i)
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
UInt_tGetFlag() const
TRefArray*GetHighPt() const
TH1F*GetHistogram() const
virtual const char*TObject::GetIconName() const
Track*GetLastTrack() const
Double32_tGetMatrix(UChar_t x, UChar_t y)
Int_tGetMeasure(UChar_t which)
TRefArray*GetMuons() const
virtual const char*TObject::GetName() const
Int_tGetNseg() const
Int_tGetNtrack() const
Int_tGetNvertex() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
Double32_tGetTemperature() const
virtual const char*TObject::GetTitle() const
TClonesArray*GetTracks() const
virtual UInt_tTObject::GetUniqueID() const
TH1*GetWebHistogram() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() const
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tIsValid() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
Event&operator=(const Event&)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
static voidReset(Option_t* option = "")
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") const
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")
static voidTObject::SetDtorOnly(void* obj)
voidSetFlag(UInt_t f)
voidSetHeader(Int_t i, Int_t run, Int_t date, Float_t random)
voidSetMatrix(UChar_t x, UChar_t y, Double32_t what)
voidSetMeasure(UChar_t which, Int_t what)
voidSetNseg(Int_t n)
voidSetNtrack(Int_t n)
voidSetNvertex(Int_t n)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetTemperature(Double32_t t)
voidSetType(char* type)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) const
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const

Data Members

enum TObject::EStatusBits { kCanDelete
enum TObject::[unnamed] { kIsOnHeap
charfType[20]event type
char*fEventNamerun+event number in character format
Int_tfNtrackNumber of tracks
Int_tfNsegNumber of track segments
TClonesArray*fTracks->array with all tracks
TRefArray*fHighPtarray of High Pt tracks only
TRefArray*fMuonsarray of Muon tracks only
TReffLastTrackreference pointer to last track
TReffWebHistogramEXEC:GetWebHistogram reference to an histogram in a TWebFile
TBitsfTriggerBitsBits triggered by this event.
static TClonesArray*fgTracks
static TH1F*fgHist

Class Description

                       Event and Track classes

  The Event class is a naive/simple example of an event structure.
        char           fType[20];
        char          *fEventName;         //run+event number in character format
        Int_t          fNtrack;
        Int_t          fNseg;
        Int_t          fNvertex;
        UInt_t         fFlag;
        Double32_t     fTemperature;
        Int_t          fMeasures[10];
        Double32_t     fMatrix[4][4];
        Double32_t    *fClosestDistance; //[fNvertex] indexed array! 
        EventHeader    fEvtHdr;
        TClonesArray  *fTracks;
        TRefArray     *fHighPt;            //array of High Pt tracks only
        TRefArray     *fMuons;             //array of Muon tracks only
        TRef           fLastTrack;         //pointer to last track
        TRef           fHistoWeb;          //EXEC:GetHistoWeb reference to an histogram in a TWebFile
        TH1F          *fH;
        TBits          fTriggerBits;       //Bits triggered by this event.

   The EventHeader class has 3 data members (integers):
        Int_t          fEvtNum;
        Int_t          fRun;
        Int_t          fDate;

   The Event data member fTracks is a pointer to a TClonesArray.
   It is an array of a variable number of tracks per event.
   Each element of the array is an object of class Track with the members:
        Float_t      fPx;           //X component of the momentum
        Float_t      fPy;           //Y component of the momentum
        Float_t      fPz;           //Z component of the momentum
        Float_t      fRandom;       //A random track quantity
        Float_t      fMass2;        //The mass square of this particle
        Float_t      fBx;           //X intercept at the vertex
        Float_t      fBy;           //Y intercept at the vertex
        Float_t      fMeanCharge;   //Mean charge deposition of all hits of this track
        Float_t      fXfirst;       //X coordinate of the first point
        Float_t      fXlast;        //X coordinate of the last point
        Float_t      fYfirst;       //Y coordinate of the first point
        Float_t      fYlast;        //Y coordinate of the last point
        Float_t      fZfirst;       //Z coordinate of the first point
        Float_t      fZlast;        //Z coordinate of the last point
        Double32_t   fCharge;       //Charge of this track
        Double32_t   fVertex[3];    //Track vertex position
        Int_t        fNpoint;       //Number of points for this track
        Short_t      fValid;        //Validity criterion
        Int_t        fNsp;          //Number of points for this track with a special value
        Double32_t  *fPointValue;   //[fNsp] a special quantity for some point.
        TBits        fTriggerBits;  //Bits triggered by this track.

   An example of a batch program to use the Event/Track classes is given
   in this directory: MainEvent.
   Look also in the same directory at the following macros:
     - eventa.C  an example how to read the tree
     - eventb.C  how to read events conditionally

   During the processing of the event (optionally) also a large number
   of histograms can be filled. The creation and handling of the
   histograms is taken care of by the HistogramManager class.

 Create an Event object.
 When the constructor is invoked for the first time, the class static
 variable fgTracks is 0 and the TClonesArray fgTracks is created.
void Build(Int_t ev, Int_t arg5, Float_t ptmin)
Track * AddTrack(Float_t random, Float_t ptmin)
 Add a new track to the list of tracks for this event.
 To avoid calling the very time consuming operator new for each track,
 the standard but not well know C++ operator "new with placement"
 is called. If tracks[i] is 0, a new Track object will be created
 otherwise the previous Track[i] will be overwritten.
void Clear(Option_t * /*option*/)
void Reset(Option_t * /*option*/)
 Static function to reset all static objects for this event
void SetHeader(Int_t i, Int_t run, Int_t date, Float_t random)
void SetMeasure(UChar_t which, Int_t what)
void SetRandomVertex()
 This delete is to test the relocation of variable length array
TBits& GetTriggerBits()
{ return fTriggerBits; }
Bool_t IsValid()
{ return fIsValid; }
void ResetHistogramPointer()
void SetNseg(Int_t n)
{ fNseg = n; }
void SetNtrack(Int_t n)
{ fNtrack = n; }
void SetNvertex(Int_t n)
{ fNvertex = n; SetRandomVertex(); }
void SetFlag(UInt_t f)
{ fFlag = f; }
void SetTemperature(Double32_t t)
{ fTemperature = t; }
void SetType(char *type)
void SetMatrix(UChar_t x, UChar_t y, Double32_t what)
{ if (x<3&&y<3) fMatrix[x][y]=what;}
Float_t GetClosestDistance(Int_t i)
{return fClosestDistance[i];}
char * GetType()
{return fType;}
Int_t GetNtrack()
{ return fNtrack; }
Int_t GetNseg()
{ return fNseg; }
Int_t GetNvertex()
{ return fNvertex; }
UInt_t GetFlag()
{ return fFlag; }
Double32_t GetTemperature()
{ return fTemperature; }
EventHeader * GetHeader()
{ return &fEvtHdr; }
TClonesArray * GetTracks()
{return fTracks;}
TRefArray * GetHighPt()
{return fHighPt;}
TRefArray * GetMuons()
{return fMuons;}
Track * GetLastTrack()
{return (Track*)fLastTrack.GetObject();}
TH1F * GetHistogram()
{return fH;}
TH1 * GetWebHistogram()
{return (TH1*)fWebHistogram.GetObject();}
Int_t GetMeasure(UChar_t which)
{ return (which<10)?fMeasures[which]:0; }
Double32_t GetMatrix(UChar_t x, UChar_t y)
{ return (x<4&&y<4)?fMatrix[x][y]:0; }

Author: Rene Brun 19/08/96
Last update: root/test:$Name: $:$Id: Event.cxx,v 1.29 2006/05/09 14:50:11 pcanal Exp $

ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.