BRAT 2.4.5
Class index
Full class index
brahmlib
BRAHMS
ROOT page
//____________________________________________________________________
// 
// Rdo (after first analysis pass) 
// 
// 
//____________________________________________________________________

//
// $Id: BrChkvRdo.cxx,v 1.2 2001/08/10 14:06:44 cholm Exp $
// $Author: cholm $
// $Date: 2001/08/10 14:06:44 $
// $Copyright: (C) 2001 BRAHMS Collaboration <brahmlib@rcf.rhic.bnl.gov>
//
//____________________________________________________________________
#ifndef BRAT_BrChkvRdo
#include "BrChkvRdo.h"
#endif
#ifndef ROOT_TDirectory
#include "TDirectory.h"
#endif
#ifndef __WIN32
#include <iostream>
#include <iomanip>
#else 
#include <iostream.h>
#include <iomanip.h>
#endif
//____________________________________________________________________
ClassImp(BrChkvRdo);

//____________________________________________________________________
BrChkvRdo::BrChkvRdo()
  : BrDataObject(),
    fChkvHits("BrChkvRdo::BrChkvHit", 0)
{
  // Default constructor, do not use 
  // Fix to allow objects of this class to be extracted an put as a
  // split branch on a new TTree. 
  fChkvHits.BypassStreamer(kFALSE);
}

//____________________________________________________________________
BrChkvRdo::BrChkvRdo(const char* name, const char* title)
  : BrDataObject(name, title),
  fChkvHits("BrChkvRdo::BrChkvHit", 0)
{
  // Named constructor
  // Fix to allow objects of this class to be extracted an put as a
  // split branch on a new TTree. 
  fChkvHits.BypassStreamer(kFALSE);
}

//____________________________________________________________________
BrChkvRdo::~BrChkvRdo() 
{
  fChkvHits.Delete();
}

//____________________________________________________________________
void BrChkvRdo::Clear(Option_t* option) 
{
  fChkvHits.Clear();
}

//____________________________________________________________________
void BrChkvRdo::Print(Option_t* option) const
{
  // Print this data object
  // 
  // Options: 
  //    A          Array data 
  // 
  // other options are passed on. 
  // 
  cout << "BrChkvRdo: " << GetName() 
       << "(" << GetTitle() << ")" << endl;
  
  TString opt(option);
  opt.ToLower();

  if (opt.Contains("a")) {
    cout << " Entries: " << setw(7) << GetEntries() << endl;
    for (Int_t i = 0; i < GetEntries(); i++)
      GetHit(i)->Print();
  }
}

//____________________________________________________________________
void BrChkvRdo::AddHit(Int_t tube, Float_t energy)
{
  Int_t idx = fChkvHits.GetLast()+1;
  new(fChkvHits[idx]) BrChkvHit(tube, energy);
}

//____________________________________________________________________
ClassImp(BrChkvRdo::BrChkvHit);

//____________________________________________________________________
 BrChkvRdo::BrChkvHit::BrChkvHit(Int_t tube, Float_t energy)
  : fTubeNum(tube),
    fEnergy(energy)
{
  // Default constructor
}

//____________________________________________________________________
 void BrChkvRdo::BrChkvHit::Clear(Option_t* option) 
{
  // Clear this object 
  fTubeNum       = -1;
  fEnergy        = -1;
}

//____________________________________________________________________
 void BrChkvRdo::BrChkvHit::Print(Option_t* option) const
{
  // Print the data
  cout << "   Tube: " << setw(3) << fTubeNum   << endl
       << " Energy: " << setw(7) << fEnergy    << endl;
}


//
// $Log: BrChkvRdo.cxx,v $
// Revision 1.2  2001/08/10 14:06:44  cholm
// Fix to allow putting theses on branch in a new TTree - thanks Rene
//
// Revision 1.1  2001/08/09 15:59:12  ekman
// Added the classes BrChkvRdo and BrChkvRcoModule.
//
//

This page automatically generated by script docBrat by Christian Holm

Copyright ; 2002 BRAHMS Collaboration <brahmlib@rcf.rhic.bnl.gov>
Last Update on by

Validate HTML
Validate CSS