MomValidate Class Reference

#include <MomValidate.h>

List of all members.

Public Member Functions

 MomValidate ()
virtual ~MomValidate ()
bool TestMomNavigatorClear (void)
bool RunAllTests (void)

Detailed Description

Definition at line 13 of file MomValidate.h.


Constructor & Destructor Documentation

MomValidate::MomValidate (  ) 

Definition at line 29 of file MomValidate.cc.

00029                           {
00030   //
00031   //  Purpose:  Default constructor.
00032   //
00033   //  Arguments: none.
00034   //
00035   //  Return:    n/a.
00036 
00037 }

MomValidate::~MomValidate (  )  [virtual]

Definition at line 39 of file MomValidate.cc.

00039                           {
00040   //
00041   //  Purpose:  Destructor.
00042   //
00043 
00044 }


Member Function Documentation

bool MomValidate::RunAllTests ( void   ) 

Definition at line 86 of file MomValidate.cc.

References TestMomNavigatorClear().

Referenced by main().

00086                               {
00087   //
00088   //  Purpose:  Run sequence of MinosObjectMap package validity tests.
00089   //
00090   //  Arguments: none.
00091   //
00092   //  Return:    pass (if all tests successful) or fail
00093   //
00094 
00095   bool allPassed = true;
00096 
00097   cout << "*** TestMomNavigatorClear *** " << endl;
00098   if ( this -> TestMomNavigatorClear() ) cout << "*** Passed ***" << endl;
00099   else {
00100     cout << "*** Failed ***" << endl;
00101     allPassed = false;
00102   }
00103 
00104   return allPassed;
00105 
00106 }

bool MomValidate::TestMomNavigatorClear ( void   ) 

Definition at line 46 of file MomValidate.cc.

References MomNavigator::AdoptFragment(), MomNavigator::Clear(), and MomNavigator::GetFragmentArray().

Referenced by RunAllTests().

00046                                         {
00047   //
00048   //  Purpose:  Test MomNavigator::Clear() method
00049   //
00050   //  Contact:   S. Kasahara
00051   // 
00052 
00053   MomNavigator mom;
00054   RecMinos* record = new RecMinos();
00055   mom.AdoptFragment(record);
00056   RecMinos* record2 = new RecMinos();
00057   mom.AdoptFragment(record2);
00058   RecRecordImp<RecHeader>* record3 = new RecRecordImp<RecHeader>();
00059   mom.AdoptFragment(record3);
00060   RecRecordImp<RecHeader>* record4 = new RecRecordImp<RecHeader>();
00061   mom.AdoptFragment(record4);
00062   cout << "After fill of 4 transient records, mom has:" << endl;
00063   mom.GetFragmentArray()->Print();
00064   mom.Clear();
00065   cout << "Post clear:" << endl;
00066   mom.GetFragmentArray()->Print();
00067 
00068   record = new RecMinos(); 
00069   mom.AdoptFragment(record);
00070   record2 = new RecMinos(); record2 -> SetTransient(false);
00071   mom.AdoptFragment(record2);
00072   record3 = new RecRecordImp<RecHeader>(); 
00073   mom.AdoptFragment(record3);
00074   record4 = new RecRecordImp<RecHeader>(); record4 -> SetTransient(false);
00075   mom.AdoptFragment(record4);
00076   cout << "After fill of 4 records, 2nd & 4th are permanent:" << endl;
00077   mom.GetFragmentArray()->Print();
00078   mom.Clear();
00079   cout << "Post clear:" << endl;
00080   mom.GetFragmentArray()->Print();
00081   
00082   return true;
00083 
00084 }


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1