#include "hrichIPUparthresholds.h"
#include "hades.h"
#include "hpario.h"
#include "hdetpario.h"
#include "hmessagemgr.h"
ClassImp(HRichIPUParThresholds)
void HRichIPUParThresholds::setDefaults(void)
{
for (Int_t xx=0; xx < 2; xx++)
{
for (Int_t yy=0; yy < 6; yy++)
{
thresholds[xx][yy]=0;
}
}
}
HRichIPUParThresholds::HRichIPUParThresholds(const Char_t* name,const Char_t* title, const Char_t* context)
: HParSet(name,title,context)
{
strcpy(detName,"Trigger");
}
HRichIPUParThresholds::~HRichIPUParThresholds(void)
{
}
Bool_t HRichIPUParThresholds::init(HParIo* inp,Int_t* set)
{
HDetParIo* input=inp->getDetParIo("HTriggerParIo");
if (input) return (input->init(this,set));
ERROR_msg(HMessageMgr::DET_TRIGGER,"Did not get input >HTriggerParIo< " );
return kFALSE;
}
Int_t HRichIPUParThresholds::write(HParIo* output)
{
HDetParIo* out=output->getDetParIo("HTriggerParIo");
if (out) return out->write(this);
return -1;
}
void HRichIPUParThresholds::clear()
{
setDefaults();
status=kFALSE;
resetInputVersions();
}
void HRichIPUParThresholds::readline(const Char_t *buf, Int_t *set)
{
Int_t sec,re;
Int_t thr;
sscanf(buf,"%i%i%i",&re,&sec,&thr);
if( (re >= 0) && (re <= 1 )
&& (sec>= 0) && (sec<= 5 ) )
{
setThresholds(re,sec,thr);
}
else
{
ERROR_msg(HMessageMgr::DET_TRIGGER,"variables not properly set");
}
}
void HRichIPUParThresholds::putAsciiHeader(TString& header)
{
header=
"# Parameters for RICH IPU Thresholds\n"
"# Format:\n"
"# region sector threshold\n";
}
Bool_t HRichIPUParThresholds::writeline(Char_t *buf,Int_t s, Int_t m)
{
sprintf(buf,"%i %i %i\n",s,m,getThresholds(s,m));
return kTRUE;
}
void HRichIPUParThresholds::printParam(void)
{
SEPERATOR_msg("=",60);
INFO_msg(10,HMessageMgr::DET_TRIGGER,"\n Parameters for RICH IPU Thresholds\n");
INFO_msg(10,HMessageMgr::DET_TRIGGER,"Format:\n");
INFO_msg(10,HMessageMgr::DET_TRIGGER,"region sector threshold\n");
SEPERATOR_msg("=",60);
for (Int_t xx=0; xx < 2; xx++)
{
for (Int_t yy=0; yy < 6; yy++)
{
gHades->getMsg()->info(10,HMessageMgr::DET_TRIGGER,GetName(),
"%d %d %d",xx, yy, getThresholds(xx,yy));
}
}
SEPERATOR_msg("=",60);
}
Last change: Sat May 22 13:09:15 2010
Last generated: 2010-05-22 13:09
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.