CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
l1t::GtInputDump Class Reference
Inheritance diagram for l1t::GtInputDump:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
 GtInputDump (const edm::ParameterSet &)
 
 ~GtInputDump () override
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Public Attributes

EDGetToken egToken
 
EDGetToken etsumToken
 
EDGetToken jetToken
 
int m_maxBx
 
int m_minBx
 
EDGetToken muToken
 
EDGetToken tauToken
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 52 of file GtInputDump.cc.

Constructor & Destructor Documentation

◆ GtInputDump()

l1t::GtInputDump::GtInputDump ( const edm::ParameterSet iConfig)
explicit

Definition at line 68 of file GtInputDump.cc.

68  {
69  egToken = consumes<BXVector<l1t::EGamma>>(iConfig.getParameter<InputTag>("egInputTag"));
70  muToken = consumes<BXVector<l1t::Muon>>(iConfig.getParameter<InputTag>("muInputTag"));
71  tauToken = consumes<BXVector<l1t::Tau>>(iConfig.getParameter<InputTag>("tauInputTag"));
72  jetToken = consumes<BXVector<l1t::Jet>>(iConfig.getParameter<InputTag>("jetInputTag"));
73  etsumToken = consumes<BXVector<l1t::EtSum>>(iConfig.getParameter<InputTag>("etsumInputTag"));
74 
75  m_minBx = iConfig.getParameter<int>("minBx");
76  m_maxBx = iConfig.getParameter<int>("maxBx");
77  }

References unpackData-CaloStage1::egToken, edm::ParameterSet::getParameter(), unpackData-CaloStage1::jetToken, and unpackData-CaloStage1::tauToken.

◆ ~GtInputDump()

l1t::GtInputDump::~GtInputDump ( )
inlineoverride

Definition at line 55 of file GtInputDump.cc.

55 {};

Member Function Documentation

◆ analyze()

void l1t::GtInputDump::analyze ( const edm::Event iEvent,
const edm::EventSetup evSetup 
)
overridevirtual

Implements edm::EDAnalyzer.

Definition at line 80 of file GtInputDump.cc.

80  {
81  //inputs
83  iEvent.getByToken(egToken, egammas);
84 
86  iEvent.getByToken(muToken, muons);
87 
89  iEvent.getByToken(tauToken, taus);
90 
92  iEvent.getByToken(jetToken, jets);
93 
95  iEvent.getByToken(etsumToken, etsums);
96 
97  printf("\n -------------------------------------- \n");
98  printf(" *********** New Event ************** \n");
99  printf(" -------------------------------------- \n");
100  //Loop over BX
101  //Loop over BX
102  for (int i = m_minBx; i <= m_maxBx; ++i) {
103  cout << " ========== BX = " << std::dec << i << " =============================" << endl;
104 
105  //Loop over EGamma
106  int nObj = 0;
107  cout << " ------ EGammas -------- " << endl;
108  if (egammas.isValid()) {
109  if (i >= egammas->getFirstBX() && i <= egammas->getLastBX()) {
110  for (std::vector<l1t::EGamma>::const_iterator eg = egammas->begin(i); eg != egammas->end(i); ++eg) {
111  cout << " " << std::dec << std::setw(2) << std::setfill(' ') << nObj << std::setfill('0') << ")";
112  cout << " Pt " << std::dec << std::setw(3) << eg->hwPt() << " (0x" << std::hex << std::setw(3)
113  << std::setfill('0') << eg->hwPt() << ")";
114  cout << " Eta " << std::dec << std::setw(3) << eg->hwEta() << " (0x" << std::hex << std::setw(2)
115  << std::setfill('0') << (eg->hwEta() & 0xff) << ")";
116  cout << " Phi " << std::dec << std::setw(3) << eg->hwPhi() << " (0x" << std::hex << std::setw(2)
117  << std::setfill('0') << eg->hwPhi() << ")";
118  cout << " Iso " << std::dec << std::setw(1) << eg->hwIso();
119  cout << " Qual " << std::dec << std::setw(1) << eg->hwQual();
120  cout << endl;
121  nObj++;
122  }
123  } else {
124  cout << "No EG stored for this bx " << i << endl;
125  }
126  } else {
127  cout << "No EG Data in this event " << endl;
128  }
129 
130  //Loop over Muons
131  nObj = 0;
132  cout << " ------ Muons --------" << endl;
133  if (muons.isValid()) {
134  if (i >= muons->getFirstBX() && i <= muons->getLastBX()) {
135  for (std::vector<l1t::Muon>::const_iterator mu = muons->begin(i); mu != muons->end(i); ++mu) {
136  cout << " " << std::dec << std::setw(2) << std::setfill(' ') << nObj << std::setfill('0') << ")";
137  cout << " Pt " << std::dec << std::setw(3) << mu->hwPt() << " (0x" << std::hex << std::setw(3)
138  << std::setfill('0') << mu->hwPt() << ")";
139  cout << " EtaAtVtx " << std::dec << std::setw(3) << mu->hwEtaAtVtx() << " (0x" << std::hex << std::setw(3)
140  << std::setfill('0') << (mu->hwEtaAtVtx() & 0x1ff) << ")";
141  cout << " Eta " << std::dec << std::setw(3) << mu->hwEta() << " (0x" << std::hex << std::setw(3)
142  << std::setfill('0') << (mu->hwEta() & 0x1ff) << ")";
143  cout << " PhiAtVtx " << std::dec << std::setw(3) << mu->hwPhiAtVtx() << " (0x" << std::hex << std::setw(3)
144  << std::setfill('0') << mu->hwPhiAtVtx() << ")";
145  cout << " Phi " << std::dec << std::setw(3) << mu->hwPhi() << " (0x" << std::hex << std::setw(3)
146  << std::setfill('0') << mu->hwPhi() << ")";
147  cout << " Iso " << std::dec << std::setw(1) << mu->hwIso();
148  cout << " Qual " << std::dec << std::setw(1) << mu->hwQual();
149  cout << endl;
150  nObj++;
151  }
152  } else {
153  cout << "No Muons stored for this bx " << i << endl;
154  }
155  } else {
156  cout << "No Muon Data in this event " << endl;
157  }
158 
159  //Loop over Taus
160  nObj = 0;
161  cout << " ------ Taus ----------" << endl;
162  if (taus.isValid()) {
163  if (i >= taus->getFirstBX() && i <= taus->getLastBX()) {
164  for (std::vector<l1t::Tau>::const_iterator tau = taus->begin(i); tau != taus->end(i); ++tau) {
165  cout << " " << std::dec << std::setw(2) << std::setfill(' ') << nObj << std::setfill('0') << ")";
166  cout << " Pt " << std::dec << std::setw(3) << tau->hwPt() << " (0x" << std::hex << std::setw(3)
167  << std::setfill('0') << tau->hwPt() << ")";
168  cout << " Eta " << std::dec << std::setw(3) << tau->hwEta() << " (0x" << std::hex << std::setw(2)
169  << std::setfill('0') << (tau->hwEta() & 0xff) << ")";
170  cout << " Phi " << std::dec << std::setw(3) << tau->hwPhi() << " (0x" << std::hex << std::setw(2)
171  << std::setfill('0') << tau->hwPhi() << ")";
172  cout << " Iso " << std::dec << std::setw(1) << tau->hwIso();
173  cout << " Qual " << std::dec << std::setw(1) << tau->hwQual();
174  cout << endl;
175  nObj++;
176  }
177  } else {
178  cout << "No Taus stored for this bx " << i << endl;
179  }
180  } else {
181  cout << "No Tau Data in this event " << endl;
182  }
183 
184  //Loop over Jets
185  nObj = 0;
186  cout << " ------ Jets ----------" << endl;
187  if (jets.isValid()) {
188  if (i >= jets->getFirstBX() && i <= jets->getLastBX()) {
189  for (std::vector<l1t::Jet>::const_iterator jet = jets->begin(i); jet != jets->end(i); ++jet) {
190  cout << " " << std::dec << std::setw(2) << std::setfill(' ') << nObj << std::setfill('0') << ")";
191  cout << " Pt " << std::dec << std::setw(3) << jet->hwPt() << " (0x" << std::hex << std::setw(3)
192  << std::setfill('0') << jet->hwPt() << ")";
193  cout << " Eta " << std::dec << std::setw(3) << jet->hwEta() << " (0x" << std::hex << std::setw(2)
194  << std::setfill('0') << (jet->hwEta() & 0xff) << ")";
195  cout << " Phi " << std::dec << std::setw(3) << jet->hwPhi() << " (0x" << std::hex << std::setw(2)
196  << std::setfill('0') << jet->hwPhi() << ")";
197  cout << " Qual " << std::dec << std::setw(1) << jet->hwQual();
198  cout << endl;
199  nObj++;
200  }
201  } else {
202  cout << "No Jets stored for this bx " << i << endl;
203  }
204  } else {
205  cout << "No jet Data in this event " << endl;
206  }
207 
208  //Dump Content
209  cout << " ------ EtSums ----------" << endl;
210  if (etsums.isValid()) {
211  if (i >= etsums->getFirstBX() && i <= etsums->getLastBX()) {
212  for (std::vector<l1t::EtSum>::const_iterator etsum = etsums->begin(i); etsum != etsums->end(i); ++etsum) {
213  switch (etsum->getType()) {
215  cout << " ETM: ";
216  break;
218  cout << " HTM: ";
219  break;
221  cout << " ETT: ";
222  break;
224  cout << " HTT: ";
225  break;
226  default:
227  cout << " Unknown: ";
228  break;
229  }
230  cout << " Et " << std::dec << std::setw(3) << etsum->hwPt() << " (0x" << std::hex << std::setw(3)
231  << std::setfill('0') << etsum->hwPt() << ")";
232  if (etsum->getType() == l1t::EtSum::EtSumType::kMissingEt ||
233  etsum->getType() == l1t::EtSum::EtSumType::kMissingHt)
234  cout << " Phi " << std::dec << std::setw(3) << etsum->hwPhi() << " (0x" << std::hex << std::setw(2)
235  << std::setfill('0') << etsum->hwPhi() << ")";
236  cout << endl;
237  }
238  } else {
239  cout << "No EtSums stored for this bx " << i << endl;
240  }
241  } else {
242  cout << "No EtSum Data in this event " << endl;
243  }
244  }
245  printf("\n");
246  }

References gather_cfg::cout, TauDecayModes::dec, unpackData-CaloStage1::egToken, mps_fire::i, iEvent, edm::HandleBase::isValid(), metsig::jet, singleTopDQM_cfi::jets, unpackData-CaloStage1::jetToken, L1Analysis::kMissingEt, L1Analysis::kMissingHt, L1Analysis::kTotalEt, L1Analysis::kTotalHt, amptDefaultParameters_cff::mu, PDWG_BPHSkim_cff::muons, metsig::tau, Tau3MuMonitor_cff::taus, and unpackData-CaloStage1::tauToken.

Member Data Documentation

◆ egToken

EDGetToken l1t::GtInputDump::egToken

Definition at line 58 of file GtInputDump.cc.

◆ etsumToken

EDGetToken l1t::GtInputDump::etsumToken

Definition at line 62 of file GtInputDump.cc.

◆ jetToken

EDGetToken l1t::GtInputDump::jetToken

Definition at line 61 of file GtInputDump.cc.

◆ m_maxBx

int l1t::GtInputDump::m_maxBx

Definition at line 65 of file GtInputDump.cc.

◆ m_minBx

int l1t::GtInputDump::m_minBx

Definition at line 64 of file GtInputDump.cc.

◆ muToken

EDGetToken l1t::GtInputDump::muToken

Definition at line 59 of file GtInputDump.cc.

◆ tauToken

EDGetToken l1t::GtInputDump::tauToken

Definition at line 60 of file GtInputDump.cc.

PDWG_BPHSkim_cff.muons
muons
Definition: PDWG_BPHSkim_cff.py:47
mps_fire.i
i
Definition: mps_fire.py:355
l1t::GtInputDump::jetToken
EDGetToken jetToken
Definition: GtInputDump.cc:61
l1t::GtInputDump::muToken
EDGetToken muToken
Definition: GtInputDump.cc:59
metsig::tau
Definition: SignAlgoResolutions.h:49
amptDefaultParameters_cff.mu
mu
Definition: amptDefaultParameters_cff.py:16
l1t::GtInputDump::m_maxBx
int m_maxBx
Definition: GtInputDump.cc:65
Tau3MuMonitor_cff.taus
taus
Definition: Tau3MuMonitor_cff.py:7
l1t::GtInputDump::tauToken
EDGetToken tauToken
Definition: GtInputDump.cc:60
gather_cfg.cout
cout
Definition: gather_cfg.py:144
singleTopDQM_cfi.jets
jets
Definition: singleTopDQM_cfi.py:42
edm::Handle
Definition: AssociativeIterator.h:50
l1t::GtInputDump::etsumToken
EDGetToken etsumToken
Definition: GtInputDump.cc:62
l1t::GtInputDump::m_minBx
int m_minBx
Definition: GtInputDump.cc:64
L1Analysis::kTotalEt
Definition: L1AnalysisL1UpgradeDataFormat.h:17
l1t::GtInputDump::egToken
EDGetToken egToken
Definition: GtInputDump.cc:58
iEvent
int iEvent
Definition: GenABIO.cc:224
L1Analysis::kMissingHt
Definition: L1AnalysisL1UpgradeDataFormat.h:20
L1Analysis::kMissingEt
Definition: L1AnalysisL1UpgradeDataFormat.h:19
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
metsig::jet
Definition: SignAlgoResolutions.h:47
L1Analysis::kTotalHt
Definition: L1AnalysisL1UpgradeDataFormat.h:18
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
TauDecayModes.dec
dec
Definition: TauDecayModes.py:143
edm::InputTag
Definition: InputTag.h:15