Diana Software
MTimeSort.hh
Go to the documentation of this file.
1 
31 #ifndef _M_TIMESORT_H_
32 #define _M_TIMESORT_H_
33 
34 #include <string>
35 #include <vector>
36 #include <utility>
37 #include "QDriver.hh"
38 #include "QDiana.hh"
39 
40 
41 class MTimeSort : public Diana::QDriver {
42 
43  public:
44  // Init method is called before event loop
45  virtual Action Init(Diana::QEventAssembler& ev);
46 
47  // Doit method is called for each event, getting the event as argument
48  virtual Action Do( Diana::QEventAssembler& ev);
49 
50  // Done method is called after event loop
51  virtual Action Done();
52 
53  private:
55  std::string fOutputFilename;
56 
58  std::vector< std::pair<int, unsigned long long> > fEventVector;
59 
61  int fIndex;
62 
64  int fIteration;
65 
67  int fNumberOfEvents;
68 
71 
73  std::vector<int> fChannelVector;
74 
75 };
76 
77 #endif
Module for sorting events by time.
Definition: MTimeSort.hh:42
int fNumberOfEvents
Number of sorted events.
Definition: MTimeSort.hh:68
int fStartTime
Start time of run.
Definition: MTimeSort.hh:70
virtual Action Done()
Done method is called after event loop.
virtual Action Do(Diana::QEventAssembler &ev)
virtual Action Init(Diana::QEventAssembler &ev)
std::vector< std::pair< int, unsigned long long > > fEventVector
vector to store event number and time
Definition: MTimeSort.hh:58
int fIteration
What iteration are we on?
Definition: MTimeSort.hh:65
std::string fOutputFilename
this is the name of the file where the sorted list is kept
Definition: MTimeSort.hh:55
std::vector< int > fChannelVector
Vector of channel numbers.
Definition: MTimeSort.hh:73
int fIndex
An index to keep track of event.
Definition: MTimeSort.hh:62