using namespace std;
#include "htriggerparrichmap.h"
#include "hades.h"
#include "hruntimedb.h"
#include "hspectrometer.h"
#include "htriggerdetector.h"
#include "hpario.h"
#include "hdetpario.h"
#include <iostream>
#include <iomanip>
ClassImp(HTriggerParRichMap)
void HTriggerParRichMap::setDefaults(void) {
for (Int_t xx=0; xx < 96; xx++) {
for (Int_t yy=0; yy < 96; yy++) {
rich_theta[xx][yy]=0.;
rich_phi[xx][yy]=0.;
}
}
}
HTriggerParRichMap::HTriggerParRichMap(const Char_t* name,const Char_t* title,
const Char_t* context)
: HParSet(name,title,context) {
strcpy(detName,"Trigger");
setDefaults();
}
HTriggerParRichMap::~HTriggerParRichMap(void) {
}
Bool_t HTriggerParRichMap::init(HParIo* inp,Int_t* set) {
HDetParIo* input=inp->getDetParIo("HTriggerParIo");
if (input) return (input->init(this,set));
cout << "Did not get input >HTriggerParIo< " << endl;
return kFALSE;
}
Int_t HTriggerParRichMap::write(HParIo* output) {
HDetParIo* out=output->getDetParIo("HTriggerParIo");
if (out) return out->write(this);
return -1;
}
void HTriggerParRichMap::clear(){
setDefaults();
status=kFALSE;
resetInputVersions();
}
void HTriggerParRichMap::readline(const Char_t *buf, Int_t *set) {
Int_t row,col,counts;
Float_t theta;
Float_t phi;
sscanf(buf,"%i%i%i%f%f",&row,&col,&counts,&theta,&phi);
if (counts == 0) {
setRichTheta(row,col,0.);
setRichPhi(row,col,0.);
} else {
if( (row > -1) && (row < 96 )
&& (col > -1) && (col < 96 ) ) {
setRichTheta(row,col,theta);
setRichPhi(row,col,phi);
}
else {
}
}
}
void HTriggerParRichMap::putAsciiHeader(TString& header) {
header=
"# Parameters for the MU Rich Mapping\n"
"# Format:\n"
"# row col counts phi theta\n";
}
Bool_t HTriggerParRichMap::writeline(Char_t *buf,Int_t s, Int_t m) {
sprintf(buf,"%i %i %i %f %f\n",s,m,10,getRichTheta(s,m),getRichPhi(s,m));
return kTRUE;
}
void HTriggerParRichMap::printPause(void) {
printf("Press any key to continue");
getchar();
printf("\n\n");
}
void HTriggerParRichMap::printParam(void) {
printf("\n Parameters for the MU Rich Mapping\n");
printf(" Format:\n");
printf(" col row phi theta\n");
printf("==============================================================\n");
for (Int_t xx=0; xx < 96; xx++) {
for (Int_t yy=0; yy< 96; yy++) {
cout << xx << " " << yy << " " << getRichTheta(xx,yy) << " " << getRichPhi(xx,yy) << endl;
}
}
printf("==============================================================\n");
}
Last change: Sat May 22 13:17:18 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.