Skip to content
Snippets Groups Projects
Commit e018e56e authored by gypaos's avatar gypaos
Browse files

[CT] tests

parent 98f631c7
No related branches found
No related tags found
No related merge requests found
......@@ -347,7 +347,7 @@ void online()
// sprintf(arg,"-D ./ComptonCAM.detector -C Calibration.txt -GH -E Example2.reaction -P %i --circular",port);
// sprintf(arg,"-D ./ComptonCAM.detector -C calibrations.txt -GH -E Example2.reaction --circular");
// sprintf(arg,"-D ./ComptonCAM.detector -C calibrations.txt -GH -E ./10He.reaction --circular");
/* string arg = "-D ./ComptonCAM.detector -C calibrations.txt -GH -E ./10He.reaction --circular";
string arg = "-D ./ComptonCAM.detector -C calibrations.txt -GH -E ./10He.reaction --circular";
NPOptionManager::getInstance(arg);
// ROOT output file name
......@@ -357,7 +357,7 @@ void online()
string detectorfileName = NPOptionManager::getInstance()->GetDetectorFile();
cout << "detector file name from NPOptionManager: " << detectorfileName << "\n";
NPL::DetectorManager* m_NPDetectorManager = new NPL::DetectorManager();
m_NPDetectorManager->ReadConfigurationFile(detectorfileName);*/
// m_NPDetectorManager->ReadConfigurationFile(detectorfileName);
/* m_NPDetectorManager->InitializeRootOutput();*/
// instantiate raw ComptonCAM data pointer
......@@ -374,7 +374,7 @@ void online()
// Load a file
ifstream is;
is.open("decodeR/mfm.bin", ios::binary);
is.open("../mfm.bin", ios::binary);
is.seekg (0, ios::end);
int length = is.tellg();
is.seekg (0, ios::beg);
......
......@@ -22,27 +22,28 @@ int main()
{
///////////////////////////////////////////////////////////////////////////
// configure option manager
// NPOptionManager::getInstance()->Destroy();
// NPOptionManager::getInstance()->Destroy();
// char arg[1000];
// sprintf(arg,"-D ./ComptonCAM.detector -C Calibration.txt -GH -E Example2.reaction -P %i --circular",port);
// sprintf(arg,"-D ./ComptonCAM.detector -C calibrations.txt -GH -E Example2.reaction --circular");
// sprintf(arg,"-D ./ComptonCAM.detector -C calibrations.txt -GH -E ./10He.reaction --circular");
// string arg = "-D ./ComptonCAM.detector -C calibrations.txt -GH -E ./10He.reaction --circular";
string arg = "-D ./Example1.detector -GH -E Example1.reaction";
string arg = "-D ./Example1.detector -GH -E Example1.reaction --circular";
NPOptionManager::getInstance(arg);
// ROOT output file name
RootOutput::getInstance("OnlineTree.root", "OnlineTree");
// configure detector manager
string detectorfileName = NPOptionManager::getInstance()->GetDetectorFile();
cout << "detector file name from NPOptionManager: " << detectorfileName << "\n";
NPL::DetectorManager* m_NPDetectorManager = new NPL::DetectorManager();
m_NPDetectorManager->ReadConfigurationFile(detectorfileName);
// m_NPDetectorManager->ReadConfigurationFile(detectorfileName);
// Essential!
#if __cplusplus > 199711L && NPMULTITHREADING
m_NPDetectorManager->StopThread();
m_NPDetectorManager->StopThread();
#endif
RootOutput::Destroy();
......
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