CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
CSCDigiToRawModule Class Reference
Inheritance diagram for CSCDigiToRawModule:
edm::global::EDProducer<> edm::global::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 CSCDigiToRawModule (const edm::ParameterSet &pset)
 Constructor. More...
 
void produce (edm::StreamID, edm::Event &, const edm::EventSetup &) const override
 
- Public Member Functions inherited from edm::global::EDProducer<>
 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 &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::global::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Attributes

edm::EDGetTokenT< CSCALCTDigiCollectional_token
 
edm::EDGetTokenT< CSCComparatorDigiCollectioncd_token
 
edm::ESGetToken< CSCChamberMap, CSCChamberMapRcdcham_token
 
edm::EDGetTokenT< CSCCLCTDigiCollectioncl_token
 
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollectionco_token
 
edm::EDGetTokenT< GEMPadDigiClusterCollectiongem_token
 
std::unique_ptr< const CSCDigiToRawpacker_
 
bool packEverything_
 
edm::EDGetTokenT< CSCCLCTPreTriggerCollectionpr_token
 
edm::EDPutTokenT< FEDRawDataCollectionput_token_
 
edm::EDGetTokenT< CSCStripDigiCollectionsd_token
 
unsigned int theFormatVersion
 
bool useGEMs_
 
bool usePreTriggers
 
edm::EDGetTokenT< CSCWireDigiCollectionwd_token
 

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
 
- Protected Member Functions inherited from edm::ProducerBase
template<class ProductType >
BranchAliasSetterT< ProductType > produces ()
 declare what type of product will make and with which optional label More...
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces ()
 
template<typename ProductType , Transition B>
BranchAliasSetterT< ProductType > produces ()
 
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)
 
template<Transition B>
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 (std::string instanceName)
 
template<typename ProductType , BranchType B>
BranchAliasSetterT< ProductType > produces (std::string instanceName)
 
ProducesCollector producesCollector ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 40 of file CSCDigiToRawModule.cc.

Constructor & Destructor Documentation

◆ CSCDigiToRawModule()

CSCDigiToRawModule::CSCDigiToRawModule ( const edm::ParameterSet pset)

Constructor.

Definition at line 72 of file CSCDigiToRawModule.cc.

72  : packer_(std::make_unique<CSCDigiToRaw>(pset)) {
73  //theStrip = pset.getUntrackedParameter<string>("DigiCreator", "cscunpacker");
74 
75  theFormatVersion = pset.getParameter<unsigned int>("useFormatVersion"); // pre-LS1 - '2005'. post-LS1 - '2013'
76  usePreTriggers = pset.getParameter<bool>("usePreTriggers"); // disable checking CLCT PreTriggers digis
77  packEverything_ = pset.getParameter<bool>("packEverything"); // don't check for consistency with trig primitives
78  // overrides usePreTriggers
79 
80  useGEMs_ = pset.getParameter<bool>("useGEMs");
81  wd_token = consumes<CSCWireDigiCollection>(pset.getParameter<edm::InputTag>("wireDigiTag"));
82  sd_token = consumes<CSCStripDigiCollection>(pset.getParameter<edm::InputTag>("stripDigiTag"));
83  cd_token = consumes<CSCComparatorDigiCollection>(pset.getParameter<edm::InputTag>("comparatorDigiTag"));
84  if (usePreTriggers) {
85  pr_token = consumes<CSCCLCTPreTriggerCollection>(pset.getParameter<edm::InputTag>("preTriggerTag"));
86  }
87  al_token = consumes<CSCALCTDigiCollection>(pset.getParameter<edm::InputTag>("alctDigiTag"));
88  cl_token = consumes<CSCCLCTDigiCollection>(pset.getParameter<edm::InputTag>("clctDigiTag"));
89  co_token = consumes<CSCCorrelatedLCTDigiCollection>(pset.getParameter<edm::InputTag>("correlatedLCTDigiTag"));
90  cham_token = esConsumes<CSCChamberMap, CSCChamberMapRcd>();
91  if (useGEMs_) {
92  gem_token = consumes<GEMPadDigiClusterCollection>(pset.getParameter<edm::InputTag>("padDigiClusterTag"));
93  }
94  put_token_ = produces<FEDRawDataCollection>("CSCRawData");
95 }

References al_token, cd_token, cham_token, cl_token, co_token, gem_token, packEverything_, pr_token, muonDTDigis_cfi::pset, put_token_, sd_token, theFormatVersion, useGEMs_, usePreTriggers, and wd_token.

Member Function Documentation

◆ fillDescriptions()

void CSCDigiToRawModule::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 97 of file CSCDigiToRawModule.cc.

97  {
98  /*** From python/cscPacker_cfi.py
99  wireDigiTag = cms.InputTag("simMuonCSCDigis","MuonCSCWireDigi"),
100  stripDigiTag = cms.InputTag("simMuonCSCDigis","MuonCSCStripDigi"),
101  comparatorDigiTag = cms.InputTag("simMuonCSCDigis","MuonCSCComparatorDigi"),
102  alctDigiTag = cms.InputTag("simCscTriggerPrimitiveDigis"),
103  clctDigiTag = cms.InputTag("simCscTriggerPrimitiveDigis"),
104  preTriggerTag = cms.InputTag("simCscTriggerPrimitiveDigis"),
105  correlatedLCTDigiTag = cms.InputTag("simCscTriggerPrimitiveDigis", "MPCSORTED"),
106  # if min parameter = -999 always accept
107  alctWindowMin = cms.int32(-3),
108  alctWindowMax = cms.int32(3),
109  clctWindowMin = cms.int32(-3),
110  clctWindowMax = cms.int32(3),
111  preTriggerWindowMin = cms.int32(-3),
112  preTriggerWindowMax = cms.int32(1)
113 */
114 
116 
117  desc.add<unsigned int>("useFormatVersion", 2005)
118  ->setComment("Set to 2005 for pre-LS1 CSC data format, 2013 - new post-LS1 CSC data format");
119  desc.add<bool>("usePreTriggers", true)->setComment("Set to false if CSCCLCTPreTrigger digis are not available");
120  desc.add<bool>("packEverything", false)
121  ->setComment("Set to true to disable trigger-related constraints on readout data");
122  desc.add<bool>("useGEMs", false)->setComment("Pack GEM trigger data");
123 
124  desc.add<edm::InputTag>("wireDigiTag", edm::InputTag("simMuonCSCDigis", "MuonCSCWireDigi"));
125  desc.add<edm::InputTag>("stripDigiTag", edm::InputTag("simMuonCSCDigis", "MuonCSCStripDigi"));
126  desc.add<edm::InputTag>("comparatorDigiTag", edm::InputTag("simMuonCSCDigis", "MuonCSCComparatorDigi"));
127  desc.add<edm::InputTag>("alctDigiTag", edm::InputTag("simCscTriggerPrimitiveDigis"));
128  desc.add<edm::InputTag>("clctDigiTag", edm::InputTag("simCscTriggerPrimitiveDigis"));
129  desc.add<edm::InputTag>("preTriggerTag", edm::InputTag("simCscTriggerPrimitiveDigis"));
130  desc.add<edm::InputTag>("correlatedLCTDigiTag", edm::InputTag("simCscTriggerPrimitiveDigis", "MPCSORTED"));
131  desc.add<edm::InputTag>("padDigiClusterTag", edm::InputTag("simMuonGEMPadDigiClusters"));
132 
133  desc.add<int32_t>("alctWindowMin", -3)->setComment("If min parameter = -999 always accept");
134  desc.add<int32_t>("alctWindowMax", 3);
135  desc.add<int32_t>("clctWindowMin", -3)->setComment("If min parameter = -999 always accept");
136  desc.add<int32_t>("clctWindowMax", 3);
137  desc.add<int32_t>("preTriggerWindowMin", -3)->setComment("If min parameter = -999 always accept");
138  desc.add<int32_t>("preTriggerWindowMax", 1);
139 
140  descriptions.add("cscPacker", desc);
141 }

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and HLT_FULL_cff::InputTag.

◆ produce()

void CSCDigiToRawModule::produce ( edm::StreamID  ,
edm::Event e,
const edm::EventSetup c 
) const
overridevirtual

reverse mapping for packer

Implements edm::global::EDProducerBase.

Definition at line 143 of file CSCDigiToRawModule.cc.

143  {
145  edm::ESHandle<CSCChamberMap> hcham = c.getHandle(cham_token);
146  const CSCChamberMap* theMapping = hcham.product();
147 
148  FEDRawDataCollection fed_buffers;
149 
150  // Take digis from the event
157 
158  e.getByToken(wd_token, wireDigis);
159  e.getByToken(sd_token, stripDigis);
160  e.getByToken(cd_token, comparatorDigis);
161  e.getByToken(al_token, alctDigis);
162  e.getByToken(cl_token, clctDigis);
163  CSCCLCTPreTriggerCollection const* preTriggersPtr = nullptr;
164  if (usePreTriggers)
165  preTriggersPtr = &e.get(pr_token);
166  e.getByToken(co_token, correlatedLCTDigis);
167  const GEMPadDigiClusterCollection* padDigiClustersPtr = nullptr;
168  if (useGEMs_) {
169  padDigiClustersPtr = &e.get(gem_token);
170  }
171  // Create the packed data
172  packer_->createFedBuffers(*stripDigis,
173  *wireDigis,
174  *comparatorDigis,
175  *alctDigis,
176  *clctDigis,
177  preTriggersPtr,
178  *correlatedLCTDigis,
179  padDigiClustersPtr,
180  fed_buffers,
181  theMapping,
182  e.id(),
185 
186  // put the raw data to the event
187  e.emplace(put_token_, std::move(fed_buffers));
188 }

References al_token, c, cd_token, cham_token, cl_token, co_token, MillePedeFileConverter_cfg::e, gem_token, eostools::move(), packer_, packEverything_, pr_token, edm::ESHandle< T >::product(), put_token_, sd_token, theFormatVersion, useGEMs_, usePreTriggers, and wd_token.

Member Data Documentation

◆ al_token

edm::EDGetTokenT<CSCALCTDigiCollection> CSCDigiToRawModule::al_token
private

Definition at line 62 of file CSCDigiToRawModule.cc.

Referenced by CSCDigiToRawModule(), and produce().

◆ cd_token

edm::EDGetTokenT<CSCComparatorDigiCollection> CSCDigiToRawModule::cd_token
private

Definition at line 61 of file CSCDigiToRawModule.cc.

Referenced by CSCDigiToRawModule(), and produce().

◆ cham_token

edm::ESGetToken<CSCChamberMap, CSCChamberMapRcd> CSCDigiToRawModule::cham_token
private

Definition at line 66 of file CSCDigiToRawModule.cc.

Referenced by CSCDigiToRawModule(), and produce().

◆ cl_token

edm::EDGetTokenT<CSCCLCTDigiCollection> CSCDigiToRawModule::cl_token
private

Definition at line 63 of file CSCDigiToRawModule.cc.

Referenced by CSCDigiToRawModule(), and produce().

◆ co_token

edm::EDGetTokenT<CSCCorrelatedLCTDigiCollection> CSCDigiToRawModule::co_token
private

Definition at line 65 of file CSCDigiToRawModule.cc.

Referenced by CSCDigiToRawModule(), and produce().

◆ gem_token

edm::EDGetTokenT<GEMPadDigiClusterCollection> CSCDigiToRawModule::gem_token
private

Definition at line 67 of file CSCDigiToRawModule.cc.

Referenced by CSCDigiToRawModule(), and produce().

◆ packer_

std::unique_ptr<const CSCDigiToRaw> CSCDigiToRawModule::packer_
private

Definition at line 57 of file CSCDigiToRawModule.cc.

Referenced by produce().

◆ packEverything_

bool CSCDigiToRawModule::packEverything_
private

Definition at line 54 of file CSCDigiToRawModule.cc.

Referenced by CSCDigiToRawModule(), and produce().

◆ pr_token

edm::EDGetTokenT<CSCCLCTPreTriggerCollection> CSCDigiToRawModule::pr_token
private

Definition at line 64 of file CSCDigiToRawModule.cc.

Referenced by CSCDigiToRawModule(), and produce().

◆ put_token_

edm::EDPutTokenT<FEDRawDataCollection> CSCDigiToRawModule::put_token_
private

Definition at line 69 of file CSCDigiToRawModule.cc.

Referenced by CSCDigiToRawModule(), and produce().

◆ sd_token

edm::EDGetTokenT<CSCStripDigiCollection> CSCDigiToRawModule::sd_token
private

Definition at line 60 of file CSCDigiToRawModule.cc.

Referenced by CSCDigiToRawModule(), and produce().

◆ theFormatVersion

unsigned int CSCDigiToRawModule::theFormatVersion
private

Definition at line 52 of file CSCDigiToRawModule.cc.

Referenced by CSCDigiToRawModule(), and produce().

◆ useGEMs_

bool CSCDigiToRawModule::useGEMs_
private

Definition at line 55 of file CSCDigiToRawModule.cc.

Referenced by CSCDigiToRawModule(), and produce().

◆ usePreTriggers

bool CSCDigiToRawModule::usePreTriggers
private

Definition at line 53 of file CSCDigiToRawModule.cc.

Referenced by CSCDigiToRawModule(), and produce().

◆ wd_token

edm::EDGetTokenT<CSCWireDigiCollection> CSCDigiToRawModule::wd_token
private

Definition at line 59 of file CSCDigiToRawModule.cc.

Referenced by CSCDigiToRawModule(), and produce().

CSCCLCTPreTriggerCollection
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
CSCDigiToRawModule::usePreTriggers
bool usePreTriggers
Definition: CSCDigiToRawModule.cc:53
FEDRawDataCollection
Definition: FEDRawDataCollection.h:18
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89285
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
CSCDigiToRawModule::sd_token
edm::EDGetTokenT< CSCStripDigiCollection > sd_token
Definition: CSCDigiToRawModule.cc:60
edm::Handle< CSCWireDigiCollection >
CSCDigiToRawModule::wd_token
edm::EDGetTokenT< CSCWireDigiCollection > wd_token
Definition: CSCDigiToRawModule.cc:59
CSCDigiToRawModule::theFormatVersion
unsigned int theFormatVersion
Definition: CSCDigiToRawModule.cc:52
CSCDigiToRawModule::al_token
edm::EDGetTokenT< CSCALCTDigiCollection > al_token
Definition: CSCDigiToRawModule.cc:62
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
CSCDigiToRawModule::co_token
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > co_token
Definition: CSCDigiToRawModule.cc:65
edm::ESHandle
Definition: DTSurvey.h:22
CSCDigiToRawModule::useGEMs_
bool useGEMs_
Definition: CSCDigiToRawModule.cc:55
GEMPadDigiClusterCollection
CSCDigiToRawModule::gem_token
edm::EDGetTokenT< GEMPadDigiClusterCollection > gem_token
Definition: CSCDigiToRawModule.cc:67
CSCDigiToRawModule::cd_token
edm::EDGetTokenT< CSCComparatorDigiCollection > cd_token
Definition: CSCDigiToRawModule.cc:61
CSCDigiToRawModule::put_token_
edm::EDPutTokenT< FEDRawDataCollection > put_token_
Definition: CSCDigiToRawModule.cc:69
CSCDigiToRawModule::pr_token
edm::EDGetTokenT< CSCCLCTPreTriggerCollection > pr_token
Definition: CSCDigiToRawModule.cc:64
CSCChamberMap
Definition: CSCChamberMap.h:11
CSCDigiToRawModule::cham_token
edm::ESGetToken< CSCChamberMap, CSCChamberMapRcd > cham_token
Definition: CSCDigiToRawModule.cc:66
CSCDigiToRawModule::cl_token
edm::EDGetTokenT< CSCCLCTDigiCollection > cl_token
Definition: CSCDigiToRawModule.cc:63
CSCDigiToRawModule::packEverything_
bool packEverything_
Definition: CSCDigiToRawModule.cc:54
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
eostools.move
def move(src, dest)
Definition: eostools.py:511
CSCDigiToRawModule::packer_
std::unique_ptr< const CSCDigiToRaw > packer_
Definition: CSCDigiToRawModule.cc:57
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
edm::InputTag
Definition: InputTag.h:15
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37