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 <map>
37 #include <utility>
38 #include "QDriver.hh"
39 #include "QDiana.hh"
40 
41 
42 class MTimeSort : public Diana::QDriver {
43 
44  public:
45  // Init method is called before event loop
46  virtual Action Init(Diana::QEventAssembler& ev);
47 
48  // Doit method is called for each event, getting the event as argument
49  virtual Action Do( Diana::QEventAssembler& ev);
50 
51  // Done method is called after event loop
52  virtual Action Done();
53 
54  private:
56 // std::string fOutputFilename;
57 
59  std::map<int,std::vector< std::pair<int, unsigned long long> >> fEventVector;
60 
62  int fIndex;
63 
66 
69 
71  std::map<int,unsigned int> fStartTime;
72 
74  std::map<int,std::vector<int>> fChannelVector;
75 
76  bool fSortByRun;
77 
78 };
79 
80 #endif
Module for sorting events by time.
Definition: MTimeSort.hh:42
int fNumberOfEvents
Number of sorted events.
Definition: MTimeSort.hh:68
std::map< int, unsigned int > fStartTime
Start time of run.
Definition: MTimeSort.hh:71
virtual Action Do(Diana::QEventAssembler &ev)
virtual Action Init(Diana::QEventAssembler &ev)
int fIteration
What iteration are we on?
Definition: MTimeSort.hh:65
std::map< int, std::vector< int > > fChannelVector
Vector of channel numbers.
Definition: MTimeSort.hh:74
std::map< int, std::vector< std::pair< int, unsigned long long > > > fEventVector
this is the name of the file where the sorted list is kept
Definition: MTimeSort.hh:59
virtual Action Done()
Done method is called after event loop.
Definition: MTimeSort.cc:118
bool fSortByRun
Definition: MTimeSort.hh:76
int fIndex
An index to keep track of event.
Definition: MTimeSort.hh:62