CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
L1TSummary Class Reference
Inheritance diagram for L1TSummary:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 L1TSummary (const ParameterSet &)
 
 ~L1TSummary () 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
 
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
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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)
 

Static Public Member Functions

static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- 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 ()
 

Private Member Functions

void analyze (Event const &, EventSetup const &) override
 
void beginJob () override
 
void beginLuminosityBlock (LuminosityBlock const &, EventSetup const &) override
 
void beginRun (Run const &, EventSetup const &) override
 
void endJob () override
 
void endLuminosityBlock (LuminosityBlock const &, EventSetup const &) override
 
void endRun (Run const &, EventSetup const &) override
 

Private Attributes

bool bxZeroOnly_
 
bool egCheck_
 
int egCount_
 
edm::EDGetTokenT
< EGammaBxCollection
egToken_
 
bool jetCheck_
 
int jetCount_
 
edm::EDGetTokenT< JetBxCollectionjetToken_
 
bool muonCheck_
 
int muonCount_
 
edm::EDGetTokenT
< MuonBxCollection
muonToken_
 
bool sumCheck_
 
int sumCount_
 
edm::EDGetTokenT
< EtSumBxCollection
sumToken_
 
string tag_
 
bool tauCheck_
 
int tauCount_
 
std::vector< edm::EDGetTokenT
< TauBxCollection > > 
tauTokens_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- 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 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<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 23 of file L1TSummary.cc.

Constructor & Destructor Documentation

L1TSummary::L1TSummary ( const ParameterSet iConfig)
explicit

Definition at line 66 of file L1TSummary.cc.

References edm::ParameterSet::getParameter(), metsig::tau, and HLT_FULL_cff::taus.

66  {
67  // InputTag barrelTfInputTag = iConfig.getParameter<InputTag>("barrelTFInput");
68  // InputTag overlapTfInputTag = iConfig.getParameter<InputTag>("overlapTFInput");
69  // InputTag forwardTfInputTag = iConfig.getParameter<InputTag>("forwardTFInput");
70  //m_barrelTfInputToken = consumes<MicroGMTConfiguration::InputCollection>(iConfig.getParameter<InputTag>("bmtfDigis"));
71 
72  tag_ = iConfig.getParameter<string>("tag");
73 
74  egCheck_ = iConfig.getParameter<bool>("egCheck");
75  tauCheck_ = iConfig.getParameter<bool>("tauCheck");
76  jetCheck_ = iConfig.getParameter<bool>("jetCheck");
77  sumCheck_ = iConfig.getParameter<bool>("sumCheck");
78  muonCheck_ = iConfig.getParameter<bool>("muonCheck");
79  bxZeroOnly_ = iConfig.getParameter<bool>("bxZeroOnly");
80 
81  //cout << "L1T Summary for " << tag << "\n";
82  //cout << "DEBUG: egCheck: " << egCheck_ << "\n";
83  //cout << "DEBUG: tauCheck: " << tauCheck_ << "\n";
84  //cout << "DEBUG: jetCheck: " << jetCheck_ << "\n";
85  //cout << "DEBUG: sumCheck: " << sumCheck_ << "\n";
86  //cout << "DEBUG: muonCheck: " << muonCheck_ << "\n";
87 
88  if (egCheck_) {
89  egToken_ = consumes<EGammaBxCollection>(iConfig.getParameter<InputTag>("egToken"));
90  }
91  if (tauCheck_) {
92  const auto& taus = iConfig.getParameter<std::vector<edm::InputTag>>("tauTokens");
93  for (const auto& tau : taus) {
94  tauTokens_.push_back(consumes<l1t::TauBxCollection>(tau));
95  }
96  }
97  if (jetCheck_) {
98  jetToken_ = consumes<JetBxCollection>(iConfig.getParameter<InputTag>("jetToken"));
99  }
100  if (sumCheck_) {
101  sumToken_ = consumes<EtSumBxCollection>(iConfig.getParameter<InputTag>("sumToken"));
102  }
103  if (muonCheck_) {
104  muonToken_ = consumes<MuonBxCollection>(iConfig.getParameter<InputTag>("muonToken"));
105  }
106 
107  egCount_ = 0;
108  tauCount_ = 0;
109  jetCount_ = 0;
110  sumCount_ = 0;
111  muonCount_ = 0;
112 }
edm::EDGetTokenT< MuonBxCollection > muonToken_
Definition: L1TSummary.cc:56
bool sumCheck_
Definition: L1TSummary.cc:47
bool egCheck_
Definition: L1TSummary.cc:44
edm::EDGetTokenT< EtSumBxCollection > sumToken_
Definition: L1TSummary.cc:55
bool muonCheck_
Definition: L1TSummary.cc:48
bool tauCheck_
Definition: L1TSummary.cc:45
bool bxZeroOnly_
Definition: L1TSummary.cc:49
std::vector< edm::EDGetTokenT< TauBxCollection > > tauTokens_
Definition: L1TSummary.cc:53
int muonCount_
Definition: L1TSummary.cc:63
int tauCount_
Definition: L1TSummary.cc:60
int sumCount_
Definition: L1TSummary.cc:62
edm::EDGetTokenT< EGammaBxCollection > egToken_
Definition: L1TSummary.cc:52
int jetCount_
Definition: L1TSummary.cc:61
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
bool jetCheck_
Definition: L1TSummary.cc:46
edm::EDGetTokenT< JetBxCollection > jetToken_
Definition: L1TSummary.cc:54
int egCount_
Definition: L1TSummary.cc:59
string tag_
Definition: L1TSummary.cc:41
L1TSummary::~L1TSummary ( )
override

Definition at line 114 of file L1TSummary.cc.

114 {}

Member Function Documentation

void L1TSummary::analyze ( Event const &  iEvent,
EventSetup const &  iSetup 
)
overrideprivatevirtual

Implements edm::EDAnalyzer.

Definition at line 116 of file L1TSummary.cc.

References gather_cfg::cout, edm::Event::getByToken(), and edm::HandleBase::isValid().

116  {
117  cout << "L1TSummary Module output for " << tag_ << "\n";
118  if (egCheck_) {
120  iEvent.getByToken(egToken_, XTMP);
121  if (XTMP.isValid()) {
122  cout << "INFO: L1T found e-gamma collection.\n";
123  for (int ibx = XTMP->getFirstBX(); ibx <= XTMP->getLastBX(); ++ibx) {
124  for (auto it = XTMP->begin(ibx); it != XTMP->end(ibx); it++) {
125  if (bxZeroOnly_ && (ibx != 0))
126  continue;
127  if (it->et() > 0) {
128  egCount_++;
129  cout << "bx: " << ibx << " et: " << it->et() << " eta: " << it->eta() << " phi: " << it->phi()
130  << "\n";
131  }
132  }
133  }
134  } else {
135  LogWarning("MissingProduct") << "L1Upgrade e-gamma's not found." << std::endl;
136  }
137  }
138 
139  if (tauCheck_) {
140  for (auto& tautoken : tauTokens_) {
142  iEvent.getByToken(tautoken, XTMP);
143  if (XTMP.isValid()) {
144  cout << "INFO: L1T found tau collection.\n";
145  for (int ibx = XTMP->getFirstBX(); ibx <= XTMP->getLastBX(); ++ibx) {
146  for (auto it = XTMP->begin(ibx); it != XTMP->end(ibx); it++) {
147  if (it->et() > 0) {
148  if (bxZeroOnly_ && (ibx != 0))
149  continue;
150  tauCount_++;
151  cout << "bx: " << ibx << " et: " << it->et() << " eta: " << it->eta() << " phi: " << it->phi()
152  << "\n";
153  }
154  }
155  }
156  } else {
157  LogWarning("MissingProduct") << "L1Upgrade tau's not found." << std::endl;
158  }
159  }
160  }
161 
162  if (jetCheck_) {
164  iEvent.getByToken(jetToken_, XTMP);
165  if (XTMP.isValid()) {
166  cout << "INFO: L1T found jet collection.\n";
167  for (int ibx = XTMP->getFirstBX(); ibx <= XTMP->getLastBX(); ++ibx) {
168  for (auto it = XTMP->begin(ibx); it != XTMP->end(ibx); it++) {
169  if (it->et() > 0) {
170  if (bxZeroOnly_ && (ibx != 0))
171  continue;
172  jetCount_++;
173  cout << "bx: " << ibx << " et: " << it->et() << " eta: " << it->eta() << " phi: " << it->phi()
174  << "\n";
175  }
176  }
177  }
178  } else {
179  LogWarning("MissingProduct") << "L1T upgrade jets not found." << std::endl;
180  }
181  }
182 
183  if (sumCheck_) {
185  iEvent.getByToken(sumToken_, XTMP);
186  if (XTMP.isValid()) {
187  cout << "INFO: L1T found sum collection.\n";
188  for (int ibx = XTMP->getFirstBX(); ibx <= XTMP->getLastBX(); ++ibx) {
189  for (auto it = XTMP->begin(ibx); it != XTMP->end(ibx); it++) {
190  //if (it->et() > 0) {
191  if (bxZeroOnly_ && (ibx != 0))
192  continue;
193  sumCount_++;
194  cout << "bx: " << ibx << " et: " << it->et() << " eta: " << it->eta() << " phi: " << it->phi()
195  << " type: " << it->getType() << "\n";
196  //}
197  }
198  }
199  } else {
200  LogWarning("MissingProduct") << "L1T upgrade sums not found." << std::endl;
201  }
202  }
203 
204  if (muonCheck_) {
206  iEvent.getByToken(muonToken_, XTMP);
207  if (XTMP.isValid()) {
208  cout << "INFO: L1T found muon collection.\n";
209  for (int ibx = XTMP->getFirstBX(); ibx <= XTMP->getLastBX(); ++ibx) {
210  for (auto it = XTMP->begin(ibx); it != XTMP->end(ibx); it++) {
211  if (it->et() > 0) {
212  if (bxZeroOnly_ && (ibx != 0))
213  continue;
214  muonCount_++;
215  cout << "bx: " << ibx << " et: " << it->et() << " eta: " << it->eta() << " phi: " << it->phi()
216  << "\n";
217  }
218  }
219  }
220  } else {
221  LogWarning("MissingProduct") << "L1T upgrade muons not found." << std::endl;
222  }
223  }
224 }
edm::EDGetTokenT< MuonBxCollection > muonToken_
Definition: L1TSummary.cc:56
bool sumCheck_
Definition: L1TSummary.cc:47
bool egCheck_
Definition: L1TSummary.cc:44
edm::EDGetTokenT< EtSumBxCollection > sumToken_
Definition: L1TSummary.cc:55
bool muonCheck_
Definition: L1TSummary.cc:48
bool tauCheck_
Definition: L1TSummary.cc:45
int iEvent
Definition: GenABIO.cc:224
bool bxZeroOnly_
Definition: L1TSummary.cc:49
std::vector< edm::EDGetTokenT< TauBxCollection > > tauTokens_
Definition: L1TSummary.cc:53
int muonCount_
Definition: L1TSummary.cc:63
int tauCount_
Definition: L1TSummary.cc:60
bool isValid() const
Definition: HandleBase.h:70
int sumCount_
Definition: L1TSummary.cc:62
edm::EDGetTokenT< EGammaBxCollection > egToken_
Definition: L1TSummary.cc:52
int jetCount_
Definition: L1TSummary.cc:61
bool jetCheck_
Definition: L1TSummary.cc:46
edm::EDGetTokenT< JetBxCollection > jetToken_
Definition: L1TSummary.cc:54
tuple cout
Definition: gather_cfg.py:144
Log< level::Warning, false > LogWarning
int egCount_
Definition: L1TSummary.cc:59
string tag_
Definition: L1TSummary.cc:41
void L1TSummary::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 226 of file L1TSummary.cc.

References gather_cfg::cout.

226 { cout << "INFO: L1TSummary module beginJob called.\n"; }
tuple cout
Definition: gather_cfg.py:144
void L1TSummary::beginLuminosityBlock ( LuminosityBlock const &  ,
EventSetup const &   
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 247 of file L1TSummary.cc.

247 {}
void L1TSummary::beginRun ( Run const &  run,
EventSetup const &  iSetup 
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 243 of file L1TSummary.cc.

243 {}
void L1TSummary::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 228 of file L1TSummary.cc.

References gather_cfg::cout.

228  {
229  cout << "INFO: L1T Summary for " << tag_ << "\n";
230  cout << "INFO: count of non-zero candidates for each type follows:\n";
231  if (egCheck_)
232  cout << "eg: " << egCount_ << "\n";
233  if (tauCheck_)
234  cout << "tau: " << tauCount_ << "\n";
235  if (jetCheck_)
236  cout << "jet: " << jetCount_ << "\n";
237  if (sumCheck_)
238  cout << "sum: " << sumCount_ << "\n";
239  if (muonCheck_)
240  cout << "muon: " << muonCount_ << "\n";
241 }
bool sumCheck_
Definition: L1TSummary.cc:47
bool egCheck_
Definition: L1TSummary.cc:44
bool muonCheck_
Definition: L1TSummary.cc:48
bool tauCheck_
Definition: L1TSummary.cc:45
int muonCount_
Definition: L1TSummary.cc:63
int tauCount_
Definition: L1TSummary.cc:60
int sumCount_
Definition: L1TSummary.cc:62
int jetCount_
Definition: L1TSummary.cc:61
bool jetCheck_
Definition: L1TSummary.cc:46
tuple cout
Definition: gather_cfg.py:144
int egCount_
Definition: L1TSummary.cc:59
string tag_
Definition: L1TSummary.cc:41
void L1TSummary::endLuminosityBlock ( LuminosityBlock const &  ,
EventSetup const &   
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 249 of file L1TSummary.cc.

249 {}
void L1TSummary::endRun ( Run const &  ,
EventSetup const &   
)
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 245 of file L1TSummary.cc.

245 {}
void L1TSummary::fillDescriptions ( ConfigurationDescriptions descriptions)
static

Definition at line 251 of file L1TSummary.cc.

References edm::ConfigurationDescriptions::addDefault(), submitPVResolutionJobs::desc, and edm::ParameterSetDescription::setUnknown().

251  {
252  //The following says we do not know what parameters are allowed so do no validation
253  // Please change this to state exactly what you do use, even if it is no parameters
255  desc.setUnknown();
256  descriptions.addDefault(desc);
257 }
void addDefault(ParameterSetDescription const &psetDescription)

Member Data Documentation

bool L1TSummary::bxZeroOnly_
private

Definition at line 49 of file L1TSummary.cc.

bool L1TSummary::egCheck_
private

Definition at line 44 of file L1TSummary.cc.

int L1TSummary::egCount_
private

Definition at line 59 of file L1TSummary.cc.

edm::EDGetTokenT<EGammaBxCollection> L1TSummary::egToken_
private

Definition at line 52 of file L1TSummary.cc.

bool L1TSummary::jetCheck_
private

Definition at line 46 of file L1TSummary.cc.

int L1TSummary::jetCount_
private

Definition at line 61 of file L1TSummary.cc.

edm::EDGetTokenT<JetBxCollection> L1TSummary::jetToken_
private

Definition at line 54 of file L1TSummary.cc.

bool L1TSummary::muonCheck_
private

Definition at line 48 of file L1TSummary.cc.

int L1TSummary::muonCount_
private

Definition at line 63 of file L1TSummary.cc.

edm::EDGetTokenT<MuonBxCollection> L1TSummary::muonToken_
private

Definition at line 56 of file L1TSummary.cc.

bool L1TSummary::sumCheck_
private

Definition at line 47 of file L1TSummary.cc.

int L1TSummary::sumCount_
private

Definition at line 62 of file L1TSummary.cc.

edm::EDGetTokenT<EtSumBxCollection> L1TSummary::sumToken_
private

Definition at line 55 of file L1TSummary.cc.

string L1TSummary::tag_
private

Definition at line 41 of file L1TSummary.cc.

bool L1TSummary::tauCheck_
private

Definition at line 45 of file L1TSummary.cc.

int L1TSummary::tauCount_
private

Definition at line 60 of file L1TSummary.cc.

std::vector<edm::EDGetTokenT<TauBxCollection> > L1TSummary::tauTokens_
private

Definition at line 53 of file L1TSummary.cc.