39 std::cout <<
"Initalizing HLTConfigProvider" << std::endl;
60 for (
auto & parameterName : parameterNames){
61 if ( parameterName ==
"Debug" )
_Debug = myHltParams.getParameter<
bool>( parameterName );
67 const int kMaxTrigFlag = 10000;
72 const int kMaxL1Flag = 10000;
73 l1flag =
new int[kMaxL1Flag];
81 const int kMaxHLTPart = 10000;
82 hltppt =
new float[kMaxHLTPart];
83 hltpeta =
new float[kMaxHLTPart];
102 int ntrigs = hltresults->
size();
103 if (ntrigs==0){
std::cout <<
"%HLTInfo -- No trigger name given in TriggerResults of the input " << std::endl;}
109 for (
int itrig = 0; itrig != ntrigs; ++itrig) {
110 TString trigName = triggerNames.
triggerName(itrig);
111 HltTree->Branch(trigName,
trigflag+itrig,trigName+
"/I");
112 HltTree->Branch(trigName+
"_Prescl",
trigPrescl+itrig,trigName+
"_Prescl/I");
117 TString trigName(dummyBranche.data());
118 bool addThisBranch = 1;
119 for (
int itrig = 0; itrig != ntrigs; ++itrig) {
120 TString realTrigName = triggerNames.
triggerName(itrig);
121 if(trigName == realTrigName) addThisBranch = 0;
124 HltTree->Branch(trigName,
trigflag+itdum,trigName+
"/I");
125 HltTree->Branch(trigName+
"_Prescl",
trigPrescl+itdum,trigName+
"_Prescl/I");
141 for (
int itrig = 0; itrig != ntrigs; ++itrig){
154 if (
_Debug)
std::cout <<
"%HLTInfo -- Number of HLT Triggers: " << ntrigs << std::endl;
155 std::cout <<
"%HLTInfo -- HLTTrigger(" << itrig <<
"): " << trigName <<
" = " << accept << std::endl;
159 else {
if (
_Debug)
std::cout <<
"%HLTInfo -- No Trigger Result" << std::endl;}
192 iEvent, trigCategory, iErrorCode);
193 if (iErrorCode == 0) {
194 if (
_Debug)
std::cout <<
"%Prescale set index: " << pfSetIndexAlgorithmTrigger << std::endl;
196 std::cout <<
"%Could not extract Prescale set index from event record. Error code: " << iErrorCode << std::endl;
202 int ntrigs = l1results->
size();
203 if (ntrigs==0){
std::cout <<
"%L1Results -- No trigger name given in TriggerResults of the input " << std::endl;}
212 std::string const & trigName = keyval.second.getName();
213 unsigned int index = keyval.second.getIndex();
214 if (
_Debug)
std::cerr <<
"bit: " << index <<
"\tname: " << trigName << std::endl;
219 TString l1trigName =
static_cast<const char *
>(
algoBitToName[itrig]);
222 HltTree->Branch(l1trigName,
l1flag+itrig,l1trigName+
"/I");
223 HltTree->Branch(l1trigName+
"_Prescl",
l1Prescl+itrig,l1trigName+
"_Prescl/I");
237 if (myflag ) {
l1flag[itrig] = 1; }
238 else {
l1flag[itrig] =0 ; }
254 else {
if (
_Debug)
std::cout <<
"%L1Results -- No Trigger Result" << std::endl;}
void analyze(const edm::Handle< edm::TriggerResults > &hltresults, const edm::Handle< GlobalAlgBlkBxCollection > &l1results, edm::EventSetup const &eventSetup, edm::Event const &iEvent, TTree *tree)
T getParameter(std::string const &) const
std::vector< std::string > dummyBranches_
T getUntrackedParameter(std::string const &, T const &) const
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
unsigned size(int bx) const
void setup(const edm::ParameterSet &pSet, TTree *tree)
std::vector< bool > const & getAlgoDecisionFinal() const
const int prescaleFactorSetIndex(const edm::Event &iEvent, const TriggerCategory &trigCategory, int &errorCode) const
bool accept() const
Has at least one path accepted the event?
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
static const unsigned int maxPhysicsTriggers
unsigned int size() const
Get number of paths stored.
void beginRun(const edm::Run &, const edm::EventSetup &)
std::vector< std::string > getParameterNames() const
std::string const & triggerName(unsigned int index) const
std::unique_ptr< HLTPrescaleProvider > hltPrescaleProvider_
const T & at(int bx, unsigned i) const
const int prescaleFactor(const edm::Event &iEvent, const std::string &nameAlgoTechTrig, int &errorCode) const
return prescale factor for a given algorithm or technical trigger