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

Public Member Functions

 CSCTFConfigTestAnalyzer (const edm::ParameterSet &)
 
 ~CSCTFConfigTestAnalyzer ()
 
- Public Member Functions inherited from edm::EDAnalyzer
 EDAnalyzer ()
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 

Private Member Functions

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

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
typedef WorkerT< EDAnalyzerWorkerType
 
- 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::EDAnalyzer
CurrentProcessingContext const * currentContext () const
 

Detailed Description

Definition at line 35 of file CSCTFConfigTestAnalyzer.cc.

Constructor & Destructor Documentation

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

Definition at line 60 of file CSCTFConfigTestAnalyzer.cc.

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

Definition at line 68 of file CSCTFConfigTestAnalyzer.cc.

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

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 83 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.

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

Reimplemented from edm::EDAnalyzer.

Definition at line 164 of file CSCTFConfigTestAnalyzer.cc.

165 {
166 }
void CSCTFConfigTestAnalyzer::endJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 170 of file CSCTFConfigTestAnalyzer.cc.

170  {
171 }