ATLAS Offline Software
Loading...
Searching...
No Matches
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
20namespace Root {
21
22 class TGoodRun : public std::vector< TLumiBlockRange >, public TObject {
23
24 public:
25
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 {
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
Bool_t IsEmpty() const
Definition TGoodRun.cxx:249
Int_t m_runnr
Definition TGoodRun.h:53
TGoodRun & operator=(const TGoodRun &other)
Definition TGoodRun.cxx:44
void AddLB(const Int_t &lumiblocknr)
Definition TGoodRun.cxx:264
const Root::TGoodRun GetPartNotIn(const TGoodRun &other) const
Definition TGoodRun.cxx:108
std::vector< Root::TLumiBlockRange >::iterator Find(const Int_t &lumiblocknr)
Definition TGoodRun.cxx:149
void SetRunNumber(const Int_t &runnr)
Definition TGoodRun.h:43
const Root::TGoodRun GetSumWith(const TGoodRun &other) const
Definition TGoodRun.cxx:79
virtual ~TGoodRun()
Definition TGoodRun.cxx:30
Bool_t HasLB(const Int_t &lumiblocknr) const
Definition TGoodRun.cxx:133
Int_t GetRunNumber() const
Definition TGoodRun.h:42
void Summary() const
Definition TGoodRun.cxx:179
const Root::TGoodRun GetOverlapWith(const TGoodRun &other) const
Definition TGoodRun.cxx:57
const Root::TGoodRun GetPartOnlyIn(const TGoodRun &other) const
Definition TGoodRun.cxx:101
bool operator()(const TLumiBlockRange &p1, const TLumiBlockRange &p2)
Definition TGoodRun.h:58