|
ATLAS Offline Software
|
Go to the documentation of this file.
15 #ifndef ANALYSIS_LUMILIST_H
16 #define ANALYSIS_LUMILIST_H
27 class lumiList :
public std::map< int, grl_run > {
53 std::pair< iterator, bool > in = insert( std::pair<int, grl_run >(
run,
grl_run(
run ) ) );
59 if ( !
m_terse ) std::cout <<
"lumiList::addRange() run " <<
run <<
";\t" <<
start <<
" - " <<
stop << std::endl;
71 if ( itr ==
end() )
return true;
74 for (
unsigned i=0 ;
i<
v.size() ;
i++ ) {
85 std::cout <<
"lumiList::sort() sorting ..." << std::endl;
87 std::vector< const grl_run* >
vec;
91 while ( itr!=
end() ) {
92 vec.push_back( &(itr->second) );
102 for (
unsigned i=
vec.size() ;
i-- ; ) total +=
vec[
i]->lbsize();
106 for (
unsigned i=0 ;
i<
vec.size() ;
i++ ) {
111 <<
"\t" <<
int(100*(
i+1.0)/
vec.size())
113 <<
"\t" << *
vec[
i] <<
"\tfraction: " <<
vec[
i]->lbsize()/total << std::endl;
139 s <<
"lumilist: " <<
ll.size() <<
" runs" <<
"\n";
141 while ( itr!=
ll.end() ) {
143 s <<
"lumiList: run " << itr->first <<
" range: " << itr->second.first() <<
"\t- " << itr->second.last() <<
"\t : size " << itr->second.lbsize() <<
"\n";
152 #endif // ANALYSIS_LUMILIST_H
JetConstituentVector::iterator iterator
std::string find(const std::string &s)
return a remapped string
std::map< int, grl_run > full_type
full map type
std::map< int, grl_run >::const_iterator const_iterator
std::vector< size_t > vec
void addRange(int run, int start, int stop)
add a lumi block range for a given run
typename vecDetail::vec_typedef< T, N >::type vec
Define a nice alias for the vectorized type.
static bool comparison(const grl_run *r1, const grl_run *r2)
std::map< int, grl_run >::iterator iterator
iterators over the full map
bool inRange(int run, int lb)
is this run, lumiblock in any of the ranges? if the run is not in the list, it is assumed that all ev...
void sort()
sort the runs by the number of good lumi blocks
std::ostream & operator<<(std::ostream &s, const lumiList &ll)