MomNavigator Class Reference

#include <MomNavigator.h>

List of all members.

Public Member Functions

 MomNavigator ()
virtual ~MomNavigator ()
void AdoptFragment (TObject *block)
TObject * GetFragment (const char *classname=0, const char *username=0, const char *streamname=0) const
std::vector< TObject * > GetFragmentList (const char *classname=0, const char *username=0, const char *streamname=0) const
TObject * GetFragmentByInputTag (const char *streamname, const char *treename, int treeindex, const char *filename) const
const TObjArray * GetFragmentArray () const
TObject * At (Int_t idx) const
TIter FragmentIter (void) const
Int_t IndexOf (TObject *Fragment)
void Clear (Option_t *option="")
virtual std::ostream & Print (std::ostream &os) const
virtual void Print (Option_t *option="") const

Private Attributes

TObjArray * fFragmentArray

Detailed Description

Definition at line 25 of file MomNavigator.h.


Constructor & Destructor Documentation

MomNavigator::MomNavigator (  ) 

Definition at line 37 of file MomNavigator.cxx.

References Msg::kDebug, and MSG.

00038    : fFragmentArray(0)
00039 {
00040    // Default constructor
00041    MSG("Mom",Msg::kDebug) << "MomNavigator ctor " << this << endl;
00042   
00043    fFragmentArray = new TObjArray;
00044 }

MomNavigator::~MomNavigator (  )  [virtual]

Definition at line 47 of file MomNavigator.cxx.

References fFragmentArray, Msg::kDebug, and MSG.

00048 {
00049    // delete all the owned sub-objects
00050    MSG("Mom",Msg::kDebug) << "MomNavigator dtor " << this << "\n" 
00051                           << *this << endl;
00052    if (fFragmentArray) fFragmentArray->Delete();//delete owned Fragments
00053    delete fFragmentArray;
00054 }


Member Function Documentation

void MomNavigator::AdoptFragment ( TObject *  block  ) 
TObject * MomNavigator::At ( Int_t  idx  )  const

Definition at line 65 of file MomNavigator.cxx.

References fFragmentArray.

Referenced by DemoSnarlList::Ana(), AltDeMuxDisplay::Ana(), DemoEventDump::DumpRawData(), main(), and DemuxFast::Reco().

00066 {
00067    // return pointer to the i-th Fragment 
00068    
00069    return fFragmentArray->At(idx);
00070 }

void MomNavigator::Clear ( Option_t *  option = ""  ) 

Definition at line 254 of file MomNavigator.cxx.

References fFragmentArray, RecRecord::GetTempTags(), RecMinos::GetTempTags(), RecRecord::IsPerOwned(), RecMinos::IsTransient(), RecRecord::IsTransient(), Msg::kDebug, Msg::kVerbose, MSG, and reg.

Referenced by ReadDispatcherModule::Get(), MCMerge::GrabStreamEvents(), DDSChildServer::Next(), JobCRecord::Reset(), SpillTimeCreateKeyFile(), MomValidate::TestMomNavigatorClear(), and JobC::~JobC().

00255 {
00256    // Clear out all transient records 
00257    //
00258    // Since, *currently*, MomNavigator _owns_ the things in it's list
00259    // then it should be responsible for deleting the heap based objects
00260    // eventually when it is just a means of associating the objects
00261    // then that responsibility might change
00262 
00263   if ( !fFragmentArray ) return;
00264   MSG("Mom",Msg::kVerbose) << "MomNavigator::Clear. Mom contents at entry:\n" 
00265                            << *this << endl;
00266   
00267   // "optstr" is the string we'll match against.
00268   // Check if special additional flag is present, if it is remove it
00269   // and set the flag.
00270   TString optstr(opt);
00271   bool forceTransient = false;
00272   const TString fstring("?forceTransient");
00273   Ssiz_t ipos = optstr.Index(fstring);
00274   if ( ipos >= 0 ) {
00275     forceTransient = true;
00276     optstr.Remove(ipos,fstring.Length());
00277   }
00278 
00279   for ( int idx = fFragmentArray->GetEntriesFast()-1; idx >= 0; idx-- ) {
00280      TObject* fragment = fFragmentArray->At(idx);
00281      if ( !fragment ) continue;
00282 
00283      RecMinos* recminos = dynamic_cast<RecMinos*>(fragment);
00284      RecRecord* recrecord = dynamic_cast<RecRecord*>(fragment);
00285 
00286      // RWH 2010-01-13
00287      // If given a non-blank opt value, only drop fragments that match
00288      // that criteria based on stream, treename, 
00289      if ( optstr != "" ) {
00290        int ismatch = 0;
00291        TString fragClassName(fragment->ClassName());
00292        TString fragUserName(fragment->GetName());
00293 
00294        const Registry* reg = 0;
00295        if      (recminos)  reg = &(recminos->GetTempTags());
00296        else if (recrecord) reg = &(recrecord->GetTempTags());
00297        TString fragStream;
00298        const char* tmp = 0;
00299        if ( reg->Get("stream",tmp)) fragStream = tmp;
00300 
00301        if ( optstr == fragClassName ) ismatch = 0x01;
00302        if ( optstr == fragUserName  ) ismatch = 0x02;
00303        if ( optstr == fragStream    ) ismatch = 0x04;
00304        MSG("Mom",Msg::kDebug) << "MomNavigator::Clear(\"" << optstr << "\") "
00305                               << " class=\"" << fragClassName << "\""
00306                               << " user=\"" << fragUserName << "\""
00307                               << " stream=\"" << fragStream << "\""
00308                               << " ismatch=" << ismatch
00309                               << endl;
00310        if ( ismatch == 0 ) continue;  // not a match, don't drop fragment
00311        MSG("Mom",Msg::kDebug) << "drop the fragment" << endl;
00312      }
00313 
00314 
00315      bool isTransient = true;
00316      bool isPerOwned = false;
00317      if ( recminos ) {
00318        isTransient = recminos->IsTransient();
00319      }
00320      else if ( recrecord ) {
00321        isTransient = recrecord->IsTransient();
00322        isPerOwned = recrecord->IsPerOwned();
00323      }
00324      if ( isTransient || forceTransient ) {
00325        fFragmentArray->RemoveAt(idx); // remove does not delete object
00326        // If fragment is owned by persistency, only remove it from list
00327        if ( fragment && !isPerOwned ) delete fragment; 
00328        fragment = 0;
00329      }
00330    }
00331    fFragmentArray->Compress();
00332   
00333    MSG("Mom",Msg::kVerbose) << "MomNavigator::Clear. Mom contents at exit:\n"
00334                             << *this << endl;
00335 
00336 }

TIter MomNavigator::FragmentIter ( void   )  const

Definition at line 73 of file MomNavigator.cxx.

References fFragmentArray.

Referenced by CompareToReroot::Ana(), ScintHitTruthModule::Ana(), FiltTriggerPrescale::Ana(), DumpBadElectronics::Ana(), NueHandScan::Ana(), FillBadChannelDB::Ana(), FarDetRawRateDump::Ana(), PrintStat::Ana(), NueDisplayModule::Ana(), FiltMBSpillModule::Ana(), WriteStdHepFileModule::Ana(), SimCheck::Ana(), ScintHitAna::Ana(), FiltSGateModule::Ana(), BDUniquifyTestModule::Ana(), DDSPaceModule::Ana(), CustomLightInjector::Ana(), NueSensitivity::Ana(), NoiseFilterModule::Ana(), MSTTemplate::Ana(), FillNearRunQuality::Ana(), FarDetVarcErrorsDump::Ana(), PulserTimingMaker::Ana(), NuePrint::Ana(), CompareMD::Ana(), NueRead::Ana(), FarDetRawDigitDump::Ana(), DetSim::Ana(), RawRecCounts::Ana(), PulserDDSCheck::Ana(), NueReadTJPID::Ana(), LightInjector::Ana(), CompareMST::Ana(), NueReadwPID::Ana(), FarDetTpSinglesDump::Ana(), CompareAll::Ana(), PEGainModule::DoMeanSigmaFromData(), DataUtil::dump_mom(), DemoEventDump::DumpCandRecords(), CDTruthifier::ExtractAllCandStripHandles(), CDTruthifier::ExtractAllDigiScintHits(), HepevtModule::FindOrCreateSimSnarlRecord(), RerootFlsDigitToDigiPE::Get(), DDSChildServer::Get(), FillFarRunQuality::Get(), FillSpillServerMon::Get(), RerootToTruthModule::Get(), FillHvFromSingles::Get(), PhotonInjector::Get(), DetSim::Get(), PhotonTransport::Get(), DataUtil::GetRawBlocks(), DataUtil::GetRawHeader(), DataUtil::GetRecords(), Blinder::GetTruth(), BDUniquify::GetUniqueBlocks(), PEGainModule::MakeDebugTree(), PEGainModule::MakeHistosFromData(), RotoServer::ProcessBuffer(), MCNNMergeModule::Reco(), FixModule::Reco(), RecordSetupModule::Reco(), OltDataIntegrity::Reco(), OltTimeScan::Reco(), OltNewModule::Reco(), OltEnds::Reco(), PulserDBModule::Reco(), NueReweight::Reco(), FarDetDataQualityModule::Reco(), OltRawLI::Reco(), OltBlockScan::Reco(), TrimModule::Reco(), OltTimePlot::Reco(), NueBeamMonModule::Reco(), FilterPID::Reco(), PulserSummaryModule::Reco(), ValVtxModule::Reco(), DataQualityReader::Reco(), Truthifier::Reset(), PerValidate::StreamMgrFileChangeSeq(), PerValidate::StreamMgrParallelFileSeq(), PerValidate::StreamMgrSelectionSeq(), PerValidate::StreamMgrSkipByThreeSeq(), PerValidate::StreamMgrSkipByTwoSeq(), PerValidate::StreamMgrTagsSeq(), PerValidate::StreamMgrTagsSeqZigZag(), and OltNewModule::WriteMom().

00074 {
00075    // return an iter over the Fragments
00076    
00077    return TIter(fFragmentArray);
00078 }

TObject * MomNavigator::GetFragment ( const char *  classname = 0,
const char *  username = 0,
const char *  streamname = 0 
) const

Definition at line 89 of file MomNavigator.cxx.

References fFragmentArray, and Nav::kBoth.

Referenced by AltDeMuxModule::Ana(), CondensedNtpModule::Ana(), DataQualityFilter::Ana(), LIStreamHunter::Ana(), MCAnalysis::Ana(), ScintCalModule::Ana(), AtNuTreeModule::Ana(), DmxDeMuxModule::Ana(), FCPCFilterModule::Ana(), MergeEvent::Ana(), CalDet2003PlotsModule::Ana(), MCMonitorCosmic::Ana(), ShieldPlankListModule::Ana(), FarDetSliceListModule::Ana(), MNtpModule::Ana(), NueDisplayModule::Ana(), UberPlotsModule::Ana(), NuDemoModule::Ana(), SelectSpillTriggers::Ana(), RemoveMuon::Ana(), FilterLIModule::Ana(), CDAnaModule::Ana(), ChopModule::Ana(), CondensedNtpModuleAtm::Ana(), EvtAddRawDigitBlockModule::Ana(), ParticleDisplay::Ana(), RawLILooker::Ana(), AtNuDisplayModule::Ana(), FarDetDataQualityModule::Ana(), FarDetDeadChipModule::Ana(), NtpMaker::Ana(), DataQualityReader::Ana(), FitTrackMSListModule::Ana(), GenieModule::Ana(), HepevtModule::Ana(), NuModule::Ana(), PreFilter::Ana(), ToyMCModule::Ana(), ClockCalibrationModule::Ana(), CondensedNtpModuleNC::Ana(), FarDetShieldPlankListModule::Ana(), MakeAlignmentModule::Ana(), PlotMuonClusterModule::Ana(), RecoTreeModule::Ana(), RerootToTruthModule::Ana(), DatabaseToucher::Ana(), DmxDeMuxCosmicsModule::Ana(), FarDetStripListModule::Ana(), SelectSpillTimes::Ana(), TrackDirectionModule::Ana(), CandDigitModule::Ana(), CDPreFilterModule::Ana(), FiltCosmicModule::Ana(), FitTrackCamAnalysisModule::Ana(), PhotonTransport::Ana(), StripCands::Ana(), AltDeMuxDisplay::Ana(), CDTrackerModule::Ana(), DummyModule::Ana(), MeuCalModule::Ana(), CheezyDisplayModule::Ana(), LISummaryAnalyser::Ana(), MCMonitorBeam::Ana(), ParticleFilterModule::Ana(), AlgFitTrackCam::CleanNDLists(), GfxMCVecList::Configure(), GfxTrackList::Configure(), PEGainModule::DoMeanSigmaFromData(), PEGainModule::DoMeanSigmaFromRawSums(), PEGainModule::DoMeanSigmaFromSums(), DataUtil::dump_mom(), Mint::DumpMom(), TruthHelper::EventCompletenessImp(), GfxDigitList::ExecuteEvent(), GfxStripList::ExecuteEvent(), DbuDaqFileModule::ExtractRunAndFile(), NtpMCModule::FillNtpMCTruth(), UberDST::Get(), DigitListModule::Get(), Cutter::Get(), RecordSetupModule::Get(), UberModule::Get(), AutoPIDMaker::Get(), UberModuleLite::Get(), NtpStModule::Get(), TruthHelper::GetBestEventNeuMatch(), TruthHelper::GetBestShowerNeuMatch(), TruthHelper::GetBestSliceNeuMatch(), TruthHelper::GetBestTrackIdMatch(), DataUtil::GetCandHeader(), DataUtil::GetCandidate(), TruthHelper::GetClosestNeuVtx(), MCint::GetData(), ScintCalEvent::GetDate(), DataUtil::GetDetector(), MadBase::GetEntry(), Blinder::GetInfo(), ScintCalEvent::GetLongestTrack(), TruthHelper::GetNeuId(), TruthHelper::GetNeuKinIndex(), TruthHelper::GetNextNeuId(), EVD::GetNumEvents(), EVD::GetNumSlices(), TruthHelper::GetP4El1(), TruthHelper::GetP4Mu1(), TruthHelper::GetP4Mu2(), TruthHelper::GetP4Neu(), TruthHelper::GetP4Shw(), ScintCalEvent::GetPHOfStrip(), ScintCalEvent::GetPlaneOfStrip(), LISummaryModule::GetPulserBlocks(), DataUtil::GetRunSnarlEvent(), TruthHelper::GetStripNeuIndex(), TruthHelper::GetTrackMaxE(), TruthHelper::GetTrackMaxE2(), TruthHelper::GetTrackMinE(), TruthHelper::GetTrackMinE2(), DataUtil::GetUgliGeomHandle(), ScintCalEvent::GetVldCntxt(), TruthHelper::IsPrimaryShowerPart(), ScintCalEvent::LISnarl(), main(), PEGainModule::MakeDebugTree(), PEGainModule::MakeHistosFromData(), TruthHelper::NumNeu(), ScintCalEvent::NumTracks(), CDTruthifier::ParticleMomentum(), TridModelMaker::Prepare(), EVD::ReadCandEvent(), EVD::ReadCandSlice(), AtNuFindModule::Reco(), ClusterSRListModule::Reco(), DmxDeMuxCosmicsModule::Reco(), NueModule::Reco(), ParticleTruthMaker::Reco(), DigitListModule::Reco(), FitShowerEMListModule::Reco(), LISummaryModule::Reco(), NtpFitSAModule::Reco(), TrackCamListModule::Reco(), DeMuxDigitListModule::Reco(), DemuxFast::Reco(), NtpEMModule::Reco(), RecordSetupModule::Reco(), ShowerSRListModule::Reco(), FarDetShieldPlankListModule::Reco(), FilterDigitListModule::Reco(), FitTrackSRListModule::Reco(), NtpBDLiteModule::Reco(), PulserFromRawModule::Reco(), CalDetSIModule::Reco(), PulserFromRawCollectorModule::Reco(), BiggestChopModule::Reco(), FarDetEventModule::Reco(), NtpSRModule::Reco(), NtpStTrimmer::Reco(), ParticleFinder::Reco(), ParticleReport::Reco(), PurgeCandidateModule::Reco(), RemoveMuon::Reco(), RerootToRawDataModule::Reco(), SpillTypeFilter::Reco(), VtxModule::Reco(), Cluster3DModule::Reco(), FitTrackCamListModule::Reco(), FitTrackMSListModule::Reco(), PulserDBModule::Reco(), EvtAddRawDigitBlockModule::Reco(), FarDetDataQualityModule::Reco(), FarDetStripListModule::Reco(), FitTrackSAListModule::Reco(), PulserCollectorModule::Reco(), SliceFromChopModule::Reco(), ChopModule::Reco(), DmxDeMuxFilterModule::Reco(), FillPIDFromText::Reco(), MnvRawDigitSuppression::Reco(), NtpCluster3DModule::Reco(), NtpSRFilterModule::Reco(), NtpStFilterModule::Reco(), StripSRListModule::Reco(), AltDeMuxModule::Reco(), AutoPIDMaker::Reco(), NtpMCModule::Reco(), AtmosShowerListModule::Reco(), NtpMRModule::Reco(), TrackSRListModule::Reco(), AtNuFitModule::Reco(), ShieldPlankListModule::Reco(), ShowerEMListModule::Reco(), DemoRecordModule::Reco(), MergeEvent::Reco(), PulserFromRawFilterModule::Reco(), StripCands::Reco(), UberModule::Reco(), EventSRListModule::Reco(), NtpTHModule::Reco(), PTSimModule::Reco(), PulserQDP::Reco(), SliceSRListModule::Reco(), SubShowerSRListModule::Reco(), DataQualityReader::Reco(), FarDetSliceListModule::Reco(), UberModuleLite::Reco(), CDTruthifier::RecoStdHep(), PulserCollectorModule::ReferencePointReco(), PulserFromRawCollectorModule::ReferencePointReco(), AlgEventSR::RunAlg(), AlgRmMu::RunAlg(), AlgCalDetPID::RunAlg(), AlgCalDetSI::RunAlg(), ScintCalTrack::ScintCalTrack(), TruthHelper::secondNEU(), TruthHelper::ShowerCompletenessImp(), PreFilter::SimCheck(), TruthHelper::SliceCompleteness(), TruthHelper::SliceCompleteness_MaxTimeGap(), TruthHelper::SliceCompleteness_xtalk(), TruthHelper::SliceTrueStrip(), TruthHelper::SliceTrueStripxtalk(), AlgTrackSRList::SpectrometerTracking(), SRMom::SRMom(), TruthHelper::StripPurity(), TruthHelper::Stripxtalk(), TruthHelper::TrackCompleteness(), TruthHelper::TrackPurity(), ScintCalEvent::Trigger(), TruthHelper::TrueNeuE(), TruthHelper::TruthSliceNum(), MCText::Update(), MCVectors::Update(), CheezyPage::Update(), MCTree::Update(), EVD::UpdateChargeHists(), and EVD::UpdateSummary().

00091                                                                  {
00092 // Returns the first selected fragment.  If classname is a null ptr or
00093 // blank string, no class selection is done.  Any classname selection
00094 // is done by testing on the InheritsFrom() boolean, rather than
00095 // requiring agreement with the final derived class name.  The username
00096 // is optional, but, if filled, will further qualify the selection by
00097 // requiring agreement with the GetName() method of the fragment.  Note
00098 // that TNamed and TCollection objects both have SetName() methods to
00099 // allow the user to set a customized name.  General TObjects do not
00100 // have the SetName() method and default to the GetName() name returned
00101 // by the associated TClass object, i.e., the final derived class name.
00102 // If the fragment is a Record then the name of the input stream it
00103 // came from can be tested; non-Record objects will skip this test
00104 // (i.e. treated as always matched).
00105 
00106    TString classtr("");
00107    if (classname)
00108      classtr.Append(TString(classname).Strip(TString::kBoth));
00109    TString userstr("");
00110    if (username)
00111      userstr.Append(TString(username).Strip(TString::kBoth));
00112    TString streamstr("");
00113    if (streamname)
00114      streamstr.Append(TString(streamname).Strip(TString::kBoth));
00115 
00116    TIter fiter(fFragmentArray);
00117    TObject* fragment = 0;
00118    while ((fragment = fiter())) {
00119 
00120 // First check whether Fragment InheritsFrom "classname"
00121      if (classtr.IsNull() || fragment->IsA()->InheritsFrom(classtr)) {
00122 
00123 // Then check whether Fragment name equals "username"
00124        if (userstr.IsNull() || (userstr == fragment->GetName())) {
00125 
00126          // early out if no request of stream name match
00127          if (streamstr.IsNull()) return fragment;
00128 
00129 // Finally test the stream name (if it exists, and can be determined)
00130          Registry* iotags = 0;
00131          if ( RecMinos* record = dynamic_cast<RecMinos*>(fragment) ) {
00132            iotags = &(record->GetTempTags());
00133          }
00134          else if ( RecRecord* record = dynamic_cast<RecRecord*>(fragment) ) {
00135            iotags = &(record->GetTempTags());
00136          }
00137          if ( iotags ) {
00138            const char* tagstream = 0;
00139            if (iotags -> Get("stream",tagstream) 
00140                && strcmp(streamname,tagstream) == 0 ) return fragment;
00141          }
00142        }  // match username
00143      }  // match classname
00144    }  // loop over fragments
00145    return 0;
00146 }

const TObjArray* MomNavigator::GetFragmentArray (  )  const [inline]
TObject * MomNavigator::GetFragmentByInputTag ( const char *  streamname,
const char *  treename,
int  treeindex,
const char *  filename 
) const

Definition at line 217 of file MomNavigator.cxx.

References fFragmentArray, and Registry::Get().

00218                                                                        {
00219 // Returns the selected fragment matching the specified input tags.  Null
00220 // is returned if none found.
00221 
00222    TIter fiter(fFragmentArray);
00223    TObject* fragment;
00224    while ((fragment = fiter())) {
00225      Registry* iotags = 0;
00226      if ( RecMinos* record = dynamic_cast<RecMinos*>(fragment) ) {
00227        iotags = &(record->GetTempTags());
00228      }
00229      else if ( RecRecord* record = dynamic_cast<RecRecord*>(fragment) ) {
00230        iotags = &(record->GetTempTags());
00231      }
00232      if ( iotags ) {
00233        const char* tagstream = 0;
00234        if(iotags->Get("stream",tagstream) && strcmp(streamname,tagstream)==0) {
00235          const char* tagtree = 0;
00236          if (iotags -> Get("tree",tagtree) && strcmp(treename,tagtree)==0 ) {
00237            int tagindex = -1;
00238            if (iotags -> Get("index",tagindex) && tagindex == treeindex ) {
00239              const char* tagfile = 0;
00240              if (iotags -> Get("file",tagfile) && strcmp(filename,tagfile)==0){
00241                return fragment;
00242              }
00243            }
00244          }
00245        }
00246      }
00247    }  // loop over fragments
00248 
00249    return 0; // no matching fragment found
00250 }

std::vector< TObject * > MomNavigator::GetFragmentList ( const char *  classname = 0,
const char *  username = 0,
const char *  streamname = 0 
) const

Definition at line 149 of file MomNavigator.cxx.

References fFragmentArray, and Nav::kBoth.

Referenced by ParticleDisplay::Ana(), MCMerge::GrabStreamEvents(), NueModule::Reco(), ParticleTruthMaker::Reco(), ParticleFinder::Reco(), ParticleReport::Reco(), ParticlePIDSaver::Reco(), ParticleAna::Reco(), PIDEval::Reco(), SystematicGains::Reco(), PETrimmer::Reco(), SetKNNModule::Reco(), AnaTrim::Reco(), and XTalkFilter::Reco().

00151                                                                                   {
00152 // Returns the list of selected fragments satisfying the argument list.
00153 // If classname is a null ptr or
00154 // blank string, no class selection is done.  Any classname selection
00155 // is done by testing on the InheritsFrom() boolean, rather than
00156 // requiring agreement with the final derived class name.  The username
00157 // is optional, but, if filled, will further qualify the selection by
00158 // requiring agreement with the GetName() method of the fragment.  Note
00159 // that TNamed and TCollection objects both have SetName() methods to
00160 // allow the user to set a customized name.  General TObjects do not
00161 // have the SetName() method and default to the GetName() name returned
00162 // by the associated TClass object, i.e., the final derived class name.
00163 // If the fragment is a Record then the name of the input stream it
00164 // came from is tested and compared to the specified streamname (optional).
00165 //
00166 
00167    std::vector<TObject*> fragmentList;
00168   
00169    TString classtr("");
00170    if (classname)
00171      classtr.Append(TString(classname).Strip(TString::kBoth));
00172    TString userstr("");
00173    if (username)
00174      userstr.Append(TString(username).Strip(TString::kBoth));
00175    TString streamstr("");
00176    if (streamname)
00177      streamstr.Append(TString(streamname).Strip(TString::kBoth));
00178 
00179    TIter fiter(fFragmentArray);
00180    TObject* fragment = 0;
00181    while ((fragment = fiter())) {
00182 
00183 // First check whether Fragment InheritsFrom "classname"
00184      if (classtr.IsNull() || fragment->IsA()->InheritsFrom(classtr)) {
00185        // meets classname criteria
00186        if (userstr.IsNull() || (userstr == fragment->GetName())) {
00187          // meets username criteria
00188          if ( streamstr.IsNull() ) {
00189            // No request of stream name match
00190            fragmentList.push_back(fragment);
00191          }
00192          else {
00193            // Test the stream name (if it exists, and can be determined)
00194            Registry* iotags = 0;
00195            if ( RecMinos* record = dynamic_cast<RecMinos*>(fragment) ) {
00196              iotags = &(record->GetTempTags());
00197            }
00198            else if ( RecRecord* record = dynamic_cast<RecRecord*>(fragment) ) {
00199              iotags = &(record->GetTempTags());
00200            }
00201            if ( iotags ) {
00202              const char* tagstream = 0;
00203              if (iotags -> Get("stream",tagstream) 
00204                  && strcmp(streamname,tagstream) == 0 ) {
00205                fragmentList.push_back(fragment);
00206              }
00207            }
00208          }
00209        }  // match username
00210      }  // match classname
00211    }  // loop over fragments
00212    return fragmentList;
00213 }

Int_t MomNavigator::IndexOf ( TObject *  Fragment  ) 

Definition at line 81 of file MomNavigator.cxx.

References fFragmentArray.

00082 {
00083    // return the index of this object (if contained in the list)
00084    
00085    return fFragmentArray->IndexOf(Fragment);
00086 }

void MomNavigator::Print ( Option_t *  option = ""  )  const [virtual]

Definition at line 401 of file MomNavigator.cxx.

References Print().

00401                                                      {
00402   //
00403   //  Purpose:  Print header in form supported by TObject::Print.
00404   //
00405   //  Arguments: option (not used)
00406   //
00407   //  Return:  none.
00408   //
00409   //  Contact:   S. Kasahara
00410   // 
00411 
00412   Print(std::cout);
00413   return;
00414 
00415 }

std::ostream & MomNavigator::Print ( std::ostream &  os  )  const [virtual]

Definition at line 338 of file MomNavigator.cxx.

References fFragmentArray, Registry::Get(), and GetVldContext().

Referenced by operator<<(), and Print().

00338                                                     {
00339   //
00340   //  Purpose:  Print brief listing of mom contents on ostream.
00341   //
00342   //  Arguments: os ostream to display on.
00343   //
00344   //  Return:  ostream reference.
00345   //
00346   //  Contact:   S. Kasahara
00347   // 
00348 
00349   assert(fFragmentArray);
00350   
00351   Int_t nent = fFragmentArray->GetEntriesFast();
00352   if ( nent <= 0 ) {
00353     os << "Mom has no entries." << endl;
00354     return os;
00355   }
00356   
00357   os << "Mom contents listed by array index:" << endl;
00358   for (int idx = 0; idx < nent; idx++) {
00359     TObject* fragment = fFragmentArray->At(idx);
00360     if ( !fragment ) {
00361       os << idx << ")No object.";
00362     }
00363     else {
00364       os << idx << ")" << fragment->ClassName();
00365       Registry* iotags = 0;
00366       bool isTransient = true;
00367       bool isPerOwned = false;
00368       if ( RecMinos* record = dynamic_cast<RecMinos*>(fragment) ) {
00369         iotags = &(record->GetTempTags());
00370         isTransient = record -> IsTransient();
00371         const VldContext& vldc = record -> GetHeader() -> GetVldContext();
00372         os << " " <<  vldc;
00373       }
00374       else if ( RecRecord* record = dynamic_cast<RecRecord*>(fragment) ) {
00375         iotags = &(record->GetTempTags());
00376         isTransient = record -> IsTransient();
00377         isPerOwned = record -> IsPerOwned();
00378         const VldContext& vldc = (record -> GetHeader()).GetVldContext();
00379         os << " " << vldc;
00380       }
00381 
00382       if ( strcmp(fragment->GetName(),"") ) {
00383         os << ", TNamed " << fragment->GetName();
00384       }
00385       if ( iotags ) {
00386         const char* tagstream = 0;
00387         if(iotags->Get("stream",tagstream)) {
00388           os << ", InputStream " << tagstream;
00389         }
00390       }
00391       os << (( isTransient ) ? ", isTransient " : ", isNotTransient ");
00392       os << (( isPerOwned ) ? ", isPerOwned " : ", isNotPerOwned ");
00393     }
00394     os << endl;
00395   }
00396 
00397   return os;
00398 
00399 }


Member Data Documentation

TObjArray* MomNavigator::fFragmentArray [private]

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

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1