std::cout << mapname << std::endl; std::cout << "layer " << ilayer << std::endl; std::cout << "sheet " << isheet << std::endl; std::cout << "view " << iview << std::endl; std::cout << "titleline " << titleline << std::endl;
26 {
27
28
29 if(CosmicRayDataSetID == "CR201909") {
30
31 TString dir = gSystem->ExpandPathName("$READCOSMICRAYDATAROOT");
32 dir += "/dat/CR201909/";
33
34
35 TString mapname = dir;
37 std::string titleline;
38
39 const int nlayer = 3;
40 const int nsheet[nlayer] = {1, 2, 2};
41 const int nview = 2;
42 int nstrip[nlayer][nview] = {{856, 1173}, {630, 1077}, {832, 1395}};
43
44
45 for(int ilayer = 0; ilayer < nlayer; ilayer++) {
46 for(int isheet = 0; isheet < nsheet[ilayer]; isheet++) {
47 for(int iview = 0; iview < nview; iview++) {
48
49 int layerid = ilayer + 1;
50 int sheetid = isheet + 1;
51
52 mapname = dir;
53 mapname += "mapping_L";
54 mapname += layerid;
55 mapname += "_S";
56 mapname += sheetid;
57 if(iview == 0) mapname += "_x.csv";
58 else mapname += "_v.csv";
59 std::cout << "StripMapper::FillMap, reading " << mapname << std::endl;
60
61 input.open(mapname);
62 if(!input.good()) {
63 std::cout << "StripMapper::FillMap, file not there!" << std::endl;
64 continue;
65 }
66
67 std::getline(input, titleline);
68
69
70
71
72
73
74
75
76
77 for(int istrip = 0; istrip < nstrip[ilayer][iview]; istrip++) {
78
79
80 int stripid;
81 input >> stripid
82 >> mapping[istrip][ilayer][isheet][iview][0]
83 >> mapping[istrip][ilayer][isheet][iview][1]
84 >> mapping[istrip][ilayer][isheet][iview][2];
85
86
87 }
88
89 input.close();
90 }
91 }
92 }
93
94 return true;
95 }
96
97 return false;
98
99
100}