CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes

L1CaloAlgoBase< tInputCollection, tOutputCollection > Class Template Reference

#include <L1CaloAlgoBase.h>

Inheritance diagram for L1CaloAlgoBase< tInputCollection, tOutputCollection >:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

virtual void algorithm (const int &, const int &)=0
virtual void initialize ()
 L1CaloAlgoBase (const edm::ParameterSet &)
std::string sourceName () const
virtual ~L1CaloAlgoBase ()

Protected Member Functions

tInputCollection::const_iterator fetch (const int &, const int &)

Protected Attributes

edm::ESHandle< L1CaloTriggerSetupmCaloTriggerSetup
int mEtaIncrement
int mEtaOffset
edm::Handle< tInputCollection > mInputCollection
std::auto_ptr< tOutputCollection > mOutputCollection
int mPhiIncrement
int mPhiOffset
bool mVerbosity

Private Member Functions

void produce (edm::Event &, const edm::EventSetup &)

Private Attributes

edm::InputTag mInputCollectionTag

Detailed Description

template<typename tInputCollection, typename tOutputCollection>
class L1CaloAlgoBase< tInputCollection, tOutputCollection >

Definition at line 28 of file L1CaloAlgoBase.h.


Constructor & Destructor Documentation

template<typename tInputCollection , typename tOutputCollection >
L1CaloAlgoBase< tInputCollection, tOutputCollection >::L1CaloAlgoBase ( const edm::ParameterSet iConfig) [explicit]

Definition at line 64 of file L1CaloAlgoBase.h.

                                                                                                         :
mInputCollectionTag( iConfig.getParameter < edm::InputTag > ( "src" ) ),
mVerbosity( iConfig.getUntrackedParameter < bool > ( "verbosity", false ) ), 
mPhiOffset( 0 ), 
mEtaOffset( 0 ), 
mPhiIncrement( 1 ), 
mEtaIncrement( 1 )
{
        produces < tOutputCollection > (  );
}
template<typename tInputCollection , typename tOutputCollection >
L1CaloAlgoBase< tInputCollection, tOutputCollection >::~L1CaloAlgoBase ( ) [virtual]

Definition at line 77 of file L1CaloAlgoBase.h.

{
}

Member Function Documentation

template<typename tInputCollection, typename tOutputCollection>
virtual void L1CaloAlgoBase< tInputCollection, tOutputCollection >::algorithm ( const int &  ,
const int &   
) [pure virtual]
template<typename tInputCollection , typename tOutputCollection >
tInputCollection::const_iterator L1CaloAlgoBase< tInputCollection, tOutputCollection >::fetch ( const int &  aEta,
const int &  aPhi 
) [protected]

Definition at line 93 of file L1CaloAlgoBase.h.

                                                                                                                                        {
        int lIndex = mCaloTriggerSetup->getBin( aEta, aPhi );
        std::pair < int, int >lEtaPhi = mCaloTriggerSetup->getTowerEtaPhi( lIndex );
        return mInputCollection->find( lEtaPhi.first , lEtaPhi.second );
}
template<typename tInputCollection, typename tOutputCollection>
virtual void L1CaloAlgoBase< tInputCollection, tOutputCollection >::initialize ( ) [inline, virtual]

Reimplemented in L1CaloClusterProducer.

Definition at line 35 of file L1CaloAlgoBase.h.

{}
template<typename tInputCollection , typename tOutputCollection >
void L1CaloAlgoBase< tInputCollection, tOutputCollection >::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
) [private, virtual]

Implements edm::EDProducer.

Definition at line 106 of file L1CaloAlgoBase.h.

References algorithm(), gather_cfg::cout, edm::EventSetup::get(), edm::Event::getByLabel(), mergeVDriftHistosByStation::name, and edm::Event::put().

{

        iSetup.get < L1CaloTriggerSetupRcd > (  ).get( mCaloTriggerSetup );
        this->initialize();

        iEvent.getByLabel( mInputCollectionTag, mInputCollection );

        mOutputCollection = std::auto_ptr < tOutputCollection > ( new tOutputCollection );


        int lPhiMin = mCaloTriggerSetup->phiMin(  );
        int lPhiMax = mCaloTriggerSetup->phiMax(  ) + mPhiOffset;
        int lEtaMin = mCaloTriggerSetup->etaMin(  );
        int lEtaMax = mCaloTriggerSetup->etaMax(  ) + mEtaOffset;

        for ( int lEta = lEtaMin; lEta <= lEtaMax; lEta += mEtaIncrement )
        {
                for ( int lPhi = lPhiMin; lPhi <= lPhiMax; lPhi += mPhiIncrement )
                {
                        this->algorithm( lEta, lPhi );
                }
        }


#ifdef __GNUG__
        if( mVerbosity )
        {
                int lStatus=0;
                std::cout << "Algorithm "
                                << abi::__cxa_demangle(typeid(*this).name(), 0,0, &lStatus)
                                << " converted " 
                                << mInputCollection->size()
                                << " x "
                                << abi::__cxa_demangle(typeid(typename tInputCollection::value_type).name(), 0,0, &lStatus)
                                << " into "
                                << mOutputCollection->size() 
                                << " x " 
                                << abi::__cxa_demangle(typeid(typename tOutputCollection::value_type).name(), 0,0, &lStatus)
                                << std::endl;
        }
#endif

        iEvent.put( mOutputCollection );

}
template<typename tInputCollection , typename tOutputCollection >
std::string L1CaloAlgoBase< tInputCollection, tOutputCollection >::sourceName ( ) const

Definition at line 82 of file L1CaloAlgoBase.h.

References AlCaHLTBitMon_QueryRunRegistry::string.


Member Data Documentation

template<typename tInputCollection, typename tOutputCollection>
edm::ESHandle< L1CaloTriggerSetup > L1CaloAlgoBase< tInputCollection, tOutputCollection >::mCaloTriggerSetup [protected]

Definition at line 53 of file L1CaloAlgoBase.h.

template<typename tInputCollection, typename tOutputCollection>
int L1CaloAlgoBase< tInputCollection, tOutputCollection >::mEtaIncrement [protected]

Definition at line 51 of file L1CaloAlgoBase.h.

template<typename tInputCollection, typename tOutputCollection>
int L1CaloAlgoBase< tInputCollection, tOutputCollection >::mEtaOffset [protected]

Definition at line 51 of file L1CaloAlgoBase.h.

template<typename tInputCollection, typename tOutputCollection>
edm::Handle< tInputCollection > L1CaloAlgoBase< tInputCollection, tOutputCollection >::mInputCollection [protected]

Definition at line 55 of file L1CaloAlgoBase.h.

template<typename tInputCollection, typename tOutputCollection>
edm::InputTag L1CaloAlgoBase< tInputCollection, tOutputCollection >::mInputCollectionTag [private]

Definition at line 44 of file L1CaloAlgoBase.h.

template<typename tInputCollection, typename tOutputCollection>
std::auto_ptr< tOutputCollection > L1CaloAlgoBase< tInputCollection, tOutputCollection >::mOutputCollection [protected]

Definition at line 56 of file L1CaloAlgoBase.h.

template<typename tInputCollection, typename tOutputCollection>
int L1CaloAlgoBase< tInputCollection, tOutputCollection >::mPhiIncrement [protected]

Definition at line 51 of file L1CaloAlgoBase.h.

template<typename tInputCollection, typename tOutputCollection>
int L1CaloAlgoBase< tInputCollection, tOutputCollection >::mPhiOffset [protected]

Definition at line 51 of file L1CaloAlgoBase.h.

template<typename tInputCollection, typename tOutputCollection>
bool L1CaloAlgoBase< tInputCollection, tOutputCollection >::mVerbosity [protected]

Definition at line 49 of file L1CaloAlgoBase.h.