FairRoot/PandaRoot
PndMQHitsEventBuilder.h
Go to the documentation of this file.
1 /*
2  * PndMQHitsEventBuilder.h
3  *
4  * Created on: 21.10.2015
5  * Author: Stockmanns
6  */
7 
8 #ifndef MVD_MVDOFFLINETBANALYSIS_TOPIX4_MQ_PNDMQHITSEVENTBUILDER_H_
9 #define MVD_MVDOFFLINETBANALYSIS_TOPIX4_MQ_PNDMQHITSEVENTBUILDER_H_
10 
11 #include <vector>
12 #include <array>
13 
14 #include "PndSdsHit.h"
15 
16 using namespace std;
17 
19 public:
20  PndMQHitsEventBuilder(int nChannels = 4);
21  virtual ~PndMQHitsEventBuilder();
22 
23  void AddData(vector<vector<vector<PndSdsHit> > >& data);
24  vector<vector<PndSdsHit> > GetEvents();
25  vector<int> GetSensorsInEvent(){ return fSensorsInEvent;}
26  std::vector<int> GetInputDataLevel(){
27  std::vector<int> result;
28  for (auto& channelIter : fInputData){
29  result.push_back(channelIter.size());
30  }
31  return result;
32  }
33 
34 protected:
35  vector<bool> GetChannelsInEvent(vector<vector<PndSdsHit> >& eventData);
36  int FindFirstChannel(vector<vector<PndSdsHit> >& eventData);
37  vector<PndSdsHit> GetNextEvent();
38  vector<int> fSensorsInEvent;
39 
40 
41  bool HasData();
42 
43 
44 private:
45  vector<vector<vector<PndSdsHit> > > fInputData; //< array of InputChannels. An InputChannel contains PndSdsHits grouped in events
48 };
49 
50 #endif /* MVD_MVDOFFLINETBANALYSIS_TOPIX4_MQ_PNDMQHITSEVENTBUILDER_H_ */
vector< vector< vector< PndSdsHit > > > fInputData
std::vector< int > GetInputDataLevel()
vector< int > GetSensorsInEvent()