CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Public Attributes
l1t::GtInputDump Class Reference
Inheritance diagram for l1t::GtInputDump:
edm::EDAnalyzer 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::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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 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)
 
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)
 

Detailed Description

Definition at line 52 of file GtInputDump.cc.

Constructor & Destructor Documentation

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

Definition at line 68 of file GtInputDump.cc.

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

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  }
EDGetToken muToken
Definition: GtInputDump.cc:59
T getParameter(std::string const &) const
EDGetToken jetToken
Definition: GtInputDump.cc:61
EDGetToken egToken
Definition: GtInputDump.cc:58
EDGetToken tauToken
Definition: GtInputDump.cc:60
EDGetToken etsumToken
Definition: GtInputDump.cc:62
l1t::GtInputDump::~GtInputDump ( )
inlineoverride

Definition at line 55 of file GtInputDump.cc.

References analyze().

55 {};

Member Function Documentation

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

Definition at line 80 of file GtInputDump.cc.

References gather_cfg::cout, TauDecayModes::dec, DEFINE_FWK_MODULE, unpackData-CaloStage1::egToken, edm::Event::getByToken(), mps_fire::i, 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.

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  }
EDGetToken muToken
Definition: GtInputDump.cc:59
EDGetToken jetToken
Definition: GtInputDump.cc:61
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
bool isValid() const
Definition: HandleBase.h:70
EDGetToken egToken
Definition: GtInputDump.cc:58
EDGetToken tauToken
Definition: GtInputDump.cc:60
EDGetToken etsumToken
Definition: GtInputDump.cc:62

Member Data Documentation

EDGetToken l1t::GtInputDump::egToken

Definition at line 58 of file GtInputDump.cc.

EDGetToken l1t::GtInputDump::etsumToken

Definition at line 62 of file GtInputDump.cc.

EDGetToken l1t::GtInputDump::jetToken

Definition at line 61 of file GtInputDump.cc.

int l1t::GtInputDump::m_maxBx

Definition at line 65 of file GtInputDump.cc.

int l1t::GtInputDump::m_minBx

Definition at line 64 of file GtInputDump.cc.

EDGetToken l1t::GtInputDump::muToken

Definition at line 59 of file GtInputDump.cc.

EDGetToken l1t::GtInputDump::tauToken

Definition at line 60 of file GtInputDump.cc.