File indexing completed on 2024-04-06 12:20:15
0001 #ifndef UCTCrate_hh
0002 #define UCTCrate_hh
0003
0004 #include <vector>
0005
0006 #include "UCTGeometry.hh"
0007
0008 class UCTCard;
0009
0010 class UCTCrate {
0011 public:
0012 UCTCrate(uint32_t crt, int fwv);
0013
0014
0015
0016 UCTCrate() = delete;
0017
0018
0019
0020 UCTCrate(const UCTCrate&) = delete;
0021
0022
0023
0024 const UCTCrate& operator=(const UCTCrate&) = delete;
0025
0026 virtual ~UCTCrate();
0027
0028
0029
0030 const std::vector<UCTCard*>& getCards() { return cards; }
0031 const UCTCard* getCard(uint32_t crd) const { return cards[crd]; }
0032 const UCTCard* getCard(UCTTowerIndex t) const;
0033 const UCTCard* getCard(UCTRegionIndex r) const {
0034 UCTGeometry g;
0035 return getCard(g.getUCTTowerIndex(r));
0036 }
0037
0038
0039
0040 bool clearEvent();
0041 bool setECALData(UCTTowerIndex t, bool ecalFG, uint32_t ecalET);
0042 bool setHCALData(UCTTowerIndex t, uint32_t hcalFB, uint32_t hcalET);
0043 bool process();
0044
0045
0046
0047 const uint32_t getCrate() const { return crate; }
0048 const uint32_t getCrateSummary() const { return crateSummary; }
0049
0050 const uint32_t et() const { return crateSummary; }
0051
0052 friend std::ostream& operator<<(std::ostream&, const UCTCrate&);
0053
0054 private:
0055
0056
0057 uint32_t crate;
0058 std::vector<UCTCard*> cards;
0059 uint32_t crateSummary;
0060
0061 const int fwVersion;
0062 };
0063
0064 #endif