CMS 3D CMS Logo

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

Classes

class  cc
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
 GtInputDump (const edm::ParameterSet &)
 
 ~GtInputDump () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const noexcept final
 
bool wantsGlobalRuns () const noexcept final
 
bool wantsInputProcessBlocks () const noexcept final
 
bool wantsProcessBlocks () const noexcept final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const noexcept
 
bool wantsStreamRuns () const noexcept
 
 ~EDAnalyzerBase () 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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESResolverIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESResolverIndex > 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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, 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::ESRecordsToProductResolverIndices 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::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 50 of file GtInputDump.cc.

Constructor & Destructor Documentation

◆ GtInputDump()

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

Definition at line 66 of file GtInputDump.cc.

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

66  {
67  egToken = consumes<BXVector<l1t::EGamma>>(iConfig.getParameter<InputTag>("egInputTag"));
68  muToken = consumes<BXVector<l1t::Muon>>(iConfig.getParameter<InputTag>("muInputTag"));
69  tauToken = consumes<BXVector<l1t::Tau>>(iConfig.getParameter<InputTag>("tauInputTag"));
70  jetToken = consumes<BXVector<l1t::Jet>>(iConfig.getParameter<InputTag>("jetInputTag"));
71  etsumToken = consumes<BXVector<l1t::EtSum>>(iConfig.getParameter<InputTag>("etsumInputTag"));
72 
73  m_minBx = iConfig.getParameter<int>("minBx");
74  m_maxBx = iConfig.getParameter<int>("maxBx");
75  }
EDGetToken muToken
Definition: GtInputDump.cc:57
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
EDGetToken jetToken
Definition: GtInputDump.cc:59
EDGetToken egToken
Definition: GtInputDump.cc:56
EDGetToken tauToken
Definition: GtInputDump.cc:58
EDGetToken etsumToken
Definition: GtInputDump.cc:60

◆ ~GtInputDump()

l1t::GtInputDump::~GtInputDump ( )
inlineoverride

Definition at line 53 of file GtInputDump.cc.

53 {};

Member Function Documentation

◆ analyze()

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

Implements edm::one::EDAnalyzerBase.

Definition at line 78 of file GtInputDump.cc.

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

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

Member Data Documentation

◆ egToken

EDGetToken l1t::GtInputDump::egToken

Definition at line 56 of file GtInputDump.cc.

◆ etsumToken

EDGetToken l1t::GtInputDump::etsumToken

Definition at line 60 of file GtInputDump.cc.

◆ jetToken

EDGetToken l1t::GtInputDump::jetToken

Definition at line 59 of file GtInputDump.cc.

◆ m_maxBx

int l1t::GtInputDump::m_maxBx

Definition at line 63 of file GtInputDump.cc.

◆ m_minBx

int l1t::GtInputDump::m_minBx

Definition at line 62 of file GtInputDump.cc.

◆ muToken

EDGetToken l1t::GtInputDump::muToken

Definition at line 57 of file GtInputDump.cc.

◆ tauToken

EDGetToken l1t::GtInputDump::tauToken

Definition at line 58 of file GtInputDump.cc.