using namespace std;
#include "htriggerparshowermap.h"
#include "hades.h"
#include "hruntimedb.h"
#include "hspectrometer.h"
#include "htriggerdetector.h"
#include "hpario.h"
#include "hdetpario.h"
#include <iostream>
#include <iomanip>
ClassImp(HTriggerParShowerMap)
void HTriggerParShowerMap::setDefaults(void) {
for (Int_t xx=0; xx < 32; xx++) {
for (Int_t yy=0; yy < 32; yy++) {
shower_theta[xx][yy]=0;
shower_phi[xx][yy]=0;
}
}
}
HTriggerParShowerMap::HTriggerParShowerMap(const Char_t* name,const Char_t* title,
const Char_t* context)
: HParSet(name,title,context) {
strcpy(detName,"Trigger");
}
HTriggerParShowerMap::~HTriggerParShowerMap(void) {
}
Bool_t HTriggerParShowerMap::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 HTriggerParShowerMap::write(HParIo* output) {
HDetParIo* out=output->getDetParIo("HTriggerParIo");
if (out) return out->write(this);
return -1;
}
void HTriggerParShowerMap::clear(){
setDefaults();
status=kFALSE;
resetInputVersions();
}
void HTriggerParShowerMap::readline(const Char_t *buf, Int_t *set) {
Int_t row,col;
Float_t theta;
Float_t phi;
sscanf(buf,"%i%i%f%f",&col,&row,&phi,&theta);
if( (row > -1) && (row < 32 )
&& (col > -1) && (col < 32 ) ) {
setShowerTheta(col,row,theta);
setShowerPhi(col,row,phi);
}
else {
cout << "variables not properly set " << endl;
}
}
void HTriggerParShowerMap::putAsciiHeader(TString& header) {
header=
"# Parameters for the MU Shower Mapping\n"
"# Format:\n"
"# col row phi theta\n";
}
Bool_t HTriggerParShowerMap::writeline(Char_t *buf,Int_t c, Int_t r) {
sprintf(buf,"%i %i %f %f\n", c,r,getShowerPhi(c,r),getShowerTheta(c,r));
return kTRUE;
}
void HTriggerParShowerMap::printPause(void) {
printf("Press any key to continue");
getchar();
printf("\n\n");
}
void HTriggerParShowerMap::printParam(void) {
printf("\n Parameters for the MU Shower Mapping\n");
printf(" Format:\n");
printf(" col row phi theta\n");
printf("==============================================================\n");
for (Int_t xx=0; xx < 32; xx++) {
for (Int_t yy=0; yy< 32; yy++) {
cout << xx << " " << yy << " " << getShowerPhi(xx,yy) << " " << getShowerTheta(xx,yy) << endl;
}
}
printf("==============================================================\n");
}
Last change: Sat May 22 13:17:20 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.