32 std::cout <<
"dataset::dataset() reading files from " << st << std::endl;
36 if ( s.find(
"root://eos")!=std::string::npos ) {
41 size_t pos=s.find(
"//");
42 while( pos!=std::string::npos ) {
43 s = s.substr(pos+1,s.length());
47 std::string xcmd =
"eos ls "+s+
"/";
48 std::system( (xcmd+
" > .eosfiles-$$.log").c_str() );
50 std::string cmd =
"export EOSFILES=$("+xcmd+
")";
51 std::system( cmd.c_str() );
53 std::ifstream infile(
".eosfiles-$$.log");
55 while( !infile.fail() ) {
58 if ( !infile.fail() &&
59 file.find(
".root")!=std::string::npos &&
60 file.find(
".part")==std::string::npos &&
61 file.find(
".bak")==std::string::npos &&
62 file.find(
".skimmed")==std::string::npos ) push_back( s+
"/"+file );
76 if( ( dirp = opendir(s.c_str()) ) ) {
77 while( ( entry = readdir(dirp) ) ) {
78 std::string
file = entry->d_name;
79 if (
file.find(
".root")!=std::string::npos ) {
80 push_back( s+
"/"+
file );
86 std::cout <<
"dataset::dataset() " <<
size() <<
" files in dataset" << std::endl;