|
ATLAS Offline Software
|
Go to the documentation of this file.
21 : m_reader(
new Root::TGoodRunsListReader())
22 , m_writer(
new Root::TGoodRunsListWriter())
49 std::map<Int_t, Root::TGoodRun>::const_iterator
it;
50 std::vector< Root::TLumiBlockRange >::const_iterator itlbr;
51 int RunNumber(-1), LumiBlockStart(-1), LumiBlockEnd(-1);
56 for(itlbr = goodrun.begin(); itlbr != goodrun.end(); ++itlbr) {
57 LumiBlockStart = itlbr->Begin();
58 LumiBlockEnd = itlbr->End();
100 TString xmlfile = ( xmlfilename.IsNull() ?
prefix +
grl.GetSuggestedName() +
".xml" : xmlfilename );
108 const TString& xmlfilename,
const TString&
prefix )
144 const std::vector<TString>
172 int prev_runnbr(-1), cur_runnbr(-1), cur_lbstart(-1), cur_lbstop(-1);
180 if (prev_runnbr!=cur_runnbr) {
181 if (prev_runnbr>=0) { (*grl)[prev_runnbr]=goodrun; }
187 prev_runnbr = cur_runnbr;
189 (*grl)[prev_runnbr]=goodrun;
237 if (lbc.
empty())
return "grl_empty";
239 Int_t beginrun(-1),
endrun(-1), beginlb(-1), endlb(-1);
244 beginrun = (*itb)->start().run();
245 beginlb = (*itb)->start().event();
246 endrun = (*ite)->stop().run();
247 endlb = (*ite)->stop().event();
249 return Form(
"grl_%d.%d-%d.%d",beginrun,beginlb,
endrun,endlb);
Const iterator class for DataVector/DataList.
void CreateXMLFile(const Root::TGoodRunsList &grl, const TString &xmlfilename="", const TString &prefix="")
uint32_t event() const noexcept
const TString GetXMLString(const Root::TGoodRunsList &grl)
void SetRunNumber(const Int_t &runnr)
LumiBlockCollection * GetLumiBlockCollection(const Root::TGoodRunsList &grl, std::map< TString, TString > &metadata, TString &version)
const IOVTime & start() const
Root::TGRLCollection * GetGRLCollectionFromString(const TString &xmlstring)
void SetXMLString(const TString &xmlstring)
Root::TGoodRunsList * GetGRLObjectFromString(const TString &xmlstring)
const IOVTime & stop() const
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
const TString & GetXMLString()
Root::TGoodRunsListReader * m_reader
Root::TGoodRunsList * GetGRLObject(const LumiBlockCollection &lbc, const grlmetadatamap &metadata=grlmetadatamap(), const char *version="") const
virtual ~LumiBlockCollectionConverter()
void SetFilename(const TString &dataCardName)
void SetGRLCollection(const TGRLCollection &grlvec)
const std::vector< TString > GetXMLStrings(const Root::TGRLCollection &grlcollection)
const_reverse_iterator rbegin() const noexcept
Return a const_reverse_iterator pointing past the end of the collection.
std::reverse_iterator< const_iterator > const_reverse_iterator
Standard const_reverse_iterator.
const TString GetSuggestedName(const LumiBlockCollection &lbc) const
Root::TGoodRunsListWriter * m_writer
void SetPrefix(const TString &prefix)
uint32_t run() const noexcept
value_type push_back(value_type pElem)
Add an element to the end of the collection.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
void sort()
Sort the container.
void SetGoodRunsList(const TGoodRunsList &goodrunslist)
Root::TGRLCollection * GetGRLCollection(const char *xmlfile)
void CreateXMLFiles(const Root::TGRLCollection &grlcollection, const char *prefix)
const std::vector< TString > & GetXMLStrings()
LumiBlockCollection * GetLumiBlockCollectionFromString(const TString &xmlstring)
const TGRLCollection GetMergedGRLCollection(const Root::BoolOperation &operation=OR) const
std::map< TString, TString > grlmetadatamap
LumiBlockCollectionConverter()
bool empty() const noexcept
Returns true if the collection is empty.
const TGoodRunsList GetMergedGoodRunsList(const Root::BoolOperation &operation=OR) const
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
TString GetSuggestedName() const
void SetXMLFile(const TString &xmlfile)