Hi, This follows up on the question of detector parameters and the
database. If I run the following script, it returns 40 for the number of
tofw slats. The actual number is 125. Am I accessing the db
incorrectly? Thanks for any help.
...steve
#include "BrRunInfoManager.h"
#include <stdio.h>
#include <iostream.h>
void dbsetup()
{
BrMainDb * mainDb = BrMainDb::Instance();
mainDb->SetUserName("query");
mainDb->SetHostName("rcas0005.rcf.bnl.gov");
mainDb->SetDbName("BrahmsMain");
mainDb->Connect();
mainDb->ConnectToRun("query");
mainDb->ConnectToCalib();
mainDb->ConnectToGeom();
BrParameterDbManager *parMan = BrParameterDbManager::Instance();
BrRunInfoManager *runinfoMan = BrRunInfoManager::Instance();
BrGeometryDbManager *geoMan = BrGeometryDbManager::Instance();
BrRunInfoManager *runinfoMan = BrRunInfoManager::Instance();
runinfoMan->Register(5702);
BrDetectorParamsTof *
fTofParams =
(BrDetectorParamsTof*)parMan->GetDetectorParameters("BrDetectorParamsTof","TOFW");
runinfoMan->Init();
runinfoMan->Update(5702);
cout<<fTofParams->GetNoSlats()<<endl;
}
This archive was generated by hypermail 2b30 : Thu Apr 18 2002 - 14:08:10 EDT