//////////////////////////////////////////////////////////////////// // REVISION HISTORY: // 2016-10-19 : M Stringer - Changes to how MCTracks are accessed (PR #1508). //////////////////////////////////////////////////////////////////// #ifndef __RAT_TrackNav__ #define __RAT_TrackNav__ #include #include #include #include namespace RAT { class TrackNav { public: TrackNav(const RAT::DS::Entry *ds, bool verbose=false) { Load(&ds->GetMC(), verbose); }; TrackNav(RAT::DS::MC *mc, bool verbose=false) { Load(mc, verbose); }; void Load(const RAT::DS::MC *mc, bool verbose=false); void Clear(); TrackNode *Head() { return fHead; }; TrackCursor Cursor(bool verbose=false) { return TrackCursor(fHead, verbose); }; TrackNode *FindID(int trackID); TrackNode *FindParticle(const std::string &particleName, bool verbose=false); protected: TrackNode *fHead; std::map fTracks; // Access by Track ID // point to first node of each track }; } // namespace RAT #endif