File indexing completed on 2024-04-06 12:04:38
0001 #ifndef DataFormats_L1DataEmulRecord_h
0002 #define DataFormats_L1DataEmulRecord_h
0003
0004
0005
0006
0007
0008
0009
0010 #include <ostream>
0011 #include <vector>
0012 #include <array>
0013
0014 #include "DataFormats/L1Trigger/interface/L1DataEmulDigi.h"
0015
0016 class L1DataEmulRecord {
0017 public:
0018 static const int DEnsys = 12;
0019 typedef std::vector<L1DataEmulDigi> L1DEDigiCollection;
0020
0021 L1DataEmulRecord();
0022 L1DataEmulRecord(bool evt_match,
0023 bool sys_comp[DEnsys],
0024 bool sys_match[DEnsys],
0025 int nCand[DEnsys][2],
0026 const L1DEDigiCollection&,
0027 const GltDEDigi&);
0028 L1DataEmulRecord(bool evt_match,
0029 std::array<bool, DEnsys> const& sys_comp,
0030 std::array<bool, DEnsys> const& sys_match,
0031 std::array<std::array<int, 2>, DEnsys> const& nCand,
0032 const L1DEDigiCollection&,
0033 const GltDEDigi&);
0034 ~L1DataEmulRecord();
0035
0036 bool get_status() const { return deAgree; }
0037 bool get_status(int s) const { return deMatch[s]; }
0038 void get_status(bool result[]) const;
0039 L1DEDigiCollection getColl() const { return deColl; }
0040 GltDEDigi getGlt() const { return deGlt; }
0041 int getNCand(int i, int j) const { return deNCand[i][j]; }
0042 bool get_isComp(int i) const { return deSysCompared[i]; }
0043
0044 void set_status(const bool result);
0045 void set_status(const bool result[]);
0046 void setColl(const L1DEDigiCollection& col) { deColl = col; }
0047 void setGlt(const GltDEDigi& glt) { deGlt = glt; }
0048
0049 bool empty() const { return deColl.empty(); }
0050
0051 private:
0052 bool deAgree;
0053 bool deSysCompared[DEnsys];
0054 bool deMatch[DEnsys];
0055 int deNCand[DEnsys][2];
0056 L1DEDigiCollection deColl;
0057 GltDEDigi deGlt;
0058 };
0059
0060 std::ostream& operator<<(std::ostream&, const L1DataEmulRecord&);
0061
0062 #endif