CMS 3D CMS Logo

OMTFinput.h
Go to the documentation of this file.
1 #ifndef OMTF_OMTFinput_H
2 #define OMTF_OMTFinput_H
3 
4 #include <vector>
5 #include <ostream>
6 #include <bitset>
7 
8 class XMLConfigReader;
10 
11 class OMTFinput{
12 
13  public:
14 
15  typedef std::vector<int> vector1D;
16  typedef std::vector<vector1D> vector2D;
17 
19 
22  bool addLayerHit(unsigned int iLayer,
23  unsigned int iInput,
24  int iPhi, int iEta, bool allowOverwrite=true);
25 
27  void clear();
28 
30  void readData(XMLConfigReader *aReader,
31  unsigned int iEvent=0,
32  unsigned int iProcessor=0);
33 
35  void shiftMyPhi(int phiShift);
36 
39  void mergeData(const OMTFinput *aInput);
40 
41  const OMTFinput::vector1D & getLayerData(unsigned int iLayer, bool giveEta=false) const;
42 
43  std::bitset<128> getRefHits(unsigned int iProcessor) const;
44 
45  friend std::ostream & operator << (std::ostream &out, const OMTFinput & aInput);
46 
47  OMTFinput & operator += (const OMTFinput & iInput) { mergeData(&iInput); return *this; }
48 
49  private:
50 
54  vector2D measurementsPhi;
55 
59  vector2D measurementsEta;
60 
62  mutable vector1D refHitsEta;
63 
65 
66 };
67 
68 
69 #endif
bool addLayerHit(unsigned int iLayer, unsigned int iInput, int iPhi, int iEta, bool allowOverwrite=true)
Definition: OMTFinput.cc:46
void clear()
Reset vectors with data.
Definition: OMTFinput.cc:95
vector2D measurementsEta
Definition: OMTFinput.h:59
void mergeData(const OMTFinput *aInput)
Definition: OMTFinput.cc:80
const OMTFConfiguration * myOmtfConfig
Definition: OMTFinput.h:64
void shiftMyPhi(int phiShift)
Apply shift to all data.
Definition: OMTFinput.cc:105
friend std::ostream & operator<<(std::ostream &out, const OMTFinput &aInput)
Definition: OMTFinput.cc:126
std::vector< int > vector1D
Definition: OMTFinput.h:15
std::vector< vector1D > vector2D
Definition: OMTFinput.h:16
const OMTFinput::vector1D & getLayerData(unsigned int iLayer, bool giveEta=false) const
Definition: OMTFinput.cc:19
vector1D refHitsEta
RefHitsEta.
Definition: OMTFinput.h:62
int iEvent
Definition: GenABIO.cc:224
OMTFinput(const OMTFConfiguration *)
Definition: OMTFinput.cc:11
std::bitset< 128 > getRefHits(unsigned int iProcessor) const
Definition: OMTFinput.cc:27
void readData(XMLConfigReader *aReader, unsigned int iEvent=0, unsigned int iProcessor=0)
Read data from a XML file.
Definition: OMTFinput.cc:70
vector2D measurementsPhi
Definition: OMTFinput.h:54
OMTFinput & operator+=(const OMTFinput &iInput)
Definition: OMTFinput.h:47