21 log << MSG::WARNING <<
"TubeDataFromFile::write: <inconsistent count>" <<
endmsg;
27 if (!container)
continue;
28 const unsigned int nml = container->numMultilayers();
29 const unsigned int nl = container->numLayers();
30 const unsigned int nt = container->numTubes();
31 const std::string datatype = container->name();
33 const int stnEta = container->idHelperSvc()->stationEta(container->identify());
34 const int stnPhi = container->idHelperSvc()->stationPhi(container->identify());
35 const std::string stnName = container->idHelperSvc()->stationNameString(container->identify());
38 const MdtIdHelper& id_helper{container->idHelperSvc()->mdtIdHelper()};
39 for (
unsigned int km = 1;
km <= nml; ++
km) {
40 for (
unsigned int kl = 1;
kl <= nl; ++
kl) {
41 for (
unsigned int kt = 1;
kt <=
nt; ++
kt) {
42 const Identifier chId{id_helper.channelID(container->identify(),
km ,
kl ,
kt)};
48 if (std::isnan(
t0) != 0)
t0 = -99999.;
50 constexpr
int technology = 0;
51 os <<
" " << stnName <<
" " << stnPhi <<
" " << stnEta
52 <<
" " << technology <<
" " <<
km <<
" " <<
kl <<
" " <<
kt;
56 os <<
" " << 0 <<
" " << 0 <<
" " << 0;
66 <<
" " << stf->
cov[6];
68 os <<
" " << -1 <<
" " << 0 <<
" " << 0 <<
" " << 0 <<
" "
69 << 0 <<
" " << 0 <<
" " << 0 <<
" " << 0 <<
" "
87 log << MSG::WARNING <<
"TubeDataFromFile::write_forDB: <inconsistent count>" <<
endmsg;
91 if (!container)
continue;
92 const unsigned int nml = container->numMultilayers();
93 const unsigned int nl = container->numLayers();
94 const unsigned int nt = container->numTubes();
95 const std::string datatype = container->name();
97 const int stnEta = container->idHelperSvc()->stationEta(container->identify());
98 const int stnPhi = container->idHelperSvc()->stationPhi(container->identify());
99 const std::string stnName = container->idHelperSvc()->stationNameString(container->identify());
101 const MdtIdHelper& id_helper{container->idHelperSvc()->mdtIdHelper()};
102 for (
unsigned int km = 1;
km <= nml; ++
km) {
103 for (
unsigned int kl = 1;
kl <= nl; ++
kl) {
104 for (
unsigned int kt = 1;
kt <=
nt; ++
kt) {
105 const Identifier chId{id_helper.channelID(container->identify(),
km ,
kl ,
kt)};
108 constexpr
int technology = 0;
112 double t0{0.}, adcm{0.}, chi2tdc{0.}, t0err{0.},
113 tmax{0.}, tmaxerr{0.},
noise{0.}, noiseerr{0.},
114 slope{0.}, sloperr{0.};
115 int tube_id{0}, runflag{0}, validflag{0};
117 if (!fixId.setTechnology(technology) ||
118 !fixId.setStationName(fixId.stationStringToFixedStationNumber(stnName)) ||
119 !fixId.setStationEta(stnEta) ||
120 !fixId.setStationPhi(stnPhi) ||
121 !fixId.setMdtTube(
kt) ||
122 !fixId.setMdtTubeLayer(
kl) ||
123 !fixId.setMdtMultilayer(
km)) {
124 std::stringstream except{};
125 except<<__FILE__<<
":"<<__LINE__<<
"nTubeDataFromFile::write_forDB() - Setting identifier failed!";
126 throw std::runtime_error(except.str());
140 tmaxerr = stf->
cov[5];
142 noiseerr = stf->
cov[0];
144 sloperr = stf->
cov[6];
147 if (std::isnan(
t0) != 0)
t0 = -99999.;
149 ftube<<mdt_head<<
","<<
tube_id<<
","<<fixId.mdtChamberId().getIdInt()<<
","
151 <<validflag<<
","<<
stat<<
",";
153 for (
int ii = -2; ii < 35; ii++) {
156 }
else if (ii == 0) {
158 }
else if (ii == 4) {
160 }
else if (ii == 5) {
162 }
else if (ii == 6) {
164 }
else if (ii == 10) {
166 }
else if (ii == 11) {
168 }
else if (ii == 12) {
169 ftube<<noiseerr<<
",";
170 }
else if (ii == 13) {
172 }
else if (ii == 14) {
178 ftube<<
"0,0,algoflag,tubegrpgr"<<std::endl;