CMS 3D CMS Logo

Public Member Functions | Private Member Functions

CSCTFConfigTestAnalyzer Class Reference

Inheritance diagram for CSCTFConfigTestAnalyzer:
edm::EDAnalyzer

List of all members.

Public Member Functions

 CSCTFConfigTestAnalyzer (const edm::ParameterSet &)
 ~CSCTFConfigTestAnalyzer ()

Private Member Functions

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

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.

{
   //now do what ever initialization is needed

}
CSCTFConfigTestAnalyzer::~CSCTFConfigTestAnalyzer ( )

Definition at line 68 of file CSCTFConfigTestAnalyzer.cc.

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

}

Member Function Documentation

void CSCTFConfigTestAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

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.

{
   using namespace edm;

   ESHandle< L1TriggerKeyList > pList ;
   iSetup.get< L1TriggerKeyListRcd >().get( pList ) ;

   std::cout << "Found " << pList->tscKeyToTokenMap().size() << " TSC keys:"
             << std::endl ;

   L1TriggerKeyList::KeyToToken::const_iterator iTSCKey =
     pList->tscKeyToTokenMap().begin() ;
   L1TriggerKeyList::KeyToToken::const_iterator eTSCKey =
     pList->tscKeyToTokenMap().end() ;
   for( ; iTSCKey != eTSCKey ; ++iTSCKey )
     {
       std::cout << iTSCKey->first << " " << iTSCKey->second << std::endl ;
     }
   std::cout << std::endl ;

   L1TriggerKeyList::RecordToKeyToToken::const_iterator iRec =
     pList->recordTypeToKeyToTokenMap().begin() ;
   L1TriggerKeyList::RecordToKeyToToken::const_iterator eRec =
     pList->recordTypeToKeyToTokenMap().end() ;
   for( ; iRec != eRec ; ++iRec )
     {
       const L1TriggerKeyList::KeyToToken& keyTokenMap = iRec->second ;
       std::cout << "For record@type " << iRec->first << ", found "
                 << keyTokenMap.size() << " keys:" << std::endl ;

       L1TriggerKeyList::KeyToToken::const_iterator iKey = keyTokenMap.begin();
       L1TriggerKeyList::KeyToToken::const_iterator eKey = keyTokenMap.end() ;
       for( ; iKey != eKey ; ++iKey )
         {
           std::cout << iKey->first << " " << iKey->second << std::endl ;
         }
       std::cout << std::endl ;
     }

   try
     {
       ESHandle< L1TriggerKey > pKey ;
       iSetup.get< L1TriggerKeyRcd >().get( pKey ) ;

       // std::cout << "Current TSC key = " << pKey->getTSCKey() << std::endl ;
       std::cout << "Current TSC key = " << pKey->tscKey() << std::endl ;

       std::cout << "Current subsystem keys:" << std::endl ;
       std::cout << "CSCTF " << pKey->subsystemKey( L1TriggerKey::kCSCTF )
                 << std::endl ;
       std::cout << "DTTF " << pKey->subsystemKey( L1TriggerKey::kDTTF )
                 << std::endl ;
       std::cout << "RPC " << pKey->subsystemKey( L1TriggerKey::kRPC )
                 << std::endl ;
       std::cout << "GMT " << pKey->subsystemKey( L1TriggerKey::kGMT )
                 << std::endl ;
       std::cout << "RCT " << pKey->subsystemKey( L1TriggerKey::kRCT )
                 << std::endl ;
       std::cout << "GCT " << pKey->subsystemKey( L1TriggerKey::kGCT )
                 << std::endl ;
       std::cout << "TSP0 " << pKey->subsystemKey( L1TriggerKey::kTSP0 )
                 << std::endl ;

       const L1TriggerKey::RecordToKey& recKeyMap = pKey->recordToKeyMap() ;
       L1TriggerKey::RecordToKey::const_iterator iRec = recKeyMap.begin() ;
       L1TriggerKey::RecordToKey::const_iterator eRec = recKeyMap.end() ;
       for( ; iRec != eRec ; ++iRec )
         {
           std::cout << iRec->first << " " << iRec->second << std::endl ;
         }
     }
   catch( cms::Exception& ex )
     {
       std::cout << "No L1TriggerKey found." << std::endl ;
     }

}
void CSCTFConfigTestAnalyzer::beginJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 164 of file CSCTFConfigTestAnalyzer.cc.

{
}
void CSCTFConfigTestAnalyzer::endJob ( void  ) [private, virtual]

Reimplemented from edm::EDAnalyzer.

Definition at line 170 of file CSCTFConfigTestAnalyzer.cc.

                                {
}