HitEVENT Class Reference

#include <AsciiData.hh>

Inheritance diagram for HitEVENT:

Tagged List of all members.

Public Member Functions

 HitEVENT ()
bool initialized () const
bool initialized () const
void set_initialized ()
void set_initialized ()
void unset_initalized ()
void unset_initalized ()

Public Attributes

EVHEAD header
DECAYMODE decayMode
TRACKTRUTH trackTruth
VERTEXTRUTH vertexTruth
MDCTRUTH mdcTruth
MDCHIT mdcHit
TOFTRUTH tofTruth
TOFHIT tofHit
EMCTRUTH emcTruth
EMCHIT emcHit
MUCTRUTH mucTruth
MUCHIT mucHit

Protected Member Functions

void check_start_tag (std::istream &is, const char *tag)
void check_start_tag (std::istream &is, const char *tag)
void check_end_tag (std::istream &is, const char *tag)
void check_end_tag (std::istream &is, const char *tag)

Friends

std::istreamoperator>> (std::istream &, HitEVENT &x)
std::ostreamoperator<< (std::ostream &, const HitEVENT &x)

Detailed Description

Definition at line 409 of file AsciiData.hh.


Constructor & Destructor Documentation

HitEVENT::HitEVENT (  )  [inline]

Definition at line 411 of file AsciiData.hh.

00411 {};


Member Function Documentation

void Tagged::check_end_tag ( std::istream is,
const char *  tag 
) [protected, inherited]

void Tagged::check_end_tag ( std::istream is,
const char *  tag 
) [inline, protected, inherited]

Definition at line 108 of file dmplib.hh.

References deljobs::string.

00109 {
00110     char c; 
00111     is >> c;
00112     if(c != '}') 
00113         throw AsciiNoEndChar();
00114 
00115     std::string in_tag;
00116     is >> in_tag;
00117     if(in_tag != tag) 
00118         throw AsciiWrongEndTag(tag, in_tag);
00119 }

void Tagged::check_start_tag ( std::istream is,
const char *  tag 
) [protected, inherited]

void Tagged::check_start_tag ( std::istream is,
const char *  tag 
) [inline, protected, inherited]

Definition at line 81 of file dmplib.hh.

References Tagged::set_initialized(), and deljobs::string.

00082 { 
00083     // read input, check for '{' character
00084     char c; 
00085     if(!(is >> c) || (c != '{')) {
00086         throw AsciiNoStartChar();
00087     }
00088 
00089     // compare tags
00090     std::string in_tag;
00091     is >> in_tag;
00092     if(in_tag != tag) 
00093       throw AsciiWrongStartTag(tag, in_tag);
00094 
00095     // check for empty block
00096     is >> c;
00097     if(c == '}') {
00098         is >> in_tag;
00099         if(in_tag != tag) 
00100             throw AsciiWrongEndTag(tag, in_tag);
00101     } else {
00102         is.putback(c); 
00103         set_initialized();
00104     }
00105 }

bool Tagged::initialized (  )  const [inherited]

bool Tagged::initialized (  )  const [inline, inherited]

Definition at line 63 of file dmplib.hh.

References Tagged::m_initialized.

00064 {
00065     return m_initialized;
00066 }

void Tagged::set_initialized (  )  [inherited]

void Tagged::set_initialized (  )  [inline, inherited]

Definition at line 69 of file dmplib.hh.

References Tagged::m_initialized.

Referenced by Tagged::check_start_tag(), main(), BesAsciiIO::SaveAsciiEvents(), and BesAsciiIO::SaveHitAsciiEvents().

00070 { 
00071     m_initialized = true; 
00072 }

void Tagged::unset_initalized (  )  [inherited]

void Tagged::unset_initalized (  )  [inline, inherited]

Definition at line 75 of file dmplib.hh.

References Tagged::m_initialized.

00076 { 
00077     m_initialized = false; 
00078 }


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream os,
const HitEVENT x 
) [friend]

Definition at line 967 of file AsciiData.cc.

00968 {
00969     os << std::endl << "{ HITEVENT" << std::endl;
00970     if(x.initialized()) {
00971     os << " " << x.header;
00972     os << " " << x.decayMode;
00973     os << " " << x.trackTruth;
00974     os << " " << x.vertexTruth;
00975     os << " " << x.mdcTruth;
00976     os << " " << x.mdcHit;
00977     os << " " << x.tofTruth;
00978     os << " " << x.tofHit;
00979     os << " " << x.emcTruth;
00980     os << " " << x.emcHit; 
00981     os << " " << x.mucTruth;
00982     os << " " << x.mucHit; 
00983     }
00984     os << std::endl << "} HITEVENT" << std::endl;
00985     return os;
00986 }

std::istream& operator>> ( std::istream is,
HitEVENT x 
) [friend]

Definition at line 887 of file AsciiData.cc.

00888 {
00889     x.check_start_tag(is,"HITEVENT");
00890     if(!x.initialized()) return is;
00891     
00892     try {
00893       is >> x.header;
00894     } catch(AsciiDumpException& ) {
00895       std::cerr << "Got AsciiDumpException eror while reading header block !!!" << std::endl;
00896     }
00897    
00898     try {
00899       is >> x.decayMode;
00900     } catch(AsciiDumpException& ) {
00901       std::cerr << "Got AsciiDumpException eror while reading decay mode block !!!" << std::endl;
00902     }
00903     
00904     try {
00905       is >> x.trackTruth;
00906     } catch(AsciiDumpException& ) {
00907       std::cerr << "Got AsciiDumpException eror while reading track truth block !!!" << std::endl;
00908     }
00909 
00910     try {
00911       is >> x.vertexTruth;
00912     } catch (AsciiDumpException& ) {
00913       std::cerr << "Got AsciiDumpException eror while reading vertex truth block !!!" << std::endl;
00914     }
00915     
00916     try {
00917       is >> x.mdcTruth;
00918     } catch (AsciiDumpException& ) {
00919       std::cerr << "Got AsciiDumpException eror while reading mdc truth block !!!" << std::endl;
00920     }
00921     
00922     try {
00923       is >> x.mdcHit;
00924     } catch (AsciiDumpException& ) {
00925       std::cerr << "Got AsciiDumpException eror while reading mdc hit block !!!" << std::endl;
00926     }
00927     
00928     try {
00929       is >> x.tofTruth;
00930     } catch (AsciiDumpException& ) {
00931       std::cerr << "Got AsciiDumpException eror while reading tof truth block !!!" << std::endl;
00932     }
00933 
00934     try {
00935       is >> x.tofHit;
00936     } catch (AsciiDumpException& ) {
00937       std::cerr << "Got AsciiDumpException eror while reading tof hiti block !!!" << std::endl;
00938     }
00939     
00940     try {
00941       is >> x.emcTruth;
00942     } catch (AsciiDumpException& ) {
00943       std::cerr << "Got AsciiDumpException eror while reading emc truth block !!!" << std::endl;
00944     }
00945 
00946     try {
00947       is >> x.emcHit;
00948     } catch (AsciiDumpException& ) {
00949       std::cerr << "Got AsciiDumpException eror while reading emc hit block !!!" << std::endl;
00950     }
00951     
00952     try {
00953       is >> x.mucTruth;
00954     } catch (AsciiDumpException& ) {
00955       std::cerr << "Got AsciiDumpException eror while reading muc truth block !!!" << std::endl;
00956     }
00957     
00958     try {
00959       is >> x.mucHit;
00960     } catch (AsciiDumpException& ) {
00961       std::cerr << "Got AsciiDumpException eror while reading muc hit block !!!" << std::endl;
00962     }
00963     x.check_end_tag(is, "HITEVENT");
00964     return is;
00965 }


Member Data Documentation

DECAYMODE HitEVENT::decayMode

Definition at line 414 of file AsciiData.hh.

Referenced by BesAsciiIO::SaveDecayMode(), and BesAsciiIO::SaveHitAsciiEvents().

EMCHIT HitEVENT::emcHit

Definition at line 422 of file AsciiData.hh.

EMCTRUTH HitEVENT::emcTruth

Definition at line 421 of file AsciiData.hh.

EVHEAD HitEVENT::header

Definition at line 411 of file AsciiData.hh.

Referenced by BesAsciiIO::SaveHitAsciiEvents().

MDCHIT HitEVENT::mdcHit

Definition at line 418 of file AsciiData.hh.

Referenced by BesTuningIO::GetMdcHits(), BesAsciiIO::SaveHitAsciiEvents(), and BesAsciiIO::SaveMdcHits().

MDCTRUTH HitEVENT::mdcTruth

Definition at line 417 of file AsciiData.hh.

Referenced by BesAsciiIO::SaveHitAsciiEvents(), and BesAsciiIO::SaveMdcTruth().

MUCHIT HitEVENT::mucHit

Definition at line 424 of file AsciiData.hh.

MUCTRUTH HitEVENT::mucTruth

Definition at line 423 of file AsciiData.hh.

TOFHIT HitEVENT::tofHit

Definition at line 420 of file AsciiData.hh.

TOFTRUTH HitEVENT::tofTruth

Definition at line 419 of file AsciiData.hh.

TRACKTRUTH HitEVENT::trackTruth

Definition at line 415 of file AsciiData.hh.

Referenced by BesAsciiIO::SaveHitAsciiEvents(), and BesAsciiIO::SaveTrackTruth().

VERTEXTRUTH HitEVENT::vertexTruth

Definition at line 416 of file AsciiData.hh.

Referenced by BesAsciiIO::SaveHitAsciiEvents(), and BesAsciiIO::SaveVertexTruth().


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