20 log << MSG::WARNING <<
"TubeDataFromFile::write: <inconsistent count>" <<
endmsg;
26 if (!container)
continue;
27 const unsigned int nml = container->numMultilayers();
28 const unsigned int nl = container->numLayers();
29 const unsigned int nt = container->numTubes();
30 const std::string datatype = container->name();
32 const int stnEta = container->idHelperSvc()->stationEta(container->identify());
33 const int stnPhi = container->idHelperSvc()->stationPhi(container->identify());
34 const std::string stnName = container->idHelperSvc()->stationNameString(container->identify());
37 const MdtIdHelper& id_helper{container->idHelperSvc()->mdtIdHelper()};
38 for (
unsigned int km = 1;
km <= nml; ++
km) {
39 for (
unsigned int kl = 1;
kl <= nl; ++
kl) {
40 for (
unsigned int kt = 1;
kt <=
nt; ++
kt) {
41 const Identifier chId{id_helper.channelID(container->identify(),
km ,
kl ,
kt)};
47 if (std::isnan(t0) != 0) t0 = -99999.;
49 constexpr
int technology = 0;
50 os <<
" " << stnName <<
" " << stnPhi <<
" " << stnEta
51 <<
" " << technology <<
" " <<
km <<
" " <<
kl <<
" " <<
kt;
55 os <<
" " << 0 <<
" " << 0 <<
" " << 0;
65 <<
" " << stf->
cov[6];
67 os <<
" " << -1 <<
" " << 0 <<
" " << 0 <<
" " << 0 <<
" "
68 << 0 <<
" " << 0 <<
" " << 0 <<
" " << 0 <<
" "
86 log << MSG::WARNING <<
"TubeDataFromFile::write_forDB: <inconsistent count>" <<
endmsg;
90 if (!container)
continue;
91 const unsigned int nml = container->numMultilayers();
92 const unsigned int nl = container->numLayers();
93 const unsigned int nt = container->numTubes();
94 const std::string datatype = container->name();
96 const int stnEta = container->idHelperSvc()->stationEta(container->identify());
97 const int stnPhi = container->idHelperSvc()->stationPhi(container->identify());
98 const std::string stnName = container->idHelperSvc()->stationNameString(container->identify());
100 const MdtIdHelper& id_helper{container->idHelperSvc()->mdtIdHelper()};
101 for (
unsigned int km = 1;
km <= nml; ++
km) {
102 for (
unsigned int kl = 1;
kl <= nl; ++
kl) {
103 for (
unsigned int kt = 1;
kt <=
nt; ++
kt) {
104 const Identifier chId{id_helper.channelID(container->identify(),
km ,
kl ,
kt)};
107 constexpr
int technology = 0;
111 double t0{0.}, adcm{0.}, chi2tdc{0.}, t0err{0.},
112 tmax{0.}, tmaxerr{0.},
noise{0.}, noiseerr{0.},
113 slope{0.}, sloperr{0.};
114 int tube_id{0}, runflag{0}, validflag{0};
116 if (!fixId.setTechnology(technology) ||
117 !fixId.setStationName(fixId.stationStringToFixedStationNumber(stnName)) ||
118 !fixId.setStationEta(stnEta) ||
119 !fixId.setStationPhi(stnPhi) ||
120 !fixId.setMdtTube(
kt) ||
121 !fixId.setMdtTubeLayer(
kl) ||
122 !fixId.setMdtMultilayer(
km)) {
123 std::stringstream except{};
124 except<<__FILE__<<
":"<<__LINE__<<
"nTubeDataFromFile::write_forDB() - Setting identifier failed!";
125 throw std::runtime_error(except.str());
139 tmaxerr = stf->
cov[5];
141 noiseerr = stf->
cov[0];
143 sloperr = stf->
cov[6];
146 if (std::isnan(t0) != 0) t0 = -99999.;
148 ftube<<mdt_head<<
","<<
tube_id<<
","<<fixId.mdtChamberId().getIdInt()<<
","
150 <<validflag<<
","<<
stat<<
",";
152 for (
int ii = -2; ii < 35; ii++) {
155 }
else if (ii == 0) {
157 }
else if (ii == 4) {
159 }
else if (ii == 5) {
161 }
else if (ii == 6) {
163 }
else if (ii == 10) {
165 }
else if (ii == 11) {
167 }
else if (ii == 12) {
168 ftube<<noiseerr<<
",";
169 }
else if (ii == 13) {
171 }
else if (ii == 14) {
177 ftube<<
"0,0,algoflag,tubegrpgr"<<std::endl;