ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
Root::TLumiBlockRange Class Reference

#include <TLumiBlockRange.h>

Inheritance diagram for Root::TLumiBlockRange:
Collaboration diagram for Root::TLumiBlockRange:

Public Member Functions

 TLumiBlockRange ()
 
 TLumiBlockRange (const Int_t &start, const Int_t &end=2147483647)
 
virtual ~TLumiBlockRange ()
 
 TLumiBlockRange (const Root::TLumiBlockRange &other)
 
TLumiBlockRangeoperator= (const TLumiBlockRange &other)
 
const Root::TLumiBlockRange GetOverlapWith (const TLumiBlockRange &other) const
 
const std::vector< Root::TLumiBlockRangeGetPartOnlyIn (const TLumiBlockRange &other) const
 
const std::vector< Root::TLumiBlockRangeGetPartNotIn (const TLumiBlockRange &other) const
 
Bool_t Contains (const Int_t &number) const
 
Int_t Begin () const
 
Int_t End () const
 
Bool_t IsEmpty () const
 
void SetBegin (const Int_t &begin)
 
void SetEnd (const Int_t &end)
 
void Summary () const
 

Private Attributes

Int_t m_begin
 
Int_t m_end
 

Detailed Description

Definition at line 26 of file TLumiBlockRange.h.

Constructor & Destructor Documentation

◆ TLumiBlockRange() [1/3]

Root::TLumiBlockRange::TLumiBlockRange ( )

◆ TLumiBlockRange() [2/3]

Root::TLumiBlockRange::TLumiBlockRange ( const Int_t &  start,
const Int_t &  end = 2147483647 
)

Definition at line 20 of file TLumiBlockRange.cxx.

21  : TObject()
22  , m_begin(begin)
23  , m_end(end)
24 {
25 }

◆ ~TLumiBlockRange()

Root::TLumiBlockRange::~TLumiBlockRange ( )
virtual

Definition at line 28 of file TLumiBlockRange.cxx.

29 {
30 }

◆ TLumiBlockRange() [3/3]

Root::TLumiBlockRange::TLumiBlockRange ( const Root::TLumiBlockRange other)

Definition at line 33 of file TLumiBlockRange.cxx.

34  : TObject(other)
35  , m_begin(other.m_begin)
36  , m_end(other.m_end)
37 {
38 }

Member Function Documentation

◆ Begin()

Int_t Root::TLumiBlockRange::Begin ( ) const
inline

Definition at line 48 of file TLumiBlockRange.h.

◆ Contains()

Bool_t Root::TLumiBlockRange::Contains ( const Int_t &  number) const

Definition at line 94 of file TLumiBlockRange.cxx.

95 {
96  if (number>=m_begin && number<=m_end) return kTRUE;
97  else return kFALSE;
98 }

◆ End()

Int_t Root::TLumiBlockRange::End ( ) const
inline

Definition at line 49 of file TLumiBlockRange.h.

◆ GetOverlapWith()

const Root::TLumiBlockRange Root::TLumiBlockRange::GetOverlapWith ( const TLumiBlockRange other) const

Definition at line 55 of file TLumiBlockRange.cxx.

56 {
57  Int_t begin = ( this->Begin()>=other.Begin() ? this->Begin() : other.Begin() );
58  Int_t end = ( this->End()<=other.End() ? this->End() : other.End() );
60 }

◆ GetPartNotIn()

const std::vector< Root::TLumiBlockRange > Root::TLumiBlockRange::GetPartNotIn ( const TLumiBlockRange other) const

Definition at line 71 of file TLumiBlockRange.cxx.

72 {
73  std::vector<Root::TLumiBlockRange> notinother;
74 
75  Int_t begin(-1), end(-1);
76 
77  if ( other.Begin()>this->Begin() ) {
78  begin = this->Begin() ;
79  end = ( other.Begin()>this->End() ? this->End() : other.Begin()-1 ) ;
80  if (end>=begin) notinother.push_back( Root::TLumiBlockRange(begin,end) ) ;
81  }
82 
83  if ( other.End()<this->End() ) {
84  begin = ( other.End()>=this->Begin() ? other.End()+1 : this->Begin() ) ;
85  end = this->End();
86  if (end>=begin) notinother.push_back( Root::TLumiBlockRange(begin,end) ) ;
87  }
88 
89  return notinother;
90 }

◆ GetPartOnlyIn()

const std::vector< Root::TLumiBlockRange > Root::TLumiBlockRange::GetPartOnlyIn ( const TLumiBlockRange other) const

Definition at line 64 of file TLumiBlockRange.cxx.

65 {
66  return other.GetPartNotIn(*this);
67 }

◆ IsEmpty()

Bool_t Root::TLumiBlockRange::IsEmpty ( ) const
inline

Definition at line 50 of file TLumiBlockRange.h.

◆ operator=()

Root::TLumiBlockRange & Root::TLumiBlockRange::operator= ( const TLumiBlockRange other)

Definition at line 42 of file TLumiBlockRange.cxx.

43 {
44  if (&other==this) {
45  return *this ;
46  }
47  m_begin = other.m_begin ;
48  m_end = other.m_end ;
49 
50  return *this ;
51 }

◆ SetBegin()

void Root::TLumiBlockRange::SetBegin ( const Int_t &  begin)
inline

Definition at line 52 of file TLumiBlockRange.h.

◆ SetEnd()

void Root::TLumiBlockRange::SetEnd ( const Int_t &  end)
inline

Definition at line 53 of file TLumiBlockRange.h.

◆ Summary()

void Root::TLumiBlockRange::Summary ( ) const

Definition at line 102 of file TLumiBlockRange.cxx.

103 {
104  Root::TMsgLogger m_logger("TLumiBlockRange");
105  m_logger << kINFO << "Begin: " << m_begin << " End: " << m_end << GEndl;
106 }

Member Data Documentation

◆ m_begin

Int_t Root::TLumiBlockRange::m_begin
private

Definition at line 59 of file TLumiBlockRange.h.

◆ m_end

Int_t Root::TLumiBlockRange::m_end
private

Definition at line 60 of file TLumiBlockRange.h.


The documentation for this class was generated from the following files:
Root::TLumiBlockRange::m_end
Int_t m_end
Definition: TLumiBlockRange.h:60
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
GEndl
#define GEndl
Definition: TMsgLogger.h:151
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
Root::TLumiBlockRange::End
Int_t End() const
Definition: TLumiBlockRange.h:49
Root::TLumiBlockRange::m_begin
Int_t m_begin
Definition: TLumiBlockRange.h:59
Root::kINFO
@ kINFO
Definition: TMsgLogger.h:50
python.selection.number
number
Definition: selection.py:20
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
Root::TLumiBlockRange
Definition: TLumiBlockRange.h:26
Root::TLumiBlockRange::Begin
Int_t Begin() const
Definition: TLumiBlockRange.h:48
Root::TMsgLogger
Definition: TMsgLogger.h:52