Definition at line 440 of file hcg.cxx.
◆ reference() [1/2]
| reference::reference |
( |
const std::string & | n, |
|
|
const std::string & | f ) |
|
inline |
oh dear, find the run number from the specified file
go through sub directories
Definition at line 444 of file hcg.cxx.
444 :
446
448
449 std::cerr <<
"opening file " <<
f << std::endl;
450
451 TFile*
r = TFile::Open(
f.c_str());
453 std::cerr <<
"cannot open root file " <<
f << std::endl;
454 std::exit(-1);
455 }
456
458
460
462 static const std::string runPrefix{"run_"};
463 for (
int i=0 ;
i<
tl->GetSize() ;
i++ ) {
464
465 TKey* tobj = (TKey*)
tl->At(i);
466
467 if ( std::string(tobj->GetClassName()).find("TDirectory")!=std::string::npos ) {
468
469
470 TDirectory* tnd = (TDirectory*)tobj->ReadObj();
471
472 std::string
dir = tnd->GetName();
473
475 dir.erase( 0, runPrefix.size() );
477
478 break;
479 }
480
481 }
482 }
483
485 }
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring
◆ reference() [2/2]
◆ file()
| const std::string & reference::file |
( |
| ) |
const |
|
inline |
◆ name()
| const std::string & reference::name |
( |
| ) |
const |
|
inline |
◆ run()
| int reference::run |
( |
| ) |
const |
|
inline |
◆ m_file
| std::string reference::m_file |
|
private |
◆ m_name
| std::string reference::m_name |
|
private |
◆ m_run
The documentation for this class was generated from the following file: