using namespace std;
#include "hmdccalibrationgo4mon.h"
#include "hmdchistfiller.h"
#include "hmdchistbooker.h"
#include "hmdcdef.h"
#include "hdebug.h"
#include "hades.h"
#include "hiterator.h"
#include "hruntimedb.h"
#include "hspectrometer.h"
#include "hdetector.h"
#include "hevent.h"
#include "hcategory.h"
#include "hmdcraw.h"
#include "hmdcraweventheader.h"
#include "hmdclookupgeom.h"
#include "hmdclookupraw.h"
#include "hmdcrawstruct.h"
#include "hmdcgeomstruct.h"
#include <iostream>
#include <iomanip>
#include <stdlib.h>
#include "TIterator.h"
ClassImp(HMdcCalibrationGo4Mon)
HMdcHistBooker* HMdcCalibrationGo4Mon::Histbooker=0;
HMdcCalibrationGo4Mon::HMdcCalibrationGo4Mon(void) {
initVariables();
}
HMdcCalibrationGo4Mon::HMdcCalibrationGo4Mon(const Text_t* name,const Text_t* title)
: HReconstructor(name,title) {
initVariables();
}
HMdcCalibrationGo4Mon::~HMdcCalibrationGo4Mon(void) {
if (iterraw) delete iterraw;
if (iterrawHeader) delete iterrawHeader;
iterraw=0;
iterrawHeader=0;
}
void HMdcCalibrationGo4Mon::initVariables()
{
rawCat=0;
rawCatHeader=0;
iterraw=0;
iterrawHeader=0;
}
void HMdcCalibrationGo4Mon::printStatus(){
cout << "************* HMdcCalibrationGo4Mon ******" << endl;
cout << "******************************************" << endl;
}
void HMdcCalibrationGo4Mon::setParContainers() {
Histbooker = HMdcHistBooker::getExObject();
if(!Histbooker)
{
Error("HMdcCalibrationGo4Mon::setParContainers()","ZERO POINTER FOR HMDCHISTBOOKER RECEIVED!");
exit(1);
}
}
Bool_t HMdcCalibrationGo4Mon::init(void) {
Bool_t test=kFALSE;
setParContainers();
test=getCategories();
printStatus();
fActive=kTRUE;
return test;
}
Bool_t HMdcCalibrationGo4Mon::reinit(void)
{
Histbooker = HMdcHistBooker::getExObject();
fActive=kTRUE;
return kTRUE;
}
Bool_t HMdcCalibrationGo4Mon::getCategories()
{
rawCat=(HCategory*)(((HEvent*)(gHades->getCurrentEvent()))->getCategory(catMdcRaw));
if (!rawCat) {
Warning("HMdcCalibrationGo4Mon:init()","CATEGORY HMDCRAW IS NOT FILLED!");
}
if (rawCatHeader)
{
iterrawHeader =(HIterator *)((HCategory*)rawCatHeader)->MakeIterator("native");
}
if (rawCat)
{
iterraw =(HIterator *)((HCategory*)rawCat)->MakeIterator("native");
}
return kTRUE;
}
Int_t HMdcCalibrationGo4Mon::execute()
{
if(rawCat)
{
iterraw->Reset();
Histbooker->getMdcFiller()->fillCalibration(iterraw);
}
return 0;
}
Bool_t HMdcCalibrationGo4Mon::finalize()
{
return kTRUE;
}
Last change: Sat May 22 13:00:33 2010
Last generated: 2010-05-22 13:00
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.