7 #include "UCTGeometry.hh" 8 #include "UCTLogging.hh" 10 UCTCrate::UCTCrate(uint32_t crt,
int fwv) : crate(crt), crateSummary(0),
fwVersion(fwv) {
12 for (uint32_t card = 0; card <
g.getNCards(); card++) {
13 cards.push_back(
new UCTCard(crate, card,
fwVersion));
17 UCTCrate::~UCTCrate() {
18 for (uint32_t
i = 0;
i < cards.size();
i++) {
19 if (cards[
i] !=
nullptr)
26 for (uint32_t
i = 0;
i < cards.size();
i++) {
27 if (cards[
i] !=
nullptr) {
29 crateSummary += cards[
i]->et();
35 bool UCTCrate::clearEvent() {
37 for (uint32_t
i = 0;
i < cards.size();
i++) {
38 if (!cards[
i]->clearEvent())
44 bool UCTCrate::setECALData(UCTTowerIndex
t,
bool ecalFG, uint32_t ecalET) {
46 uint32_t
i =
g.getCard(
t.first,
t.second);
47 if (
i > cards.size()) {
48 LOG_ERROR <<
"UCTCrate: Incorrect (caloEta, caloPhi) -- bailing" << std::endl;
51 return cards[
i]->setECALData(
t, ecalFG, ecalET);
54 bool UCTCrate::setHCALData(UCTTowerIndex
t, uint32_t hcalFB, uint32_t hcalET) {
56 uint32_t
i =
g.getCard(
t.first,
t.second);
57 if (
i > cards.size()) {
58 LOG_ERROR <<
"UCTCrate: Incorrect (caloEta, caloPhi) -- bailing" << std::endl;
61 return cards[
i]->setHCALData(
t, hcalFB, hcalET);
64 const UCTCard* UCTCrate::getCard(UCTTowerIndex
t)
const {
66 uint32_t
i =
g.getCard(
t.first,
t.second);
67 if (
i > cards.size()) {
68 LOG_ERROR <<
"UCTCrate: Incorrect (caloEta, caloPhi) -- bailing" << std::endl;
74 std::ostream&
operator<<(std::ostream& os,
const UCTCrate& cr) {
75 if (cr.crateSummary > 0)
76 os <<
"UCTCrate: crate = " << cr.crate <<
"; Summary = " << cr.crateSummary << std::endl;
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
std::ostream & operator<<(std::ostream &os, const UCTCrate &cr)