Skip to content
Snippets Groups Projects
Commit 301a82c4 authored by Petr Jacka's avatar Petr Jacka
Browse files

Removing LoadFCalGeometryFromFiles function

parent 04b656a5
No related branches found
No related tags found
No related merge requests found
......@@ -66,10 +66,9 @@ class CaloGeometry : virtual public ICaloGeometry {
TGraph* DrawGeoSampleForPhi0(int sample, int calocol, bool print=false);
TCanvas* DrawGeoForPhi0();
FCAL_ChannelMap* GetFCAL_ChannelMap(){return &m_FCal_ChannelMap;}
void SetFCal_ChannelMap(const FCAL_ChannelMap* fcal_ChannnelMap){m_FCal_ChannelMap=*fcal_ChannnelMap;}
virtual bool LoadFCalGeometryFromFiles(TString filename1,TString filename2,TString filename3); // Initialize m_FCal_ChannelMap
void calculateFCalRminRmax();
virtual bool checkFCalGeometryConsistency();
virtual void PrintMapInfo(int i, int j);
......
......@@ -899,81 +899,6 @@ std::string CaloGeometry::SamplingName(int sample)
return CaloSampling::getSamplingName(sample);
}
bool CaloGeometry::LoadFCalGeometryFromFiles(TString filename1,TString filename2,TString filename3){
vector<ifstream*> electrodes(3);
electrodes[0]=new ifstream(filename1);
electrodes[1]=new ifstream(filename2);
electrodes[2]=new ifstream(filename3);
int thisTubeId;
int thisTubeI;
int thisTubeJ;
//int thisTubeID;
//int thisTubeMod;
double thisTubeX;
double thisTubeY;
TString tubeName;
//int second_column;
string seventh_column;
string eight_column;
int ninth_column;
int i;
for(int imodule=1;imodule<=3;imodule++){
i=0;
while(1){
(*electrodes[imodule-1]) >> tubeName;
if(electrodes[imodule-1]->eof())break;
(*electrodes[imodule-1]) >> thisTubeId; // ?????
(*electrodes[imodule-1]) >> thisTubeI;
(*electrodes[imodule-1]) >> thisTubeJ;
(*electrodes[imodule-1]) >> thisTubeX;
(*electrodes[imodule-1]) >> thisTubeY;
(*electrodes[imodule-1]) >> seventh_column;
(*electrodes[imodule-1]) >> eight_column;
(*electrodes[imodule-1]) >> ninth_column;
tubeName.ReplaceAll("'","");
string tubeNamestring=tubeName.Data();
std::istringstream tileStream1(std::string(tubeNamestring,1,1));
std::istringstream tileStream2(std::string(tubeNamestring,3,2));
std::istringstream tileStream3(std::string(tubeNamestring,6,3));
int a1=0,a2=0,a3=0;
if (tileStream1) tileStream1 >> a1;
if (tileStream2) tileStream2 >> a2;
if (tileStream3) tileStream3 >> a3;
stringstream s;
m_FCal_ChannelMap.add_tube(tubeNamestring, imodule, thisTubeId, thisTubeI,thisTubeJ, thisTubeX, thisTubeY,seventh_column);
i++;
}
}
m_FCal_ChannelMap.finish(); // Creates maps
for(int imodule=1;imodule<=3;imodule++) delete electrodes[imodule-1];
electrodes.clear();
this->calculateFCalRminRmax();
return this->checkFCalGeometryConsistency();
}
void CaloGeometry::calculateFCalRminRmax(){
m_FCal_rmin.resize(3,FLT_MAX);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment