17 , m_checkGRLInfo( checkGRLInfo )
39 std::vector<TGoodRunsList>::iterator itr = this->begin();
40 std::vector<TGoodRunsList>::iterator end = this->end();
41 for (; itr!=end; ++itr) itr->SetVersion(version);
48 std::vector<TGoodRunsList>::iterator itr = this->begin();
49 std::vector<TGoodRunsList>::iterator end = this->end();
50 for (; itr!=end; ++itr) itr->SetMetaData(metadata);
56 std::vector<TGoodRunsList>::const_iterator itr = this->begin();
57 std::vector<TGoodRunsList>::const_iterator end = this->end();
59 for (; itr!=end; ++itr)
67 std::vector<TGoodRunsList>::const_iterator itr = this->begin();
68 std::vector<TGoodRunsList>::const_iterator end = this->end();
71 for (; itr!=end && !pass; ++itr)
72 pass = itr->HasRun(runnr);
81 std::vector<TGoodRunsList>::const_iterator itr = this->begin();
82 std::vector<TGoodRunsList>::const_iterator end = this->end();
85 for (; itr!=end && !pass; ++itr)
86 pass = itr->HasRunLumiBlock(runnr,lumiblocknr);
95 if (this->
empty())
return kTRUE;
97 Bool_t isEmpty(kTRUE);
98 std::vector< TGoodRunsList >::const_iterator litr = this->begin();
99 for (; litr!=this->end() && isEmpty; ++litr)
100 isEmpty = isEmpty && litr->IsEmpty();
113 std::vector<Root::TGoodRunsList>::const_iterator itr = this->begin();
115 if (this->size()==1) {
121 mylogger <<
kINFO <<
"Now merging GRLs." <<
GEndl;
127 mylogger <<
kINFO <<
"Metadata and other info not required to be identical between GRLs." <<
GEndl;
130 for (++itr; itr!=this->end(); ++itr) {
133 if (
grl.HasOverlapWith(*itr,
false) ) {
140 grl =
grl.GetOverlapWith(*itr);
163 if (this->
empty() )
return *
this;
166 mylogger <<
kINFO <<
"Now merging GRLs where possible. Metadata required to be identical." <<
GEndl;
170 std::vector<TGoodRunsList>::const_iterator itr = this->begin();
171 std::vector<TGoodRunsList>::const_iterator end = this->end();
172 std::vector<TGoodRunsList>::iterator mitr;
174 for (; itr!=end; ++itr) {
175 bool matchFound(
false);
176 for (mitr=mergevec.begin(); mitr!=mergevec.end() && !matchFound ; ++mitr) {
177 if (mitr->HasSameGRLInfo(*itr)) {
181 if ( mitr->HasOverlapWith(*itr,
false) ) {
185 mitr->AddGRL( *itr );
188 *mitr = mitr->GetOverlapWith( *itr );
195 mergevec.push_back(*itr);
196 mergevec.rbegin()->Compress();
204std::vector<Root::TGoodRunsList>::iterator
209 std::vector<TGoodRunsList>::iterator itr = this->begin();
210 std::vector<TGoodRunsList>::iterator end = this->end();
212 for (; itr!=end; ++itr) {
213 found = ( name==TString(itr->GetName()) ) ;
221std::vector<Root::TGoodRunsList>::const_iterator
226 std::vector<TGoodRunsList>::const_iterator itr = this->begin();
227 std::vector<TGoodRunsList>::const_iterator end = this->end();
229 for (; itr!=end; ++itr) {
230 found = ( name==TString(itr->GetName()) ) ;
241 return (this->
find(name)!=this->end());
250 std::vector<TGoodRunsList>::const_iterator itr = this->begin();
251 for (; itr!=this->end(); ++itr) {
253 overlapgrl.SetName(itr->GetName());
257 overlapvec.push_back(overlapgrl);
ClassImp(Root::TGRLCollection) Root
static const Attributes_t empty
const TGoodRunsList GetMergedGoodRunsList(const Root::BoolOperation &operation=OR) const
const TGoodRunsList GetGoodRunsList(unsigned int idx) const
void SetVersion(const TString &version)
void SetMetaData(const std::map< TString, TString > &metadata)
Bool_t HasRun(const Int_t &runnr) const
Bool_t HasRunLumiBlock(const Int_t &runnr, const Int_t &lumiblocknr) const
const Root::TGRLCollection GetOverlapWith(const TGoodRunsList &other) const
void Summary(Bool_t verbose=kFALSE) const
const Root::TGRLCollection GetMergedGRLCollection(const Root::BoolOperation &operation=OR) const
TGRLCollection(Bool_t checkGRLInfo=kFALSE)
Bool_t HasGoodRunsList(const TString &name) const
virtual ~TGRLCollection()
std::vector< TGoodRunsList >::iterator find(const TString &name)
void SetVersion(const TString &version)
void SetMetaData(const std::map< TString, TString > &metadata)
std::string find(const std::string &s)
return a remapped string