go through all the lines ...
36 {
37
41 if ( pos!=std::string::npos ) {
42 std::string
cmd =
"wget ";
48 std::string mvcmd = "mv ";
50 std::system( mvcmd.c_str() );
51 }
52 std::system(
cmd.c_str() );
53 }
54
55 std::cout <<
"lumiParser file: " <<
file << std::endl;
56
59
62 std::vector<int>
lbend;
63
65 for( std::string line; getline( input, line ); ) {
66
67
68
69
70 std::string inputline =
tolower(line);
71
73 if ( inputline.find("run:")!=std::string::npos ||
74 inputline.find("<run>")!=std::string::npos ) {
75
77
85
89
90
91
93 for( std::string fline ; getline( input, fline ) ; ) {
94 if (
tolower(fline).
find(
"from:")!=std::string::npos ) {
95 chop( fline,
"From:" );
97 std::string
start = fline;
101 lbend.push_back( std::atoi(fline.c_str()) );
102 }
103 else if (
tolower(fline).
find(
"lbrange")!=std::string::npos ) {
104 clean( fline,
"\"" );
106 chop( fline,
"LBRange");
107 chomp( fline,
"/>" );
108 chop( fline,
"Start=" );
109 std::string
start = fline;
110 chomp( start,
"End");
111 chop( fline,
"End=");
113 lbend.push_back( std::atoi(fline.c_str()) );
114 }
115 else break;
116 }
117
119
120 }
121 }
122
123 std::cout << "lumiParser: read " << size() << " runs" << std::endl;
124 }
void addRange(int run, int start, int stop)
add a lumi block range for a given run
void chomp(std::string &s, const std::string ®ex)
all these string manipulation routines should all be available from elsewhere
void tail(std::string &s, const std::string ®ex)
std::string tolower(const std::string &s)
void chop(std::string &s, const std::string ®ex)
void clean(std::string &s, const std::string ®ex)
bool exists(const std::string &filename)
does a file exist
static std::vector< uint32_t > lbstart
static std::vector< uint32_t > lbend
std::string label(const std::string &format, int i)