CMS 3D CMS Logo

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

Public Member Functions

 CSCTFConfigTestAnalyzer (const edm::ParameterSet &)
 
- 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 final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const 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
 
bool wantsStreamRuns () const
 
 ~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)
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 

Private Attributes

edm::ESGetToken< L1TriggerKeyList, L1TriggerKeyListRcdkeyListToken_
 
edm::ESGetToken< L1TriggerKey, L1TriggerKeyRcdkeyToken_
 

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 33 of file CSCTFConfigTestAnalyzer.cc.

Constructor & Destructor Documentation

◆ CSCTFConfigTestAnalyzer()

CSCTFConfigTestAnalyzer::CSCTFConfigTestAnalyzer ( const edm::ParameterSet iConfig)
explicit

Definition at line 56 of file CSCTFConfigTestAnalyzer.cc.

56  : keyToken_(esConsumes()) {
57  //now do what ever initialization is needed
58 }
edm::ESGetToken< L1TriggerKey, L1TriggerKeyRcd > keyToken_

Member Function Documentation

◆ analyze()

void CSCTFConfigTestAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 65 of file CSCTFConfigTestAnalyzer.cc.

References gather_cfg::cout, edm::EventSetup::getHandle(), L1TriggerKey::kCSCTF, L1TriggerKey::kDTTF, keyListToken_, keyToken_, L1TriggerKey::kGCT, L1TriggerKey::kGMT, L1TriggerKey::kRCT, L1TriggerKey::kRPC, L1TriggerKey::kTSP0, L1TriggerKey::recordToKeyMap(), L1TriggerKeyList::recordTypeToKeyToTokenMap(), L1TriggerKey::subsystemKey(), L1TriggerKey::tscKey(), and L1TriggerKeyList::tscKeyToTokenMap().

65  {
66  using namespace edm;
67 
69 
70  std::cout << "Found " << pList->tscKeyToTokenMap().size() << " TSC keys:" << std::endl;
71 
72  L1TriggerKeyList::KeyToToken::const_iterator iTSCKey = pList->tscKeyToTokenMap().begin();
73  L1TriggerKeyList::KeyToToken::const_iterator eTSCKey = pList->tscKeyToTokenMap().end();
74  for (; iTSCKey != eTSCKey; ++iTSCKey) {
75  std::cout << iTSCKey->first << " " << iTSCKey->second << std::endl;
76  }
77  std::cout << std::endl;
78 
79  L1TriggerKeyList::RecordToKeyToToken::const_iterator iRec = pList->recordTypeToKeyToTokenMap().begin();
80  L1TriggerKeyList::RecordToKeyToToken::const_iterator eRec = pList->recordTypeToKeyToTokenMap().end();
81  for (; iRec != eRec; ++iRec) {
82  const L1TriggerKeyList::KeyToToken& keyTokenMap = iRec->second;
83  std::cout << "For record@type " << iRec->first << ", found " << keyTokenMap.size() << " keys:" << std::endl;
84 
85  L1TriggerKeyList::KeyToToken::const_iterator iKey = keyTokenMap.begin();
86  L1TriggerKeyList::KeyToToken::const_iterator eKey = keyTokenMap.end();
87  for (; iKey != eKey; ++iKey) {
88  std::cout << iKey->first << " " << iKey->second << std::endl;
89  }
90  std::cout << std::endl;
91  }
92 
93  try {
95 
96  // std::cout << "Current TSC key = " << pKey->getTSCKey() << std::endl ;
97  std::cout << "Current TSC key = " << pKey->tscKey() << std::endl;
98 
99  std::cout << "Current subsystem keys:" << std::endl;
100  std::cout << "CSCTF " << pKey->subsystemKey(L1TriggerKey::kCSCTF) << std::endl;
101  std::cout << "DTTF " << pKey->subsystemKey(L1TriggerKey::kDTTF) << std::endl;
102  std::cout << "RPC " << pKey->subsystemKey(L1TriggerKey::kRPC) << std::endl;
103  std::cout << "GMT " << pKey->subsystemKey(L1TriggerKey::kGMT) << std::endl;
104  std::cout << "RCT " << pKey->subsystemKey(L1TriggerKey::kRCT) << std::endl;
105  std::cout << "GCT " << pKey->subsystemKey(L1TriggerKey::kGCT) << std::endl;
106  std::cout << "TSP0 " << pKey->subsystemKey(L1TriggerKey::kTSP0) << std::endl;
107 
108  const L1TriggerKey::RecordToKey& recKeyMap = pKey->recordToKeyMap();
109  L1TriggerKey::RecordToKey::const_iterator iRec = recKeyMap.begin();
110  L1TriggerKey::RecordToKey::const_iterator eRec = recKeyMap.end();
111  for (; iRec != eRec; ++iRec) {
112  std::cout << iRec->first << " " << iRec->second << std::endl;
113  }
114  } catch (cms::Exception& ex) {
115  std::cout << "No L1TriggerKey found." << std::endl;
116  }
117 }
edm::ESGetToken< L1TriggerKeyList, L1TriggerKeyListRcd > keyListToken_
std::map< std::string, std::string > RecordToKey
Definition: L1TriggerKey.h:25
std::map< std::string, std::string > KeyToToken
const RecordToKey & recordToKeyMap() const
Definition: L1TriggerKey.h:76
edm::ESGetToken< L1TriggerKey, L1TriggerKeyRcd > keyToken_
const KeyToToken & tscKeyToTokenMap() const
const RecordToKeyToToken & recordTypeToKeyToTokenMap() const
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:130
const std::string & subsystemKey(L1Subsystems subsystem) const
Definition: L1TriggerKey.h:71
HLT enums.
const std::string & tscKey() const
Definition: L1TriggerKey.h:69

Member Data Documentation

◆ keyListToken_

edm::ESGetToken<L1TriggerKeyList, L1TriggerKeyListRcd> CSCTFConfigTestAnalyzer::keyListToken_
private

Definition at line 41 of file CSCTFConfigTestAnalyzer.cc.

Referenced by analyze().

◆ keyToken_

edm::ESGetToken<L1TriggerKey, L1TriggerKeyRcd> CSCTFConfigTestAnalyzer::keyToken_
private

Definition at line 42 of file CSCTFConfigTestAnalyzer.cc.

Referenced by analyze().