Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

multithreading fix for 74x: L1GtTrigReport #11350

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions L1Trigger/GlobalTriggerAnalyzer/interface/L1GtTrigReport.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,9 @@

// user include files
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"

#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"

#include "FWCore/ParameterSet/interface/ParameterSet.h"

Expand All @@ -43,7 +42,7 @@ class L1GtTriggerMenu;

// class declaration

class L1GtTrigReport : public edm::EDAnalyzer
class L1GtTrigReport : public edm::one::EDAnalyzer<>
{

public:
Expand Down Expand Up @@ -119,19 +118,19 @@ class L1GtTrigReport : public edm::EDAnalyzer
private:

/// boolean flag to select the input record
bool m_useL1GlobalTriggerRecord;
const bool m_useL1GlobalTriggerRecord;

/// input tag for GT record (L1 GT DAQ record or L1 GT "lite" record):
edm::InputTag m_l1GtRecordInputTag;
const edm::InputTag m_l1GtRecordInputTag;

edm::EDGetTokenT<L1GlobalTriggerRecord> m_l1GtRecordInputToken1;
edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> m_l1GtRecordInputToken2;
const edm::EDGetTokenT<L1GlobalTriggerRecord> m_l1GtRecordInputToken1;
const edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> m_l1GtRecordInputToken2;

/// print verbosity
int m_printVerbosity;
const int m_printVerbosity;

/// print output
int m_printOutput;
const int m_printOutput;

/// counters

Expand All @@ -154,7 +153,7 @@ class L1GtTrigReport : public edm::EDAnalyzer
typedef std::list<L1GtTrigReportEntry*>::iterator ItEntry;

/// index of physics DAQ partition
unsigned int m_physicsDaqPartition;
const unsigned int m_physicsDaqPartition;

};

Expand Down
82 changes: 41 additions & 41 deletions L1Trigger/GlobalTriggerAnalyzer/src/L1GtTrigReport.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,68 +65,68 @@
#include "L1Trigger/GlobalTriggerAnalyzer/interface/L1GtTrigReportEntry.h"

// constructor(s)
L1GtTrigReport::L1GtTrigReport(const edm::ParameterSet& pSet) {
L1GtTrigReport::L1GtTrigReport(const edm::ParameterSet& pSet) :

// boolean flag to select the input record
// if true, it will use L1GlobalTriggerRecord
m_useL1GlobalTriggerRecord = pSet.getParameter<bool>("UseL1GlobalTriggerRecord");
// initialize cached IDs

/// input tag for GT record (L1 GT DAQ record or L1 GT "lite" record):
m_l1GtRecordInputTag = pSet.getParameter<edm::InputTag>("L1GtRecordInputTag");
//
m_l1GtStableParCacheID( 0ULL ),

// print verbosity
m_printVerbosity = pSet.getUntrackedParameter<int>("PrintVerbosity", 2);
m_numberPhysTriggers( 0 ),
m_numberTechnicalTriggers( 0 ),
m_numberDaqPartitions( 0 ),
m_numberDaqPartitionsMax( 0 ),

// print output
m_printOutput = pSet.getUntrackedParameter<int>("PrintOutput", 3);
//
m_l1GtPfAlgoCacheID( 0ULL ),
m_l1GtPfTechCacheID( 0ULL ),

LogDebug("L1GtTrigReport") << "\n Use L1GlobalTriggerRecord: " << m_useL1GlobalTriggerRecord
<< "\n (if false: L1GtTrigReport uses L1GlobalTriggerReadoutRecord.)"
<< "\n Input tag for L1 GT record: " << m_l1GtRecordInputTag.label() << " \n"
<< "\n Print verbosity level: " << m_printVerbosity << " \n"
<< "\n Print output: " << m_printOutput << " \n" << std::endl;
m_l1GtTmAlgoCacheID( 0ULL ),
m_l1GtTmTechCacheID( 0ULL ),

// initialize cached IDs
m_l1GtTmVetoAlgoCacheID( 0ULL ),
m_l1GtTmVetoTechCacheID( 0ULL ),

//
m_l1GtStableParCacheID = 0ULL;
m_l1GtMenuCacheID( 0ULL ),

m_numberPhysTriggers = 0;
m_numberTechnicalTriggers = 0;
m_numberDaqPartitions = 0;
m_numberDaqPartitionsMax = 0;

//
m_l1GtPfAlgoCacheID = 0ULL;
m_l1GtPfTechCacheID = 0ULL;
// boolean flag to select the input record
// if true, it will use L1GlobalTriggerRecord
m_useL1GlobalTriggerRecord( pSet.getParameter<bool>("UseL1GlobalTriggerRecord") ),

m_l1GtTmAlgoCacheID = 0ULL;
m_l1GtTmTechCacheID = 0ULL;
/// input tag for GT record (L1 GT DAQ record or L1 GT "lite" record):
m_l1GtRecordInputTag( pSet.getParameter<edm::InputTag>("L1GtRecordInputTag") ),
m_l1GtRecordInputToken1( m_useL1GlobalTriggerRecord
? consumes<L1GlobalTriggerRecord>(m_l1GtRecordInputTag)
: edm::EDGetTokenT<L1GlobalTriggerRecord>() ),
m_l1GtRecordInputToken2( not m_useL1GlobalTriggerRecord
? consumes<L1GlobalTriggerReadoutRecord>(m_l1GtRecordInputTag)
: edm::EDGetTokenT<L1GlobalTriggerReadoutRecord>() ),

m_l1GtTmVetoAlgoCacheID = 0ULL;
m_l1GtTmVetoTechCacheID = 0ULL;
// print verbosity
m_printVerbosity( pSet.getUntrackedParameter<int>("PrintVerbosity", 2) ),

//
m_l1GtMenuCacheID = 0ULL;
// print output
m_printOutput( pSet.getUntrackedParameter<int>("PrintOutput", 3) ),

// initialize global counters

// number of events processed
m_totalEvents = 0;
m_totalEvents( 0 ),

//
m_entryList.clear();
m_entryListTechTrig.clear();
m_entryList(),
m_entryListTechTrig(),

// set the index of physics DAQ partition TODO input parameter?
m_physicsDaqPartition = 0;
m_physicsDaqPartition( 0 )

if (m_useL1GlobalTriggerRecord) {
m_l1GtRecordInputToken1=consumes<L1GlobalTriggerRecord>(m_l1GtRecordInputTag);
}
else{
m_l1GtRecordInputToken2=consumes<L1GlobalTriggerReadoutRecord>(m_l1GtRecordInputTag);
}
{
LogDebug("L1GtTrigReport") << "\n Use L1GlobalTriggerRecord: " << m_useL1GlobalTriggerRecord
<< "\n (if false: L1GtTrigReport uses L1GlobalTriggerReadoutRecord.)"
<< "\n Input tag for L1 GT record: " << m_l1GtRecordInputTag.label() << " \n"
<< "\n Print verbosity level: " << m_printVerbosity << " \n"
<< "\n Print output: " << m_printOutput << " \n" << std::endl;

}

Expand Down