/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Trigger/Trigger/Trigger-00-01-05/src/AsciiData.cxx

Go to the documentation of this file.
00001 
00002 #include "Trigger/AsciiData.h"
00003 
00004 //std::string Tagged::s_saved_tag;
00005 
00006 std::istream& operator>>(std::istream& is, VERSIONNUM& x)
00007 {
00008     x.check_start_tag(is,"VERSION");
00009     if(!x.initialized()) return is;
00010     is >> x.major;
00011     is >> x.minor;
00012     x.check_end_tag(is, "VERSION");
00013     return is;
00014 }
00015 
00016 std::ostream& operator<<(std::ostream& os, const VERSIONNUM& x)
00017 {
00018     os << std::endl << "{ VERSION" << std::endl;
00019     if(x.initialized()) {
00020     os << " " << x.major;
00021     os << " " << x.minor;
00022     }
00023     os << std::endl << "} VERSION" << std::endl;
00024     return os;
00025 }
00026 
00027 std::istream& operator>>(std::istream& is, EVHEAD& x)
00028 {
00029     x.check_start_tag(is,"EVHEAD");
00030     if(!x.initialized()) return is;
00031     is >> x.runNo;
00032     is >> x.eventNo;
00033     x.check_end_tag(is, "EVHEAD");
00034     return is;
00035 }
00036 
00037 std::ostream& operator<<(std::ostream &os,const EVHEAD& x)
00038 {
00039     os << std::endl << "{ EVHEAD" << std::endl;
00040     if(x.initialized()) {
00041     os << " " << x.runNo;
00042     os << " " << x.eventNo;
00043     }
00044     os << std::endl << "} EVHEAD" << std::endl;
00045     return os;
00046 }
00047 
00048 std::istream& operator>>(std::istream& is, DECAYMODE& x)
00049 {
00050    x.check_start_tag(is,"DECAYMODE");
00051    if(!x.initialized()) return is;
00052    is >> x.size;
00053    for (int index=0; index<x.size; index++) {
00054      is >> x.data[index];
00055    }
00056    x.check_end_tag(is, "DECAYMODE");
00057    return is;
00058 }
00059 
00060 std::ostream& operator<<(std::ostream &os,const DECAYMODE& x)
00061 {
00062   os << std::endl << "{ DECAYMODE" << std::endl;
00063   if(x.initialized()) {
00064     os << " " << x.size;
00065     for (int index=0; index<x.size; index++) {
00066       os << " " << x.data[index];
00067     }
00068   }
00069   os << std::endl << "} DECAYMODE" << std::endl;
00070   return os;
00071 }
00072 
00073 std::istream& operator>>(std::istream& is, TrackTruthType& x)
00074 {
00075     is >> x.trackIndex;
00076     is >> x.PDGCode;
00077     is >> x.PDGCharge;
00078     is >> x.v0Index;
00079     is >> x.v1Index;
00080     is >> x.px;
00081     is >> x.py;
00082     is >> x.pz;
00083     is >> x.E;
00084     is >> x.minDaughterIndex;
00085     is >> x.maxDaughterIndex;
00086     return is;
00087 }
00088 
00089 std::ostream& operator<<(std::ostream &os,const TrackTruthType& x)
00090 {
00091     os << " " << x.trackIndex;
00092     os << " " << x.PDGCode;
00093     os << " " << x.PDGCharge;
00094     os << " " << x.v0Index;
00095     os << " " << x.v1Index;
00096     os << " " << x.px;
00097     os << " " << x.py;
00098     os << " " << x.pz;
00099     os << " " << x.E;
00100     os << " " << x.minDaughterIndex;
00101     os << " " << x.maxDaughterIndex;
00102     os << std::endl;
00103     return os;
00104 }
00105 
00106 std::istream& operator>>(std::istream& is, TRACKTRUTH& x)
00107 {
00108     x.check_start_tag(is,"TRACKTRUTH");
00109     if(!x.initialized()) return is;
00110     is >> x.nTruth;
00111     x.truthCol.resize(x.nTruth);
00112     {for(int i = 0; i < x.nTruth; i++) {
00113         is >> x.truthCol[i];
00114     }}
00115     x.check_end_tag(is, "TRACKTRUTH");
00116     return is;
00117 }
00118 
00119 std::ostream& operator<<(std::ostream &os,const TRACKTRUTH& x)
00120 {
00121     os << std::endl << "{ TRACKTRUTH" << std::endl;
00122     if(x.initialized()) {
00123     os << " " << x.nTruth;
00124     {for(int i = 0; i < x.nTruth; i++) {
00125         os << " " << x.truthCol[i];
00126     }}
00127     }
00128     os << std::endl << "} TRACKTRUTH" << std::endl;
00129     return os;
00130 }
00131 
00132 std::istream& operator>>(std::istream& is, VertexTruthType& x)
00133 {
00134     is >> x.vertexIndex;
00135     is >> x.parentTrackIndex;
00136     is >> x.posX;
00137     is >> x.posY;
00138     is >> x.posZ;
00139     is >> x.time;
00140     return is;
00141 }
00142 
00143 std::ostream& operator<<(std::ostream &os,const VertexTruthType& x)
00144 {
00145     os << " " << x.vertexIndex;
00146     os << " " << x.parentTrackIndex;
00147     os << " " << x.posX;
00148     os << " " << x.posY;
00149     os << " " << x.posZ;
00150     os << " " << x.time;
00151     os << std::endl;
00152     return os;
00153 }
00154 
00155 std::istream& operator>>(std::istream& is, VERTEXTRUTH& x)
00156 {
00157     x.check_start_tag(is,"VERTEXTRUTH");
00158     if(!x.initialized()) return is;
00159     is >> x.nTruth;
00160     x.truthCol.resize(x.nTruth);
00161     {for(int i = 0; i < x.nTruth; i++) {
00162         is >> x.truthCol[i];
00163     }}
00164     x.check_end_tag(is, "VERTEXTRUTH");
00165     return is;
00166 }
00167 
00168 std::ostream& operator<<(std::ostream &os,const VERTEXTRUTH& x)
00169 {
00170     os << std::endl << "{ VERTEXTRUTH" << std::endl;
00171     if(x.initialized()) {
00172     os << " " << x.nTruth;
00173     {for(int i = 0; i < x.nTruth; i++) {
00174         os << " " << x.truthCol[i];
00175     }}
00176     }
00177     os << std::endl << "} VERTEXTRUTH" << std::endl;
00178     return os;
00179 }
00180 
00181 
00182 std::istream& operator>>(std::istream& is, MdcTruthType& x)
00183 {
00184     is >> x.trackIndex;
00185     is >> x.layerNo;  
00186     is >> x.cellNo;
00187     is >> x.edep;
00188     is >> x.driftD;
00189     is >> x.posX;
00190     is >> x.posY;
00191     is >> x.posZ;
00192     is >> x.posFlag;
00193     return is;
00194 }
00195 
00196 std::ostream& operator<<(std::ostream &os,const MdcTruthType& x)
00197 {
00198     os << " " << x.trackIndex;
00199     os << " " << x.layerNo;
00200     os << " " << x.cellNo;
00201     os << " " << x.edep;
00202     os << " " << x.driftD;
00203     os << " " << x.posX;
00204     os << " " << x.posY;
00205     os << " " << x.posZ;
00206     os << " " << x.posFlag;
00207     os << std::endl;
00208     return os;
00209 }
00210 
00211 std::istream& operator>>(std::istream& is, MDCTRUTH& x)
00212 {
00213     x.check_start_tag(is,"MDCTRUTH");
00214     if(!x.initialized()) return is;
00215     is >> x.nTruth;
00216     x.truthCol.resize(x.nTruth);
00217     {for(int i = 0; i < x.nTruth; i++) {
00218         is >> x.truthCol[i];
00219     }}
00220     x.check_end_tag(is, "MDCTRUTH");
00221     return is;
00222 }
00223 
00224 std::ostream& operator<<(std::ostream &os,const MDCTRUTH& x)
00225 {
00226     os << std::endl << "{ MDCTRUTH" << std::endl;
00227     if(x.initialized()) {
00228     os << " " << x.nTruth;
00229     {for(int i = 0; i < x.nTruth; i++) {
00230         os << " " << x.truthCol[i];
00231     }}
00232     }
00233     os << std::endl << "} MDCTRUTH" << std::endl;
00234     return os;
00235 }
00236 
00237 std::istream& operator>>(std::istream& is, TofTruthType& x)
00238 {
00239     is >> x.trackIndex;
00240     is >> x.partId;  
00241     is >> x.scinNb;
00242     is >> x.posX;
00243     is >> x.posY;
00244     is >> x.posZ;
00245     is >> x.px;
00246     is >> x.py;
00247     is >> x.pz;
00248     is >> x.trackL;
00249     is >> x.time;
00250     return is;
00251 }
00252 
00253 std::ostream& operator<<(std::ostream &os,const TofTruthType& x)
00254 {
00255     os << " " << x.trackIndex;
00256     os << " " << x.partId;
00257     os << " " << x.scinNb;
00258     os << " " << x.posX;
00259     os << " " << x.posY;
00260     os << " " << x.posZ;
00261     os << " " << x.px;
00262     os << " " << x.py;
00263     os << " " << x.pz;
00264     os << " " << x.trackL;
00265     os << " " << x.time;
00266     os << std::endl;
00267     return os;
00268 }
00269 
00270 std::istream& operator>>(std::istream& is, TOFTRUTH& x)
00271 {
00272     x.check_start_tag(is,"TOFTRUTH");
00273     if(!x.initialized()) return is;
00274     is >> x.nTruth;
00275     x.truthCol.resize(x.nTruth);
00276     {for(int i = 0; i < x.nTruth; i++) {
00277         is >> x.truthCol[i];
00278     }}
00279     x.check_end_tag(is, "TOFTRUTH");
00280     return is;
00281 }
00282 
00283 std::ostream& operator<<(std::ostream &os,const TOFTRUTH& x)
00284 {
00285     os << std::endl << "{ TOFTRUTH" << std::endl;
00286     if(x.initialized()) {
00287     os << " " << x.nTruth;
00288     {for(int i = 0; i < x.nTruth; i++) {
00289         os << " " << x.truthCol[i];
00290     }}
00291     }
00292     os << std::endl << "} TOFTRUTH" << std::endl;
00293     return os;
00294 }
00295 
00296 std::istream& operator>>(std::istream& is, EmcTruthType& x)
00297 {
00298     is >> x.trackIndex;
00299     is >> x.partId;
00300     is >> x.numTheta;  
00301     is >> x.numPhi;
00302     is >> x.posX;
00303     is >> x.posY;
00304     is >> x.posZ;
00305     is >> x.px;
00306     is >> x.py;
00307     is >> x.pz;
00308     is >> x.totalEdep;
00309     return is;
00310 }
00311 
00312 std::ostream& operator<<(std::ostream &os,const EmcTruthType& x)
00313 {
00314     os << " " << x.trackIndex;
00315     os << " " << x.partId;
00316     os << " " << x.numTheta;
00317     os << " " << x.numPhi;
00318     os << " " << x.posX;
00319     os << " " << x.posY;
00320     os << " " << x.posZ;
00321     os << " " << x.px;
00322     os << " " << x.py;
00323     os << " " << x.pz;
00324     os << " " << x.totalEdep;
00325     os << std::endl;
00326     return os;
00327     
00328 }
00329 
00330 std::istream& operator>>(std::istream& is, EMCTRUTH& x)
00331 {
00332     x.check_start_tag(is,"EMCTRUTH");
00333     if(!x.initialized()) return is;
00334     is >> x.nTruth;
00335     x.truthCol.resize(x.nTruth);
00336     {for(int i = 0; i < x.nTruth; i++) {
00337         is >> x.truthCol[i];
00338     }}
00339     x.check_end_tag(is, "EMCTRUTH");
00340     return is;
00341 }
00342 
00343 std::ostream& operator<<(std::ostream &os,const EMCTRUTH& x)
00344 {
00345     os << std::endl << "{ EMCTRUTH" << std::endl;
00346     if(x.initialized()) {
00347     os << " " << x.nTruth;
00348     {for(int i = 0; i < x.nTruth; i++) {
00349         os << " " << x.truthCol[i];
00350     }}
00351     }
00352     os << std::endl << "} EMCTRUTH" << std::endl;
00353     return os;
00354 }
00355 
00356 std::istream& operator>>(std::istream& is, MucTruthType& x)
00357 {
00358     is >> x.trackIndex;
00359     is >> x.partId;
00360     is >> x.segId;
00361     is >> x.gapId;
00362     is >> x.stripId;
00363     is >> x.posX;
00364     is >> x.posY;
00365     is >> x.posZ;
00366     is >> x.px;
00367     is >> x.py;
00368     is >> x.pz;
00369     return is;
00370 }
00371 
00372 std::ostream& operator<<(std::ostream &os,const MucTruthType& x)
00373 {
00374     os << " " << x.trackIndex;
00375     os << " " << x.partId;
00376     os << " " << x.segId;
00377     os << " " << x.gapId;
00378     os << " " << x.stripId;
00379     os << " " << x.posX;
00380     os << " " << x.posY;
00381     os << " " << x.posZ;
00382     os << " " << x.px;
00383     os << " " << x.py;
00384     os << " " << x.pz;
00385     os << std::endl;
00386     return os;
00387 }
00388 
00389 std::istream& operator>>(std::istream& is, MUCTRUTH& x)
00390 {
00391     x.check_start_tag(is,"MUCTRUTH");
00392     if(!x.initialized()) return is;
00393     is >> x.nTruth;
00394     x.truthCol.resize(x.nTruth);
00395     {for(int i = 0; i < x.nTruth; i++) {
00396         is >> x.truthCol[i];
00397     }}
00398     x.check_end_tag(is, "MUCTRUTH");
00399     return is;
00400 }
00401 
00402 std::ostream& operator<<(std::ostream &os,const MUCTRUTH& x)
00403 {
00404     os << std::endl << "{ MUCTRUTH" << std::endl;
00405     if(x.initialized()) {
00406     os << " " << x.nTruth;
00407     {for(int i = 0; i < x.nTruth; i++) {
00408         os << " " << x.truthCol[i];
00409     }}
00410     }
00411     os << std::endl << "} MUCTRUTH" << std::endl;
00412     return os;
00413 }
00414 
00415 
00416 std::istream& operator>>(std::istream& is, MdcDigiType& x)
00417 {
00418     is >> x.trackIndex;
00419     is >> x.layerNo;
00420     is >> x.cellNo;
00421     is >> x.energyDeposit;
00422     is >> x.driftTime;
00423     return is;
00424 }
00425 
00426 std::ostream& operator<<(std::ostream &os,const MdcDigiType& x)
00427 {
00428     os << " " << x.trackIndex;
00429     os << " " << x.layerNo;
00430     os << " " << x.cellNo;
00431     os << " " << x.energyDeposit;
00432     os << " " << x.driftTime;
00433     os << std::endl;
00434     return os;
00435 }
00436 
00437 
00438 std::istream& operator>>(std::istream& is, MDCDIGI& x)
00439 {
00440     x.check_start_tag(is,"MDCDIGI");
00441     if(!x.initialized()) return is;
00442     is >> x.nDigi;
00443     x.digiCol.resize(x.nDigi);
00444     {for(int i = 0; i < x.nDigi; i++) {
00445         is >> x.digiCol[i];
00446     }}
00447     x.check_end_tag(is, "MDCDIGI");
00448     return is;
00449 }
00450 
00451 std::ostream& operator<<(std::ostream &os,const MDCDIGI& x)
00452 {
00453     os << std::endl << "{ MDCDIGI" << std::endl;
00454     if(x.initialized()) {
00455     os << " " << x.nDigi;
00456     {for(int i = 0; i < x.nDigi; i++) {
00457         os << " " << x.digiCol[i];
00458     }}
00459     }
00460     os << std::endl << "} MDCDIGI" << std::endl;
00461     return os;
00462 }
00463 
00464 std::istream& operator>>(std::istream& is, TofDigiType& x)
00465 {
00466     is >> x.trackIndex;
00467     is >> x.partId;
00468     is >> x.scinNb;
00469     is >> x.forwADC;
00470     is >> x.forwTDC;
00471     is >> x.backADC;
00472     is >> x.backTDC;
00473     return is;
00474 }
00475 
00476 std::ostream& operator<<(std::ostream &os,const TofDigiType& x)
00477 {
00478     os << " " << x.trackIndex;
00479     os << " " << x.partId;
00480     os << " " << x.scinNb;
00481     os << " " << x.forwADC;
00482     os << " " << x.forwTDC;
00483     os << " " << x.backADC;
00484     os << " " << x.backTDC;
00485     os << std::endl;
00486     return os;
00487 }
00488 
00489 
00490 std::istream& operator>>(std::istream& is, TOFDIGI& x)
00491 {
00492     x.check_start_tag(is,"TOFDIGI");
00493     if(!x.initialized()) return is;
00494     is >> x.nDigi;
00495     x.digiCol.resize(x.nDigi);
00496     {for(int i = 0; i < x.nDigi; i++) {
00497         is >> x.digiCol[i];
00498     }}
00499     x.check_end_tag(is, "TOFDIGI");
00500     return is;
00501 }
00502 
00503 std::ostream& operator<<(std::ostream &os,const TOFDIGI& x)
00504 {
00505     os << std::endl << "{ TOFDIGI" << std::endl;
00506     if(x.initialized()) {
00507     os << " " << x.nDigi;
00508     {for(int i = 0; i < x.nDigi; i++) {
00509         os << " " << x.digiCol[i];
00510     }}
00511     }
00512     os << std::endl << "} TOFDIGI" << std::endl;
00513     return os;
00514 }
00515 
00516 std::istream& operator>>(std::istream& is, EmcDigiType& x)
00517 {
00518     is >> x.trackIndex;
00519     is >> x.partId;
00520     is >> x.numTheta;
00521     is >> x.numPhi;
00522     is >> x.energyDeposit;
00523     is >> x.hitTime;
00524     return is;
00525 }
00526 
00527 std::ostream& operator<<(std::ostream &os,const EmcDigiType& x)
00528 {
00529     os << " " << x.trackIndex;
00530     os << " " << x.partId;
00531     os << " " << x.numTheta;
00532     os << " " << x.numPhi;
00533     os << " " << x.energyDeposit;
00534     os << " " << x.hitTime;
00535     os << std::endl;
00536     return os;
00537 }
00538 
00539 std::istream& operator>>(std::istream& is, EMCDIGI& x)
00540 {
00541     x.check_start_tag(is,"EMCDIGI");
00542     if(!x.initialized()) return is;
00543     is >> x.nDigi;
00544     x.digiCol.resize(x.nDigi);
00545     {for(int i = 0; i < x.nDigi; i++) {
00546         is >> x.digiCol[i];
00547     }}
00548     x.check_end_tag(is, "EMCDIGI");
00549     return is;
00550 }
00551 
00552 std::ostream& operator<<(std::ostream &os,const EMCDIGI& x)
00553 {
00554     os << std::endl << "{ EMCDIGI" << std::endl;
00555     if(x.initialized()) {
00556     os << " " << x.nDigi;
00557     {for(int i = 0; i < x.nDigi; i++) {
00558         os << " " << x.digiCol[i];
00559     }}
00560     }
00561     os << std::endl << "} EMCDIGI" << std::endl;
00562     return os;
00563 }
00564 
00565 std::istream& operator>>(std::istream& is, MucDigiType& x)
00566 {
00567     is >> x.trackIndex;
00568     is >> x.partNo;
00569     is >> x.segNo;
00570     is >> x.gapNo;
00571     is >> x.stripNo;
00572     return is;
00573 }
00574 
00575 std::ostream& operator<<(std::ostream &os,const MucDigiType& x)
00576 {
00577     os << " " << x.trackIndex;
00578     os << " " << x.partNo;
00579     os << " " << x.segNo;
00580     os << " " << x.gapNo;
00581     os << " " << x.stripNo;
00582     os << std::endl;
00583     return os;
00584 }
00585 
00586 
00587 std::istream& operator>>(std::istream& is, MUCDIGI& x)
00588 {
00589     x.check_start_tag(is,"MUCDIGI");
00590     if(!x.initialized()) return is;
00591     is >> x.nDigi;
00592     x.digiCol.resize(x.nDigi);
00593     {for(int i = 0; i < x.nDigi; i++) {
00594         is >> x.digiCol[i];
00595     }}
00596     x.check_end_tag(is, "MUCDIGI");
00597     return is;
00598 }
00599 
00600 std::ostream& operator<<(std::ostream &os,const MUCDIGI& x)
00601 {
00602     os << std::endl << "{ MUCDIGI" << std::endl;
00603     if(x.initialized()) {
00604     os << " " << x.nDigi;
00605     {for(int i = 0; i < x.nDigi; i++) {
00606         os << " " << x.digiCol[i];
00607     }}
00608     }
00609     os << std::endl << "} MUCDIGI" << std::endl;
00610     return os;
00611 }
00612 std::istream& operator>>(std::istream& is, EVENT& x)
00613 {
00614     x.check_start_tag(is,"EVENT");
00615     if(!x.initialized()) return is;
00616     
00617     try {
00618       is >> x.header;
00619     } catch(AsciiDumpException& ) {
00620       std::cerr << "Got AsciiDumpException eror while reading header block !!!" << std::endl;
00621     }
00622    
00623     try {
00624       is >> x.decayMode;
00625     } catch(AsciiDumpException& ) {
00626       std::cerr << "Got AsciiDumpException eror while reading decay mode block !!!" << std::endl;
00627     }
00628     
00629     try {
00630       is >> x.trackTruth;
00631     } catch(AsciiDumpException& ) {
00632       std::cerr << "Got AsciiDumpException eror while reading track truth block !!!" << std::endl;
00633     }
00634 
00635     try {
00636       is >> x.vertexTruth;
00637     } catch (AsciiDumpException& ) {
00638       std::cerr << "Got AsciiDumpException eror while reading vertex truth block !!!" << std::endl;
00639     }
00640     
00641     try {
00642       is >> x.mdcTruth;
00643     } catch (AsciiDumpException& ) {
00644       std::cerr << "Got AsciiDumpException eror while reading mdc truth block !!!" << std::endl;
00645     }
00646     
00647     try {
00648       is >> x.mdcDigi;
00649     } catch (AsciiDumpException& ) {
00650       std::cerr << "Got AsciiDumpException eror while reading mdc digi block !!!" << std::endl;
00651     }
00652     
00653     try {
00654       is >> x.tofTruth;
00655     } catch (AsciiDumpException& ) {
00656       std::cerr << "Got AsciiDumpException eror while reading tof truth block !!!" << std::endl;
00657     }
00658 
00659     try {
00660       is >> x.tofDigi;
00661     } catch (AsciiDumpException& ) {
00662       std::cerr << "Got AsciiDumpException eror while reading tof digi block !!!" << std::endl;
00663     }
00664     
00665     try {
00666       is >> x.emcTruth;
00667     } catch (AsciiDumpException& ) {
00668       std::cerr << "Got AsciiDumpException eror while reading emc truth block !!!" << std::endl;
00669     }
00670 
00671     try {
00672       is >> x.emcDigi;
00673     } catch (AsciiDumpException& ) {
00674       std::cerr << "Got AsciiDumpException eror while reading emc digi block !!!" << std::endl;
00675     }
00676     
00677     try {
00678       is >> x.mucTruth;
00679     } catch (AsciiDumpException& ) {
00680       std::cerr << "Got AsciiDumpException eror while reading muc truth block !!!" << std::endl;
00681     }
00682     
00683     try {
00684       is >> x.mucDigi;
00685     } catch (AsciiDumpException& ) {
00686       std::cerr << "Got AsciiDumpException eror while reading muc digi block !!!" << std::endl;
00687     }
00688     x.check_end_tag(is, "EVENT");
00689     return is;
00690 }
00691 
00692 std::ostream& operator<<(std::ostream &os,const EVENT& x)
00693 {
00694     os << std::endl << "{ EVENT" << std::endl;
00695     if(x.initialized()) {
00696     os << " " << x.header;
00697     os << " " << x.decayMode;
00698     os << " " << x.trackTruth;
00699     os << " " << x.vertexTruth;
00700     os << " " << x.mdcTruth;
00701     os << " " << x.mdcDigi;
00702     os << " " << x.tofTruth;
00703     os << " " << x.tofDigi;
00704     os << " " << x.emcTruth;
00705     os << " " << x.emcDigi; 
00706     os << " " << x.mucTruth;
00707     os << " " << x.mucDigi; 
00708     }
00709     os << std::endl << "} EVENT" << std::endl;
00710     return os;
00711 }
00712 

Generated on Tue Nov 29 23:14:40 2016 for BOSS_7.0.2 by  doxygen 1.4.7