Read given text file.
20 std::ifstream myfile(textFileName.c_str());
21 if (!myfile.is_open())
22 throw cms::Exception(
"FileAccess") <<
"Unable to open input text file for " << fileType.c_str();
26 int NINPUTS_align = 30;
27 int NINPUTS_detId = 6;
28 if (fileType ==
"TID")
31 std::vector<int> d_inputs;
37 while (!myfile.eof() && myfile.good()) {
42 if (fileType ==
"TIB") {
48 d_inputs.push_back(itmpInput);
50 for (
int i = 0;
i < NINPUTS_detId;
i++) {
52 d_inputs.push_back(itmpInput);
59 if (fileType ==
"TID") {
60 m_detId = tTopo->
tidDetId(d_inputs[2], d_inputs[3], d_inputs[4], d_inputs[5], d_inputs[6], ster);
61 }
else if (fileType ==
"TIB") {
62 m_detId = tTopo->
tibDetId(d_inputs[2], d_inputs[3], d_inputs[4], d_inputs[5], d_inputs[6], ster);
65 if (
abs(
int(m_detId) -
int(d_inputs[1])) > 2) {
66 std::cout <<
"ERROR : DetId - detector position mismatch! Found " << nErrors << std::endl;
72 for (
int j = 0; j < NINPUTS_align; j++) {
74 a_inputs.push_back(tmpInput);
std::pair< align::ID, align::Scalars > PairType
std::pair< std::vector< int >, align::Scalars > PairTypeOr
std::vector< Scalar > Scalars
DetId tidDetId(uint32_t side, uint32_t wheel, uint32_t ring, uint32_t module_fw_bw, uint32_t module, uint32_t ster) const
Abs< T >::type abs(const T &t)
DetId tibDetId(uint32_t layer, uint32_t str_fw_bw, uint32_t str_int_ext, uint32_t str, uint32_t module, uint32_t ster) const
align::Scalars convertToAlignableCoord(const align::Scalars &align_params)