ATLAS Offline Software
TGoodRun.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 /**********************************************************************************
7  * Class : TGoodRun *
8  * *
9  * Authors (alphabetical): *
10  * Max Baak <mbaak@cern.ch> - CERN, Switzerland *
11  **********************************************************************************/
12 
13 #ifndef __TGoodRun__
14 #define __TGoodRun__
15 
17 #include "TObject.h"
18 #include <vector>
19 
20 namespace Root {
21 
22  class TGoodRun : public std::vector< TLumiBlockRange >, public TObject {
23 
24  public:
25 
26  TGoodRun() ;
27  TGoodRun( const Int_t& runnr );
28  virtual ~TGoodRun();
29 
30  TGoodRun(const Root::TGoodRun& other) ;
31  TGoodRun& operator=(const TGoodRun& other) ;
32 
33  const Root::TGoodRun GetOverlapWith(const TGoodRun& other) const ;
34  const Root::TGoodRun GetSumWith(const TGoodRun& other) const ;
35  const Root::TGoodRun GetPartOnlyIn(const TGoodRun& other) const ;
36  const Root::TGoodRun GetPartNotIn(const TGoodRun& other) const ;
37 
38  Bool_t IsEmpty() const;
39  Bool_t HasLB( const Int_t& lumiblocknr ) const;
40  std::vector<Root::TLumiBlockRange>::iterator Find( const Int_t& lumiblocknr );
41  std::vector< Root::TLumiBlockRange >::const_iterator Find( const Int_t& lumiblocknr ) const;
42  inline Int_t GetRunNumber() const { return m_runnr; }
43  inline void SetRunNumber( const Int_t& runnr ) { m_runnr=runnr; }
44 
45  void Summary() const ;
46 
47  void Sort();
48  void Compress();
49  void AddLB( const Int_t& lumiblocknr );
50 
51  private:
52 
53  Int_t m_runnr;
54 
55  // sorter function for lumiblock ranges
56  struct SorterL2H {
57  SorterL2H () {}
58  bool operator() (const TLumiBlockRange& p1, const TLumiBlockRange& p2) {
59  return (p1.Begin()<p2.Begin());
60  }
61  };
62 
63  ClassDef(TGoodRun,1)
64  };
65 }
66 
67 #endif
68 
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
TLumiBlockRange.h
Root::TGoodRun::SorterL2H::SorterL2H
SorterL2H()
Definition: TGoodRun.h:67
Root::TGoodRun::GetPartOnlyIn
const Root::TGoodRun GetPartOnlyIn(const TGoodRun &other) const
Definition: TGoodRun.cxx:101
Root::TGoodRun
Definition: TGoodRun.h:27
Root
Definition: GoodRunsListSelectorTool.h:30
Root::TGoodRun::Sort
void Sort()
Definition: TGoodRun.cxx:193
Root::TGoodRun::operator=
TGoodRun & operator=(const TGoodRun &other)
Definition: TGoodRun.cxx:44
Root::TGoodRun::SetRunNumber
void SetRunNumber(const Int_t &runnr)
Definition: TGoodRun.h:53
Root::TGoodRun::SorterL2H::operator()
bool operator()(const TLumiBlockRange &p1, const TLumiBlockRange &p2)
Definition: TGoodRun.h:68
Root::TGoodRun::GetSumWith
const Root::TGoodRun GetSumWith(const TGoodRun &other) const
Definition: TGoodRun.cxx:79
Root::TGoodRun::TGoodRun
TGoodRun()
Root::TGoodRun::SorterL2H
Definition: TGoodRun.h:66
Root::TGoodRun::GetPartNotIn
const Root::TGoodRun GetPartNotIn(const TGoodRun &other) const
Definition: TGoodRun.cxx:108
Root::TGoodRun::IsEmpty
Bool_t IsEmpty() const
Definition: TGoodRun.cxx:251
Root::TGoodRun::Summary
void Summary() const
Definition: TGoodRun.cxx:179
beamspotman.runnr
runnr
Definition: beamspotman.py:724
Root::TGoodRun::~TGoodRun
virtual ~TGoodRun()
Definition: TGoodRun.cxx:30
Root::TGoodRun::HasLB
Bool_t HasLB(const Int_t &lumiblocknr) const
Definition: TGoodRun.cxx:133
Root::TGoodRun::m_runnr
Int_t m_runnr
Definition: TGoodRun.h:63
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
Root::TGoodRun::Compress
void Compress()
Definition: TGoodRun.cxx:200
Root::TLumiBlockRange
Definition: TLumiBlockRange.h:26
Root::TGoodRun::GetRunNumber
Int_t GetRunNumber() const
Definition: TGoodRun.h:52
Root::TGoodRun::GetOverlapWith
const Root::TGoodRun GetOverlapWith(const TGoodRun &other) const
Definition: TGoodRun.cxx:57
Root::TLumiBlockRange::Begin
Int_t Begin() const
Definition: TLumiBlockRange.h:48
Root::TGoodRun::AddLB
void AddLB(const Int_t &lumiblocknr)
Definition: TGoodRun.cxx:266
Root::TGoodRun::Find
std::vector< Root::TLumiBlockRange >::iterator Find(const Int_t &lumiblocknr)
Definition: TGoodRun.cxx:149