Definition at line 438 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 442 of file hcg.cxx.
442 :
444
446
447 std::cerr <<
"opening file " <<
f << std::endl;
448
449 TFile*
r = TFile::Open(
f.c_str());
451 std::cerr <<
"cannot open root file " <<
f << std::endl;
452 std::exit(-1);
453 }
454
456
458
460
461 for (
int i=0 ;
i<
tl->GetSize() ;
i++ ) {
462
463 TKey* tobj = (TKey*)
tl->At(i);
464
465 if ( std::string(tobj->GetClassName()).find("TDirectory")!=std::string::npos ) {
466
467
468 TDirectory* tnd = (TDirectory*)tobj->ReadObj();
469
470 std::string
dir = tnd->GetName();
471
473 dir.erase( 0, std::string(
"run_").
size() );
475
476 break;
477 }
478
479 }
480 }
481
483 }
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: