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
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
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 wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
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 = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
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 51 of file GtInputDump.cc.

Constructor & Destructor Documentation

◆ GtInputDump()

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

Definition at line 67 of file GtInputDump.cc.

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

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

◆ ~GtInputDump()

l1t::GtInputDump::~GtInputDump ( )
inlineoverride

Definition at line 54 of file GtInputDump.cc.

54 {};

Member Function Documentation

◆ analyze()

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

Implements edm::EDAnalyzer.

Definition at line 79 of file GtInputDump.cc.

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

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 57 of file GtInputDump.cc.

◆ etsumToken

EDGetToken l1t::GtInputDump::etsumToken

Definition at line 61 of file GtInputDump.cc.

◆ jetToken

EDGetToken l1t::GtInputDump::jetToken

Definition at line 60 of file GtInputDump.cc.

◆ m_maxBx

int l1t::GtInputDump::m_maxBx

Definition at line 64 of file GtInputDump.cc.

◆ m_minBx

int l1t::GtInputDump::m_minBx

Definition at line 63 of file GtInputDump.cc.

◆ muToken

EDGetToken l1t::GtInputDump::muToken

Definition at line 58 of file GtInputDump.cc.

◆ tauToken

EDGetToken l1t::GtInputDump::tauToken

Definition at line 59 of file GtInputDump.cc.

PDWG_BPHSkim_cff.muons
muons
Definition: PDWG_BPHSkim_cff.py:47
mps_fire.i
i
Definition: mps_fire.py:428
l1t::GtInputDump::jetToken
EDGetToken jetToken
Definition: GtInputDump.cc:60
l1t::GtInputDump::muToken
EDGetToken muToken
Definition: GtInputDump.cc:58
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:64
Tau3MuMonitor_cff.taus
taus
Definition: Tau3MuMonitor_cff.py:7
l1t::GtInputDump::tauToken
EDGetToken tauToken
Definition: GtInputDump.cc:59
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:61
l1t::GtInputDump::m_minBx
int m_minBx
Definition: GtInputDump.cc:63
L1Analysis::kTotalEt
Definition: L1AnalysisL1UpgradeDataFormat.h:17
l1t::GtInputDump::egToken
EDGetToken egToken
Definition: GtInputDump.cc:57
iEvent
int iEvent
Definition: GenABIO.cc:224
L1Analysis::kMissingHt
Definition: L1AnalysisL1UpgradeDataFormat.h:20
L1Analysis::kMissingEt
Definition: L1AnalysisL1UpgradeDataFormat.h:19
metsig::jet
Definition: SignAlgoResolutions.h:47
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
L1Analysis::kTotalHt
Definition: L1AnalysisL1UpgradeDataFormat.h:18
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142
edm::InputTag
Definition: InputTag.h:15