void test01_TRunInfo() { // ---- Load libraries ---------------------------------------------- // gROOT->LoadMacro("$VMCWORKDIR/gconfig/basiclibs.C"); // basiclibs(); gSystem->Load("libTRunInfo"); // --------------------------------------------------------------------- TRunInfo *pTRunInfo = new TRunInfo(); pTRunInfo->SetDebugLevel(10); //pTRunInfo->Config(); //cout << "# of loaded files " << pTRunInfo->GetNloadedRuns() << endl; //TString configFile = "/home/sebastian/Projects/Asyeosroot/asyeosroot/macros/kratta/test11_truninfo/goodBeamList.txt"; //pTRunInfo->Config( configFile ); // Test clearing the runlist: //cout << "# of loaded files " << pTRunInfo->GetNloadedRuns() << endl; //pTRunInfo->ClearRunlist(); //cout << "# of loaded files " << pTRunInfo->GetNloadedRuns() << endl; //EProjectile aa; /// TEST #1 runList = "ListOfRuns_1334-1369.txt"; cout << "TEST #1: \""<< runList << "\"" << endl; pTRunInfo->SetDebugLevel(10); pTRunInfo->LoadFilesWithListV1( runList ); cout << "# of loaded files " << pTRunInfo->GetNloadedRuns() << endl; // Test enum types: //pTRunInfo->Print(); //EProjectile aa = kPUndef;// = kPUndef; //cout << aa << endl; /// TEST #2 cout << "TEST #2: Check given element" << endl; int tempRunNo = 1816; TRunInfoCont ric = pTRunInfo-> GetRunInfoCont( tempRunNo ); //cout << ric << endl; /// it doesn't work ric.Print(); cout << "Note of run: " << tempRunNo << endl; cout << ric.GetNote() << endl; /// TEST #3 cout << "TEST #3: Get information directly from the TRunInfo class" << endl; pTRunInfo->SetDebugLevel(0); cout << pTRunInfo->IsShadowBar(200) << endl; cout << "XXX pTRunInfo->GetNote(1833): " << pTRunInfo->GetNote(1350) << endl; cout << "Run 200 was autom. cloed: " << pTRunInfo->IsAutomClosed(200) << endl; cout << "Run 1350 was autom. cloed: " << pTRunInfo->IsAutomClosed(1350) << endl; cout << "TEST_PASSED" << endl; /// for testing only return; }