CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
l1extra::L1ParticleMap Class Reference

#include <L1ParticleMap.h>

Public Types

typedef std::vector< unsigned int > L1IndexCombo
 
typedef std::vector< L1IndexComboL1IndexComboVector
 
enum  L1ObjectType {
  kEM, kJet, kMuon, kEtMiss,
  kEtTotal, kEtHad, kNumOfL1ObjectTypes
}
 
typedef std::vector< L1ObjectTypeL1ObjectTypeVector
 
enum  L1TriggerType {
  kSingleMu3, kSingleMu5, kSingleMu7, kSingleMu10,
  kSingleMu14, kSingleMu20, kSingleMu25, kSingleIsoEG5,
  kSingleIsoEG8, kSingleIsoEG10, kSingleIsoEG12, kSingleIsoEG15,
  kSingleIsoEG20, kSingleIsoEG25, kSingleEG5, kSingleEG8,
  kSingleEG10, kSingleEG12, kSingleEG15, kSingleEG20,
  kSingleEG25, kSingleJet15, kSingleJet20, kSingleJet30,
  kSingleJet50, kSingleJet70, kSingleJet100, kSingleJet150,
  kSingleJet200, kSingleTauJet10, kSingleTauJet20, kSingleTauJet30,
  kSingleTauJet35, kSingleTauJet40, kSingleTauJet60, kSingleTauJet80,
  kSingleTauJet100, kHTT100, kHTT200, kHTT250,
  kHTT300, kHTT400, kHTT500, kETM10,
  kETM15, kETM20, kETM30, kETM40,
  kETM50, kETM60, kETT60, kDoubleMu3,
  kDoubleIsoEG8, kDoubleIsoEG10, kDoubleEG5, kDoubleEG10,
  kDoubleEG15, kDoubleJet70, kDoubleJet100, kDoubleTauJet20,
  kDoubleTauJet30, kDoubleTauJet35, kDoubleTauJet40, kMu3_IsoEG5,
  kMu5_IsoEG10, kMu3_EG12, kMu3_Jet15, kMu5_Jet15,
  kMu3_Jet70, kMu5_Jet20, kMu5_TauJet20, kMu5_TauJet30,
  kIsoEG10_EG10, kIsoEG10_Jet15, kIsoEG10_Jet20, kIsoEG10_Jet30,
  kIsoEG10_Jet70, kIsoEG10_TauJet20, kIsoEG10_TauJet30, kEG10_Jet15,
  kEG12_Jet20, kEG12_Jet70, kEG12_TauJet40, kJet70_TauJet40,
  kMu3_HTT200, kIsoEG10_HTT200, kEG12_HTT200, kJet70_HTT200,
  kTauJet40_HTT200, kMu3_ETM30, kIsoEG10_ETM30, kEG12_ETM30,
  kJet70_ETM40, kTauJet20_ETM20, kTauJet30_ETM30, kTauJet30_ETM40,
  kHTT100_ETM30, kTripleMu3, kTripleIsoEG5, kTripleEG10,
  kTripleJet50, kTripleTauJet40, kDoubleMu3_IsoEG5, kDoubleMu3_EG10,
  kDoubleIsoEG5_Mu3, kDoubleEG10_Mu3, kDoubleMu3_HTT200, kDoubleIsoEG5_HTT200,
  kDoubleEG10_HTT200, kDoubleJet50_HTT200, kDoubleTauJet40_HTT200, kDoubleMu3_ETM20,
  kDoubleIsoEG5_ETM20, kDoubleEG10_ETM20, kDoubleJet50_ETM20, kDoubleTauJet40_ETM20,
  kQuadJet30, kExclusiveDoubleIsoEG4, kExclusiveDoubleJet60, kExclusiveJet25_Gap_Jet25,
  kIsoEG10_Jet20_ForJet10, kMinBias_HTT10, kZeroBias, kNumOfL1TriggerTypes
}
 

Public Member Functions

std::vector< const reco::LeafCandidate * > candidateCombo (const L1IndexCombo &aCombo) const
 
const reco::LeafCandidatecandidateInCombo (int aIndexInCombo, const L1IndexCombo &aCombo) const
 
const L1EmParticleemParticleInCombo (int aIndexInCombo, const L1IndexCombo &aCombo) const
 
const L1EmParticleVectorRefemParticles () const
 
const L1EtMissParticleRefProdetMissParticle () const
 
const L1EtMissParticleetMissParticleInCombo (int aIndexInCombo, const L1IndexCombo &aCombo) const
 
const L1IndexComboVectorindexCombos () const
 
const L1JetParticlejetParticleInCombo (int aIndexInCombo, const L1IndexCombo &aCombo) const
 
const L1JetParticleVectorRefjetParticles () const
 
 L1ParticleMap ()
 
 L1ParticleMap (L1TriggerType triggerType, bool triggerDecision, const L1ObjectTypeVector &objectTypes, const L1EmParticleVectorRef &emParticles=L1EmParticleVectorRef(), const L1JetParticleVectorRef &jetParticles=L1JetParticleVectorRef(), const L1MuonParticleVectorRef &muonParticles=L1MuonParticleVectorRef(), const L1EtMissParticleRefProd &etMissParticle=L1EtMissParticleRefProd(), const L1IndexComboVector &indexCombos=L1IndexComboVector())
 
 L1ParticleMap (const L1ParticleMap &)
 
const L1MuonParticlemuonParticleInCombo (int aIndexInCombo, const L1IndexCombo &aCombo) const
 
const L1MuonParticleVectorRefmuonParticles () const
 
int numOfObjects () const
 
const L1ObjectTypeVectorobjectTypes () const
 
L1ParticleMapoperator= (const L1ParticleMap &)
 
void swap (L1ParticleMap &)
 
bool triggerDecision () const
 
const std::string & triggerName () const
 
L1TriggerType triggerType () const
 
virtual ~L1ParticleMap ()
 

Static Public Member Functions

static bool objectTypeIsGlobal (L1ObjectType type)
 
static const std::string & triggerName (L1TriggerType type)
 
static L1TriggerType triggerType (const std::string &name)
 

Private Member Functions

void setIndexCombos () const
 

Private Attributes

L1EmParticleVectorRef emParticles_
 
L1EtMissParticleRefProd etMissParticle_
 
L1IndexComboVector indexCombos_
 
std::atomic< char > indexCombosState_
 
L1JetParticleVectorRef jetParticles_
 
L1MuonParticleVectorRef muonParticles_
 
L1ObjectTypeVector objectTypes_
 
bool triggerDecision_
 
L1TriggerType triggerType_
 

Static Private Attributes

static const std::string triggerNames_ [kNumOfL1TriggerTypes]
 

Detailed Description

Definition at line 117 of file L1ParticleMap.h.

Member Typedef Documentation

◆ L1IndexCombo

typedef std::vector<unsigned int> l1extra::L1ParticleMap::L1IndexCombo

Definition at line 262 of file L1ParticleMap.h.

◆ L1IndexComboVector

Definition at line 263 of file L1ParticleMap.h.

◆ L1ObjectTypeVector

Definition at line 264 of file L1ParticleMap.h.

Member Enumeration Documentation

◆ L1ObjectType

Enumerator
kEM 
kJet 
kMuon 
kEtMiss 
kEtTotal 
kEtHad 
kNumOfL1ObjectTypes 

Definition at line 119 of file L1ParticleMap.h.

◆ L1TriggerType

Enumerator
kSingleMu3 
kSingleMu5 
kSingleMu7 
kSingleMu10 
kSingleMu14 
kSingleMu20 
kSingleMu25 
kSingleIsoEG5 
kSingleIsoEG8 
kSingleIsoEG10 
kSingleIsoEG12 
kSingleIsoEG15 
kSingleIsoEG20 
kSingleIsoEG25 
kSingleEG5 
kSingleEG8 
kSingleEG10 
kSingleEG12 
kSingleEG15 
kSingleEG20 
kSingleEG25 
kSingleJet15 
kSingleJet20 
kSingleJet30 
kSingleJet50 
kSingleJet70 
kSingleJet100 
kSingleJet150 
kSingleJet200 
kSingleTauJet10 
kSingleTauJet20 
kSingleTauJet30 
kSingleTauJet35 
kSingleTauJet40 
kSingleTauJet60 
kSingleTauJet80 
kSingleTauJet100 
kHTT100 
kHTT200 
kHTT250 
kHTT300 
kHTT400 
kHTT500 
kETM10 
kETM15 
kETM20 
kETM30 
kETM40 
kETM50 
kETM60 
kETT60 
kDoubleMu3 
kDoubleIsoEG8 
kDoubleIsoEG10 
kDoubleEG5 
kDoubleEG10 
kDoubleEG15 
kDoubleJet70 
kDoubleJet100 
kDoubleTauJet20 
kDoubleTauJet30 
kDoubleTauJet35 
kDoubleTauJet40 
kMu3_IsoEG5 
kMu5_IsoEG10 
kMu3_EG12 
kMu3_Jet15 
kMu5_Jet15 
kMu3_Jet70 
kMu5_Jet20 
kMu5_TauJet20 
kMu5_TauJet30 
kIsoEG10_EG10 
kIsoEG10_Jet15 
kIsoEG10_Jet20 
kIsoEG10_Jet30 
kIsoEG10_Jet70 
kIsoEG10_TauJet20 
kIsoEG10_TauJet30 
kEG10_Jet15 
kEG12_Jet20 
kEG12_Jet70 
kEG12_TauJet40 
kJet70_TauJet40 
kMu3_HTT200 
kIsoEG10_HTT200 
kEG12_HTT200 
kJet70_HTT200 
kTauJet40_HTT200 
kMu3_ETM30 
kIsoEG10_ETM30 
kEG12_ETM30 
kJet70_ETM40 
kTauJet20_ETM20 
kTauJet30_ETM30 
kTauJet30_ETM40 
kHTT100_ETM30 
kTripleMu3 
kTripleIsoEG5 
kTripleEG10 
kTripleJet50 
kTripleTauJet40 
kDoubleMu3_IsoEG5 
kDoubleMu3_EG10 
kDoubleIsoEG5_Mu3 
kDoubleEG10_Mu3 
kDoubleMu3_HTT200 
kDoubleIsoEG5_HTT200 
kDoubleEG10_HTT200 
kDoubleJet50_HTT200 
kDoubleTauJet40_HTT200 
kDoubleMu3_ETM20 
kDoubleIsoEG5_ETM20 
kDoubleEG10_ETM20 
kDoubleJet50_ETM20 
kDoubleTauJet40_ETM20 
kQuadJet30 
kExclusiveDoubleIsoEG4 
kExclusiveDoubleJet60 
kExclusiveJet25_Gap_Jet25 
kIsoEG10_Jet20_ForJet10 
kMinBias_HTT10 
kZeroBias 
kNumOfL1TriggerTypes 

Definition at line 135 of file L1ParticleMap.h.

135  {
136  kSingleMu3,
137  kSingleMu5,
138  kSingleMu7,
139  kSingleMu10,
140  kSingleMu14,
141  kSingleMu20,
142  kSingleMu25,
150  kSingleEG5,
151  kSingleEG8,
152  kSingleEG10,
153  kSingleEG12,
154  kSingleEG15,
155  kSingleEG20,
156  kSingleEG25,
157  kSingleJet15,
158  kSingleJet20,
159  kSingleJet30,
160  kSingleJet50,
161  kSingleJet70,
173  kHTT100,
174  kHTT200,
175  kHTT250,
176  kHTT300,
177  kHTT400,
178  kHTT500,
179  kETM10,
180  kETM15,
181  kETM20,
182  kETM30,
183  kETM40,
184  kETM50,
185  kETM60,
186  kETT60,
187  kDoubleMu3,
190  kDoubleEG5,
191  kDoubleEG10,
192  kDoubleEG15,
193  kDoubleJet70,
199  kMu3_IsoEG5,
200  kMu5_IsoEG10,
201  kMu3_EG12,
202  kMu3_Jet15,
203  kMu5_Jet15,
204  kMu3_Jet70,
205  kMu5_Jet20,
215  kEG10_Jet15,
216  kEG12_Jet20,
217  kEG12_Jet70,
220  kMu3_HTT200,
222  kEG12_HTT200,
225  kMu3_ETM30,
227  kEG12_ETM30,
228  kJet70_ETM40,
233  kTripleMu3,
235  kTripleEG10,
236  kTripleJet50,
252  kQuadJet30,
258  kZeroBias,
260  };

Constructor & Destructor Documentation

◆ L1ParticleMap() [1/3]

L1ParticleMap::L1ParticleMap ( )

Definition at line 165 of file L1ParticleMap.cc.

165 {}

◆ L1ParticleMap() [2/3]

L1ParticleMap::L1ParticleMap ( L1TriggerType  triggerType,
bool  triggerDecision,
const L1ObjectTypeVector objectTypes,
const L1EmParticleVectorRef emParticles = L1EmParticleVectorRef(),
const L1JetParticleVectorRef jetParticles = L1JetParticleVectorRef(),
const L1MuonParticleVectorRef muonParticles = L1MuonParticleVectorRef(),
const L1EtMissParticleRefProd etMissParticle = L1EtMissParticleRefProd(),
const L1IndexComboVector indexCombos = L1IndexComboVector() 
)

Definition at line 167 of file L1ParticleMap.cc.

References indexCombos(), and kSet.

177  indexCombosState_{static_cast<char>(!indexCombos.empty() ? kSet : IndexComboStates::kUnset)},
L1TriggerType triggerType() const
std::atomic< char > indexCombosState_
L1IndexComboVector indexCombos_
const L1EtMissParticleRefProd & etMissParticle() const
const char * kSet
const L1EmParticleVectorRef & emParticles() const
L1EtMissParticleRefProd etMissParticle_
const L1MuonParticleVectorRef & muonParticles() const
const L1IndexComboVector & indexCombos() const
L1EmParticleVectorRef emParticles_
L1MuonParticleVectorRef muonParticles_
const L1JetParticleVectorRef & jetParticles() const
L1JetParticleVectorRef jetParticles_
L1ObjectTypeVector objectTypes_
const L1ObjectTypeVector & objectTypes() const
L1TriggerType triggerType_
bool triggerDecision() const

◆ L1ParticleMap() [3/3]

L1ParticleMap::L1ParticleMap ( const L1ParticleMap rhs)

Definition at line 185 of file L1ParticleMap.cc.

References indexCombos_, indexCombosState_, and kSet.

186  : triggerType_(rhs.triggerType_),
188  indexCombosState_(IndexComboStates::kUnset),
194  indexCombos_() {
195  // do actual copying here;
196  if (rhs.indexCombosState_.load(std::memory_order_acquire) == kSet) {
198  indexCombosState_.store(kSet, std::memory_order_release);
199  }
200 }
std::atomic< char > indexCombosState_
L1IndexComboVector indexCombos_
const char * kSet
L1EtMissParticleRefProd etMissParticle_
L1EmParticleVectorRef emParticles_
L1MuonParticleVectorRef muonParticles_
L1JetParticleVectorRef jetParticles_
L1ObjectTypeVector objectTypes_
L1TriggerType triggerType_

◆ ~L1ParticleMap()

L1ParticleMap::~L1ParticleMap ( )
virtual

Definition at line 202 of file L1ParticleMap.cc.

202 {}

Member Function Documentation

◆ candidateCombo()

std::vector< const reco::LeafCandidate * > L1ParticleMap::candidateCombo ( const L1IndexCombo aCombo) const

Definition at line 370 of file L1ParticleMap.cc.

References candidateInCombo(), mps_fire::i, numOfObjects(), and createJobs::tmp.

370  {
371  std::vector<const reco::LeafCandidate*> tmp;
372 
373  tmp.reserve(numOfObjects());
374  for (int i = 0; i < numOfObjects(); ++i) {
375  tmp.push_back(candidateInCombo(i, aCombo));
376  }
377 
378  return tmp;
379 }
const reco::LeafCandidate * candidateInCombo(int aIndexInCombo, const L1IndexCombo &aCombo) const
tmp
align.sh
Definition: createJobs.py:716

◆ candidateInCombo()

const reco::LeafCandidate * L1ParticleMap::candidateInCombo ( int  aIndexInCombo,
const L1IndexCombo aCombo 
) const

Definition at line 310 of file L1ParticleMap.cc.

References emParticles_, etMissParticle_, edm::RefProd< C >::get(), jetParticles_, kEM, kEtHad, kEtMiss, kEtTotal, kJet, kMuon, muonParticles_, and objectTypes_.

Referenced by candidateCombo().

310  {
311  L1ObjectType type = objectTypes_[aIndexInCombo];
312  int particleInList = aCombo[aIndexInCombo];
313 
314  if (type == kEM) {
315  return dynamic_cast<const reco::LeafCandidate*>(emParticles_[particleInList].get());
316  } else if (type == kJet) {
317  return dynamic_cast<const reco::LeafCandidate*>(jetParticles_[particleInList].get());
318  } else if (type == kMuon) {
319  return dynamic_cast<const reco::LeafCandidate*>(muonParticles_[particleInList].get());
320  } else if (type == kEtMiss || type == kEtTotal || type == kEtHad) {
321  return dynamic_cast<const reco::LeafCandidate*>(etMissParticle_.get());
322  } else {
323  return nullptr;
324  }
325 }
L1EtMissParticleRefProd etMissParticle_
product_type const * get() const
Definition: RefProd.h:106
L1EmParticleVectorRef emParticles_
L1MuonParticleVectorRef muonParticles_
L1JetParticleVectorRef jetParticles_
L1ObjectTypeVector objectTypes_

◆ emParticleInCombo()

const L1EmParticle * L1ParticleMap::emParticleInCombo ( int  aIndexInCombo,
const L1IndexCombo aCombo 
) const

Definition at line 327 of file L1ParticleMap.cc.

References emParticles_, kEM, and objectTypes_.

327  {
328  L1ObjectType type = objectTypes_[aIndexInCombo];
329  int particleInList = aCombo[aIndexInCombo];
330 
331  if (type == kEM) {
332  return emParticles_[particleInList].get();
333  } else {
334  return nullptr;
335  }
336 }
L1EmParticleVectorRef emParticles_
L1ObjectTypeVector objectTypes_

◆ emParticles()

const L1EmParticleVectorRef& l1extra::L1ParticleMap::emParticles ( ) const
inline

Definition at line 296 of file L1ParticleMap.h.

References emParticles_.

296 { return emParticles_; }
L1EmParticleVectorRef emParticles_

◆ etMissParticle()

const L1EtMissParticleRefProd& l1extra::L1ParticleMap::etMissParticle ( ) const
inline

Definition at line 302 of file L1ParticleMap.h.

References etMissParticle_.

302 { return etMissParticle_; }
L1EtMissParticleRefProd etMissParticle_

◆ etMissParticleInCombo()

const L1EtMissParticle * L1ParticleMap::etMissParticleInCombo ( int  aIndexInCombo,
const L1IndexCombo aCombo 
) const

Definition at line 360 of file L1ParticleMap.cc.

References etMissParticle_, edm::RefProd< C >::get(), kEtHad, kEtMiss, kEtTotal, and objectTypes_.

360  {
361  L1ObjectType type = objectTypes_[aIndexInCombo];
362 
363  if (type == kEtMiss || type == kEtTotal || type == kEtHad) {
364  return etMissParticle_.get();
365  } else {
366  return nullptr;
367  }
368 }
L1EtMissParticleRefProd etMissParticle_
product_type const * get() const
Definition: RefProd.h:106
L1ObjectTypeVector objectTypes_

◆ indexCombos()

const L1ParticleMap::L1IndexComboVector & L1ParticleMap::indexCombos ( ) const

Definition at line 236 of file L1ParticleMap.cc.

References indexCombos_, indexCombosState_, kSet, and setIndexCombos().

Referenced by L1ParticleMap().

236  {
237  if (kSet != indexCombosState_.load(std::memory_order_acquire)) {
238  setIndexCombos();
239  }
240  return indexCombos_;
241 }
std::atomic< char > indexCombosState_
L1IndexComboVector indexCombos_
const char * kSet
void setIndexCombos() const

◆ jetParticleInCombo()

const L1JetParticle * L1ParticleMap::jetParticleInCombo ( int  aIndexInCombo,
const L1IndexCombo aCombo 
) const

Definition at line 338 of file L1ParticleMap.cc.

References jetParticles_, kJet, and objectTypes_.

338  {
339  L1ObjectType type = objectTypes_[aIndexInCombo];
340  int particleInList = aCombo[aIndexInCombo];
341 
342  if (type == kJet) {
343  return jetParticles_[particleInList].get();
344  } else {
345  return nullptr;
346  }
347 }
L1JetParticleVectorRef jetParticles_
L1ObjectTypeVector objectTypes_

◆ jetParticles()

const L1JetParticleVectorRef& l1extra::L1ParticleMap::jetParticles ( ) const
inline

Definition at line 298 of file L1ParticleMap.h.

References jetParticles_.

298 { return jetParticles_; }
L1JetParticleVectorRef jetParticles_

◆ muonParticleInCombo()

const L1MuonParticle * L1ParticleMap::muonParticleInCombo ( int  aIndexInCombo,
const L1IndexCombo aCombo 
) const

Definition at line 349 of file L1ParticleMap.cc.

References kMuon, muonParticles_, and objectTypes_.

349  {
350  L1ObjectType type = objectTypes_[aIndexInCombo];
351  int particleInList = aCombo[aIndexInCombo];
352 
353  if (type == kMuon) {
354  return muonParticles_[particleInList].get();
355  } else {
356  return nullptr;
357  }
358 }
L1MuonParticleVectorRef muonParticles_
L1ObjectTypeVector objectTypes_

◆ muonParticles()

const L1MuonParticleVectorRef& l1extra::L1ParticleMap::muonParticles ( ) const
inline

Definition at line 300 of file L1ParticleMap.h.

References muonParticles_.

300 { return muonParticles_; }
L1MuonParticleVectorRef muonParticles_

◆ numOfObjects()

int l1extra::L1ParticleMap::numOfObjects ( ) const
inline

Definition at line 294 of file L1ParticleMap.h.

References objectTypes_.

Referenced by candidateCombo(), and setIndexCombos().

294 { return objectTypes_.size(); }
L1ObjectTypeVector objectTypes_

◆ objectTypeIsGlobal()

bool L1ParticleMap::objectTypeIsGlobal ( L1ObjectType  type)
static

◆ objectTypes()

const L1ObjectTypeVector& l1extra::L1ParticleMap::objectTypes ( ) const
inline

Definition at line 291 of file L1ParticleMap.h.

References objectTypes_.

291 { return objectTypes_; }
L1ObjectTypeVector objectTypes_

◆ operator=()

L1ParticleMap & L1ParticleMap::operator= ( const L1ParticleMap rhs)

Definition at line 207 of file L1ParticleMap.cc.

References swap(), and groupFilesInBlocks::temp.

207  {
208  //An exception safe implementation is
209  L1ParticleMap temp(rhs);
210  swap(temp);
211 
212  return *this;
213 }
void swap(L1ParticleMap &)

◆ setIndexCombos()

void L1ParticleMap::setIndexCombos ( ) const
private

Definition at line 243 of file L1ParticleMap.cc.

References emParticles_, mps_fire::i, indexCombos_, indexCombosState_, dqmiolumiharvest::j, jetParticles_, kEM, kJet, kMuon, kNumOfL1ObjectTypes, kSet, muonParticles_, numOfObjects(), objectTypeIsGlobal(), and objectTypes_.

Referenced by indexCombos().

243  {
244  // Determine the number of non-global objects. There should be 0 or 1.
245  int numNonGlobal = 0;
246  L1ObjectType nonGlobalType = kNumOfL1ObjectTypes;
247  int nonGlobalIndex = -1;
248 
249  L1IndexComboVector tempIndexCombos;
250  for (int i = 0; i < numOfObjects(); ++i) {
252  ++numNonGlobal;
253  nonGlobalType = objectTypes_[i];
254  nonGlobalIndex = i;
255  }
256  }
257 
258  if (numNonGlobal == 0) {
259  // Dummy entry for each object type.
260  L1IndexCombo tmpCombo;
261  tmpCombo.reserve(numOfObjects());
262  for (int i = 0; i < numOfObjects(); ++i) {
263  tmpCombo.push_back(0);
264  }
265 
266  tempIndexCombos.push_back(tmpCombo);
267  } else if (numNonGlobal == 1) {
268  int nParticles = 0;
269 
270  if (nonGlobalType == kEM) {
271  nParticles = emParticles_.size();
272  } else if (nonGlobalType == kJet) {
273  nParticles = jetParticles_.size();
274  } else if (nonGlobalType == kMuon) {
275  nParticles = muonParticles_.size();
276  }
277 
278  tempIndexCombos.reserve(nParticles);
279  for (int i = 0; i < nParticles; ++i) {
280  L1IndexCombo tmpCombo;
281  tmpCombo.reserve(numOfObjects());
282  for (int j = 0; j < numOfObjects(); ++j) {
283  if (j == nonGlobalIndex) {
284  tmpCombo.push_back(i);
285  } else {
286  tmpCombo.push_back(0);
287  }
288  }
289 
290  tempIndexCombos.push_back(tmpCombo);
291  }
292  }
293  char expected = IndexComboStates::kUnset;
294  if (indexCombosState_.compare_exchange_strong(expected, kSetting, std::memory_order_acq_rel)) {
295  //If this was read from an old file, it is possible that indexCombos_ is already set.
296  // This is the only safe place to check since we know no other thread can be attempting
297  // to change this value.
298  if (indexCombos_.empty()) {
299  indexCombos_.swap(tempIndexCombos);
300  }
301  indexCombosState_.store(kSet, std::memory_order_release);
302  } else {
303  //have to wait
304  while (kSet != indexCombosState_.load(std::memory_order_acquire)) {
305  hardware_pause();
306  }
307  }
308 }
std::atomic< char > indexCombosState_
std::vector< unsigned int > L1IndexCombo
L1IndexComboVector indexCombos_
const char * kSet
L1EmParticleVectorRef emParticles_
std::vector< L1IndexCombo > L1IndexComboVector
L1MuonParticleVectorRef muonParticles_
static bool objectTypeIsGlobal(L1ObjectType type)
L1JetParticleVectorRef jetParticles_
L1ObjectTypeVector objectTypes_

◆ swap()

void L1ParticleMap::swap ( L1ParticleMap rhs)

Definition at line 218 of file L1ParticleMap.cc.

References emParticles_, etMissParticle_, indexCombos_, indexCombosState_, jetParticles_, muonParticles_, objectTypes_, std::swap(), triggerDecision_, and triggerType_.

Referenced by operator=().

218  {
221  indexCombosState_.store(
222  rhs.indexCombosState_.exchange(indexCombosState_.load(std::memory_order_acquire), std::memory_order_acq_rel),
223  std::memory_order_release);
230 }
std::atomic< char > indexCombosState_
L1IndexComboVector indexCombos_
void swap(edm::DataFrameContainer &lhs, edm::DataFrameContainer &rhs)
L1EtMissParticleRefProd etMissParticle_
L1EmParticleVectorRef emParticles_
L1MuonParticleVectorRef muonParticles_
L1JetParticleVectorRef jetParticles_
L1ObjectTypeVector objectTypes_
L1TriggerType triggerType_

◆ triggerDecision()

bool l1extra::L1ParticleMap::triggerDecision ( ) const
inline

Definition at line 286 of file L1ParticleMap.h.

References triggerDecision_.

286 { return triggerDecision_; }

◆ triggerName() [1/2]

const std::string& l1extra::L1ParticleMap::triggerName ( ) const
inline

Definition at line 284 of file L1ParticleMap.h.

References triggerName(), and triggerType_.

Referenced by triggerName().

284 { return triggerName(triggerType_); }
const std::string & triggerName() const
L1TriggerType triggerType_

◆ triggerName() [2/2]

const std::string & L1ParticleMap::triggerName ( L1TriggerType  type)
static

Definition at line 384 of file L1ParticleMap.cc.

References triggerNames_.

384 { return triggerNames_[type]; }
static const std::string triggerNames_[kNumOfL1TriggerTypes]

◆ triggerType() [1/2]

L1TriggerType l1extra::L1ParticleMap::triggerType ( ) const
inline

Definition at line 282 of file L1ParticleMap.h.

References triggerType_.

282 { return triggerType_; }
L1TriggerType triggerType_

◆ triggerType() [2/2]

L1ParticleMap::L1TriggerType L1ParticleMap::triggerType ( const std::string &  name)
static

Definition at line 386 of file L1ParticleMap.cc.

References mps_fire::i, kNumOfL1TriggerTypes, Skims_PA_cff::name, and triggerNames_.

386  {
387  for (int i = 0; i < kNumOfL1TriggerTypes; ++i) {
388  if (triggerNames_[i] == name) {
389  return (L1TriggerType)i;
390  }
391  }
392 
393  return kNumOfL1TriggerTypes;
394 }
static const std::string triggerNames_[kNumOfL1TriggerTypes]

Member Data Documentation

◆ emParticles_

L1EmParticleVectorRef l1extra::L1ParticleMap::emParticles_
private

◆ etMissParticle_

L1EtMissParticleRefProd l1extra::L1ParticleMap::etMissParticle_
private

Definition at line 365 of file L1ParticleMap.h.

Referenced by candidateInCombo(), etMissParticle(), etMissParticleInCombo(), and swap().

◆ indexCombos_

L1IndexComboVector l1extra::L1ParticleMap::indexCombos_
mutableprivate

Definition at line 376 of file L1ParticleMap.h.

Referenced by indexCombos(), L1ParticleMap(), setIndexCombos(), and swap().

◆ indexCombosState_

std::atomic<char> l1extra::L1ParticleMap::indexCombosState_
mutableprivate

Definition at line 349 of file L1ParticleMap.h.

Referenced by indexCombos(), L1ParticleMap(), setIndexCombos(), and swap().

◆ jetParticles_

L1JetParticleVectorRef l1extra::L1ParticleMap::jetParticles_
private

◆ muonParticles_

L1MuonParticleVectorRef l1extra::L1ParticleMap::muonParticles_
private

◆ objectTypes_

L1ObjectTypeVector l1extra::L1ParticleMap::objectTypes_
private

◆ triggerDecision_

bool l1extra::L1ParticleMap::triggerDecision_
private

Definition at line 347 of file L1ParticleMap.h.

Referenced by swap(), and triggerDecision().

◆ triggerNames_

const std::string L1ParticleMap::triggerNames_
staticprivate

Definition at line 379 of file L1ParticleMap.h.

Referenced by triggerName(), and triggerType().

◆ triggerType_

L1TriggerType l1extra::L1ParticleMap::triggerType_
private

Definition at line 345 of file L1ParticleMap.h.

Referenced by swap(), triggerName(), and triggerType().