ATLAS Offline Software
RegionSelectorBase.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef RegionSelectorBase_H
6 #define RegionSelectorBase_H
7 
8 #include "GaudiKernel/MsgStream.h"
9 #include "iostream"
10 #include "string"
11 
12 namespace MuonCalib {
13 
14  class MuonFixedId;
15 
17  public:
19  RegionSelectorBase() = default;
21  virtual ~RegionSelectorBase() = default;
23  virtual bool Result(const MuonFixedId& region) const = 0;
25  virtual void Print(std::ostream& os) const = 0;
27  static std::unique_ptr<RegionSelectorBase> GetRegion(const std::string& input);
28 
29  private:
30  static std::unique_ptr<RegionSelectorBase> process_region(const std::string& input, unsigned int& i, bool is_in_braces);
31  static void print_position(const std::string& input, const unsigned int& position, MsgStream* msgStr);
32  };
33 
34 } // namespace MuonCalib
35 
36 #endif
MuonCalib::RegionSelectorBase::~RegionSelectorBase
virtual ~RegionSelectorBase()=default
Destructor.
MuonCalib::RegionSelectorBase::GetRegion
static std::unique_ptr< RegionSelectorBase > GetRegion(const std::string &input)
create a region from a string
Definition: RegionSelectorBase.cxx:13
MuonCalib::RegionSelectorBase::Result
virtual bool Result(const MuonFixedId &region) const =0
return the result of the logical operation
MuonCalib::RegionSelectorBase
Definition: RegionSelectorBase.h:16
MuonCalib::RegionSelectorBase::Print
virtual void Print(std::ostream &os) const =0
character output of region
MuonCalib::RegionSelectorBase::print_position
static void print_position(const std::string &input, const unsigned int &position, MsgStream *msgStr)
Definition: RegionSelectorBase.cxx:133
MuonCalib::RegionSelectorBase::process_region
static std::unique_ptr< RegionSelectorBase > process_region(const std::string &input, unsigned int &i, bool is_in_braces)
Definition: RegionSelectorBase.cxx:18
lumiFormat.i
int i
Definition: lumiFormat.py:85
PlotPulseshapeFromCool.input
input
Definition: PlotPulseshapeFromCool.py:106
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::RegionSelectorBase::RegionSelectorBase
RegionSelectorBase()=default
Constructor.
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
MuonCalib::MuonFixedId
Definition: MuonFixedId.h:50