using namespace std;
#include "hsimulgeantreader.h"
#include "hgeantheader.h"
#include "hdebug.h"
#include "hades.h"
#include "hevent.h"
#include "hrecevent.h"
#include "hpartialevent.h"
#include "hlinearcategory.h"
#include "TDirectory.h"
#include <iostream>
#include <iomanip>
ClassImp(HSimulGeantReader)
HSimulGeantReader::HSimulGeantReader(void) {
fEventId = 0;
}
HSimulGeantReader::~HSimulGeantReader(void) {
}
Bool_t HSimulGeantReader::init(void) {
fEventId = 0;
if (fInputFile == NULL) {
t = NULL;
return kFALSE;
}
fSimEv = (HRecEvent*)fInputFile->Get("Event");
gHades->setEvent(fSimEv);
if ((t = (TTree*)fInputFile->Get("T")) == NULL) return kFALSE;
gHades->activateTree(t);
HGeantHeader* fSimHead=(HGeantHeader*)(fSimEv->getPartialEvent(catSimul)
->getSubHeader());
if(fSimHead == NULL) {
fSimEv->getPartialEvent(catSimul)->setSubHeader(new HGeantHeader());
fSimHead = (HGeantHeader*)(fSimEv->getPartialEvent(catSimul)
->getSubHeader());
}
t->SetBranchAddress("Simul.Header",&fSimHead);
t->SetBranchStatus("Simul.Header",1);
if (gHades->getOutputFile() != NULL) gHades->getOutputFile()->cd();
return kTRUE;
}
Bool_t HSimulGeantReader::execute(void) {
if(t) {
if(t->GetEntry(fEventId)==0) return kFALSE;
}
fEventId++;
return kTRUE;
}
Last change: Sat May 22 13:14:19 2010
Last generated: 2010-05-22 13:14
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.