16#ifndef CbmMuchSegmentSector_H
17#define CbmMuchSegmentSector_H 1
22#include <RtypesCore.h>
54 virtual InitStatus
Init();
69 std::map<Int_t, std::vector<Double_t>>
fRadii;
70 std::map<Int_t, std::vector<Double_t>>
72 std::map<Int_t, std::vector<Double_t>>
74 std::map<Int_t, std::vector<Double_t>>
77 std::map<Int_t, std::vector<Int_t>>
fNCols;
78 std::map<Int_t, std::vector<Int_t>>
fNRows;
114 std::string::size_type pos1 = str.find_first_not_of(
' ');
115 std::string::size_type pos2 = str.find_last_not_of(
' ');
117 str.substr(pos1 == std::string::npos ? 0 : pos1, pos2 == std::string::npos ? str.length() - 1 : pos2 - pos1 + 1);
123 return str[0] ==
'#' || str.length() == 0 || str[0] ==
'\0' || str[0] ==
'\n';
128 getline(infile, str);
130 getline(infile, str);
133 std::vector<std::string>&
Split(
const std::string& s,
char delim, std::vector<std::string>& elems)
135 std::stringstream ss(s);
137 while (getline(ss, item, delim)) {
138 if (item.length() != 0) elems.push_back(item);
144 std::vector<std::string>
Split(
const std::string& s,
char delim)
146 std::vector<std::string> elems;
147 return Split(s, delim, elems);
154 std::stringstream ss(str);
155 if ((ss >> number).fail() || !(ss >> std::ws).eof())
throw std::bad_cast();
157 catch (
const std::bad_cast& exc) {
158 Fatal(
"",
"Invalid cast.\n");
void SegmentSector(CbmMuchModuleGemRadial *module, CbmMuchSectorRadial *sector)
void Trim(std::string &str)
std::map< Int_t, std::vector< Double_t > > fSecLy
Bool_t IsDummyLine(std::string &str)
std::vector< std::string > Split(const std::string &s, char delim)
virtual void SetParContainers()
virtual ~CbmMuchSegmentSector()
std::vector< std::string > & Split(const std::string &s, char delim, std::vector< std::string > &elems)
void StrToNum(std::string &str, T &number)
std::map< Int_t, std::vector< Double_t > > fAngles
std::map< Int_t, std::vector< Int_t > > fNCols
virtual InitStatus Init()
std::map< Int_t, std::vector< Double_t > > fRadii
std::map< Int_t, Int_t > fNRegions
void OmitDummyLines(std::ifstream &infile, std::string &str)
Int_t SegmentModule(CbmMuchModuleGemRadial *module, Bool_t useModuleDesign)
std::map< Int_t, std::vector< Int_t > > fNRows
std::map< Int_t, Int_t > fNChannels
CbmMuchSegmentSector(const CbmMuchSegmentSector &)
CbmMuchSegmentSector & operator=(const CbmMuchSegmentSector &)
std::map< Int_t, std::vector< Double_t > > fSecLx
Int_t SegmentLayerSide(CbmMuchLayerSide *layerSide)