CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes
L1Comparator Class Reference

#include <L1Comparator.h>

Inheritance diagram for L1Comparator:
edm::global::EDProducer< edm::RunCache< std::array< bool, dedefs::DEnsys > > > edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Classes

struct  EventInfo
 

Public Member Functions

template<class myCol >
bool CompareCollections (edm::Handle< myCol > data, edm::Handle< myCol > emul, std::ostream &dumpStream) const
 
 L1Comparator (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::global::EDProducer< edm::RunCache< std::array< bool, dedefs::DEnsys > > >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
EDProduceroperator= (const EDProducer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
bool wantsStreamLuminosityBlocks () const final
 
bool wantsStreamRuns () const final
 
- Public Member Functions inherited from edm::global::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
std::vector< bool > const & recordProvenanceList () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
TypeLabelList const & typeLabelList () const
 used by the fwk to register the list of products of this module More...
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Types

using RunCache = std::array< bool, dedefs::DEnsys >
 

Private Member Functions

template<class T >
bool CompareCollections (edm::Handle< T > data, edm::Handle< T > emul, std::ostream &) const
 
template<class T >
bool dumpCandidate (const T &dt, const T &em, std::ostream &s) const
 
void endJob () override
 
std::shared_ptr< RunCacheglobalBeginRun (edm::Run const &, const edm::EventSetup &) const final
 
void globalEndRun (edm::Run const &, edm::EventSetup const &) const final
 
template<class T >
void process (T const *, T const *, const int, const int, EventInfo &eventInfo) const
 
template<class T >
void process (const edm::Handle< T > data, const edm::Handle< T > emul, const int sys, const int cid, EventInfo &eventInfo) const
 
void produce (edm::StreamID, edm::Event &, const edm::EventSetup &) const override
 
int verbose () const
 

Private Attributes

const std::array< bool, dedefs::DEnsysm_doSys
 
std::ofstream m_dumpFile
 
const std::string m_dumpFileName
 
const int m_dumpMode
 
std::mutex m_fileGuard
 
std::atomic< bool > m_match
 
const bool m_stage1_layer2_
 
std::atomic< int > nevt_
 
edm::EDGetTokenT< L1CaloEmCollectiontokenCaloEm_ [2]
 
edm::EDGetTokenT< L1CaloRegionCollectiontokenCaloRegion_ [2]
 
edm::EDGetTokenT< L1GctEmCandCollectiontokenGctEmCand_isoEm_ [2]
 
edm::EDGetTokenT< L1GctEmCandCollectiontokenGctEmCand_nonIsoEm_ [2]
 
edm::EDGetTokenT< L1GctEtHadCollectiontokenGctEtHad_ [2]
 
edm::EDGetTokenT< L1GctEtMissCollectiontokenGctEtMiss_ [2]
 
edm::EDGetTokenT< L1GctEtTotalCollectiontokenGctEtTotal_ [2]
 
edm::EDGetTokenT< L1GctHFBitCountsCollectiontokenGctHFBitCounts_ [2]
 
edm::EDGetTokenT< L1GctHFRingEtSumsCollectiontokenGctHFRingEtSums_ [2]
 
edm::EDGetTokenT< L1GctHtMissCollectiontokenGctHtMiss_ [2]
 
edm::EDGetTokenT< L1GctJetCandCollectiontokenGctJetCand_cenJets_ [2]
 
edm::EDGetTokenT< L1GctJetCandCollectiontokenGctJetCand_forJets_ [2]
 
edm::EDGetTokenT< L1GctJetCandCollectiontokenGctJetCand_isoTauJets_ [2]
 
edm::EDGetTokenT< L1GctJetCandCollectiontokenGctJetCand_tauJets_ [2]
 
edm::EDGetTokenT< L1GctJetCountsCollectiontokenGctJetCounts_ [2]
 
edm::EDGetTokenT< LTCDigiCollectiontokenLTCDigi_ [2]
 
edm::EDGetTokenT< L1MuDTChambPhContainertokenMuDTChambPh_ [2]
 
edm::EDGetTokenT< L1MuDTChambThContainertokenMuDTChambTh_ [2]
 
edm::EDGetTokenT< L1MuDTTrackContainertokenMuDTTrack_ [2]
 
edm::EDGetTokenT< L1MuGMTCandCollectiontokenMuGMTCand_ [2]
 
edm::EDGetTokenT< L1MuGMTReadoutCollectiontokenMuReadoutCand_ [2]
 
edm::EDGetTokenT< L1MuRegionalCandCollectiontokenMuRegionalCandRPCb_ [2]
 
edm::EDGetTokenT< L1MuRegionalCandCollectiontokenMuRegionalCandRPCf_ [2]
 
const edm::ESGetToken< L1TriggerKey, L1TriggerKeyRcdtokenTriggerKey_
 
const int verbose_
 

Additional Inherited Members

- Public Types inherited from edm::global::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex > >
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::ProducerBase
template<Transition Tr = Transition::Event>
auto produces (std::string instanceName) noexcept
 declare what type of product will make and with which optional label More...
 
template<Transition B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<BranchType B>
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
BranchAliasSetter produces (const TypeID &id, std::string instanceName=std::string(), bool recordProvenance=true)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<class ProductType >
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
template<Transition Tr = Transition::Event>
auto produces () noexcept
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 44 of file L1Comparator.h.

Member Typedef Documentation

◆ RunCache

using L1Comparator::RunCache = std::array<bool, dedefs::DEnsys>
private

Definition at line 49 of file L1Comparator.h.

Constructor & Destructor Documentation

◆ L1Comparator()

L1Comparator::L1Comparator ( const edm::ParameterSet iConfig)
explicit

assertions/temporary

dump level: -1(all),0(none),1(disagree),2(loc.disagree),3(loc.agree)

create d|e record product

Definition at line 29 of file L1Comparator.cc.

References edm::ParameterSet::getParameter().

30  : m_stage1_layer2_{iConfig.getParameter<bool>("stage1_layer2_")},
31  verbose_{iConfig.getUntrackedParameter<int>("VerboseFlag", 0)},
32  tokenTriggerKey_{esConsumes<edm::Transition::BeginRun>()},
33  m_doSys{fillDoSys(iConfig)},
34  m_dumpFileName{iConfig.getUntrackedParameter<std::string>("DumpFile", "")},
35  m_dumpMode{iConfig.getUntrackedParameter<int>("DumpMode", 0)},
36  m_fileGuard{} {
37  if (verbose())
38  std::cout << "\nL1COMPARATOR constructor...\n" << std::flush;
39 
40  if (verbose()) {
41  std::cout << "[L1Comparator] do sys? ";
42  for (int i = 0; i < DEnsys; i++)
43  std::cout << m_doSys[i] << " ";
44  std::cout << std::endl;
45 
46  std::cout << "[L1Comparator] list of systems to process: ";
47  for (int i = 0; i < DEnsys; i++)
48  if (m_doSys[i])
49  std::cout << SystLabel[i] << " ";
50  std::cout << std::endl;
51  }
52 
54  assert(ETP == 0);
55  assert(HTP == 1);
56  assert(RCT == 2);
57  assert(GCT == 3);
58  assert(DTP == 4);
59  assert(DTF == 5);
60  assert(CTP == 6);
61  assert(CTF == 7);
62  assert(RPC == 8);
63  assert(LTC == 9);
64  assert(GMT == 10);
65  assert(GLT == 11);
66 
68  if (m_dumpMode) {
70  if (!m_dumpFile.good())
71  edm::LogInfo("L1ComparatorDumpFileOpenError")
72  << " L1Comparator::L1Comparator() : "
73  << " couldn't open dump file " << m_dumpFileName.c_str() << std::endl;
74  }
75 
76  m_match = true;
77  nevt_ = -1;
78 
80  produces<L1DataEmulRecord>().setBranchAlias("L1DataEmulRecord");
81 
82  // -- RCT [regional calorimeter trigger]
83  if (m_doSys[RCT]) {
84  edm::InputTag tag0 = iConfig.getParameter<edm::InputTag>("RCTsourceData");
85  edm::InputTag tag1 = iConfig.getParameter<edm::InputTag>("RCTsourceEmul");
86 
87  tokenCaloEm_[0] = consumes<L1CaloEmCollection>(tag0);
88  tokenCaloEm_[1] = consumes<L1CaloEmCollection>(tag1);
89  tokenCaloRegion_[0] = consumes<L1CaloRegionCollection>(tag0);
90  tokenCaloRegion_[1] = consumes<L1CaloRegionCollection>(tag1);
91  }
92 
93  // -- GCT [global calorimeter trigger]
94  if (m_doSys[GCT]) {
96  tags[0] = iConfig.getParameter<edm::InputTag>("GCTsourceData");
97  tags[1] = iConfig.getParameter<edm::InputTag>("GCTsourceEmul");
98 
99  if (m_stage1_layer2_ == false) {
100  for (int i = 0; i < 2; ++i) {
101  edm::InputTag const& tag = tags[i];
102  std::string const& label = tag.label();
103  tokenGctEmCand_isoEm_[i] = consumes<L1GctEmCandCollection>(edm::InputTag(label, "isoEm"));
104  tokenGctEmCand_nonIsoEm_[i] = consumes<L1GctEmCandCollection>(edm::InputTag(label, "nonIsoEm"));
105  tokenGctJetCand_cenJets_[i] = consumes<L1GctJetCandCollection>(edm::InputTag(label, "cenJets"));
106  tokenGctJetCand_forJets_[i] = consumes<L1GctJetCandCollection>(edm::InputTag(label, "forJets"));
107  tokenGctJetCand_tauJets_[i] = consumes<L1GctJetCandCollection>(edm::InputTag(label, "tauJets"));
108  tokenGctEtTotal_[i] = consumes<L1GctEtTotalCollection>(tag);
109  tokenGctEtHad_[i] = consumes<L1GctEtHadCollection>(tag);
110  tokenGctEtMiss_[i] = consumes<L1GctEtMissCollection>(tag);
111  tokenGctHFRingEtSums_[i] = consumes<L1GctHFRingEtSumsCollection>(tag);
112  tokenGctHFBitCounts_[i] = consumes<L1GctHFBitCountsCollection>(tag);
113  tokenGctHtMiss_[i] = consumes<L1GctHtMissCollection>(tag);
114  tokenGctJetCounts_[i] = consumes<L1GctJetCountsCollection>(tag);
115  }
116  }
117  if (m_stage1_layer2_ == true) {
118  for (int i = 0; i < 2; ++i) {
119  edm::InputTag const& tag = tags[i];
120  std::string const& label = tag.label();
121  tokenGctEmCand_isoEm_[i] = consumes<L1GctEmCandCollection>(edm::InputTag(label, "isoEm"));
122  tokenGctEmCand_nonIsoEm_[i] = consumes<L1GctEmCandCollection>(edm::InputTag(label, "nonIsoEm"));
123  tokenGctJetCand_cenJets_[i] = consumes<L1GctJetCandCollection>(edm::InputTag(label, "cenJets"));
124  tokenGctJetCand_forJets_[i] = consumes<L1GctJetCandCollection>(edm::InputTag(label, "forJets"));
125  tokenGctJetCand_tauJets_[i] = consumes<L1GctJetCandCollection>(edm::InputTag(label, "tauJets"));
126  tokenGctJetCand_isoTauJets_[i] = consumes<L1GctJetCandCollection>(edm::InputTag(label, "isoTauJets"));
127  tokenGctEtTotal_[i] = consumes<L1GctEtTotalCollection>(tag);
128  tokenGctEtHad_[i] = consumes<L1GctEtHadCollection>(tag);
129  tokenGctEtMiss_[i] = consumes<L1GctEtMissCollection>(tag);
130  tokenGctHFRingEtSums_[i] = consumes<L1GctHFRingEtSumsCollection>(tag);
131  tokenGctHFBitCounts_[i] = consumes<L1GctHFBitCountsCollection>(tag);
132  tokenGctHtMiss_[i] = consumes<L1GctHtMissCollection>(tag);
133  tokenGctJetCounts_[i] = consumes<L1GctJetCountsCollection>(tag);
134  }
135  }
136  }
137 
138  // -- DTP [drift tube trigger primitive]
139  if (m_doSys[DTP]) {
140  edm::InputTag tag0 = iConfig.getParameter<edm::InputTag>("DTPsourceData");
141  edm::InputTag tag1 = iConfig.getParameter<edm::InputTag>("DTPsourceEmul");
142 
143  tokenMuDTChambPh_[0] = consumes<L1MuDTChambPhContainer>(tag0);
144  tokenMuDTChambPh_[1] = consumes<L1MuDTChambPhContainer>(tag1);
145  tokenMuDTChambTh_[0] = consumes<L1MuDTChambThContainer>(tag0);
146  tokenMuDTChambTh_[1] = consumes<L1MuDTChambThContainer>(tag1);
147  }
148 
149  // -- DTF [drift tube track finder]
150  if (m_doSys[DTF]) {
151  edm::InputTag tag0 = iConfig.getParameter<edm::InputTag>("DTFsourceData");
152  edm::InputTag tag1 = iConfig.getParameter<edm::InputTag>("DTFsourceEmul");
153 
154  tokenMuDTTrack_[0] = consumes<L1MuDTTrackContainer>(edm::InputTag(tag0.label(), "DATA"));
155  tokenMuDTTrack_[1] = consumes<L1MuDTTrackContainer>(edm::InputTag(tag1.label(), "DTTF"));
156  }
157 
158  // -- RPC [resistive plate chambers regional trigger]
159  if (m_doSys[RPC]) {
160  edm::InputTag tag0 = iConfig.getParameter<edm::InputTag>("RPCsourceData");
161  edm::InputTag tag1 = iConfig.getParameter<edm::InputTag>("RPCsourceEmul");
162 
163  tokenMuRegionalCandRPCb_[0] = consumes<L1MuRegionalCandCollection>(edm::InputTag(tag0.label(), "RPCb"));
164  tokenMuRegionalCandRPCb_[1] = consumes<L1MuRegionalCandCollection>(edm::InputTag(tag1.label(), "RPCb"));
165  tokenMuRegionalCandRPCf_[0] = consumes<L1MuRegionalCandCollection>(edm::InputTag(tag0.label(), "RPCf"));
166  tokenMuRegionalCandRPCf_[1] = consumes<L1MuRegionalCandCollection>(edm::InputTag(tag1.label(), "RPCf"));
167  }
168 
169  // -- LTC [local trigger controller]
170  if (m_doSys[LTC]) {
171  // FIXME
172  // There should be a real input tag here, but there was none in the original code.
173  edm::InputTag dummyTag;
174  tokenLTCDigi_[0] = consumes<LTCDigiCollection>(dummyTag);
175  tokenLTCDigi_[1] = consumes<LTCDigiCollection>(dummyTag);
176  }
177 
178  // -- GMT [global muon trigger]
179  if (m_doSys[GMT]) {
180  edm::InputTag tag0 = iConfig.getParameter<edm::InputTag>("GMTsourceData");
181  edm::InputTag tag1 = iConfig.getParameter<edm::InputTag>("GMTsourceEmul");
182 
183  tokenMuGMTCand_[0] = consumes<L1MuGMTCandCollection>(tag0);
184  tokenMuGMTCand_[1] = consumes<L1MuGMTCandCollection>(tag1);
185  tokenMuReadoutCand_[0] = consumes<L1MuGMTReadoutCollection>(tag0);
186  tokenMuReadoutCand_[1] = consumes<L1MuGMTReadoutCollection>(tag1);
187  }
188 
189  if (verbose())
190  std::cout << "\nL1Comparator constructor...done.\n" << std::flush;
191 }
const edm::ESGetToken< L1TriggerKey, L1TriggerKeyRcd > tokenTriggerKey_
Definition: L1Comparator.h:112
edm::EDGetTokenT< L1GctEmCandCollection > tokenGctEmCand_nonIsoEm_[2]
Definition: L1Comparator.h:91
edm::EDGetTokenT< LTCDigiCollection > tokenLTCDigi_[2]
Definition: L1Comparator.h:105
T getParameter(std::string const &) const
Definition: ParameterSet.h:307
const int DEnsys
Definition: DEtrait.h:38
edm::EDGetTokenT< L1GctEtHadCollection > tokenGctEtHad_[2]
Definition: L1Comparator.h:97
edm::EDGetTokenT< L1MuRegionalCandCollection > tokenMuRegionalCandRPCb_[2]
Definition: L1Comparator.h:107
edm::EDGetTokenT< L1GctJetCountsCollection > tokenGctJetCounts_[2]
Definition: L1Comparator.h:102
std::mutex m_fileGuard
Definition: L1Comparator.h:118
edm::EDGetTokenT< L1GctEtMissCollection > tokenGctEtMiss_[2]
Definition: L1Comparator.h:98
edm::EDGetTokenT< L1GctHFBitCountsCollection > tokenGctHFBitCounts_[2]
Definition: L1Comparator.h:100
std::string const & label() const
Definition: InputTag.h:36
edm::EDGetTokenT< L1MuDTChambThContainer > tokenMuDTChambTh_[2]
Definition: L1Comparator.h:104
edm::EDGetTokenT< L1GctJetCandCollection > tokenGctJetCand_tauJets_[2]
Definition: L1Comparator.h:94
assert(be >=bs)
T getUntrackedParameter(std::string const &, T const &) const
char const * label
std::atomic< int > nevt_
Definition: L1Comparator.h:85
edm::EDGetTokenT< L1MuGMTReadoutCollection > tokenMuReadoutCand_[2]
Definition: L1Comparator.h:110
const std::string m_dumpFileName
Definition: L1Comparator.h:115
edm::EDGetTokenT< L1GctJetCandCollection > tokenGctJetCand_isoTauJets_[2]
Definition: L1Comparator.h:95
const int verbose_
Definition: L1Comparator.h:86
edm::EDGetTokenT< L1MuRegionalCandCollection > tokenMuRegionalCandRPCf_[2]
Definition: L1Comparator.h:108
edm::EDGetTokenT< L1GctEtTotalCollection > tokenGctEtTotal_[2]
Definition: L1Comparator.h:96
edm::EDGetTokenT< L1CaloEmCollection > tokenCaloEm_[2]
Definition: L1Comparator.h:88
edm::EDGetTokenT< L1MuDTChambPhContainer > tokenMuDTChambPh_[2]
Definition: L1Comparator.h:103
int verbose() const
Definition: L1Comparator.h:81
std::atomic< bool > m_match
Definition: L1Comparator.h:119
edm::EDGetTokenT< L1GctJetCandCollection > tokenGctJetCand_cenJets_[2]
Definition: L1Comparator.h:92
const std::array< bool, dedefs::DEnsys > m_doSys
Definition: L1Comparator.h:114
edm::EDGetTokenT< L1GctHFRingEtSumsCollection > tokenGctHFRingEtSums_[2]
Definition: L1Comparator.h:99
edm::EDGetTokenT< L1GctJetCandCollection > tokenGctJetCand_forJets_[2]
Definition: L1Comparator.h:93
edm::EDGetTokenT< L1GctHtMissCollection > tokenGctHtMiss_[2]
Definition: L1Comparator.h:101
edm::EDGetTokenT< L1CaloRegionCollection > tokenCaloRegion_[2]
Definition: L1Comparator.h:89
const std::string SystLabel[DEnsys]
Definition: DEtrait.h:42
std::ofstream m_dumpFile
Definition: L1Comparator.h:116
edm::EDGetTokenT< L1MuDTTrackContainer > tokenMuDTTrack_[2]
Definition: L1Comparator.h:106
edm::EDGetTokenT< L1GctEmCandCollection > tokenGctEmCand_isoEm_[2]
Definition: L1Comparator.h:90
const int m_dumpMode
Definition: L1Comparator.h:117
edm::EDGetTokenT< L1MuGMTCandCollection > tokenMuGMTCand_[2]
Definition: L1Comparator.h:109
const bool m_stage1_layer2_
Definition: L1Comparator.h:82

Member Function Documentation

◆ CompareCollections() [1/2]

template<class T >
bool L1Comparator::CompareCollections ( edm::Handle< T data,
edm::Handle< T emul,
std::ostream &   
) const
private

◆ CompareCollections() [2/2]

template<class myCol >
bool L1Comparator::CompareCollections ( edm::Handle< myCol >  data,
edm::Handle< myCol >  emul,
std::ostream &  dumpStream 
) const

Definition at line 866 of file L1Comparator.cc.

References data, dumpCandidate(), L1TdeGEMTPG_cfi::emul, mps_fire::i, and match().

868  {
869  bool match = true;
870  typedef typename myCol::size_type col_sz;
871  typedef typename myCol::iterator col_it;
872  col_sz ndata = data->size();
873  col_sz nemul = emul->size();
874  if (ndata != nemul) {
875  match &= false;
876  dumpStream << " #cand mismatch!"
877  << "\tdata: " << ndata << "\temul: " << nemul << std::endl;
878  }
879  col_it itd = data->begin();
880  col_it itm = emul->begin();
881  for (col_sz i = 0; i < ndata; i++) {
882  match &= dumpCandidate(*itd++, *itm++, dumpStream);
883  }
884  return match;
885 }
uint16_t size_type
bool dumpCandidate(const T &dt, const T &em, std::ostream &s) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10

◆ dumpCandidate()

template<class T >
bool L1Comparator::dumpCandidate ( const T dt,
const T em,
std::ostream &  s 
) const
private

Definition at line 888 of file L1Comparator.cc.

References dt, and alignCSCRings::s.

Referenced by CompareCollections().

888  {
889  if (dt == em)
890  return true;
891  s << dt << std::endl;
892  s << em << std::endl << std::endl;
893  return false;
894 }
float dt
Definition: AMPTWrapper.h:136

◆ endJob()

void L1Comparator::endJob ( void  )
overrideprivatevirtual

Reimplemented from edm::global::EDProducerBase.

Definition at line 241 of file L1Comparator.cc.

References m_dumpFile, m_dumpMode, and m_match.

241  {
242  if (m_dumpMode)
243  m_dumpFile << "\n\n-------\n"
244  << "Global data|emulator agreement: " << m_match << std::endl;
245  m_dumpFile.close();
246 }
std::atomic< bool > m_match
Definition: L1Comparator.h:119
std::ofstream m_dumpFile
Definition: L1Comparator.h:116
const int m_dumpMode
Definition: L1Comparator.h:117

◆ globalBeginRun()

std::shared_ptr< L1Comparator::RunCache > L1Comparator::globalBeginRun ( edm::Run const &  iRun,
const edm::EventSetup iSetup 
) const
finalprivate

Definition at line 193 of file L1Comparator.cc.

References gather_cfg::cout, dedefs::CTF, dedefs::DTF, dedefs::GCT, edm::EventSetup::getData(), dedefs::GLT, GMT, L1TriggerKey::kCSCTF, L1TriggerKey::kDTTF, L1TriggerKey::kGCT, L1TriggerKey::kGMT, L1TriggerKey::kGT, L1TriggerKey::kRCT, L1TriggerKey::kRPC, m_doSys, dedefs::RCT, RunInfoPI::RPC, tokenTriggerKey_, and verbose().

194  {
195  if (verbose())
196  std::cout << "\nL1COMPARATOR beginRun...\n" << std::flush;
197 
198  auto runDoSys = std::make_shared<RunCache>();
199  // disable subsystem if not included in current run configuration
200  try {
201  auto const& pKey = iSetup.getData(tokenTriggerKey_);
202  *runDoSys = m_doSys;
203 
204  (*runDoSys)[RCT] &= (!(pKey.subsystemKey(L1TriggerKey::kRCT).empty()));
205  (*runDoSys)[GCT] &= (!(pKey.subsystemKey(L1TriggerKey::kGCT).empty()));
206  (*runDoSys)[DTF] &= (!(pKey.subsystemKey(L1TriggerKey::kDTTF).empty()));
207  (*runDoSys)[CTF] &= (!(pKey.subsystemKey(L1TriggerKey::kCSCTF).empty()));
208  (*runDoSys)[RPC] &= (!(pKey.subsystemKey(L1TriggerKey::kRPC).empty()));
209  (*runDoSys)[GMT] &= (!(pKey.subsystemKey(L1TriggerKey::kGMT).empty()));
210  (*runDoSys)[GLT] &= (!(pKey.subsystemKey(L1TriggerKey::kGT).empty()));
211 
212  if (verbose()) {
213  if (pKey.subsystemKey(L1TriggerKey::kRCT).empty())
214  std::cout << "RCT key is empty. Sub-systems is disabled (" << (*runDoSys)[RCT] << ")\n";
215  if (pKey.subsystemKey(L1TriggerKey::kGCT).empty())
216  std::cout << "GCT key is empty. Sub-systems is disabled (" << (*runDoSys)[GCT] << ")\n";
217  if (pKey.subsystemKey(L1TriggerKey::kDTTF).empty())
218  std::cout << "DTTF key is empty. Sub-systems is disabled (" << (*runDoSys)[DTF] << ")\n";
219  if (pKey.subsystemKey(L1TriggerKey::kCSCTF).empty())
220  std::cout << "CSCTF key is empty. Sub-systems is disabled (" << (*runDoSys)[CTF] << ")\n";
221  if (pKey.subsystemKey(L1TriggerKey::kRPC).empty())
222  std::cout << "RPC key is empty. Sub-systems is disabled (" << (*runDoSys)[RPC] << ")\n";
223  if (pKey.subsystemKey(L1TriggerKey::kGMT).empty())
224  std::cout << "GMT key is empty. Sub-systems is disabled (" << (*runDoSys)[GMT] << ")\n";
225  if (pKey.subsystemKey(L1TriggerKey::kGT).empty())
226  std::cout << "GT key is empty. Sub-systems is disabled (" << (*runDoSys)[GLT] << ")\n";
227  std::cout << "TSC key = " << pKey.tscKey() << std::endl;
228  }
229 
230  //access subsystem key if needed, eg:
231  //std::cout << "RCT key:" << pKey->subsystemKey( L1TriggerKey::kRCT ) << std::endl;
232  } catch (cms::Exception& ex) {
233  edm::LogWarning("L1Comparator") << "No L1TriggerKey found." << std::endl;
234  }
235 
236  if (verbose())
237  std::cout << "L1COMPARATOR beginRun... done\n" << std::flush;
238  return runDoSys;
239 }
const edm::ESGetToken< L1TriggerKey, L1TriggerKeyRcd > tokenTriggerKey_
Definition: L1Comparator.h:112
bool getData(T &iHolder) const
Definition: EventSetup.h:122
int verbose() const
Definition: L1Comparator.h:81
const std::array< bool, dedefs::DEnsys > m_doSys
Definition: L1Comparator.h:114
Log< level::Warning, false > LogWarning

◆ globalEndRun()

void L1Comparator::globalEndRun ( edm::Run const &  ,
edm::EventSetup const &   
) const
inlinefinalprivate

Definition at line 52 of file L1Comparator.h.

52 {}

◆ process() [1/2]

template<class T >
void L1Comparator::process ( T const *  data,
T const *  emul,
const int  sys,
const int  cid,
EventInfo eventInfo 
) const
private

tmp: for getting a clean dump (avoid empty entries)

perform comparison

gather results

over-write system-id: needed eg for GMT input, CSC tf reg cand, CTP&CTF

over-write data type: needed eg for GCT jet types, regional muon sources

append d|e digis to the record's collection

Definition at line 768 of file L1Comparator.cc.

References fileCollector::cmp, gather_cfg::cout, data, L1TdeGEMTPG_cfi::emul, dumpTauVariables_cfi::eventInfo, alignBH_cfg::fixed, mps_fire::i, m_dumpMode, dedefs::SystLabel, createJobs::tmp, and verbose().

Referenced by process().

768  {
769  if (verbose())
770  std::cout << "L1Comparator::process -ing system:" << sys << " (" << SystLabel[sys] << "), data type " << cid
771  << "...\n"
772  << std::flush;
773  if (verbose())
774  std::cout << "L1Comparator::process debug "
775  << " (size " << data->size() << "," << emul->size() << ")"
776  << ".\n"
777  << std::flush;
778 
780  bool prt = false;
781  if (!m_dumpMode)
782  prt = false;
783  else if (m_dumpMode == -1)
784  prt = true;
785  else if (m_dumpMode > 0) {
787  if (tmp.get_ncand(0) == 0 && tmp.get_ncand(1) == 0)
788  prt = false;
789  else
790  prt = !tmp.do_compare(eventInfo.dumpToFile_, 0);
791  }
792 
793  //declare de compare object
795 
796  int ndata = cmp.get_ncand(0);
797  int nemul = cmp.get_ncand(1);
798 
799  if (verbose())
800  std::cout << "L1Comparator::process "
801  << " system:" << SystLabel[sys] << "(id " << sys << ")"
802  << " type:" << cmp.GetName(0) << "(" << cmp.de_type() << ")"
803  << " ndata:" << ndata << " nemul:" << nemul << " (size " << data->size() << "," << emul->size() << ")"
804  << ".\n"
805  << std::flush;
806 
807  if (ndata == 0 && nemul == 0) {
808  if (verbose())
809  std::cout << "L1Comparator::process "
810  << "empty collections -- exiting!\n"
811  << std::flush;
812  return;
813  }
814 
815  eventInfo.dumpToFile_ << std::setiosflags(std::ios::showpoint | std::ios::fixed | std::ios::right |
816  std::ios::adjustfield);
817  std::cout << std::setiosflags(std::ios::showpoint | std::ios::fixed | std::ios::right | std::ios::adjustfield);
818 
819  if (eventInfo.dumpEvent_ && prt) {
820  eventInfo.dumpToFile_ << "\nEntry: " << eventInfo.nevt_ << " (event:" << eventInfo.evtNum_
821  << " | run:" << eventInfo.runNum_ << ")\n"
822  << std::flush;
823  eventInfo.dumpEvent_ = false;
824  }
825 
826  if (prt)
827  eventInfo.dumpToFile_ << "\n sys:" << SystLabel[sys] << " (" << sys << "), type:" << cid //cmp.GetName()
828  << " ...\n";
829 
830  if (verbose())
831  std::cout << "L1Comparator::process print:\n" << std::flush << cmp.print() << std::flush;
832 
834  eventInfo.DEmatchEvt[sys] &= cmp.do_compare(eventInfo.dumpToFile_, m_dumpMode);
835 
837  L1DEDigiCollection dg = cmp.getDEDigis();
838 
839  if (verbose())
840  for (L1DEDigiCollection::iterator it = dg.begin(); it != dg.end(); it++)
841  std::cout << *it << "\n";
842 
844  for (L1DEDigiCollection::iterator it = dg.begin(); it != dg.end(); it++)
845  it->setSid(sys);
847  for (L1DEDigiCollection::iterator it = dg.begin(); it != dg.end(); it++)
848  it->setCid(cid);
849 
851  eventInfo.m_dedigis.insert(eventInfo.m_dedigis.end(), dg.begin(), dg.end());
852  for (int i = 0; i < 2; i++)
853  eventInfo.DEncand[sys][i] += cmp.get_ncand(i);
854 
855  if (verbose())
856  std::cout << "L1Comparator::process "
857  << " system:" << SystLabel[sys] << " type:" << cmp.GetName(0) << " ndata:" << eventInfo.DEncand[sys][0]
858  << " nemul:" << eventInfo.DEncand[sys][1] << " (size " << data->size() << "," << emul->size() << ")"
859  << " ndigis:" << dg.size() << " agree? " << eventInfo.DEmatchEvt[sys] << std::endl;
860 
861  if (verbose())
862  std::cout << "L1Comparator::process -ing system:" << sys << " (" << SystLabel[sys] << ")...done.\n" << std::flush;
863 }
std::vector< L1DataEmulDigi > L1DEDigiCollection
Definition: DEtrait.h:101
int verbose() const
Definition: L1Comparator.h:81
const std::string SystLabel[DEnsys]
Definition: DEtrait.h:42
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
eventInfo
add run, event number and lumi section
tmp
align.sh
Definition: createJobs.py:716
const int m_dumpMode
Definition: L1Comparator.h:117

◆ process() [2/2]

template<class T >
void L1Comparator::process ( const edm::Handle< T data,
const edm::Handle< T emul,
const int  sys,
const int  cid,
EventInfo eventInfo 
) const
inlineprivate

Definition at line 70 of file L1Comparator.h.

References data, L1TdeGEMTPG_cfi::emul, dumpTauVariables_cfi::eventInfo, and process().

71  {
72  if (data.isValid() && emul.isValid())
73  process(data.product(), emul.product(), sys, cid, eventInfo);
74  }
void process(T const *, T const *, const int, const int, EventInfo &eventInfo) const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
eventInfo
add run, event number and lumi section

◆ produce()

void L1Comparator::produce ( edm::StreamID  ,
edm::Event iEvent,
const edm::EventSetup iSetup 
) const
overrideprivatevirtual

– Get the data and emulated collections --------------------———

— done getting collections. —

processing : compare the pairs of collections

Implements edm::global::EDProducerBase.

Definition at line 248 of file L1Comparator.cc.

References gather_cfg::cout, dedefs::DEnsys, dedefs::DTF, dedefs::DTP, dedefs::DTtftrk, dedefs::DTtpPh, dedefs::DTtpTh, dumpTauVariables_cfi::eventInfo, dedefs::GCT, dedefs::GCTcenjets, dedefs::GCTethad, dedefs::GCTetmiss, dedefs::GCTettot, dedefs::GCTforjets, dedefs::GCThfbit, dedefs::GCThfring, dedefs::GCThtmiss, dedefs::GCTisolaem, dedefs::GCTisotaujets, dedefs::GCTnoisoem, dedefs::GCTtaujets, L1MuDTTrackContainer::getContainer(), L1MuDTChambPhContainer::getContainer(), L1MuDTChambThContainer::getContainer(), L1MuGMTReadoutCollection::getRecords(), GMT, dedefs::GMTcnd, dedefs::GMTmain, dedefs::GMTrdt, mps_fire::i, iEvent, if(), sistrip::SpyUtilities::isValid(), edm::HandleBase::isValid(), dqmiolumiharvest::j, dedefs::LTC, m_dumpFile, m_dumpMode, m_fileGuard, m_match, m_stage1_layer2_, eostools::move(), nevt_, dedefs::RCT, dedefs::RCTem, dedefs::RCTrgn, AlCaHarvesting_cff::record, RunInfoPI::RPC, dedefs::RPCcen, dedefs::RPCfor, csv2json::runIndex, tokenCaloEm_, tokenCaloRegion_, tokenGctEmCand_isoEm_, tokenGctEmCand_nonIsoEm_, tokenGctEtHad_, tokenGctEtMiss_, tokenGctEtTotal_, tokenGctHFBitCounts_, tokenGctHFRingEtSums_, tokenGctHtMiss_, tokenGctJetCand_cenJets_, tokenGctJetCand_forJets_, tokenGctJetCand_isoTauJets_, tokenGctJetCand_tauJets_, tokenGctJetCounts_, tokenLTCDigi_, tokenMuDTChambPh_, tokenMuDTChambTh_, tokenMuDTTrack_, tokenMuGMTCand_, tokenMuReadoutCand_, tokenMuRegionalCandRPCb_, tokenMuRegionalCandRPCf_, and verbose().

248  {
250  eventInfo.nevt_ = ++nevt_;
251  eventInfo.evtNum_ = iEvent.id().event();
252  eventInfo.runNum_ = iEvent.id().run();
253 
254  if (verbose())
255  std::cout << "\nL1COMPARATOR entry:" << eventInfo.nevt_ << " | evt:" << eventInfo.evtNum_
256  << " | run:" << eventInfo.runNum_ << "\n"
257  << std::flush;
258 
260 
261  // -- RCT [regional calorimeter trigger]
266  auto const runIndex = iEvent.getRun().index();
267  auto& runDoSys = *runCache(runIndex);
268 
269  if (runDoSys[RCT]) {
270  iEvent.getByToken(tokenCaloEm_[0], rct_em_data);
271  iEvent.getByToken(tokenCaloEm_[1], rct_em_emul);
272  iEvent.getByToken(tokenCaloRegion_[0], rct_rgn_data);
273  iEvent.getByToken(tokenCaloRegion_[1], rct_rgn_emul);
274  }
275 
276  // -- GCT [global calorimeter trigger]
277  edm::Handle<L1GctEmCandCollection> gct_isolaem_data;
278  edm::Handle<L1GctEmCandCollection> gct_isolaem_emul;
279  edm::Handle<L1GctEmCandCollection> gct_noisoem_data;
280  edm::Handle<L1GctEmCandCollection> gct_noisoem_emul;
281  edm::Handle<L1GctJetCandCollection> gct_cenjets_data;
282  edm::Handle<L1GctJetCandCollection> gct_cenjets_emul;
283  edm::Handle<L1GctJetCandCollection> gct_forjets_data;
284  edm::Handle<L1GctJetCandCollection> gct_forjets_emul;
285  edm::Handle<L1GctJetCandCollection> gct_taujets_data;
286  edm::Handle<L1GctJetCandCollection> gct_taujets_emul;
287  edm::Handle<L1GctJetCandCollection> gct_isotaujets_data;
288  edm::Handle<L1GctJetCandCollection> gct_isotaujets_emul;
289 
292  edm::Handle<L1GctEtMissCollection> gct_etmiss_data;
293  edm::Handle<L1GctEtMissCollection> gct_etmiss_emul;
294  edm::Handle<L1GctEtTotalCollection> gct_ettota_data;
295  edm::Handle<L1GctEtTotalCollection> gct_ettota_emul;
296  edm::Handle<L1GctHtMissCollection> gct_htmiss_data;
297  edm::Handle<L1GctHtMissCollection> gct_htmiss_emul;
304 
305  if (runDoSys[GCT]) {
306  if (m_stage1_layer2_ == false) {
307  iEvent.getByToken(tokenGctEmCand_isoEm_[0], gct_isolaem_data);
308  iEvent.getByToken(tokenGctEmCand_isoEm_[1], gct_isolaem_emul);
309  iEvent.getByToken(tokenGctEmCand_nonIsoEm_[0], gct_noisoem_data);
310  iEvent.getByToken(tokenGctEmCand_nonIsoEm_[1], gct_noisoem_emul);
311  iEvent.getByToken(tokenGctJetCand_cenJets_[0], gct_cenjets_data);
312  iEvent.getByToken(tokenGctJetCand_cenJets_[1], gct_cenjets_emul);
313  iEvent.getByToken(tokenGctJetCand_forJets_[0], gct_forjets_data);
314  iEvent.getByToken(tokenGctJetCand_forJets_[1], gct_forjets_emul);
315  iEvent.getByToken(tokenGctJetCand_tauJets_[0], gct_taujets_data);
316  iEvent.getByToken(tokenGctJetCand_tauJets_[1], gct_taujets_emul);
317  iEvent.getByToken(tokenGctEtHad_[0], gct_ht_data);
318  iEvent.getByToken(tokenGctEtHad_[1], gct_ht_emul);
319  iEvent.getByToken(tokenGctEtMiss_[0], gct_etmiss_data);
320  iEvent.getByToken(tokenGctEtMiss_[1], gct_etmiss_emul);
321  iEvent.getByToken(tokenGctEtTotal_[0], gct_ettota_data);
322  iEvent.getByToken(tokenGctEtTotal_[1], gct_ettota_emul);
323  iEvent.getByToken(tokenGctHtMiss_[0], gct_htmiss_data);
324  iEvent.getByToken(tokenGctHtMiss_[1], gct_htmiss_emul);
325  iEvent.getByToken(tokenGctHFRingEtSums_[0], gct_hfring_data);
326  iEvent.getByToken(tokenGctHFRingEtSums_[1], gct_hfring_emul);
327  iEvent.getByToken(tokenGctHFBitCounts_[0], gct_hfbcnt_data);
328  iEvent.getByToken(tokenGctHFBitCounts_[1], gct_hfbcnt_emul);
329  iEvent.getByToken(tokenGctJetCounts_[0], gct_jetcnt_data);
330  iEvent.getByToken(tokenGctJetCounts_[1], gct_jetcnt_emul);
331  }
332  if (m_stage1_layer2_ == true) {
333  iEvent.getByToken(tokenGctEmCand_isoEm_[0], gct_isolaem_data);
334  iEvent.getByToken(tokenGctEmCand_isoEm_[1], gct_isolaem_emul);
335  iEvent.getByToken(tokenGctEmCand_nonIsoEm_[0], gct_noisoem_data);
336  iEvent.getByToken(tokenGctEmCand_nonIsoEm_[1], gct_noisoem_emul);
337  iEvent.getByToken(tokenGctJetCand_cenJets_[0], gct_cenjets_data);
338  iEvent.getByToken(tokenGctJetCand_cenJets_[1], gct_cenjets_emul);
339  iEvent.getByToken(tokenGctJetCand_forJets_[0], gct_forjets_data);
340  iEvent.getByToken(tokenGctJetCand_forJets_[1], gct_forjets_emul);
341  iEvent.getByToken(tokenGctJetCand_tauJets_[0], gct_taujets_data);
342  iEvent.getByToken(tokenGctJetCand_tauJets_[1], gct_taujets_emul);
343  iEvent.getByToken(tokenGctJetCand_isoTauJets_[0], gct_isotaujets_data);
344  iEvent.getByToken(tokenGctJetCand_isoTauJets_[1], gct_isotaujets_emul);
345  iEvent.getByToken(tokenGctEtHad_[0], gct_ht_data);
346  iEvent.getByToken(tokenGctEtHad_[1], gct_ht_emul);
347  iEvent.getByToken(tokenGctEtMiss_[0], gct_etmiss_data);
348  iEvent.getByToken(tokenGctEtMiss_[1], gct_etmiss_emul);
349  iEvent.getByToken(tokenGctEtTotal_[0], gct_ettota_data);
350  iEvent.getByToken(tokenGctEtTotal_[1], gct_ettota_emul);
351  iEvent.getByToken(tokenGctHtMiss_[0], gct_htmiss_data);
352  iEvent.getByToken(tokenGctHtMiss_[1], gct_htmiss_emul);
353  iEvent.getByToken(tokenGctHFRingEtSums_[0], gct_hfring_data);
354  iEvent.getByToken(tokenGctHFRingEtSums_[1], gct_hfring_emul);
355  iEvent.getByToken(tokenGctHFBitCounts_[0], gct_hfbcnt_data);
356  iEvent.getByToken(tokenGctHFBitCounts_[1], gct_hfbcnt_emul);
357  iEvent.getByToken(tokenGctJetCounts_[0], gct_jetcnt_data);
358  iEvent.getByToken(tokenGctJetCounts_[1], gct_jetcnt_emul);
359  }
360  }
361 
362  // -- DTP [drift tube trigger primitive]
367  if (runDoSys[DTP]) {
368  iEvent.getByToken(tokenMuDTChambPh_[0], dtp_ph_data_);
369  iEvent.getByToken(tokenMuDTChambPh_[1], dtp_ph_emul_);
370  iEvent.getByToken(tokenMuDTChambTh_[0], dtp_th_data_);
371  iEvent.getByToken(tokenMuDTChambTh_[1], dtp_th_emul_);
372  }
373  L1MuDTChambPhDigiCollection const* dtp_ph_data = nullptr;
374  L1MuDTChambPhDigiCollection const* dtp_ph_emul = nullptr;
375  L1MuDTChambThDigiCollection const* dtp_th_data = nullptr;
376  L1MuDTChambThDigiCollection const* dtp_th_emul = nullptr;
377 
378  if (dtp_ph_data_.isValid())
379  dtp_ph_data = dtp_ph_data_->getContainer();
380  if (dtp_ph_emul_.isValid())
381  dtp_ph_emul = dtp_ph_emul_->getContainer();
382  if (dtp_th_data_.isValid())
383  dtp_th_data = dtp_th_data_->getContainer();
384  if (dtp_th_emul_.isValid())
385  dtp_th_emul = dtp_th_emul_->getContainer();
386 
387  // -- DTF [drift tube track finder]
388  edm::Handle<L1MuDTTrackContainer> dtf_trk_data_;
389  edm::Handle<L1MuDTTrackContainer> dtf_trk_emul_;
390  L1MuRegionalCandCollection const* dtf_trk_data = nullptr;
391  L1MuRegionalCandCollection const* dtf_trk_emul = nullptr;
392  if (runDoSys[DTF]) {
393  iEvent.getByToken(tokenMuDTTrack_[0], dtf_trk_data_);
394  iEvent.getByToken(tokenMuDTTrack_[1], dtf_trk_emul_);
395  }
396  //extract the regional cands
397  typedef std::vector<L1MuDTTrackCand> L1MuDTTrackCandCollection;
398  L1MuRegionalCandCollection dtf_trk_data_v, dtf_trk_emul_v;
399  dtf_trk_data_v.clear();
400  dtf_trk_emul_v.clear();
401  if (dtf_trk_data_.isValid()) {
402  L1MuDTTrackCandCollection const* dttc = dtf_trk_data_->getContainer();
403  for (L1MuDTTrackCandCollection::const_iterator it = dttc->begin(); it != dttc->end(); it++)
404  dtf_trk_data_v.push_back(L1MuRegionalCand(*it));
405  }
406  if (dtf_trk_emul_.isValid()) {
407  L1MuDTTrackCandCollection const* dttc = dtf_trk_emul_->getContainer();
408  for (L1MuDTTrackCandCollection::const_iterator it = dttc->begin(); it != dttc->end(); it++)
409  dtf_trk_emul_v.push_back(L1MuRegionalCand(*it));
410  }
411  dtf_trk_data = &dtf_trk_data_v;
412  dtf_trk_emul = &dtf_trk_emul_v;
413 
414  // -- RPC [resistive plate chambers regional trigger]
419  if (runDoSys[RPC]) {
420  iEvent.getByToken(tokenMuRegionalCandRPCb_[0], rpc_cen_data);
421  iEvent.getByToken(tokenMuRegionalCandRPCb_[1], rpc_cen_emul);
422  iEvent.getByToken(tokenMuRegionalCandRPCf_[0], rpc_for_data);
423  iEvent.getByToken(tokenMuRegionalCandRPCf_[1], rpc_for_emul);
424  }
425 
426  // -- LTC [local trigger controller]
429  if (runDoSys[LTC]) {
430  iEvent.getByToken(tokenLTCDigi_[0], ltc_data);
431  iEvent.getByToken(tokenLTCDigi_[1], ltc_emul);
432  }
433 
434  // -- GMT [global muon trigger]
441  //tbd: may compare extended candidates
442  L1MuGMTCandCollection const* gmt_can_data(new L1MuGMTCandCollection);
443  L1MuGMTCandCollection const* gmt_can_emul(new L1MuGMTCandCollection);
444  if (runDoSys[GMT]) {
445  iEvent.getByToken(tokenMuGMTCand_[0], gmt_data);
446  iEvent.getByToken(tokenMuGMTCand_[1], gmt_emul);
447  iEvent.getByToken(tokenMuReadoutCand_[0], gmt_rdt_data_);
448  iEvent.getByToken(tokenMuReadoutCand_[1], gmt_rdt_emul_);
449  }
450  L1MuGMTCandCollection gmt_can_data_vec, gmt_can_emul_vec;
451  L1MuRegionalCandCollection gmt_rdt_data_vec, gmt_rdt_emul_vec;
452  gmt_can_data_vec.clear();
453  gmt_can_emul_vec.clear();
454  gmt_rdt_data_vec.clear();
455  gmt_rdt_emul_vec.clear();
456  if (gmt_rdt_data_.isValid() && gmt_rdt_emul_.isValid()) {
457  typedef std::vector<L1MuGMTReadoutRecord>::const_iterator GmtRrIt;
458  //get record vector for data
459  std::vector<L1MuGMTReadoutRecord> gmt_rdt_data_bx = gmt_rdt_data_->getRecords();
460  for (GmtRrIt igmtrr = gmt_rdt_data_bx.begin(); igmtrr != gmt_rdt_data_bx.end(); igmtrr++) {
461  //get gmt cands
462  typedef std::vector<L1MuGMTExtendedCand>::const_iterator GmtECIt;
463  std::vector<L1MuGMTExtendedCand> gmc;
464  gmc = igmtrr->getGMTCands();
465  for (GmtECIt iter1 = gmc.begin(); iter1 != gmc.end(); iter1++) {
466  L1MuGMTCand cand(iter1->getDataWord(), iter1->bx());
467  cand.setPhiValue(iter1->phiValue());
468  cand.setEtaValue(iter1->etaValue());
469  cand.setPtValue(iter1->ptValue());
470  gmt_can_data_vec.push_back(cand);
471  }
472  //get reg cands
473  typedef L1MuRegionalCandCollection::const_iterator GmtRCIt;
475  rmc.clear();
476  rmc = igmtrr->getDTBXCands();
477  gmt_rdt_data_vec.insert(gmt_rdt_data_vec.end(), rmc.begin(), rmc.end());
478  rmc.clear();
479  rmc = igmtrr->getCSCCands();
480  gmt_rdt_data_vec.insert(gmt_rdt_data_vec.end(), rmc.begin(), rmc.end());
481  rmc.clear();
482  rmc = igmtrr->getBrlRPCCands();
483  gmt_rdt_data_vec.insert(gmt_rdt_data_vec.end(), rmc.begin(), rmc.end());
484  rmc.clear();
485  rmc = igmtrr->getFwdRPCCands();
486  gmt_rdt_data_vec.insert(gmt_rdt_data_vec.end(), rmc.begin(), rmc.end());
487  }
488  //get record vector for emul
489  std::vector<L1MuGMTReadoutRecord> gmt_rdt_emul_bx = gmt_rdt_emul_->getRecords();
490  for (GmtRrIt igmtrr = gmt_rdt_emul_bx.begin(); igmtrr != gmt_rdt_emul_bx.end(); igmtrr++) {
491  //get gmt cands
492  typedef std::vector<L1MuGMTExtendedCand>::const_iterator GmtECIt;
493  std::vector<L1MuGMTExtendedCand> gmc;
494  gmc = igmtrr->getGMTCands();
495  for (GmtECIt iter1 = gmc.begin(); iter1 != gmc.end(); iter1++) {
496  gmt_can_emul_vec.push_back(L1MuGMTCand(iter1->getDataWord(), iter1->bx()));
497  }
498  //get reg cands
499  typedef L1MuRegionalCandCollection::const_iterator GmtRCIt;
501  rmc.clear();
502  rmc = igmtrr->getDTBXCands();
503  gmt_rdt_emul_vec.insert(gmt_rdt_emul_vec.end(), rmc.begin(), rmc.end());
504  rmc.clear();
505  rmc = igmtrr->getCSCCands();
506  gmt_rdt_emul_vec.insert(gmt_rdt_emul_vec.end(), rmc.begin(), rmc.end());
507  rmc.clear();
508  rmc = igmtrr->getBrlRPCCands();
509  gmt_rdt_emul_vec.insert(gmt_rdt_emul_vec.end(), rmc.begin(), rmc.end());
510  rmc.clear();
511  rmc = igmtrr->getFwdRPCCands();
512  gmt_rdt_emul_vec.insert(gmt_rdt_emul_vec.end(), rmc.begin(), rmc.end());
513  }
514  }
515  gmt_rdt_data = &gmt_rdt_data_vec;
516  gmt_rdt_emul = &gmt_rdt_emul_vec;
517  gmt_can_data = &gmt_can_data_vec;
518  gmt_can_emul = &gmt_can_emul_vec;
519 
521 
522  //check collections validity
523  bool isValidDE[DEnsys][2]; // = {false};
524  for (int i = 0; i < DEnsys; i++)
525  for (int j = 0; j < 2; j++)
526  isValidDE[i][j] = false;
527 
528  isValidDE[RCT][0] = rct_em_data.isValid();
529  isValidDE[RCT][1] = rct_em_emul.isValid();
530  isValidDE[RCT][0] &= rct_rgn_data.isValid();
531  isValidDE[RCT][1] = rct_rgn_emul.isValid();
532 
533  if (m_stage1_layer2_ == false) {
534  isValidDE[GCT][0] = gct_isolaem_data.isValid();
535  isValidDE[GCT][1] = gct_isolaem_emul.isValid();
536  isValidDE[GCT][0] &= gct_noisoem_data.isValid();
537  isValidDE[GCT][1] &= gct_noisoem_emul.isValid();
538  isValidDE[GCT][0] &= gct_cenjets_data.isValid();
539  isValidDE[GCT][1] &= gct_cenjets_emul.isValid();
540  isValidDE[GCT][0] &= gct_forjets_data.isValid();
541  isValidDE[GCT][1] &= gct_forjets_emul.isValid();
542  isValidDE[GCT][0] &= gct_taujets_data.isValid();
543  isValidDE[GCT][1] &= gct_taujets_emul.isValid();
544  isValidDE[GCT][0] &= gct_etmiss_data.isValid();
545  isValidDE[GCT][1] &= gct_etmiss_emul.isValid();
546  isValidDE[GCT][0] &= gct_ettota_data.isValid();
547  isValidDE[GCT][1] &= gct_ettota_emul.isValid();
548  isValidDE[GCT][0] &= gct_htmiss_data.isValid();
549  isValidDE[GCT][1] &= gct_htmiss_emul.isValid();
550  isValidDE[GCT][0] &= gct_hfring_data.isValid();
551  isValidDE[GCT][1] &= gct_hfring_emul.isValid();
552  isValidDE[GCT][0] &= gct_hfbcnt_data.isValid();
553  isValidDE[GCT][1] &= gct_hfbcnt_emul.isValid();
554  //isValidDE[GCT][0]&= gct_jetcnt_data .isValid(); isValidDE[GCT][1]&= gct_jetcnt_emul .isValid(); #temporary
555  }
556  if (m_stage1_layer2_ == true) {
557  isValidDE[GCT][0] = gct_isolaem_data.isValid();
558  isValidDE[GCT][1] = gct_isolaem_emul.isValid();
559  isValidDE[GCT][0] &= gct_noisoem_data.isValid();
560  isValidDE[GCT][1] &= gct_noisoem_emul.isValid();
561  isValidDE[GCT][0] &= gct_cenjets_data.isValid();
562  isValidDE[GCT][1] &= gct_cenjets_emul.isValid();
563  isValidDE[GCT][0] &= gct_forjets_data.isValid();
564  isValidDE[GCT][1] &= gct_forjets_emul.isValid();
565  isValidDE[GCT][0] &= gct_taujets_data.isValid();
566  isValidDE[GCT][1] &= gct_taujets_emul.isValid();
567  isValidDE[GCT][0] &= gct_isotaujets_data.isValid();
568  isValidDE[GCT][1] &= gct_isotaujets_emul.isValid();
569  isValidDE[GCT][0] &= gct_etmiss_data.isValid();
570  isValidDE[GCT][1] &= gct_etmiss_emul.isValid();
571  isValidDE[GCT][0] &= gct_ettota_data.isValid();
572  isValidDE[GCT][1] &= gct_ettota_emul.isValid();
573  isValidDE[GCT][0] &= gct_htmiss_data.isValid();
574  isValidDE[GCT][1] &= gct_htmiss_emul.isValid();
575  isValidDE[GCT][0] &= gct_hfring_data.isValid();
576  isValidDE[GCT][1] &= gct_hfring_emul.isValid();
577  isValidDE[GCT][0] &= gct_hfbcnt_data.isValid();
578  isValidDE[GCT][1] &= gct_hfbcnt_emul.isValid();
579  }
580  isValidDE[DTP][0] = dtp_ph_data_.isValid();
581  isValidDE[DTP][1] = dtp_ph_emul_.isValid();
582  isValidDE[DTP][0] &= dtp_th_data_.isValid();
583  isValidDE[DTP][1] &= dtp_th_emul_.isValid();
584 
585  isValidDE[DTF][0] = dtf_trk_data_.isValid();
586  isValidDE[DTF][1] = dtf_trk_emul_.isValid();
587 
588  isValidDE[RPC][0] = rpc_cen_data.isValid();
589  isValidDE[RPC][1] = rpc_cen_emul.isValid();
590  isValidDE[RPC][0] &= rpc_for_data.isValid();
591  isValidDE[RPC][1] &= rpc_for_emul.isValid();
592 
593  isValidDE[LTC][0] = ltc_data.isValid();
594  isValidDE[LTC][1] = ltc_emul.isValid();
595 
596  isValidDE[GMT][0] = gmt_data.isValid();
597  isValidDE[GMT][1] = gmt_emul.isValid();
598  //isValidDE[GMT][0]&= gmt_rdt_data_.isValid(); isValidDE[GMT][1]&= gmt_rdt_emul_.isValid();
599 
600  bool isValid[DEnsys];
601  for (int i = 0; i < DEnsys; i++) {
602  isValid[i] = true;
603  for (int j = 0; j < 2; j++) {
604  isValid[i] &= isValidDE[i][j];
605  }
606  }
607 
608  if (verbose()) {
609  std::cout << "L1Comparator sys isValid? (evt:" << eventInfo.nevt_ << ") ";
610  std::cout << "\n\t&: ";
611  for (int i = 0; i < DEnsys; i++)
612  std::cout << isValid[i] << " ";
613  std::cout << "\n\td: ";
614  for (int i = 0; i < DEnsys; i++)
615  std::cout << isValidDE[i][0] << " ";
616  std::cout << "\n\te: ";
617  for (int i = 0; i < DEnsys; i++)
618  std::cout << isValidDE[i][1] << " ";
619  std::cout << std::endl;
620  }
621 
622  //reset flags...
623  //for(int i=0; i<DEnsys; i++) isValid[i]=true;
624 
625  if (verbose())
626  std::cout << "L1Comparator start processing the collections.\n" << std::flush;
627 
629  if (runDoSys[RCT] && isValid[RCT])
630  process<L1CaloEmCollection>(rct_em_data, rct_em_emul, RCT, RCTem, eventInfo);
631  if (runDoSys[RCT] && isValid[RCT])
632  process<L1CaloRegionCollection>(rct_rgn_data, rct_rgn_emul, RCT, RCTrgn, eventInfo);
633 
634  if (m_stage1_layer2_ == false) {
635  if (runDoSys[GCT] && isValid[GCT])
636  process<L1GctEmCandCollection>(gct_isolaem_data, gct_isolaem_emul, GCT, GCTisolaem, eventInfo);
637  if (runDoSys[GCT] && isValid[GCT])
638  process<L1GctEmCandCollection>(gct_noisoem_data, gct_noisoem_emul, GCT, GCTnoisoem, eventInfo);
639  if (runDoSys[GCT] && isValid[GCT])
640  process<L1GctJetCandCollection>(gct_cenjets_data, gct_cenjets_emul, GCT, GCTcenjets, eventInfo);
641  if (runDoSys[GCT] && isValid[GCT])
642  process<L1GctJetCandCollection>(gct_forjets_data, gct_forjets_emul, GCT, GCTforjets, eventInfo);
643  if (runDoSys[GCT] && isValid[GCT])
644  process<L1GctJetCandCollection>(gct_taujets_data, gct_taujets_emul, GCT, GCTtaujets, eventInfo);
645  if (runDoSys[GCT] && isValid[GCT])
646  process<L1GctEtHadCollection>(gct_ht_data, gct_ht_emul, GCT, GCTethad, eventInfo);
647  if (runDoSys[GCT] && isValid[GCT])
648  process<L1GctEtMissCollection>(gct_etmiss_data, gct_etmiss_emul, GCT, GCTetmiss, eventInfo);
649  if (runDoSys[GCT] && isValid[GCT])
650  process<L1GctEtTotalCollection>(gct_ettota_data, gct_ettota_emul, GCT, GCTettot, eventInfo);
651  if (runDoSys[GCT] && isValid[GCT])
652  process<L1GctHtMissCollection>(gct_htmiss_data, gct_htmiss_emul, GCT, GCThtmiss, eventInfo);
653  if (runDoSys[GCT] && isValid[GCT])
654  process<L1GctHFRingEtSumsCollection>(gct_hfring_data, gct_hfring_emul, GCT, GCThfring, eventInfo);
655  if (runDoSys[GCT] && isValid[GCT])
656  process<L1GctHFBitCountsCollection>(gct_hfbcnt_data, gct_hfbcnt_emul, GCT, GCThfbit, eventInfo);
657  //if(runDoSys[GCT]&&isValid[GCT]) process<L1GctJetCountsCollection> ( gct_jetcnt_data, gct_jetcnt_emul, GCT,GCTjetcnt);#missing in emulator
658  }
659  if (m_stage1_layer2_ == true) {
660  if (runDoSys[GCT] && isValid[GCT])
661  process<L1GctEmCandCollection>(gct_isolaem_data, gct_isolaem_emul, GCT, GCTisolaem, eventInfo);
662  if (runDoSys[GCT] && isValid[GCT])
663  process<L1GctEmCandCollection>(gct_noisoem_data, gct_noisoem_emul, GCT, GCTnoisoem, eventInfo);
664  if (runDoSys[GCT] && isValid[GCT])
665  process<L1GctJetCandCollection>(gct_cenjets_data, gct_cenjets_emul, GCT, GCTcenjets, eventInfo);
666  if (runDoSys[GCT] && isValid[GCT])
667  process<L1GctJetCandCollection>(gct_forjets_data, gct_forjets_emul, GCT, GCTforjets, eventInfo);
668  if (runDoSys[GCT] && isValid[GCT])
669  process<L1GctJetCandCollection>(gct_taujets_data, gct_taujets_emul, GCT, GCTtaujets, eventInfo);
670  if (runDoSys[GCT] && isValid[GCT])
671  process<L1GctJetCandCollection>(gct_isotaujets_data, gct_isotaujets_emul, GCT, GCTisotaujets, eventInfo);
672  if (runDoSys[GCT] && isValid[GCT])
673  process<L1GctEtHadCollection>(gct_ht_data, gct_ht_emul, GCT, GCTethad, eventInfo);
674  if (runDoSys[GCT] && isValid[GCT])
675  process<L1GctEtMissCollection>(gct_etmiss_data, gct_etmiss_emul, GCT, GCTetmiss, eventInfo);
676  if (runDoSys[GCT] && isValid[GCT])
677  process<L1GctEtTotalCollection>(gct_ettota_data, gct_ettota_emul, GCT, GCTettot, eventInfo);
678  if (runDoSys[GCT] && isValid[GCT])
679  process<L1GctHtMissCollection>(gct_htmiss_data, gct_htmiss_emul, GCT, GCThtmiss, eventInfo);
680  if (runDoSys[GCT] && isValid[GCT])
681  process<L1GctHFRingEtSumsCollection>(gct_hfring_data, gct_hfring_emul, GCT, GCThfring, eventInfo);
682  if (runDoSys[GCT] && isValid[GCT])
683  process<L1GctHFBitCountsCollection>(gct_hfbcnt_data, gct_hfbcnt_emul, GCT, GCThfbit, eventInfo);
684  //if(runDoSys[GCT]&&isValid[GCT]) process<L1GctJetCountsCollection> ( gct_jetcnt_data, gct_jetcnt_emul, GCT,GCTjetcnt);#missing in emulator
685  }
686 
687  if (runDoSys[DTP] && isValid[DTP])
688  process<L1MuDTChambPhDigiCollection>(dtp_ph_data, dtp_ph_emul, DTP, DTtpPh, eventInfo);
689  if (runDoSys[DTP] && isValid[DTP])
690  process<L1MuDTChambThDigiCollection>(dtp_th_data, dtp_th_emul, DTP, DTtpTh, eventInfo);
691 
692  if (runDoSys[DTF] && isValid[DTF])
693  process<L1MuRegionalCandCollection>(dtf_trk_data, dtf_trk_emul, DTF, DTtftrk, eventInfo);
694 
695  if (runDoSys[RPC] && isValid[RPC])
696  process<L1MuRegionalCandCollection>(rpc_cen_data, rpc_cen_emul, RPC, RPCcen, eventInfo);
697  if (runDoSys[RPC] && isValid[RPC])
698  process<L1MuRegionalCandCollection>(rpc_for_data, rpc_for_emul, RPC, RPCfor, eventInfo);
699 
700  if (runDoSys[GMT] && isValid[GMT])
701  process<L1MuGMTCandCollection>(gmt_data, gmt_emul, GMT, GMTmain, eventInfo);
702  if (runDoSys[GMT] && isValid[GMT])
703  process<L1MuRegionalCandCollection>(gmt_rdt_data, gmt_rdt_emul, GMT, GMTrdt, eventInfo);
704  if (runDoSys[GMT] && isValid[GMT])
705  process<L1MuGMTCandCollection>(gmt_can_data, gmt_can_emul, GMT, GMTcnd, eventInfo);
706 
707  // >>---- GLT ---- <<
708  GltDEDigi gltdigimon;
709 
710  if (verbose())
711  std::cout << "L1Comparator done processing all collections.\n" << std::flush;
712 
713  if (verbose()) {
714  std::cout << "[L1Comparator] sys match? << evt." << eventInfo.nevt_ << ": ";
715  for (int i = 0; i < DEnsys; i++)
716  std::cout << eventInfo.DEmatchEvt[i] << " ";
717  std::cout << std::endl;
718  }
719 
720  // >>---- Event match? ---- <<
721 
722  bool evt_match = true;
723  for (int i = 0; i < DEnsys; i++)
724  evt_match &= eventInfo.DEmatchEvt[i];
725 
726  /* char ok[10];
727  if(evt_match) sprintf(ok,"GOOD :]");
728  else sprintf(ok,"BAD !!!");
729  char dumptofile[1000];
730  sprintf(dumptofile,"\n -> event data and emulator match... %s\n", ok);
731  m_dumpFile<<dumptofile;
732  */
733 
734  // >>---- Global match? ---- <<
735  if (not evt_match) {
736  m_match = false;
737  }
738  {
739  if (m_dumpMode) {
740  std::lock_guard<std::mutex> guard(m_fileGuard);
741  m_dumpFile << eventInfo.dumpToFile_.rdbuf() << std::flush;
742  }
743  }
744  //if collection is empty, add empty digi
745  if (eventInfo.m_dedigis.empty()) {
746  if (verbose())
747  std::cout << "\n [L1Comparator] adding empty collection to DErecord\n";
748  eventInfo.m_dedigis.push_back(L1DataEmulDigi());
749  }
750 
751  // >>---- d|e record ---- <<
752  std::unique_ptr<L1DataEmulRecord> record(new L1DataEmulRecord(
753  evt_match, runDoSys, eventInfo.DEmatchEvt, eventInfo.DEncand, eventInfo.m_dedigis, gltdigimon));
754  if (verbose()) {
755  std::cout << "\n [L1Comparator] printing DErecord"
756  << "(entry:" << eventInfo.nevt_ << "|evt:" << eventInfo.evtNum_ << "|run:" << eventInfo.runNum_ << "):\n"
757  << std::flush;
758  std::cout << *record << "\n" << std::flush;
759  }
760 
761  iEvent.put(std::move(record));
762 
763  if (verbose())
764  std::cout << "L1comparator::analize() end. " << eventInfo.nevt_ << std::endl;
765 }
edm::EDGetTokenT< L1GctEmCandCollection > tokenGctEmCand_nonIsoEm_[2]
Definition: L1Comparator.h:91
edm::EDGetTokenT< LTCDigiCollection > tokenLTCDigi_[2]
Definition: L1Comparator.h:105
const int DEnsys
Definition: DEtrait.h:38
edm::EDGetTokenT< L1GctEtHadCollection > tokenGctEtHad_[2]
Definition: L1Comparator.h:97
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
edm::EDGetTokenT< L1MuRegionalCandCollection > tokenMuRegionalCandRPCb_[2]
Definition: L1Comparator.h:107
edm::EDGetTokenT< L1GctJetCountsCollection > tokenGctJetCounts_[2]
Definition: L1Comparator.h:102
std::mutex m_fileGuard
Definition: L1Comparator.h:118
edm::EDGetTokenT< L1GctEtMissCollection > tokenGctEtMiss_[2]
Definition: L1Comparator.h:98
edm::EDGetTokenT< L1GctHFBitCountsCollection > tokenGctHFBitCounts_[2]
Definition: L1Comparator.h:100
edm::EDGetTokenT< L1MuDTChambThContainer > tokenMuDTChambTh_[2]
Definition: L1Comparator.h:104
edm::EDGetTokenT< L1GctJetCandCollection > tokenGctJetCand_tauJets_[2]
Definition: L1Comparator.h:94
define event information passed to algorithms
The_Container const * getContainer() const
std::atomic< int > nevt_
Definition: L1Comparator.h:85
int iEvent
Definition: GenABIO.cc:224
edm::EDGetTokenT< L1MuGMTReadoutCollection > tokenMuReadoutCand_[2]
Definition: L1Comparator.h:110
edm::EDGetTokenT< L1GctJetCandCollection > tokenGctJetCand_isoTauJets_[2]
Definition: L1Comparator.h:95
edm::EDGetTokenT< L1MuRegionalCandCollection > tokenMuRegionalCandRPCf_[2]
Definition: L1Comparator.h:108
edm::EDGetTokenT< L1GctEtTotalCollection > tokenGctEtTotal_[2]
Definition: L1Comparator.h:96
TrackContainer const * getContainer() const
edm::EDGetTokenT< L1CaloEmCollection > tokenCaloEm_[2]
Definition: L1Comparator.h:88
std::vector< L1MuDTChambThDigi > L1MuDTChambThDigiCollection
Definition: DEtrait.h:93
std::vector< L1MuRegionalCand > L1MuRegionalCandCollection
edm::EDGetTokenT< L1MuDTChambPhContainer > tokenMuDTChambPh_[2]
Definition: L1Comparator.h:103
int verbose() const
Definition: L1Comparator.h:81
std::atomic< bool > m_match
Definition: L1Comparator.h:119
edm::EDGetTokenT< L1GctJetCandCollection > tokenGctJetCand_cenJets_[2]
Definition: L1Comparator.h:92
Phi_Container const * getContainer() const
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
std::vector< L1MuDTChambPhDigi > L1MuDTChambPhDigiCollection
Definition: DEtrait.h:92
edm::EDGetTokenT< L1GctHFRingEtSumsCollection > tokenGctHFRingEtSums_[2]
Definition: L1Comparator.h:99
edm::EDGetTokenT< L1GctJetCandCollection > tokenGctJetCand_forJets_[2]
Definition: L1Comparator.h:93
edm::EDGetTokenT< L1GctHtMissCollection > tokenGctHtMiss_[2]
Definition: L1Comparator.h:101
edm::EDGetTokenT< L1CaloRegionCollection > tokenCaloRegion_[2]
Definition: L1Comparator.h:89
bool isValid() const
Definition: HandleBase.h:70
std::ofstream m_dumpFile
Definition: L1Comparator.h:116
eventInfo
add run, event number and lumi section
edm::EDGetTokenT< L1MuDTTrackContainer > tokenMuDTTrack_[2]
Definition: L1Comparator.h:106
edm::EDGetTokenT< L1GctEmCandCollection > tokenGctEmCand_isoEm_[2]
Definition: L1Comparator.h:90
def move(src, dest)
Definition: eostools.py:511
std::vector< L1MuGMTCand > L1MuGMTCandCollection
Definition: DEtrait.h:99
const int m_dumpMode
Definition: L1Comparator.h:117
edm::EDGetTokenT< L1MuGMTCandCollection > tokenMuGMTCand_[2]
Definition: L1Comparator.h:109
const bool m_stage1_layer2_
Definition: L1Comparator.h:82

◆ verbose()

int L1Comparator::verbose ( ) const
inlineprivate

Definition at line 81 of file L1Comparator.h.

References verbose_.

Referenced by globalBeginRun(), process(), and produce().

81 { return verbose_; }
const int verbose_
Definition: L1Comparator.h:86

Member Data Documentation

◆ m_doSys

const std::array<bool, dedefs::DEnsys> L1Comparator::m_doSys
private

Definition at line 114 of file L1Comparator.h.

Referenced by globalBeginRun().

◆ m_dumpFile

std::ofstream L1Comparator::m_dumpFile
mutableprivate

Definition at line 116 of file L1Comparator.h.

Referenced by endJob(), and produce().

◆ m_dumpFileName

const std::string L1Comparator::m_dumpFileName
private

Definition at line 115 of file L1Comparator.h.

◆ m_dumpMode

const int L1Comparator::m_dumpMode
private

Definition at line 117 of file L1Comparator.h.

Referenced by endJob(), process(), and produce().

◆ m_fileGuard

std::mutex L1Comparator::m_fileGuard
mutableprivate

Definition at line 118 of file L1Comparator.h.

Referenced by produce().

◆ m_match

std::atomic<bool> L1Comparator::m_match
mutableprivate

Definition at line 119 of file L1Comparator.h.

Referenced by endJob(), and produce().

◆ m_stage1_layer2_

const bool L1Comparator::m_stage1_layer2_
private

Definition at line 82 of file L1Comparator.h.

Referenced by produce().

◆ nevt_

std::atomic<int> L1Comparator::nevt_
mutableprivate

Definition at line 85 of file L1Comparator.h.

Referenced by produce().

◆ tokenCaloEm_

edm::EDGetTokenT<L1CaloEmCollection> L1Comparator::tokenCaloEm_[2]
private

Definition at line 88 of file L1Comparator.h.

Referenced by produce().

◆ tokenCaloRegion_

edm::EDGetTokenT<L1CaloRegionCollection> L1Comparator::tokenCaloRegion_[2]
private

Definition at line 89 of file L1Comparator.h.

Referenced by produce().

◆ tokenGctEmCand_isoEm_

edm::EDGetTokenT<L1GctEmCandCollection> L1Comparator::tokenGctEmCand_isoEm_[2]
private

Definition at line 90 of file L1Comparator.h.

Referenced by produce().

◆ tokenGctEmCand_nonIsoEm_

edm::EDGetTokenT<L1GctEmCandCollection> L1Comparator::tokenGctEmCand_nonIsoEm_[2]
private

Definition at line 91 of file L1Comparator.h.

Referenced by produce().

◆ tokenGctEtHad_

edm::EDGetTokenT<L1GctEtHadCollection> L1Comparator::tokenGctEtHad_[2]
private

Definition at line 97 of file L1Comparator.h.

Referenced by produce().

◆ tokenGctEtMiss_

edm::EDGetTokenT<L1GctEtMissCollection> L1Comparator::tokenGctEtMiss_[2]
private

Definition at line 98 of file L1Comparator.h.

Referenced by produce().

◆ tokenGctEtTotal_

edm::EDGetTokenT<L1GctEtTotalCollection> L1Comparator::tokenGctEtTotal_[2]
private

Definition at line 96 of file L1Comparator.h.

Referenced by produce().

◆ tokenGctHFBitCounts_

edm::EDGetTokenT<L1GctHFBitCountsCollection> L1Comparator::tokenGctHFBitCounts_[2]
private

Definition at line 100 of file L1Comparator.h.

Referenced by produce().

◆ tokenGctHFRingEtSums_

edm::EDGetTokenT<L1GctHFRingEtSumsCollection> L1Comparator::tokenGctHFRingEtSums_[2]
private

Definition at line 99 of file L1Comparator.h.

Referenced by produce().

◆ tokenGctHtMiss_

edm::EDGetTokenT<L1GctHtMissCollection> L1Comparator::tokenGctHtMiss_[2]
private

Definition at line 101 of file L1Comparator.h.

Referenced by produce().

◆ tokenGctJetCand_cenJets_

edm::EDGetTokenT<L1GctJetCandCollection> L1Comparator::tokenGctJetCand_cenJets_[2]
private

Definition at line 92 of file L1Comparator.h.

Referenced by produce().

◆ tokenGctJetCand_forJets_

edm::EDGetTokenT<L1GctJetCandCollection> L1Comparator::tokenGctJetCand_forJets_[2]
private

Definition at line 93 of file L1Comparator.h.

Referenced by produce().

◆ tokenGctJetCand_isoTauJets_

edm::EDGetTokenT<L1GctJetCandCollection> L1Comparator::tokenGctJetCand_isoTauJets_[2]
private

Definition at line 95 of file L1Comparator.h.

Referenced by produce().

◆ tokenGctJetCand_tauJets_

edm::EDGetTokenT<L1GctJetCandCollection> L1Comparator::tokenGctJetCand_tauJets_[2]
private

Definition at line 94 of file L1Comparator.h.

Referenced by produce().

◆ tokenGctJetCounts_

edm::EDGetTokenT<L1GctJetCountsCollection> L1Comparator::tokenGctJetCounts_[2]
private

Definition at line 102 of file L1Comparator.h.

Referenced by produce().

◆ tokenLTCDigi_

edm::EDGetTokenT<LTCDigiCollection> L1Comparator::tokenLTCDigi_[2]
private

Definition at line 105 of file L1Comparator.h.

Referenced by produce().

◆ tokenMuDTChambPh_

edm::EDGetTokenT<L1MuDTChambPhContainer> L1Comparator::tokenMuDTChambPh_[2]
private

Definition at line 103 of file L1Comparator.h.

Referenced by produce().

◆ tokenMuDTChambTh_

edm::EDGetTokenT<L1MuDTChambThContainer> L1Comparator::tokenMuDTChambTh_[2]
private

Definition at line 104 of file L1Comparator.h.

Referenced by produce().

◆ tokenMuDTTrack_

edm::EDGetTokenT<L1MuDTTrackContainer> L1Comparator::tokenMuDTTrack_[2]
private

Definition at line 106 of file L1Comparator.h.

Referenced by produce().

◆ tokenMuGMTCand_

edm::EDGetTokenT<L1MuGMTCandCollection> L1Comparator::tokenMuGMTCand_[2]
private

Definition at line 109 of file L1Comparator.h.

Referenced by produce().

◆ tokenMuReadoutCand_

edm::EDGetTokenT<L1MuGMTReadoutCollection> L1Comparator::tokenMuReadoutCand_[2]
private

Definition at line 110 of file L1Comparator.h.

Referenced by produce().

◆ tokenMuRegionalCandRPCb_

edm::EDGetTokenT<L1MuRegionalCandCollection> L1Comparator::tokenMuRegionalCandRPCb_[2]
private

Definition at line 107 of file L1Comparator.h.

Referenced by produce().

◆ tokenMuRegionalCandRPCf_

edm::EDGetTokenT<L1MuRegionalCandCollection> L1Comparator::tokenMuRegionalCandRPCf_[2]
private

Definition at line 108 of file L1Comparator.h.

Referenced by produce().

◆ tokenTriggerKey_

const edm::ESGetToken<L1TriggerKey, L1TriggerKeyRcd> L1Comparator::tokenTriggerKey_
private

Definition at line 112 of file L1Comparator.h.

Referenced by globalBeginRun().

◆ verbose_

const int L1Comparator::verbose_
private

Definition at line 86 of file L1Comparator.h.

Referenced by verbose().