//_HADES_CLASS_DESCRIPTION
////////////////////////////////////////////////////////////////////////////
//*-- AUTHOR : J. Markert
////////////////////////////////////////////////////////////////////////////
// HMdcDigitPar
//
// Container class for Mdc digitization parameters
//
////////////////////////////////////////////////////////////////////////////
#include "hmdcdigitpar.h"
#include "hpario.h"
#include "hdetpario.h"
#include "hmessagemgr.h"
#include "hparamlist.h"
#include "hmessagemgr.h"
#include <stdlib.h>
ClassImp(HMdcDigitPar)
HMdcDigitPar::HMdcDigitPar(const char* name,const char* title,
const char* context)
: HParCond(name,title,context)
{
//
strcpy(detName,"Mdc");
layEff.Set(144);
clear();
}
HMdcDigitPar::~HMdcDigitPar()
{
// destructor
}
void HMdcDigitPar::clear()
{
for(Int_t i=0;i<144;i++)
{
layEff[i]=-99;
}
signalspeed=-99;
status=kFALSE;
resetInputVersions();
changed=kFALSE;
}
void HMdcDigitPar::printParam(void)
{
// prints the parameters of HMdcDigitPar to the screen.
SEPERATOR_msg("#",60);
INFO_msg(10,HMessageMgr::DET_MDC,"HMdcDigitPar:");
INFO_msg(10,HMessageMgr::DET_MDC,"LayerEfficiency:");
for(Int_t s=0;s<6;s++){
for(Int_t m=0;m<4;m++){
gHades->getMsg()->info(10,HMessageMgr::DET_MDC,GetName(),
"s %i m %i %5.4f %5.4f %5.4f %5.4f %5.4f %5.4f",
s,m,
layEff[(s*24)+(m*6)+0],layEff[(s*24)+(m*6)+1],layEff[(s*24)+(m*6)+2],
layEff[(s*24)+(m*6)+3],layEff[(s*24)+(m*6)+4],layEff[(s*24)+(m*6)+5]);
}
}
gHades->getMsg()->info(10,HMessageMgr::DET_MDC,GetName(),"SignalSpeed: %6.4f ns/mm",signalspeed);
SEPERATOR_msg("#",60);
}
Bool_t HMdcDigitPar::init(HParIo* inp,Int_t* set)
{
// intitializes the container from an input
HDetParIo* input=inp->getDetParIo("HMdcParIo");
if (input) return (input->init(this,set));
return kFALSE;
}
Int_t HMdcDigitPar::write(HParIo* output)
{
// writes the container to an output
HDetParIo* out=output->getDetParIo("HMdcParIo");
if (out) return out->write(this);
return -1;
}
void HMdcDigitPar::putParams(HParamList* l)
{
// Puts all params of HMdcDigitPar to the parameter list of
// HParamList (which ist used by the io);
if (!l) return;
l->add("layEff", layEff);
l->add("signalspeed",signalspeed);
}
Bool_t HMdcDigitPar::getParams(HParamList* l)
{
if (!l) return kFALSE;
if(!( l->fill("layEff", &layEff))) return kFALSE;
if(!( l->fill("signalspeed",&signalspeed))) return kFALSE;
return kTRUE;
}
ROOT page - Class index - Class Hierarchy - Top of the page
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.