#include "htriggerparmulep.h"
#include "hades.h"
#include "hruntimedb.h"
#include "hspectrometer.h"
#include "htriggerdetector.h"
#include "hpario.h"
#include "hdetpario.h"
#include "hparamlist.h"
#include "hmessagemgr.h"
ClassImp(HTriggerParMuLep)
void HTriggerParMuLep::setDefaults(void)
{
MUtheta=255;
MUphi_offset=34;
MUphi_slope=4;
MUfield=500;
MUtof=20.0;
}
HTriggerParMuLep::HTriggerParMuLep(const Char_t* name,const Char_t* title, const Char_t* context)
: HParCond(name,title,context)
{
strcpy(detName,"Trigger");
}
HTriggerParMuLep::~HTriggerParMuLep(void)
{
}
Bool_t HTriggerParMuLep::init(HParIo* inp,Int_t* set)
{
HDetParIo* input=inp->getDetParIo("HTriggerParIo");
if (input) return (input->init(this,set));
return kFALSE;
}
Int_t HTriggerParMuLep::write(HParIo* output)
{
HDetParIo* out=output->getDetParIo("HTriggerParIo");
if (out) return out->write(this);
return -1;
}
void HTriggerParMuLep::putParams(HParamList* l)
{
if (!l) return;
l->add("MUtheta",MUtheta);
l->add("MUphi_offset",MUphi_offset);
l->add("MUphi_slope",MUphi_slope);
l->add("MUfield",MUfield);
l->add("MUtof",MUtof);
}
Bool_t HTriggerParMuLep::getParams(HParamList* l)
{
if (!l) return kFALSE;
if (!l->fill("MUtheta",&MUtheta)) return kFALSE;
if (!l->fill("MUphi_offset",&MUphi_offset)) return kFALSE;
if (!l->fill("MUphi_slope",&MUphi_slope)) return kFALSE;
if (!l->fill("MUfield",&MUfield)) return kFALSE;
if (!l->fill("MUtof",&MUtof)) return kFALSE;
return kTRUE;
}
void HTriggerParMuLep::clear()
{
setDefaults();
status=kFALSE;
resetInputVersions();
}
void HTriggerParMuLep::readline(const Char_t *buf, Int_t *set)
{
Int_t th,phO,phS,ff;
Float_t tof;
sscanf(buf,"%i%i%i%i%f",&th,&phO,&phS,&ff,&tof);
setMUtheta(th);
setMUphiOffset(phO);
setMUphiSlope(phS);
setMUfield(ff);
setMUtof(tof);
}
void HTriggerParMuLep::putAsciiHeader(TString& header)
{
header=
"# Parameters for the MU Lepton emulation\n"
"# Format:\n"
"# MUtheta MUphi_offset MUphi_slope MUfield MUtof\n";
}
void HTriggerParMuLep::printParam(void)
{
INFO_msg(10,HMessageMgr::DET_TRIGGER,"\n Parameters for the MU Lepton emulation\n");
INFO_msg(10,HMessageMgr::DET_TRIGGER," Format:\n");
INFO_msg(10,HMessageMgr::DET_TRIGGER," MUtheta MUphi_offset MUphi_slope MUfield MUtof\n");
SEPERATOR_msg("=",80);
gHades->getMsg()->info(10, HMessageMgr::DET_TRIGGER,GetName(),
" %i %i %i %i %2.2f\n",
MUtheta,
MUphi_offset,
MUphi_slope,
MUfield,
MUtof);
SEPERATOR_msg("=",80);
}
Last change: Sat May 22 13:17:16 2010
Last generated: 2010-05-22 13:17
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.