using namespace std;
#include "hstartgo4mon.h"
#include "hstarthistfiller.h"
#include "hstarthistbooker.h"
#include "hstartdef.h"
#include "hcategory.h"
#include "hstartcal.h"
#include "hstartraw.h"
#include "hstarthit.h"
#include "hdebug.h"
#include "hades.h"
#include "hiterator.h"
#include "hruntimedb.h"
#include "hspectrometer.h"
#include "hdetector.h"
#include "hevent.h"
#include <iostream>
#include <iomanip>
#include <stdlib.h>
#include "TIterator.h"
ClassImp(HStartGo4Mon)
HStartHistBooker* HStartGo4Mon::startHistbooker=0;
HStartGo4Mon::HStartGo4Mon(void) {
initVariables();
}
HStartGo4Mon::HStartGo4Mon(const Text_t* name,const Text_t* title)
: HReconstructor(name,title) {
initVariables();
}
HStartGo4Mon::~HStartGo4Mon(void) {
if (itercal) delete itercal;
if (iterraw) delete iterraw;
if (iterhit) delete iterhit;
itercal=0;
iterraw=0;
iterhit=0;
}
void HStartGo4Mon::initVariables()
{
calCat =0;
rawCat =0;
hitCat =0;
itercal=0;
iterraw=0;
iterhit=0;
}
void HStartGo4Mon::printStatus(){
cout << "************* HStartGo4Mon ***************" << endl;
cout << "******************************************" << endl;
}
void HStartGo4Mon::setParContainers() {
startHistbooker = HStartHistBooker::getExObject();
if(!startHistbooker)
{
Error("HStartGo4Mon::setParContainers()","ZERO POINTER FOR HSTARTHISTBOOKER RECEIVED!");
exit(1);
}
}
Bool_t HStartGo4Mon::init(void) {
Bool_t test=kFALSE;
setParContainers();
test=getCategories();
printStatus();
fActive=kTRUE;
return test;
}
Bool_t HStartGo4Mon::reinit(void)
{
startHistbooker = HStartHistBooker::getExObject();
startHistbooker->printStatus();
fActive=kTRUE;
return kTRUE;
}
Bool_t HStartGo4Mon::getCategories()
{
rawCat=(HCategory*)(((HEvent*)(gHades->getCurrentEvent()))->getCategory(catStartRaw));
if (!rawCat) {
Warning("HStartGo4Mon:init()","CATEGORY HSTARTRAW IS NOT FILLED!");
}
calCat=(HCategory*)(((HEvent*)(gHades->getCurrentEvent()))->getCategory(catStartCal));
if (!calCat) {
Warning("HStartGo4Mon:init()","CATEGORY HSTARTCAL IS NOT FILLED!");
}
hitCat=(HCategory*)(((HEvent*)(gHades->getCurrentEvent()))->getCategory(catStartHit));
if (!hitCat) {
Warning("HStartGo4Mon:init()","CATEGORY HSTARTHIT IS NOT FILLED!");
}
if (rawCat)
{
iterraw =(HIterator *)((HCategory*)rawCat)->MakeIterator("native");
}
if (calCat)
{
itercal=(HIterator *)((HCategory*)calCat)->MakeIterator("native");
}
if (hitCat)
{
iterhit =(HIterator *)((HCategory*)hitCat)->MakeIterator("native");
}
return kTRUE;
}
Int_t HStartGo4Mon::execute()
{
startHistbooker->getStartFiller()->fillLatch();
startHistbooker->getStartFiller()->fillVertex();
if(rawCat)
{
iterraw->Reset();
startHistbooker->getStartFiller()->fillRaw(iterraw);
}
if(calCat)
{
itercal->Reset();
startHistbooker->getStartFiller()->fillCal(itercal);
}
if(hitCat)
{
iterhit->Reset();
startHistbooker->getStartFiller()->fillHit(iterhit);
}
return 0;
}
Bool_t HStartGo4Mon::finalize()
{
return kTRUE;
}
Last change: Sat May 22 13:14:41 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.