6 #include "UCTRegion.hh"
7 #include "UCTGeometry.hh"
8 #include "UCTLogging.hh"
10 UCTCard::UCTCard(uint32_t crt, uint32_t crd,
int fwv) : crate(crt), card(crd), cardSummary(0),
fwVersion(fwv) {
12 regions.reserve(2 *
g.getNRegions());
13 for (uint32_t rgn = 0; rgn <
g.getNRegions(); rgn++) {
22 for (uint32_t
i = 0;
i <
regions.size();
i++) {
30 for (uint32_t
i = 0;
i <
regions.size();
i++) {
38 bool UCTCard::clearEvent() {
40 for (uint32_t
i = 0;
i <
regions.size();
i++) {
47 bool UCTCard::setECALData(UCTTowerIndex
t,
bool ecalFG, uint32_t ecalET) {
51 bool negativeEta =
false;
54 uint32_t
i =
g.getRegion(absCaloEta, absCaloPhi) * 2;
58 LOG_ERROR <<
"UCTCard: Incorrect region requested -- bailing" << std::endl;
61 return regions[
i]->setECALData(
t, ecalFG, ecalET);
64 bool UCTCard::setHCALData(UCTTowerIndex
t, uint32_t hcalFB, uint32_t hcalET) {
68 bool negativeEta =
false;
71 uint32_t
i =
g.getRegion(absCaloEta, absCaloPhi) * 2;
75 LOG_ERROR <<
"UCTCard: Incorrect region requested -- bailing" << std::endl;
78 return regions[
i]->setHCALData(
t, hcalFB, hcalET);
81 const UCTRegion* UCTCard::getRegion(UCTRegionIndex
r)
const {
83 UCTTowerIndex
t =
g.getUCTTowerIndex(
r);
86 bool negativeEta =
false;
89 return getRegion(negativeEta, absCaloEta, absCaloPhi);
92 const UCTRegion* UCTCard::getRegion(
bool nE, uint32_t cEta, uint32_t cPhi)
const {
94 uint32_t
i =
g.getRegion(cEta, cPhi) * 2;
98 LOG_ERROR <<
"UCTCard: Incorrect region requested -- bailing" << std::endl;
105 if (
c.cardSummary > 0)
106 os <<
"UCTCard: card = " <<
c.card <<
"; Summary = " <<
c.cardSummary << std::endl;