using namespace std;
#include "hwallgeompar.h"
#include "hgeomcompositevolume.h"
#include "hpario.h"
#include "hdetpario.h"
#include <iostream>
#include <iomanip>
ClassImp(HWallGeomPar)
HWallGeomPar::HWallGeomPar(const Char_t* name,const Char_t* title,
const Char_t* context)
: HDetGeomPar(name,title,context,"Wall") {
}
Bool_t HWallGeomPar::init(HParIo* inp,Int_t* set) {
HDetParIo* input=inp->getDetParIo("HWallParIo");
if (input) return (input->init(this,set));
return kFALSE;
}
Int_t HWallGeomPar::write(HParIo* output) {
HDetParIo* out=output->getDetParIo("HWallParIo");
if (out) return out->write(this);
return -1;
}
Int_t HWallGeomPar::getCompNum(const TString& name) {
Int_t length = name.Length();
switch (length) {
case 5:
return ((Int_t)(name[4]-'0')-1);
break;
case 6:
return ((Int_t)(name[4]-'0')*10+(Int_t)(name[5]-'0')-1);
break;
case 7:
return ((Int_t)(name[4]-'0')*100+(Int_t)(name[5]-'0')*10+(Int_t)(name[6]-'0')-1);
break;
}
return(-1);
}
TString HWallGeomPar::getCellName(const Int_t c) {
Int_t precision = 0;
Int_t decimal, sign;
Int_t c1=c+1;
TString baseName1="W001";
TString baseName2="W002";
TString baseName3="W003";
TString buffer;
TString cellName;
buffer = fcvt ((Double_t)c1, precision, &decimal, &sign);
if(c<144) cellName=baseName1+buffer;
if(c>143&&c<208) cellName=baseName2+buffer;
if(c>209&&c<302) cellName=baseName3+buffer;
return cellName;
}
Last change: Sat May 22 13:17:31 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.