test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 ()
 
- 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 ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &) override
 
virtual void beginJob () override
 
virtual 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 &)
 
- 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 36 of file CSCTFConfigTestAnalyzer.cc.

Constructor & Destructor Documentation

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

Definition at line 61 of file CSCTFConfigTestAnalyzer.cc.

63 {
64  //now do what ever initialization is needed
65 
66 }
CSCTFConfigTestAnalyzer::~CSCTFConfigTestAnalyzer ( )

Definition at line 69 of file CSCTFConfigTestAnalyzer.cc.

70 {
71 
72  // do anything here that needs to be done at desctruction time
73  // (e.g. close files, deallocate resources etc.)
74 
75 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 84 of file CSCTFConfigTestAnalyzer.cc.

References gather_cfg::cout, edm::EventSetup::get(), L1TriggerKey::kCSCTF, L1TriggerKey::kDTTF, L1TriggerKey::kGCT, L1TriggerKey::kGMT, L1TriggerKey::kRCT, L1TriggerKey::kRPC, and L1TriggerKey::kTSP0.

85 {
86  using namespace edm;
87 
89  iSetup.get< L1TriggerKeyListRcd >().get( pList ) ;
90 
91  std::cout << "Found " << pList->tscKeyToTokenMap().size() << " TSC keys:"
92  << std::endl ;
93 
94  L1TriggerKeyList::KeyToToken::const_iterator iTSCKey =
95  pList->tscKeyToTokenMap().begin() ;
96  L1TriggerKeyList::KeyToToken::const_iterator eTSCKey =
97  pList->tscKeyToTokenMap().end() ;
98  for( ; iTSCKey != eTSCKey ; ++iTSCKey )
99  {
100  std::cout << iTSCKey->first << " " << iTSCKey->second << std::endl ;
101  }
102  std::cout << std::endl ;
103 
104  L1TriggerKeyList::RecordToKeyToToken::const_iterator iRec =
105  pList->recordTypeToKeyToTokenMap().begin() ;
106  L1TriggerKeyList::RecordToKeyToToken::const_iterator eRec =
107  pList->recordTypeToKeyToTokenMap().end() ;
108  for( ; iRec != eRec ; ++iRec )
109  {
110  const L1TriggerKeyList::KeyToToken& keyTokenMap = iRec->second ;
111  std::cout << "For record@type " << iRec->first << ", found "
112  << keyTokenMap.size() << " keys:" << std::endl ;
113 
114  L1TriggerKeyList::KeyToToken::const_iterator iKey = keyTokenMap.begin();
115  L1TriggerKeyList::KeyToToken::const_iterator eKey = keyTokenMap.end() ;
116  for( ; iKey != eKey ; ++iKey )
117  {
118  std::cout << iKey->first << " " << iKey->second << std::endl ;
119  }
120  std::cout << std::endl ;
121  }
122 
123  try
124  {
126  iSetup.get< L1TriggerKeyRcd >().get( pKey ) ;
127 
128  // std::cout << "Current TSC key = " << pKey->getTSCKey() << std::endl ;
129  std::cout << "Current TSC key = " << pKey->tscKey() << std::endl ;
130 
131  std::cout << "Current subsystem keys:" << std::endl ;
132  std::cout << "CSCTF " << pKey->subsystemKey( L1TriggerKey::kCSCTF )
133  << std::endl ;
134  std::cout << "DTTF " << pKey->subsystemKey( L1TriggerKey::kDTTF )
135  << std::endl ;
136  std::cout << "RPC " << pKey->subsystemKey( L1TriggerKey::kRPC )
137  << std::endl ;
138  std::cout << "GMT " << pKey->subsystemKey( L1TriggerKey::kGMT )
139  << std::endl ;
140  std::cout << "RCT " << pKey->subsystemKey( L1TriggerKey::kRCT )
141  << std::endl ;
142  std::cout << "GCT " << pKey->subsystemKey( L1TriggerKey::kGCT )
143  << std::endl ;
144  std::cout << "TSP0 " << pKey->subsystemKey( L1TriggerKey::kTSP0 )
145  << std::endl ;
146 
147  const L1TriggerKey::RecordToKey& recKeyMap = pKey->recordToKeyMap() ;
148  L1TriggerKey::RecordToKey::const_iterator iRec = recKeyMap.begin() ;
149  L1TriggerKey::RecordToKey::const_iterator eRec = recKeyMap.end() ;
150  for( ; iRec != eRec ; ++iRec )
151  {
152  std::cout << iRec->first << " " << iRec->second << std::endl ;
153  }
154  }
155  catch( cms::Exception& ex )
156  {
157  std::cout << "No L1TriggerKey found." << std::endl ;
158  }
159 
160 }
std::map< std::string, std::string > RecordToKey
Definition: L1TriggerKey.h:26
std::map< std::string, std::string > KeyToToken
const T & get() const
Definition: EventSetup.h:56
tuple cout
Definition: gather_cfg.py:145
void CSCTFConfigTestAnalyzer::beginJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 165 of file CSCTFConfigTestAnalyzer.cc.

166 {
167 }
void CSCTFConfigTestAnalyzer::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 171 of file CSCTFConfigTestAnalyzer.cc.

171  {
172 }