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

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
 GtInputDump (const edm::ParameterSet &)
 
virtual ~GtInputDump ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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 & itemsToGetFromEvent () 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
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
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 &)
 
- 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 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 56 of file GtInputDump.cc.

Constructor & Destructor Documentation

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

Definition at line 72 of file GtInputDump.cc.

References edm::ParameterSet::getParameter().

73  {
74  egToken = consumes<BXVector<l1t::EGamma>>(iConfig.getParameter<InputTag>("egInputTag"));
75  muToken = consumes<BXVector<l1t::Muon>>(iConfig.getParameter<InputTag>("muInputTag"));
76  tauToken = consumes<BXVector<l1t::Tau>>(iConfig.getParameter<InputTag>("tauInputTag"));
77  jetToken = consumes<BXVector<l1t::Jet>>(iConfig.getParameter<InputTag>("jetInputTag"));
78  etsumToken = consumes<BXVector<l1t::EtSum>>(iConfig.getParameter<InputTag>("etsumInputTag"));
79 
80  m_minBx = iConfig.getParameter<int>("minBx");
81  m_maxBx = iConfig.getParameter<int>("maxBx");
82 
83 
84  }
EDGetToken muToken
Definition: GtInputDump.cc:63
T getParameter(std::string const &) const
EDGetToken jetToken
Definition: GtInputDump.cc:65
EDGetToken egToken
Definition: GtInputDump.cc:62
EDGetToken tauToken
Definition: GtInputDump.cc:64
EDGetToken etsumToken
Definition: GtInputDump.cc:66
virtual l1t::GtInputDump::~GtInputDump ( )
inlinevirtual

Definition at line 59 of file GtInputDump.cc.

References Vispa.Share.Profiling::analyze().

59 {};

Member Function Documentation

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

Definition at line 87 of file GtInputDump.cc.

References gather_cfg::cout, TauDecayModes::dec, DEFINE_FWK_MODULE, edm::Event::getByToken(), mps_fire::i, edm::HandleBase::isValid(), metsig::jet, fwrapper::jets, L1Analysis::kMissingEt, L1Analysis::kMissingHt, L1Analysis::kTotalEt, L1Analysis::kTotalHt, RPCpg::mu, electronCleaner_cfi::muons, metsig::tau, and jetCleaner_cfi::taus.

87  {
88 
89 
90  //inputs
92  iEvent.getByToken(egToken,egammas);
93 
95  iEvent.getByToken(muToken,muons);
96 
98  iEvent.getByToken(tauToken,taus);
99 
101  iEvent.getByToken(jetToken,jets);
102 
104  iEvent.getByToken(etsumToken,etsums);
105 
106  printf("\n -------------------------------------- \n");
107  printf(" *********** New Event ************** \n");
108  printf(" -------------------------------------- \n");
109  //Loop over BX
110  //Loop over BX
111  for(int i =m_minBx; i <= m_maxBx; ++i) {
112 
113  cout << " ========== BX = " << std::dec << i << " =============================" << endl;
114 
115  //Loop over EGamma
116  int nObj =0;
117  cout << " ------ EGammas -------- " << endl;
118  if (egammas.isValid()) {
119  if(i>=egammas->getFirstBX() && i<=egammas->getLastBX()) {
120  for(std::vector<l1t::EGamma>::const_iterator eg = egammas->begin(i); eg != egammas->end(i); ++eg) {
121  cout << " " << std::dec << std::setw(2) << std::setfill(' ') << nObj << std::setfill('0')<< ")";
122  cout << " Pt " << std::dec << std::setw(3) << eg->hwPt() << " (0x" << std::hex << std::setw(3) << std::setfill('0') << eg->hwPt() << ")";
123  cout << " Eta " << std::dec << std::setw(3) << eg->hwEta() << " (0x" << std::hex << std::setw(2) << std::setfill('0') << (eg->hwEta()&0xff) << ")";
124  cout << " Phi " << std::dec << std::setw(3) << eg->hwPhi() << " (0x" << std::hex << std::setw(2) << std::setfill('0') << eg->hwPhi() << ")";
125  cout << " Iso " << std::dec << std::setw(1) << eg->hwIso() ;
126  cout << " Qual "<< std::dec << std::setw(1) << eg->hwQual() ;
127  cout << endl;
128  nObj++;
129  }
130  } else {
131  cout << "No EG stored for this bx " << i << endl;
132  }
133  } else {
134  cout << "No EG Data in this event " << endl;
135  }
136 
137  //Loop over Muons
138  nObj =0;
139  cout << " ------ Muons --------" << endl;
140  if (muons.isValid()) {
141  if(i>=muons->getFirstBX() && i<=muons->getLastBX()) {
142  for(std::vector<l1t::Muon>::const_iterator mu = muons->begin(i); mu != muons->end(i); ++mu) {
143  cout << " " << std::dec << std::setw(2) << std::setfill(' ') << nObj << std::setfill('0')<< ")";
144  cout << " Pt " << std::dec << std::setw(3) << mu->hwPt() << " (0x" << std::hex << std::setw(3) << std::setfill('0') << mu->hwPt() << ")";
145  cout << " EtaAtVtx " << std::dec << std::setw(3) << mu->hwEtaAtVtx() << " (0x" << std::hex << std::setw(3) << std::setfill('0') << (mu->hwEtaAtVtx()&0x1ff) << ")";
146  cout << " Eta " << std::dec << std::setw(3) << mu->hwEta() << " (0x" << std::hex << std::setw(3) << std::setfill('0') << (mu->hwEta()&0x1ff) << ")";
147  cout << " PhiAtVtx " << std::dec << std::setw(3) << mu->hwPhiAtVtx() << " (0x" << std::hex << std::setw(3) << std::setfill('0') << mu->hwPhiAtVtx() << ")";
148  cout << " Phi " << std::dec << std::setw(3) << mu->hwPhi() << " (0x" << std::hex << std::setw(3) << std::setfill('0') << mu->hwPhi() << ")";
149  cout << " Iso " << std::dec << std::setw(1) << mu->hwIso() ;
150  cout << " Qual "<< std::dec << std::setw(1) << mu->hwQual() ;
151  cout << endl;
152  nObj++;
153  }
154  }else {
155  cout << "No Muons stored for this bx " << i << endl;
156  }
157  } else {
158  cout << "No Muon Data in this event " << endl;
159  }
160 
161  //Loop over Taus
162  nObj =0;
163  cout << " ------ Taus ----------" << endl;
164  if(taus.isValid()) {
165  if(i>=taus->getFirstBX() && i<=taus->getLastBX()) {
166  for(std::vector<l1t::Tau>::const_iterator tau = taus->begin(i); tau != taus->end(i); ++tau) {
167  cout << " " << std::dec << std::setw(2) << std::setfill(' ') << nObj << std::setfill('0')<< ")";
168  cout << " Pt " << std::dec << std::setw(3) << tau->hwPt() << " (0x" << std::hex << std::setw(3) << std::setfill('0') << tau->hwPt() << ")";
169  cout << " Eta " << std::dec << std::setw(3) << tau->hwEta() << " (0x" << std::hex << std::setw(2) << std::setfill('0') << (tau->hwEta()&0xff) << ")";
170  cout << " Phi " << std::dec << std::setw(3) << tau->hwPhi() << " (0x" << std::hex << std::setw(2) << 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) << std::setfill('0') << jet->hwPt() << ")";
191  cout << " Eta " << std::dec << std::setw(3) << jet->hwEta() << " (0x" << std::hex << std::setw(2) << std::setfill('0') << (jet->hwEta()&0xff) << ")";
192  cout << " Phi " << std::dec << std::setw(3) << jet->hwPhi() << " (0x" << std::hex << std::setw(2) << std::setfill('0') << jet->hwPhi() << ")";
193  cout << " Qual "<< std::dec << std::setw(1) << jet->hwQual() ;
194  cout << endl;
195  nObj++;
196  }
197  } else {
198  cout << "No Jets stored for this bx " << i << endl;
199  }
200  } else {
201  cout << "No jet Data in this event " << endl;
202  }
203 
204  //Dump Content
205  cout << " ------ EtSums ----------" << endl;
206  if(etsums.isValid()) {
207  if(i>=etsums->getFirstBX() && i<=etsums->getLastBX()) {
208  for(std::vector<l1t::EtSum>::const_iterator etsum = etsums->begin(i); etsum != etsums->end(i); ++etsum) {
209  switch ( etsum->getType() ) {
211  cout << " ETM: ";
212  break;
214  cout << " HTM: ";
215  break;
217  cout << " ETT: ";
218  break;
220  cout << " HTT: ";
221  break;
222  default:
223  cout << " Unknown: ";
224  break;
225  }
226  cout << " Et " << std::dec << std::setw(3) << etsum->hwPt() << " (0x" << std::hex << std::setw(3) << std::setfill('0') << etsum->hwPt() << ")";
227  if(etsum->getType() == l1t::EtSum::EtSumType::kMissingEt || etsum->getType() == l1t::EtSum::EtSumType::kMissingHt)
228  cout << " Phi " << std::dec << std::setw(3) << etsum->hwPhi() << " (0x" << std::hex << std::setw(2) << std::setfill('0') << etsum->hwPhi() << ")";
229  cout << endl;
230  }
231  } else {
232  cout << "No EtSums stored for this bx " << i << endl;
233  }
234  } else {
235  cout << "No EtSum Data in this event " << endl;
236  }
237 
238  }
239  printf("\n");
240  }
EDGetToken muToken
Definition: GtInputDump.cc:63
EDGetToken jetToken
Definition: GtInputDump.cc:65
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:457
vector< PseudoJet > jets
const int mu
Definition: Constants.h:22
bool isValid() const
Definition: HandleBase.h:74
EDGetToken egToken
Definition: GtInputDump.cc:62
EDGetToken tauToken
Definition: GtInputDump.cc:64
EDGetToken etsumToken
Definition: GtInputDump.cc:66

Member Data Documentation

EDGetToken l1t::GtInputDump::egToken

Definition at line 62 of file GtInputDump.cc.

EDGetToken l1t::GtInputDump::etsumToken

Definition at line 66 of file GtInputDump.cc.

EDGetToken l1t::GtInputDump::jetToken

Definition at line 65 of file GtInputDump.cc.

int l1t::GtInputDump::m_maxBx

Definition at line 69 of file GtInputDump.cc.

int l1t::GtInputDump::m_minBx

Definition at line 68 of file GtInputDump.cc.

EDGetToken l1t::GtInputDump::muToken

Definition at line 63 of file GtInputDump.cc.

EDGetToken l1t::GtInputDump::tauToken

Definition at line 64 of file GtInputDump.cc.