Skip to content
Snippets Groups Projects
Commit b9cddb90 authored by Mark Jones's avatar Mark Jones
Browse files

1) Add fNPlanes to the new THcScintillatorPlane so the fTotPlanes is filled

properly with 4. Before it was filled with 1,2,3,4 for each plane 1,2,3,4
2) Only if fTofUsingInvAdc==1 the read database for hodo_pos_invadc_offset, hodo_pos_invadc_linear
,hodo_pos_invadc_adc, hodo_neg_invadc_offset, hodo_neg_invadc_linear
,hodo_neg_invadc_adc
parent 3c1741c8
No related branches found
No related tags found
No related merge requests found
......@@ -79,7 +79,7 @@ void THcHodoscope::Setup(const char* name, const char* description)
{"hodo_plane_names",&planenamelist, kString},
{0}
};
fNPlanes = 4; // Default if not defined
//fNPlanes = 4; // Default if not defined
gHcParms->LoadParmValues((DBRequest*)&listextra,prefix);
cout << "Plane Name List : " << planenamelist << endl;
......@@ -111,7 +111,7 @@ void THcHodoscope::Setup(const char* name, const char* description)
strcpy(desc, description);
strcat(desc, " Plane ");
strcat(desc, fPlaneNames[i]);
fPlanes[i] = new THcScintillatorPlane(fPlaneNames[i], desc, i+1,this); // Number planes starting from zero!!
fPlanes[i] = new THcScintillatorPlane(fPlaneNames[i], desc, i+1,fNPlanes,this); // Number planes starting from zero!!
cout << "Created Scintillator Plane " << fPlaneNames[i] << ", " << desc << endl;
}
}
......@@ -317,7 +317,7 @@ Int_t THcHodoscope::ReadDatabase( const TDatime& date )
strcpy(parname,prefix);
strcat(parname,"scin_");
Int_t plen=strlen(parname);
cout << " readdatabse hodo fnplanes = " << fNPlanes << endl;
fNPaddle = new Int_t [fNPlanes];
// fSpacing = new Double_t [fNPlanes];
//fCenter = new Double_t* [fNPlanes];
......@@ -406,6 +406,11 @@ Int_t THcHodoscope::ReadDatabase( const TDatime& date )
{"hodo_pos_ped_limit",&fHodoPosPedLimit[0],kInt,fMaxHodoScin},
{"hodo_neg_ped_limit",&fHodoNegPedLimit[0],kInt,fMaxHodoScin},
{"tofusinginvadc",&fTofUsingInvAdc,kInt},
{0}
};
gHcParms->LoadParmValues((DBRequest*)&list,prefix);
if (fTofUsingInvAdc) {
DBRequest list2[]={
{"hodo_pos_invadc_offset",&fHodoPosInvAdcOffset[0],kDouble,fMaxHodoScin},
{"hodo_neg_invadc_offset",&fHodoNegInvAdcOffset[0],kDouble,fMaxHodoScin},
{"hodo_pos_invadc_linear",&fHodoPosInvAdcLinear[0],kDouble,fMaxHodoScin},
......@@ -414,7 +419,8 @@ Int_t THcHodoscope::ReadDatabase( const TDatime& date )
{"hodo_neg_invadc_adc",&fHodoNegInvAdcAdc[0],kDouble,fMaxHodoScin},
{0}
};
gHcParms->LoadParmValues((DBRequest*)&list,prefix);
gHcParms->LoadParmValues((DBRequest*)&list2,prefix);
};
if (fDebug >=1) {
cout <<"******* Testing Hodoscope Parameter Reading ***\n";
cout<<"StarTimeCenter = "<<fStartTimeCenter<<endl;
......
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