8 x.check_start_tag(is,
"VERSION");
9 if(!
x.initialized())
return is;
12 x.check_end_tag(is,
"VERSION");
18 os << std::endl <<
"{ VERSION" << std::endl;
23 os << std::endl <<
"} VERSION" << std::endl;
29 x.check_start_tag(is,
"EVHEAD");
30 if(!
x.initialized())
return is;
33 x.check_end_tag(is,
"EVHEAD");
39 os << std::endl <<
"{ EVHEAD" << std::endl;
42 os <<
" " <<
x.eventNo;
44 os << std::endl <<
"} EVHEAD" << std::endl;
50 x.check_start_tag(is,
"DECAYMODE");
51 if(!
x.initialized())
return is;
53 for (
int index=0; index<
x.size; index++) {
56 x.check_end_tag(is,
"DECAYMODE");
62 os << std::endl <<
"{ DECAYMODE" << std::endl;
65 for (
int index=0; index<
x.size; index++) {
66 os <<
" " <<
x.data[index];
69 os << std::endl <<
"} DECAYMODE" << std::endl;
84 is >>
x.minDaughterIndex;
85 is >>
x.maxDaughterIndex;
91 os <<
" " <<
x.trackIndex;
92 os <<
" " <<
x.PDGCode;
93 os <<
" " <<
x.PDGCharge;
94 os <<
" " <<
x.v0Index;
95 os <<
" " <<
x.v1Index;
100 os <<
" " <<
x.minDaughterIndex;
101 os <<
" " <<
x.maxDaughterIndex;
108 x.check_start_tag(is,
"TRACKTRUTH");
109 if(!
x.initialized())
return is;
111 x.truthCol.resize(
x.nTruth);
112 {
for(
int i = 0; i <
x.nTruth; i++) {
115 x.check_end_tag(is,
"TRACKTRUTH");
121 os << std::endl <<
"{ TRACKTRUTH" << std::endl;
122 if(
x.initialized()) {
123 os <<
" " <<
x.nTruth;
124 {
for(
int i = 0; i <
x.nTruth; i++) {
125 os <<
" " <<
x.truthCol[i];
128 os << std::endl <<
"} TRACKTRUTH" << std::endl;
135 is >>
x.parentTrackIndex;
145 os <<
" " <<
x.vertexIndex;
146 os <<
" " <<
x.parentTrackIndex;
157 x.check_start_tag(is,
"VERTEXTRUTH");
158 if(!
x.initialized())
return is;
160 x.truthCol.resize(
x.nTruth);
161 {
for(
int i = 0; i <
x.nTruth; i++) {
164 x.check_end_tag(is,
"VERTEXTRUTH");
170 os << std::endl <<
"{ VERTEXTRUTH" << std::endl;
171 if(
x.initialized()) {
172 os <<
" " <<
x.nTruth;
173 {
for(
int i = 0; i <
x.nTruth; i++) {
174 os <<
" " <<
x.truthCol[i];
177 os << std::endl <<
"} VERTEXTRUTH" << std::endl;
198 os <<
" " <<
x.trackIndex;
199 os <<
" " <<
x.layerNo;
200 os <<
" " <<
x.cellNo;
202 os <<
" " <<
x.driftD;
206 os <<
" " <<
x.posFlag;
213 x.check_start_tag(is,
"MDCTRUTH");
214 if(!
x.initialized())
return is;
216 x.truthCol.resize(
x.nTruth);
217 {
for(
int i = 0; i <
x.nTruth; i++) {
220 x.check_end_tag(is,
"MDCTRUTH");
226 os << std::endl <<
"{ MDCTRUTH" << std::endl;
227 if(
x.initialized()) {
228 os <<
" " <<
x.nTruth;
229 {
for(
int i = 0; i <
x.nTruth; i++) {
230 os <<
" " <<
x.truthCol[i];
233 os << std::endl <<
"} MDCTRUTH" << std::endl;
242 is >>
x.m_global_time;
248 is >>
x.m_XYZ_post_x;
249 is >>
x.m_XYZ_post_y;
250 is >>
x.m_XYZ_post_z;
264 is >>
x.m_P_Cu_pre_x;
265 is >>
x.m_P_Cu_pre_y;
266 is >>
x.m_P_Cu_pre_z;
267 is >>
x.m_P_Cu_post_x;
268 is >>
x.m_P_Cu_post_y;
269 is >>
x.m_P_Cu_post_z;
276 os <<
" " <<
x.m_ID_track;
277 os <<
" " <<
x.m_ID_layer;
278 os <<
" " <<
x.m_pdg_code;
279 os <<
" " <<
x.m_global_time;
280 os <<
" " <<
x.m_E_deposit;
281 os <<
" " <<
x.m_L_step;
282 os <<
" " <<
x.m_XYZ_pre_x;
283 os <<
" " <<
x.m_XYZ_pre_y;
284 os <<
" " <<
x.m_XYZ_pre_z;
285 os <<
" " <<
x.m_XYZ_post_x;
286 os <<
" " <<
x.m_XYZ_post_y;
287 os <<
" " <<
x.m_XYZ_post_z;
288 os <<
" " <<
x.m_P_pre_x;
289 os <<
" " <<
x.m_P_pre_y;
290 os <<
" " <<
x.m_P_pre_z;
291 os <<
" " <<
x.m_P_post_x;
292 os <<
" " <<
x.m_P_post_y;
293 os <<
" " <<
x.m_P_post_z;
294 os <<
" " <<
x.m_Cu_pre_x;
295 os <<
" " <<
x.m_Cu_pre_y;
296 os <<
" " <<
x.m_Cu_pre_z;
297 os <<
" " <<
x.m_Cu_post_x;
298 os <<
" " <<
x.m_Cu_post_y;
299 os <<
" " <<
x.m_Cu_post_z;
300 os <<
" " <<
x.m_P_Cu_pre_x;
301 os <<
" " <<
x.m_P_Cu_pre_y;
302 os <<
" " <<
x.m_P_Cu_pre_z;
303 os <<
" " <<
x.m_P_Cu_post_x;
304 os <<
" " <<
x.m_P_Cu_post_y;
305 os <<
" " <<
x.m_P_Cu_post_z;
312 x.check_start_tag(is,
"CGEMTRUTH");
313 if(!
x.initialized())
return is;
315 x.truthCol.resize(
x.nTruth);
316 {
for(
int i = 0; i <
x.nTruth; i++) {
319 x.check_end_tag(is,
"CGEMTRUTH");
325 os << std::endl <<
"{ CGEMTRUTH" << std::endl;
326 if(
x.initialized()) {
327 os <<
" " <<
x.nTruth;
328 {
for(
int i = 0; i <
x.nTruth; i++) {
329 os <<
" " <<
x.truthCol[i];
332 os << std::endl <<
"} CGEMTRUTH" << std::endl;
354 os <<
" " <<
x.trackIndex;
355 os <<
" " <<
x.partId;
356 os <<
" " <<
x.scinNb;
363 os <<
" " <<
x.trackL;
371 x.check_start_tag(is,
"TOFTRUTH");
372 if(!
x.initialized())
return is;
374 x.truthCol.resize(
x.nTruth);
375 {
for(
int i = 0; i <
x.nTruth; i++) {
378 x.check_end_tag(is,
"TOFTRUTH");
384 os << std::endl <<
"{ TOFTRUTH" << std::endl;
385 if(
x.initialized()) {
386 os <<
" " <<
x.nTruth;
387 {
for(
int i = 0; i <
x.nTruth; i++) {
388 os <<
" " <<
x.truthCol[i];
391 os << std::endl <<
"} TOFTRUTH" << std::endl;
413 os <<
" " <<
x.trackIndex;
414 os <<
" " <<
x.partId;
415 os <<
" " <<
x.numTheta;
416 os <<
" " <<
x.numPhi;
423 os <<
" " <<
x.totalEdep;
431 x.check_start_tag(is,
"EMCTRUTH");
432 if(!
x.initialized())
return is;
434 x.truthCol.resize(
x.nTruth);
435 {
for(
int i = 0; i <
x.nTruth; i++) {
438 x.check_end_tag(is,
"EMCTRUTH");
444 os << std::endl <<
"{ EMCTRUTH" << std::endl;
445 if(
x.initialized()) {
446 os <<
" " <<
x.nTruth;
447 {
for(
int i = 0; i <
x.nTruth; i++) {
448 os <<
" " <<
x.truthCol[i];
451 os << std::endl <<
"} EMCTRUTH" << std::endl;
473 os <<
" " <<
x.trackIndex;
474 os <<
" " <<
x.partId;
475 os <<
" " <<
x.segId;
476 os <<
" " <<
x.gapId;
477 os <<
" " <<
x.stripId;
490 x.check_start_tag(is,
"MUCTRUTH");
491 if(!
x.initialized())
return is;
493 x.truthCol.resize(
x.nTruth);
494 {
for(
int i = 0; i <
x.nTruth; i++) {
497 x.check_end_tag(is,
"MUCTRUTH");
503 os << std::endl <<
"{ MUCTRUTH" << std::endl;
504 if(
x.initialized()) {
505 os <<
" " <<
x.nTruth;
506 {
for(
int i = 0; i <
x.nTruth; i++) {
507 os <<
" " <<
x.truthCol[i];
510 os << std::endl <<
"} MUCTRUTH" << std::endl;
519 is >>
x.energyDeposit;
526 os <<
" " <<
x.trackIndex;
527 os <<
" " <<
x.layerNo;
528 os <<
" " <<
x.cellNo;
529 os <<
" " <<
x.energyDeposit;
530 os <<
" " <<
x.driftTime;
537 x.check_start_tag(is,
"MDCDIGI");
538 if(!
x.initialized())
return is;
540 x.digiCol.resize(
x.nDigi);
541 {
for(
int i = 0; i <
x.nDigi; i++) {
544 x.check_end_tag(is,
"MDCDIGI");
550 os << std::endl <<
"{ MDCDIGI" << std::endl;
551 if(
x.initialized()) {
552 os <<
" " <<
x.nDigi;
553 {
for(
int i = 0; i <
x.nDigi; i++) {
554 os <<
" " <<
x.digiCol[i];
557 os << std::endl <<
"} MDCDIGI" << std::endl;
569 is >>
x.energyDeposit;
570 is >>
x.driftDistance;
580 os <<
" " <<
x.trackIndex;
581 os <<
" " <<
x.layerNo;
582 os <<
" " <<
x.cellNo;
586 os <<
" " <<
x.energyDeposit;
587 os <<
" " <<
x.driftDistance;
588 os <<
" " <<
x.globalT;
589 os <<
" " <<
x.theta;
590 os <<
" " <<
x.enterAngle;
591 os <<
" " <<
x.posFlag;
598 x.check_start_tag(is,
"MDCHIT");
599 if(!
x.initialized())
return is;
601 x.hitCol.resize(
x.nHit);
602 {
for(
int i = 0; i <
x.nHit; i++) {
605 x.check_end_tag(is,
"MDCHIT");
611 os << std::endl <<
"{ MDCHIT" << std::endl;
612 if(
x.initialized()) {
614 {
for(
int i = 0; i <
x.nHit; i++) {
615 os <<
" " <<
x.hitCol[i];
618 os << std::endl <<
"} MDCHIT" << std::endl;
630 is >>
x.m_global_time;
636 os <<
" " <<
x.m_ID_track;
637 os <<
" " <<
x.m_ID_layer;
638 os <<
" " <<
x.m_ID_sheet;
639 os <<
" " <<
x.m_F_XV;
640 os <<
" " <<
x.m_ID_strip;
641 os <<
" " <<
x.m_E_deposit;
642 os <<
" " <<
x.m_global_time;
649 x.check_start_tag(is,
"CGEMDIGI");
650 if(!
x.initialized())
return is;
652 x.digiCol.resize(
x.nDigi);
653 {
for(
int i = 0; i <
x.nDigi; i++) {
656 x.check_end_tag(is,
"CGEMDIGI");
662 os << std::endl <<
"{ CGEMDIGI" << std::endl;
663 if(
x.initialized()) {
664 os <<
" " <<
x.nDigi;
665 {
for(
int i = 0; i <
x.nDigi; i++) {
666 os <<
" " <<
x.digiCol[i];
669 os << std::endl <<
"} CGEMDIGI" << std::endl;
678 is >>
x.m_global_time;
684 is >>
x.m_XYZ_post_x;
685 is >>
x.m_XYZ_post_y;
686 is >>
x.m_XYZ_post_z;
700 is >>
x.m_P_Cu_pre_x;
701 is >>
x.m_P_Cu_pre_y;
702 is >>
x.m_P_Cu_pre_z;
703 is >>
x.m_P_Cu_post_x;
704 is >>
x.m_P_Cu_post_y;
705 is >>
x.m_P_Cu_post_z;
712 os <<
" " <<
x.m_ID_track;
713 os <<
" " <<
x.m_ID_layer;
714 os <<
" " <<
x.m_pdg_code;
715 os <<
" " <<
x.m_global_time;
716 os <<
" " <<
x.m_E_deposit;
717 os <<
" " <<
x.m_L_step;
718 os <<
" " <<
x.m_XYZ_pre_x;
719 os <<
" " <<
x.m_XYZ_pre_y;
720 os <<
" " <<
x.m_XYZ_pre_z;
721 os <<
" " <<
x.m_XYZ_post_x;
722 os <<
" " <<
x.m_XYZ_post_y;
723 os <<
" " <<
x.m_XYZ_post_z;
724 os <<
" " <<
x.m_P_pre_x;
725 os <<
" " <<
x.m_P_pre_y;
726 os <<
" " <<
x.m_P_pre_z;
727 os <<
" " <<
x.m_P_post_x;
728 os <<
" " <<
x.m_P_post_y;
729 os <<
" " <<
x.m_P_post_z;
731 os <<
" " <<
x.m_Cu_pre_x;
732 os <<
" " <<
x.m_Cu_pre_y;
733 os <<
" " <<
x.m_Cu_pre_z;
734 os <<
" " <<
x.m_Cu_post_x;
735 os <<
" " <<
x.m_Cu_post_y;
736 os <<
" " <<
x.m_Cu_post_z;
737 os <<
" " <<
x.m_P_Cu_pre_x;
738 os <<
" " <<
x.m_P_Cu_pre_y;
739 os <<
" " <<
x.m_P_Cu_pre_z;
740 os <<
" " <<
x.m_P_Cu_post_x;
741 os <<
" " <<
x.m_P_Cu_post_y;
742 os <<
" " <<
x.m_P_Cu_post_z;
750 x.check_start_tag(is,
"CGEMHIT");
751 if(!
x.initialized())
return is;
753 x.hitCol.resize(
x.nHit);
754 {
for(
int i = 0; i <
x.nHit; i++) {
757 x.check_end_tag(is,
"CGEMHIT");
763 os << std::endl <<
"{ CGEMHIT" << std::endl;
764 if(
x.initialized()) {
766 {
for(
int i = 0; i <
x.nHit; i++) {
767 os <<
" " <<
x.hitCol[i];
770 os << std::endl <<
"} CGEMHIT" << std::endl;
788 os <<
" " <<
x.trackIndex;
789 os <<
" " <<
x.partId;
790 os <<
" " <<
x.scinNb;
791 os <<
" " <<
x.forwADC;
792 os <<
" " <<
x.forwTDC;
793 os <<
" " <<
x.backADC;
794 os <<
" " <<
x.backTDC;
802 x.check_start_tag(is,
"TOFDIGI");
803 if(!
x.initialized())
return is;
805 x.digiCol.resize(
x.nDigi);
806 {
for(
int i = 0; i <
x.nDigi; i++) {
809 x.check_end_tag(is,
"TOFDIGI");
815 os << std::endl <<
"{ TOFDIGI" << std::endl;
816 if(
x.initialized()) {
817 os <<
" " <<
x.nDigi;
818 {
for(
int i = 0; i <
x.nDigi; i++) {
819 os <<
" " <<
x.digiCol[i];
822 os << std::endl <<
"} TOFDIGI" << std::endl;
840 x.check_start_tag(is,
"TOFHIT");
841 if(!
x.initialized())
return is;
843 x.hitCol.resize(
x.nHit);
844 {
for(
int i = 0; i <
x.nHit; i++) {
847 x.check_end_tag(is,
"TOFHIT");
853 os << std::endl <<
"{ TOFHIT" << std::endl;
854 if(
x.initialized()) {
856 {
for(
int i = 0; i <
x.nHit; i++) {
857 os <<
" " <<
x.hitCol[i];
860 os << std::endl <<
"} TOFHIT" << std::endl;
870 is >>
x.energyDeposit;
877 os <<
" " <<
x.trackIndex;
878 os <<
" " <<
x.partId;
879 os <<
" " <<
x.numTheta;
880 os <<
" " <<
x.numPhi;
881 os <<
" " <<
x.energyDeposit;
882 os <<
" " <<
x.hitTime;
889 x.check_start_tag(is,
"EMCDIGI");
890 if(!
x.initialized())
return is;
892 x.digiCol.resize(
x.nDigi);
893 {
for(
int i = 0; i <
x.nDigi; i++) {
896 x.check_end_tag(is,
"EMCDIGI");
902 os << std::endl <<
"{ EMCDIGI" << std::endl;
903 if(
x.initialized()) {
904 os <<
" " <<
x.nDigi;
905 {
for(
int i = 0; i <
x.nDigi; i++) {
906 os <<
" " <<
x.digiCol[i];
909 os << std::endl <<
"} EMCDIGI" << std::endl;
927 x.check_start_tag(is,
"EMCHIT");
928 if(!
x.initialized())
return is;
930 x.hitCol.resize(
x.nHit);
931 {
for(
int i = 0; i <
x.nHit; i++) {
934 x.check_end_tag(is,
"EMCHIT");
940 os << std::endl <<
"{ EMCHIT" << std::endl;
941 if(
x.initialized()) {
943 {
for(
int i = 0; i <
x.nHit; i++) {
944 os <<
" " <<
x.hitCol[i];
947 os << std::endl <<
"} EMCHIT" << std::endl;
963 os <<
" " <<
x.trackIndex;
964 os <<
" " <<
x.partNo;
965 os <<
" " <<
x.segNo;
966 os <<
" " <<
x.gapNo;
967 os <<
" " <<
x.stripNo;
975 x.check_start_tag(is,
"MUCDIGI");
976 if(!
x.initialized())
return is;
978 x.digiCol.resize(
x.nDigi);
979 {
for(
int i = 0; i <
x.nDigi; i++) {
982 x.check_end_tag(is,
"MUCDIGI");
988 os << std::endl <<
"{ MUCDIGI" << std::endl;
989 if(
x.initialized()) {
990 os <<
" " <<
x.nDigi;
991 {
for(
int i = 0; i <
x.nDigi; i++) {
992 os <<
" " <<
x.digiCol[i];
995 os << std::endl <<
"} MUCDIGI" << std::endl;
1013 x.check_start_tag(is,
"MUCHIT");
1014 if(!
x.initialized())
return is;
1016 x.hitCol.resize(
x.nHit);
1017 {
for(
int i = 0; i <
x.nHit; i++) {
1020 x.check_end_tag(is,
"MUCHIT");
1026 os << std::endl <<
"{ MUCHIT" << std::endl;
1027 if(
x.initialized()) {
1028 os <<
" " <<
x.nHit;
1029 {
for(
int i = 0; i <
x.nHit; i++) {
1030 os <<
" " <<
x.hitCol[i];
1033 os << std::endl <<
"} MUCHIT" << std::endl;
1039 x.check_start_tag(is,
"EVENT");
1040 if(!
x.initialized())
return is;
1045 std::cerr <<
"Got AsciiDumpException eror while reading header block !!!" << std::endl;
1051 std::cerr <<
"Got AsciiDumpException eror while reading decay mode block !!!" << std::endl;
1057 std::cerr <<
"Got AsciiDumpException eror while reading track truth block !!!" << std::endl;
1061 is >>
x.vertexTruth;
1063 std::cerr <<
"Got AsciiDumpException eror while reading vertex truth block !!!" << std::endl;
1069 std::cerr <<
"Got AsciiDumpException eror while reading mdc truth block !!!" << std::endl;
1075 std::cerr <<
"Got AsciiDumpException eror while reading mdc digi block !!!" << std::endl;
1081 std::cerr <<
"Got AsciiDumpException eror while reading cgem truth block !!!" << std::endl;
1087 std::cerr <<
"Got AsciiDumpException eror while reading cgem digi block !!!" << std::endl;
1093 std::cerr <<
"Got AsciiDumpException eror while reading tof truth block !!!" << std::endl;
1099 std::cerr <<
"Got AsciiDumpException eror while reading tof digi block !!!" << std::endl;
1105 std::cerr <<
"Got AsciiDumpException eror while reading emc truth block !!!" << std::endl;
1111 std::cerr <<
"Got AsciiDumpException eror while reading emc digi block !!!" << std::endl;
1117 std::cerr <<
"Got AsciiDumpException eror while reading muc truth block !!!" << std::endl;
1123 std::cerr <<
"Got AsciiDumpException eror while reading muc digi block !!!" << std::endl;
1125 x.check_end_tag(is,
"EVENT");
1131 os << std::endl <<
"{ EVENT" << std::endl;
1132 if(
x.initialized()) {
1133 os <<
" " <<
x.header;
1134 os <<
" " <<
x.decayMode;
1135 os <<
" " <<
x.trackTruth;
1136 os <<
" " <<
x.vertexTruth;
1137 os <<
" " <<
x.mdcTruth;
1138 os <<
" " <<
x.mdcDigi;
1139 os <<
" " <<
x.cgemTruth;
1140 os <<
" " <<
x.cgemDigi;
1141 os <<
" " <<
x.tofTruth;
1142 os <<
" " <<
x.tofDigi;
1143 os <<
" " <<
x.emcTruth;
1144 os <<
" " <<
x.emcDigi;
1145 os <<
" " <<
x.mucTruth;
1146 os <<
" " <<
x.mucDigi;
1148 os << std::endl <<
"} EVENT" << std::endl;
1154 x.check_start_tag(is,
"HITEVENT");
1155 if(!
x.initialized())
return is;
1160 std::cerr <<
"Got AsciiDumpException eror while reading header block !!!" << std::endl;
1166 std::cerr <<
"Got AsciiDumpException eror while reading decay mode block !!!" << std::endl;
1172 std::cerr <<
"Got AsciiDumpException eror while reading track truth block !!!" << std::endl;
1176 is >>
x.vertexTruth;
1178 std::cerr <<
"Got AsciiDumpException eror while reading vertex truth block !!!" << std::endl;
1184 std::cerr <<
"Got AsciiDumpException eror while reading mdc truth block !!!" << std::endl;
1190 std::cerr <<
"Got AsciiDumpException eror while reading mdc hit block !!!" << std::endl;
1196 std::cerr <<
"Got AsciiDumpException eror while reading cgem truth block !!!" << std::endl;
1202 std::cerr <<
"Got AsciiDumpException eror while reading cgem hit block !!!" << std::endl;
1208 std::cerr <<
"Got AsciiDumpException eror while reading tof truth block !!!" << std::endl;
1214 std::cerr <<
"Got AsciiDumpException eror while reading tof hiti block !!!" << std::endl;
1220 std::cerr <<
"Got AsciiDumpException eror while reading emc truth block !!!" << std::endl;
1226 std::cerr <<
"Got AsciiDumpException eror while reading emc hit block !!!" << std::endl;
1232 std::cerr <<
"Got AsciiDumpException eror while reading muc truth block !!!" << std::endl;
1238 std::cerr <<
"Got AsciiDumpException eror while reading muc hit block !!!" << std::endl;
1240 x.check_end_tag(is,
"HITEVENT");
1246 os << std::endl <<
"{ HITEVENT" << std::endl;
1247 if(
x.initialized()) {
1248 os <<
" " <<
x.header;
1249 os <<
" " <<
x.decayMode;
1250 os <<
" " <<
x.trackTruth;
1251 os <<
" " <<
x.vertexTruth;
1252 os <<
" " <<
x.mdcTruth;
1253 os <<
" " <<
x.mdcHit;
1254 os <<
" " <<
x.cgemTruth;
1255 os <<
" " <<
x.cgemHit;
1256 os <<
" " <<
x.tofTruth;
1257 os <<
" " <<
x.tofHit;
1258 os <<
" " <<
x.emcTruth;
1259 os <<
" " <<
x.emcHit;
1260 os <<
" " <<
x.mucTruth;
1261 os <<
" " <<
x.mucHit;
1263 os << std::endl <<
"} HITEVENT" << std::endl;
std::istream & operator>>(std::istream &is, FRMTVERSION &x)
std::ostream & operator<<(std::ostream &os, const FRMTVERSION &x)