00001 #include "EventFilter/GctRawToDigi/src/GctUnpackCollections.h"
00002
00003
00004 GctUnpackCollections::GctUnpackCollections(edm::Event& event, const bool hltMode):
00005 m_event(event),
00006 m_hltMode(hltMode),
00007 m_gctFibres(new L1GctFibreCollection()),
00008 m_rctEm(new L1CaloEmCollection()),
00009 m_rctCalo(new L1CaloRegionCollection()),
00010 m_gctInternEm(new L1GctInternEmCandCollection()),
00011 m_gctInternJets(new L1GctInternJetDataCollection()),
00012 m_gctInternEtSums(new L1GctInternEtSumCollection()),
00013 m_gctIsoEm(new L1GctEmCandCollection()),
00014 m_gctNonIsoEm(new L1GctEmCandCollection()),
00015 m_gctCenJets(new L1GctJetCandCollection()),
00016 m_gctForJets(new L1GctJetCandCollection()),
00017 m_gctTauJets(new L1GctJetCandCollection()),
00018 m_gctHfBitCounts(new L1GctHFBitCountsCollection()),
00019 m_gctHfRingEtSums(new L1GctHFRingEtSumsCollection()),
00020 m_gctEtTot(new L1GctEtTotalCollection()),
00021 m_gctEtHad(new L1GctEtHadCollection()),
00022 m_gctEtMiss(new L1GctEtMissCollection()),
00023 m_gctJetCounts(new L1GctJetCountsCollection())
00024 {
00025 m_gctIsoEm->reserve(4);
00026 m_gctCenJets->reserve(4);
00027 m_gctForJets->reserve(4);
00028 m_gctTauJets->reserve(4);
00029
00030 }
00031
00032 GctUnpackCollections::~GctUnpackCollections()
00033 {
00034
00035 if(!m_hltMode) { m_event.put(m_gctFibres); }
00036 m_event.put(m_rctEm);
00037 m_event.put(m_rctCalo);
00038
00039
00040 if(!m_hltMode)
00041 {
00042 m_event.put(m_gctInternEm);
00043 m_event.put(m_gctInternJets);
00044 m_event.put(m_gctInternEtSums);
00045 }
00046
00047
00048 m_event.put(m_gctIsoEm, "isoEm");
00049 m_event.put(m_gctNonIsoEm, "nonIsoEm");
00050 m_event.put(m_gctCenJets,"cenJets");
00051 m_event.put(m_gctForJets,"forJets");
00052 m_event.put(m_gctTauJets,"tauJets");
00053 m_event.put(m_gctHfBitCounts);
00054 m_event.put(m_gctHfRingEtSums);
00055 m_event.put(m_gctEtTot);
00056 m_event.put(m_gctEtHad);
00057 m_event.put(m_gctEtMiss);
00058 m_event.put(m_gctJetCounts);
00059 }
00060
00061 std::ostream& operator<<(std::ostream& os, const GctUnpackCollections& rhs)
00062 {
00063
00064 os << "Read " << rhs.gctFibres()->size() << " GCT raw fibre data\n"
00065 << "Read " << rhs.rctEm()->size() << " RCT EM candidates\n"
00066 << "Read " << rhs.rctCalo()->size() << " RCT Calo Regions\n"
00067
00068
00069 << "Read " << rhs.gctInternEm()->size() << " GCT intermediate EM candidates\n"
00070 << "Read " << rhs.gctInternJets()->size() << " GCT intermediate jet candidates\n"
00071 << "Read " << rhs.gctInternEtSums()->size() << " GCT intermediate et sums\n"
00072
00073
00074 << "Read " << rhs.gctIsoEm()->size() << " GCT iso EM candidates\n"
00075 << "Read " << rhs.gctNonIsoEm()->size() << " GCT non-iso EM candidates\n"
00076 << "Read " << rhs.gctCenJets()->size() << " GCT central jet candidates\n"
00077 << "Read " << rhs.gctForJets()->size() << " GCT forward jet candidates\n"
00078 << "Read " << rhs.gctTauJets()->size() << " GCT tau jet candidates\n"
00079 << "Read " << rhs.gctHfBitCounts()->size() << " GCT HF ring bit counts\n"
00080 << "Read " << rhs.gctHfRingEtSums()->size() << " GCT HF ring et sums\n"
00081 << "Read " << rhs.gctEtTot()->size() << " GCT total et\n"
00082 << "Read " << rhs.gctEtHad()->size() << " GCT ht\n"
00083 << "Read " << rhs.gctEtMiss()->size() << " GCT met\n";
00084
00085 return os;
00086 }