CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
CSCTFConfigTestAnalyzer Class Reference
Inheritance diagram for CSCTFConfigTestAnalyzer:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

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

Private Member Functions

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

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 wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 33 of file CSCTFConfigTestAnalyzer.cc.

Constructor & Destructor Documentation

◆ CSCTFConfigTestAnalyzer()

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

Definition at line 57 of file CSCTFConfigTestAnalyzer.cc.

59 {
60  //now do what ever initialization is needed
61 }

◆ ~CSCTFConfigTestAnalyzer()

CSCTFConfigTestAnalyzer::~CSCTFConfigTestAnalyzer ( )
override

Definition at line 63 of file CSCTFConfigTestAnalyzer.cc.

63  {
64  // do anything here that needs to be done at desctruction time
65  // (e.g. close files, deallocate resources etc.)
66 }

Member Function Documentation

◆ analyze()

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

Implements edm::EDAnalyzer.

Definition at line 73 of file CSCTFConfigTestAnalyzer.cc.

73  {
74  using namespace edm;
75 
77  iSetup.get<L1TriggerKeyListRcd>().get(pList);
78 
79  std::cout << "Found " << pList->tscKeyToTokenMap().size() << " TSC keys:" << std::endl;
80 
81  L1TriggerKeyList::KeyToToken::const_iterator iTSCKey = pList->tscKeyToTokenMap().begin();
82  L1TriggerKeyList::KeyToToken::const_iterator eTSCKey = pList->tscKeyToTokenMap().end();
83  for (; iTSCKey != eTSCKey; ++iTSCKey) {
84  std::cout << iTSCKey->first << " " << iTSCKey->second << std::endl;
85  }
86  std::cout << std::endl;
87 
88  L1TriggerKeyList::RecordToKeyToToken::const_iterator iRec = pList->recordTypeToKeyToTokenMap().begin();
89  L1TriggerKeyList::RecordToKeyToToken::const_iterator eRec = pList->recordTypeToKeyToTokenMap().end();
90  for (; iRec != eRec; ++iRec) {
91  const L1TriggerKeyList::KeyToToken& keyTokenMap = iRec->second;
92  std::cout << "For record@type " << iRec->first << ", found " << keyTokenMap.size() << " keys:" << std::endl;
93 
94  L1TriggerKeyList::KeyToToken::const_iterator iKey = keyTokenMap.begin();
95  L1TriggerKeyList::KeyToToken::const_iterator eKey = keyTokenMap.end();
96  for (; iKey != eKey; ++iKey) {
97  std::cout << iKey->first << " " << iKey->second << std::endl;
98  }
99  std::cout << std::endl;
100  }
101 
102  try {
104  iSetup.get<L1TriggerKeyRcd>().get(pKey);
105 
106  // std::cout << "Current TSC key = " << pKey->getTSCKey() << std::endl ;
107  std::cout << "Current TSC key = " << pKey->tscKey() << std::endl;
108 
109  std::cout << "Current subsystem keys:" << std::endl;
110  std::cout << "CSCTF " << pKey->subsystemKey(L1TriggerKey::kCSCTF) << std::endl;
111  std::cout << "DTTF " << pKey->subsystemKey(L1TriggerKey::kDTTF) << std::endl;
112  std::cout << "RPC " << pKey->subsystemKey(L1TriggerKey::kRPC) << std::endl;
113  std::cout << "GMT " << pKey->subsystemKey(L1TriggerKey::kGMT) << std::endl;
114  std::cout << "RCT " << pKey->subsystemKey(L1TriggerKey::kRCT) << std::endl;
115  std::cout << "GCT " << pKey->subsystemKey(L1TriggerKey::kGCT) << std::endl;
116  std::cout << "TSP0 " << pKey->subsystemKey(L1TriggerKey::kTSP0) << std::endl;
117 
118  const L1TriggerKey::RecordToKey& recKeyMap = pKey->recordToKeyMap();
119  L1TriggerKey::RecordToKey::const_iterator iRec = recKeyMap.begin();
120  L1TriggerKey::RecordToKey::const_iterator eRec = recKeyMap.end();
121  for (; iRec != eRec; ++iRec) {
122  std::cout << iRec->first << " " << iRec->second << std::endl;
123  }
124  } catch (cms::Exception& ex) {
125  std::cout << "No L1TriggerKey found." << std::endl;
126  }
127 }

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

◆ beginJob()

void CSCTFConfigTestAnalyzer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 130 of file CSCTFConfigTestAnalyzer.cc.

130 {}

◆ endJob()

void CSCTFConfigTestAnalyzer::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 133 of file CSCTFConfigTestAnalyzer.cc.

133 {}
L1TriggerKey::kRPC
Definition: L1TriggerKey.h:27
L1TriggerKeyRcd
Definition: L1TriggerKeyRcd.h:30
edm
HLT enums.
Definition: AlignableModifier.h:19
L1TriggerKey::kGMT
Definition: L1TriggerKey.h:27
gather_cfg.cout
cout
Definition: gather_cfg.py:144
L1TriggerKey::RecordToKey
std::map< std::string, std::string > RecordToKey
Definition: L1TriggerKey.h:25
L1TriggerKeyList::recordTypeToKeyToTokenMap
const RecordToKeyToToken & recordTypeToKeyToTokenMap() const
Definition: L1TriggerKeyList.h:54
edm::EventSetup::get
T get() const
Definition: EventSetup.h:87
L1TriggerKey::kTSP0
Definition: L1TriggerKey.h:27
edm::ESHandle
Definition: DTSurvey.h:22
L1TriggerKey::recordToKeyMap
const RecordToKey & recordToKeyMap() const
Definition: L1TriggerKey.h:76
L1TriggerKey::kRCT
Definition: L1TriggerKey.h:27
L1TriggerKey::kDTTF
Definition: L1TriggerKey.h:27
L1TriggerKeyList::KeyToToken
std::map< std::string, std::string > KeyToToken
Definition: L1TriggerKeyList.h:37
L1TriggerKey::kGCT
Definition: L1TriggerKey.h:27
get
#define get
L1TriggerKey::tscKey
const std::string & tscKey() const
Definition: L1TriggerKey.h:69
L1TriggerKey::kCSCTF
Definition: L1TriggerKey.h:27
cms::Exception
Definition: Exception.h:70
L1TriggerKey::subsystemKey
const std::string & subsystemKey(L1Subsystems subsystem) const
Definition: L1TriggerKey.h:71
L1TriggerKeyList::tscKeyToTokenMap
const KeyToToken & tscKeyToTokenMap() const
Definition: L1TriggerKeyList.h:52
L1TriggerKeyListRcd
Definition: L1TriggerKeyListRcd.h:24