It's only a convenience method for end-users to access the results by name
rather than by index, it's not used in production: it doesn't modify the
persistent data, it just saves the trigger names into a transient
datamember.

    Giovanni
Il 14-apr-2014 19:24 "Slava Krutelyov" <notifications@github.com> ha
scritto:

> In DataFormats/PatCandidates/interface/PackedTriggerPrescales.h:
>
> > +        PackedTriggerPrescales(const edm::Handle<edm::TriggerResults> & handle) ;
> > +        ~PackedTriggerPrescales() {}
> > +
> > +        // get prescale by index.
> > +        int getPrescaleForIndex(int index) const ;
> > +        // get prescale by name or name prefix (if setTriggerNames was called)
> > +        int getPrescaleForName(const std::string & name, bool prefixOnly=false) const ;
> > +
> > +        // return the TriggerResults associated with this
> > +        const edm::TriggerResults & triggerResults() const {
> > +            return *edm::getProduct<edm::TriggerResults>(triggerResults_);
> > +        }
> > +
> > +        // use this method first if you want to be able to access the prescales by name
> > +        // you can get the TriggerNames from the TriggerResults and the Event (edm or fwlite)
> > +        void setTriggerNames(const edm::TriggerNames &names) const { triggerNames_ = &names; }
>
> not thread safe?
> a modifier const method
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/cms-sw/cmssw/pull/3253/files#r11596185>
> .
>