File indexing completed on 2024-04-06 12:21:03
0001 #ifndef OMTF_OMTFinput_H
0002 #define OMTF_OMTFinput_H
0003
0004 #include <vector>
0005 #include <ostream>
0006 #include <bitset>
0007
0008 class XMLConfigReader;
0009 class OMTFConfiguration;
0010
0011 class OMTFinput {
0012 public:
0013 typedef std::vector<int> vector1D;
0014 typedef std::vector<vector1D> vector2D;
0015
0016 OMTFinput(const OMTFConfiguration *);
0017
0018
0019
0020 bool addLayerHit(unsigned int iLayer, unsigned int iInput, int iPhi, int iEta, bool allowOverwrite = true);
0021
0022
0023 void clear();
0024
0025
0026 void readData(XMLConfigReader *aReader, unsigned int iEvent = 0, unsigned int iProcessor = 0);
0027
0028
0029 void shiftMyPhi(int phiShift);
0030
0031
0032
0033 void mergeData(const OMTFinput *aInput);
0034
0035 const OMTFinput::vector1D &getLayerData(unsigned int iLayer, bool giveEta = false) const;
0036
0037 std::bitset<128> getRefHits(unsigned int iProcessor) const;
0038
0039 friend std::ostream &operator<<(std::ostream &out, const OMTFinput &aInput);
0040
0041 OMTFinput &operator+=(const OMTFinput &iInput) {
0042 mergeData(&iInput);
0043 return *this;
0044 }
0045
0046 private:
0047
0048
0049
0050 vector2D measurementsPhi;
0051
0052
0053
0054
0055 vector2D measurementsEta;
0056
0057
0058 mutable vector1D refHitsEta;
0059
0060 const OMTFConfiguration *myOmtfConfig;
0061 };
0062
0063 #endif