/* * PndOnlineHitProducer.h * * Created on: Nov. 14, 2012 * Author: Sean Dobbs (s-dobbs@northwestern.edu) * * Reads in time-sorted hits for further processing, aggregates hits by detector */ #ifndef PNDONLINEHITPRODUCER_H_ #define PNDONLINEHITPRODUCER_H_ #include #include #include #include #include "FairTSBufferFunctional.h" using namespace std; class PndOnlineHitProducer { public: PndOnlineHitProducer() : current_time(0) { // time_gap_functor = new TimeGap(); stop_time_functor = new StopTime(); } ~PndOnlineHitProducer() { delete stop_time_functor; } void LoadStream(int detector_id, char *branch_name); list *GetHits(int detector_id, double delta_t); double GetCurrentTime() { return current_time; } void AdvanceCurrentTime(double delta_t) { current_time += delta_t; } bool SetStartTime(double new_time); private: map< int, TString > input_branches; //multimap< int, TString > input_branches; BinaryFunctor* stop_time_functor; //! //BinaryFunctor* time_gap_functor; //! // internal interface for modifying time // (we may change how time is kept) // does not properly set location in the hit buffer void SetCurrentTime(double new_time) { current_time = new_time; } double current_time; }; #endif