CMS 3D CMS Logo

Public Member Functions | Private Attributes

TriggerSummaryProducerRAW Class Reference

#include <TriggerSummaryProducerRAW.h>

Inheritance diagram for TriggerSummaryProducerRAW:
edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

virtual void produce (edm::Event &, const edm::EventSetup &)
 TriggerSummaryProducerRAW (const edm::ParameterSet &)
 ~TriggerSummaryProducerRAW ()

Private Attributes

std::vector< edm::Handle
< trigger::TriggerFilterObjectWithRefs > > 
fobs_
 handles to the filter objects
std::string pn_
 process name
edm::ProcessNameSelector selector_
 selector for getMany methods
edm::service::TriggerNamesServicetns_
 the pointer to the current TriggerNamesService

Detailed Description

This class is an EDProducer making the HLT summary object for RAW

Date:
2007/12/06 08:27:31
Revision:
1.1
Author:
Martin Grunewald

See header file for documentation

Date:
2010/11/08 15:47:45
Revision:
1.11
Author:
Martin Grunewald

Definition at line 33 of file TriggerSummaryProducerRAW.h.


Constructor & Destructor Documentation

TriggerSummaryProducerRAW::TriggerSummaryProducerRAW ( const edm::ParameterSet ps) [explicit]

Definition at line 22 of file TriggerSummaryProducerRAW.cc.

References edm::service::TriggerNamesService::getProcessName(), LogDebug, cmsCodeRules::cppFunctionSkipper::operator, pn_, selector_, and tns_.

                                                                              : 
  pn_(ps.getParameter<std::string>("processName")),
  selector_(edm::ProcessNameSelector(pn_)),
  tns_(), fobs_()
{
  if (pn_=="@") {
    // use tns
    if (edm::Service<edm::service::TriggerNamesService>().isAvailable()) {
      // get tns pointer
      tns_ = edm::Service<edm::service::TriggerNamesService>().operator->();
      if (tns_!=0) {
        pn_=tns_->getProcessName();
      } else {
        edm::LogError("TriggerSummaryProducerRaw") << "HLT Error: TriggerNamesService pointer = 0!";
        pn_="*";
      }
    } else {
      edm::LogError("TriggerSummaryProducerRaw") << "HLT Error: TriggerNamesService not available!";
      pn_="*";
    }
    selector_=edm::ProcessNameSelector(pn_);
  }

  LogDebug("TriggerSummaryProducerRaw") << "Using process name: '" << pn_ <<"'";
  produces<trigger::TriggerEventWithRefs>();

}
TriggerSummaryProducerRAW::~TriggerSummaryProducerRAW ( )

Definition at line 50 of file TriggerSummaryProducerRAW.cc.

{
}

Member Function Documentation

void TriggerSummaryProducerRAW::produce ( edm::Event iEvent,
const edm::EventSetup iSetup 
) [virtual]

Implements edm::EDProducer.

Definition at line 60 of file TriggerSummaryProducerRAW.cc.

References fobs_, edm::Event::getMany(), label, LogDebug, LogTrace, moduleLabel(), pn_, align_tpl::process, edm::Event::put(), dt_dqm_sourceclient_common_cff::reco, MultipleCompare::ref, selector_, and GlobalPosition_Frontier_DevDB_cff::tag.

{
   using namespace std;
   using namespace edm;
   using namespace reco;
   using namespace trigger;

   // reset from previous event
   fobs_.clear();

   // get all filter objects created in requested process
   iEvent.getMany(selector_,fobs_);
   const unsigned int nfob(fobs_.size());
   LogDebug("TriggerSummaryProducerRaw") << "Number of filter objects found: " << nfob;

   // construct single RAW product
   auto_ptr<TriggerEventWithRefs> product(new TriggerEventWithRefs(pn_,nfob));
   for (unsigned int ifob=0; ifob!=nfob; ++ifob) {
     const string& label    (fobs_[ifob].provenance()->moduleLabel());
     const string& instance (fobs_[ifob].provenance()->productInstanceName());
     const string& process  (fobs_[ifob].provenance()->processName());
     const InputTag tag(label,instance,process);
     LogTrace("TriggerSummaryProducerRaw")
       << ifob << " " << tag << endl
       << " Sizes: "
       << " 1/" << fobs_[ifob]->photonSize()
       << " 2/" << fobs_[ifob]->electronSize()
       << " 3/" << fobs_[ifob]->muonSize()
       << " 4/" << fobs_[ifob]->jetSize()
       << " 5/" << fobs_[ifob]->compositeSize()
       << " 6/" << fobs_[ifob]->basemetSize()
       << " 7/" << fobs_[ifob]->calometSize()
       << " 8/" << fobs_[ifob]->pixtrackSize()
       << " 9/" << fobs_[ifob]->l1emSize()
       << " A/" << fobs_[ifob]->l1muonSize()
       << " B/" << fobs_[ifob]->l1jetSize()
       << " C/" << fobs_[ifob]->l1etmissSize()
       << " D/" << fobs_[ifob]->l1hfringsSize()
       << endl;
     product->addFilterObject(tag,*fobs_[ifob]);
   }

   // place product in Event
   OrphanHandle<TriggerEventWithRefs> ref = iEvent.put(product);
   LogTrace("TriggerSummaryProducerRaw") << "Number of filter objects packed: " << ref->size();

   return;
}

Member Data Documentation

handles to the filter objects

Definition at line 48 of file TriggerSummaryProducerRAW.h.

Referenced by produce().

std::string TriggerSummaryProducerRAW::pn_ [private]

process name

Definition at line 42 of file TriggerSummaryProducerRAW.h.

Referenced by produce(), and TriggerSummaryProducerRAW().

selector for getMany methods

Definition at line 44 of file TriggerSummaryProducerRAW.h.

Referenced by produce(), and TriggerSummaryProducerRAW().

the pointer to the current TriggerNamesService

Definition at line 46 of file TriggerSummaryProducerRAW.h.

Referenced by TriggerSummaryProducerRAW().