Skip to content
Snippets Groups Projects
Commit 26880241 authored by Stephen A. Wood's avatar Stephen A. Wood
Browse files

Add some print statements. Return a valid code from ReadDatabase.

parent 1de42d61
No related branches found
No related tags found
No related merge requests found
...@@ -113,6 +113,9 @@ Int_t THcHodoscope::ReadDatabase( const TDatime& date ) ...@@ -113,6 +113,9 @@ Int_t THcHodoscope::ReadDatabase( const TDatime& date )
// We will probably want to add some kind of method to gHcParms to allow // We will probably want to add some kind of method to gHcParms to allow
// bulk retrieval of parameters of interest. // bulk retrieval of parameters of interest.
// Will need to determine which spectrometer in order to construct
// the parameter names (e.g. hscin_1x_nr vs. sscin_1x_nr)
fNPlanes = 4; // Hardwire for now fNPlanes = 4; // Hardwire for now
fNPaddle = new Int_t [4]; fNPaddle = new Int_t [4];
...@@ -135,30 +138,42 @@ Int_t THcHodoscope::ReadDatabase( const TDatime& date ) ...@@ -135,30 +138,42 @@ Int_t THcHodoscope::ReadDatabase( const TDatime& date )
iplane = 0; iplane = 0;
p = (Double_t *)gHcParms->Find("hscin_1x_center")->GetValuePointer(); p = (Double_t *)gHcParms->Find("hscin_1x_center")->GetValuePointer();
fCenter[iplane] = new Double_t [fNPaddle[iplane]]; fCenter[iplane] = new Double_t [fNPaddle[iplane]];
for(Int_t i=0;i<fNPaddle[0];i++) { cout << iplane;
for(Int_t i=0;i<fNPaddle[iplane];i++) {
fCenter[iplane][i] = p[i]; fCenter[iplane][i] = p[i];
cout << " " << fCenter[iplane][i];
} }
cout << endl;
iplane = 1; iplane = 1;
p = (Double_t *)gHcParms->Find("hscin_1y_center")->GetValuePointer(); p = (Double_t *)gHcParms->Find("hscin_1y_center")->GetValuePointer();
fCenter[iplane] = new Double_t [fNPaddle[iplane]]; fCenter[iplane] = new Double_t [fNPaddle[iplane]];
for(Int_t i=0;i<fNPaddle[0];i++) { cout << iplane;
for(Int_t i=0;i<fNPaddle[iplane];i++) {
fCenter[iplane][i] = p[i]; fCenter[iplane][i] = p[i];
cout << " " << fCenter[iplane][i];
} }
cout << endl;
iplane = 2; iplane = 2;
p = (Double_t *)gHcParms->Find("hscin_2x_center")->GetValuePointer(); p = (Double_t *)gHcParms->Find("hscin_2x_center")->GetValuePointer();
fCenter[iplane] = new Double_t [fNPaddle[iplane]]; fCenter[iplane] = new Double_t [fNPaddle[iplane]];
for(Int_t i=0;i<fNPaddle[0];i++) { cout << iplane;
for(Int_t i=0;i<fNPaddle[iplane];i++) {
fCenter[iplane][i] = p[i]; fCenter[iplane][i] = p[i];
cout << " " << fCenter[iplane][i];
} }
cout << endl;
iplane = 3; iplane = 3;
p = (Double_t *)gHcParms->Find("hscin_2y_center")->GetValuePointer(); p = (Double_t *)gHcParms->Find("hscin_2y_center")->GetValuePointer();
fCenter[iplane] = new Double_t [fNPaddle[iplane]]; fCenter[iplane] = new Double_t [fNPaddle[iplane]];
for(Int_t i=0;i<fNPaddle[0];i++) { cout << iplane;
for(Int_t i=0;i<fNPaddle[iplane];i++) {
fCenter[iplane][i] = p[i]; fCenter[iplane][i] = p[i];
cout << " " << fCenter[iplane][i];
} }
cout << endl;
fIsInit = true; fIsInit = true;
...@@ -207,6 +222,7 @@ Int_t THcHodoscope::DefineVariables( EMode mode ) ...@@ -207,6 +222,7 @@ Int_t THcHodoscope::DefineVariables( EMode mode )
// { 0 } // { 0 }
// }; // };
// return DefineVarsFromList( vars, mode ); // return DefineVarsFromList( vars, mode );
return kOK;
} }
//_____________________________________________________________________________ //_____________________________________________________________________________
......
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