#include <FillMRCC.h>
Inheritance diagram for Anp::FillMRCC:

Public Member Functions | |
| FillMRCC () | |
| virtual | ~FillMRCC () |
| bool | Run (Record &record, TObject *ptr=0) |
| void | Config (const Registry ®) |
Private Member Functions | |
| const MRCCInfo | Fill (const NtpMREvent &mrevent) const |
Private Attributes | |
| bool | fDebug |
|
|
Definition at line 32 of file FillMRCC.cxx. 00033 :fDebug(true) 00034 { 00035 }
|
|
|
Definition at line 38 of file FillMRCC.cxx. 00039 {
00040 }
|
|
|
Reimplemented from Anp::AlgStore. Definition at line 87 of file FillMRCC.cxx. References fDebug, Registry::KeyExists(), Anp::Read(), and reg. 00088 {
00089
00090 Anp::Read(reg,"FillMRCCDebug",fDebug);
00091 if(reg.KeyExists("PrintConfig"))
00092 {
00093 cout << "FillMRCC::Config" << endl;
00094 cout << "Debug "<<fDebug<< endl;
00095 }
00096 }
|
|
|
||||||||||||
|
Implements Anp::AlgStore. Definition at line 43 of file FillMRCC.cxx. References Anp::Record::Add(), Fill(), Anp::MRCCInfo::infoindex, NtpMRRecord::mrevt, and MSG. 00044 {
00045 //
00046 // Get and fill Monte-Carlo truth and StdHep information
00047 //
00048 const NtpMRRecord* ntmrcc= dynamic_cast<NtpMRRecord *>(ptr);
00049 if(!ntmrcc){
00050 const MomNavigator *mom = dynamic_cast<const MomNavigator *> (ptr);
00051 if(mom)
00052 {
00053 ntmrcc = dynamic_cast<NtpMRRecord *>(mom -> GetFragment("NtpMRRecord"));
00054 if(!ntmrcc)
00055 {
00056 MSG("FillAlg", Msg::kError) << "Failed to find NtpMRRecord pointer 1" << endl;
00057 return false;
00058 }
00059 }
00060 else
00061 {
00062 MSG("FillAlg", Msg::kError) << "Failed to find MomNavigator pointer" << endl;
00063 return false;
00064 }
00065 }
00066 if(!ntmrcc)
00067 {
00068 MSG("FillAlg", Msg::kError) << "Failed to get NtpMRRecord pointer 2" << endl;
00069 return false;
00070 }
00071
00072 TClonesArray& evtTca=*(ntmrcc->mrevt);
00073 // TClonesArray& truTca=*(ntmrcc->mrtru);
00074
00075 const Int_t numEvts=evtTca.GetEntriesFast();
00076 for(int jj=0;jj<numEvts;jj++){
00077 const NtpMREvent& mrccevt= *dynamic_cast<NtpMREvent*>(evtTca[jj]);
00078 MRCCInfo minfo = Fill(mrccevt);
00079 minfo.infoindex = jj;
00080 record.Add(minfo);
00081 }
00082 if(fDebug) cout<<"FillMRCC::Run - End "<<endl;
00083 return true;
00084 }
|
|
|
Definition at line 28 of file FillMRCC.h. Referenced by Config(). |
1.3.9.1