BRAT 2.4.5
Class index
Full class index
brahmlib
BRAHMS
ROOT page

BrGeantInput


class description - source file - inheritance tree

class BrGeantInput : public BrIOModule

    private:
void OutStatus() public:
BrGeantInput BrGeantInput() BrGeantInput BrGeantInput(const Char_t* name, const Char_t* title = "0") BrGeantInput BrGeantInput(BrGeantInput&) virtual void ~BrGeantInput() static TClass* Class() virtual Bool_t Close() virtual void Event(BrEvent* event) UInt_t GetDetectorBit(const Text_t* name) const Int_t GetNumberOfVolumes() Bool_t GetrHeader() virtual TClass* IsA() const void ListDetectors(UInt_t bits) const virtual Bool_t Open(const Char_t* fname, const Option_t* option) virtual void Print(Option_t* option = "B") const virtual Bool_t ReadStreamHeader() void SetFillHitList(Bool_t b) void SetrHeader(Bool_t rHead) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void SkipEvent(Int_t numevt) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) void SwapLong(int* buffer, int nb) Bool_t TryRepair()

Data Members

    private:
Bool_t fRepair | Repair in progress flag Bool_t rHeader ! Header read mark Bool_t fByteSwap Flag for ByteSwap Int_t fEventCounter ! Event counter Int_t fFileDescriptor file descriptor Int_t fNumberOfVolumes ! Number of GEANT volumes GeantVol fVolume[50] ! Geant Volumes in STREAM file Bool_t fFillHitList Flag for Event to fill hit list of tracks Int_t fVersion ! Version number for cdat file. Int_t fEndOfStreamEvent ! Actual end of stream(event) tag.

Class Description

                                                            
 BrGeantInput provides an interface to GBRAHMS output       

 The class is derived from the general input/output class
 and falls natural into the hierachi of module classes.

 The data read from the GBRAHMS file by the Event method will
 add several data tables to the BrEventNode. They are
 named

  "GeantTracks"      a BrDataTable with objects of BrGeantTrack
  "GeantHits [name]" a BrDataTable with objects of BrGeantHit
                     belonging to the detector with the given name
                     e.g. T1, T2, TPM1
  "GeantHeader"      a BrGeantHeader object.

 This class is meant to interacts with the gbr2c.f comis routine
 that is presently the sole output method used by GBRAHMS. Thus it
 is crucial that changed in gbr2c and BrGeantInput, BrGeantTrack are
 coordinated and that versions are properly kept. For a description
 of the file format consult the code and comments of gbr2c.f




BrGeantInput()
  Constructor. Set fFilePointer and fEventCounter to NULL
  In root environment use the named constructor normally.

BrGeantInput(const Char_t *name, const Char_t* title) : BrIOModule(name, title ? title : name)
 Constructor. Set fFilePointer and fEventCounter to NULL
 name becomes Name and Title for the Module.
 No data file is opened this has to be done in
 the Open() method.


~BrGeantInput()
  Destructor for BrGeantInput. Close the file if open.


Bool_t Open(const Char_t *fname, const Option_t *)
 Open the C stream file with fname. Returns kFALSE
 if the file can't be opened.
 Otherwise the fFileName data member is set to the
 corresponding filepointer. The file header is read
 and the volume information is stored in the intrinsic arrays


Bool_t Close()
 Close the file Opened by the object. Return
 kFALSE if no file was open.

Bool_t ReadStreamHeader()
 Read the volume information from the header.
 At this time it is only used to define the Names
 of the hit structures. The information is not used by other parts
 of the reconstruction even though one could imagine that
 the code could 'inquire' on volume information for a specific
 detector.
 This is not implemented. A better way will also be to have a general
 method for passing geometries around.


void SkipEvent(Int_t numevt)

void Event(BrEvent* event)
 Reads one event from the C-stream  data file.The BrEvent
 object has hitlist and tracklist added to the Event.

 This object is filled with data read from the file.
  It is the responsibility of the calling program to have created the
  event.

 Releasing the memory for this event is the responsibility
 of the function/macro calling Event();
 Status of the reading can be checked via the methods IsError() and
 IsEof().

void OutStatus()

void Print(Option_t* option) const
 Standard information printout.

 Options: See BrModule::Print


void SwapLong(int *buffer,int nb)

UInt_t GetDetectorBit(const Text_t *name) const
 Return detector bit corresponding to volume (or 0)

void ListDetectors(UInt_t bits) const
 List names of detectors corresponding to bits



Inline Functions


               Int_t GetNumberOfVolumes()
              Bool_t GetrHeader()
                void SetrHeader(Bool_t rHead)
                void SetFillHitList(Bool_t b)
              Bool_t TryRepair()
             TClass* Class()
             TClass* IsA() const
                void ShowMembers(TMemberInspector& insp, char* parent)
                void Streamer(TBuffer& b)
                void StreamerNVirtual(TBuffer& b)
        BrGeantInput BrGeantInput(BrGeantInput&)

This page automatically generated by script docBrat by Christian Holm

Copyright ; 2002 BRAHMS Collaboration <brahmlib@rcf.rhic.bnl.gov>
Last Update on 2002/04/23 14:45:18 $ by videbaek $

Validate HTML
Validate CSS