CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
SiStripClusterizerFromRaw Class Referencefinal
Inheritance diagram for SiStripClusterizerFromRaw:
edm::stream::EDProducer<> edm::stream::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

void beginRun (const edm::Run &, const edm::EventSetup &es)
 
void produce (edm::Event &ev, const edm::EventSetup &es)
 
 SiStripClusterizerFromRaw (const edm::ParameterSet &conf)
 
- Public Member Functions inherited from edm::stream::EDProducer<>
 EDProducer ()=default
 
- Public Member Functions inherited from edm::stream::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducerBase ()
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription
const &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void initialize (const edm::EventSetup &es)
 
void run (const FEDRawDataCollection &rawColl, edmNew::DetSetVector< SiStripCluster > &output)
 

Private Attributes

SiStripDetCabling const * cabling_
 
std::auto_ptr
< StripClusterizerAlgorithm
clusterizer_
 
bool doAPVEmulatorCheck_
 
bool onDemand
 
edm::EDGetTokenT
< FEDRawDataCollection
productToken_
 
std::auto_ptr
< SiStripRawProcessingAlgorithms
rawAlgos_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDProducer<>
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDProducerBase
typedef EDProducerAdaptorBase ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::stream::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 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)
 

Detailed Description

Definition at line 183 of file ClustersFromRawProducer.cc.

Constructor & Destructor Documentation

SiStripClusterizerFromRaw::SiStripClusterizerFromRaw ( const edm::ParameterSet conf)
inlineexplicit

Definition at line 187 of file ClustersFromRawProducer.cc.

References assert(), clusterizer_, edm::ParameterSet::getParameter(), productToken_, and rawAlgos_.

187  :
188  onDemand(conf.getParameter<bool>("onDemand")),
189  cabling_(nullptr),
192  doAPVEmulatorCheck_(conf.existsAs<bool>("DoAPVEmulatorCheck") ? conf.getParameter<bool>("DoAPVEmulatorCheck") : true)
193  {
194  productToken_ = consumes<FEDRawDataCollection>(conf.getParameter<edm::InputTag>("ProductLabel"));
195  produces< edmNew::DetSetVector<SiStripCluster> > ();
196  assert(clusterizer_.get());
197  assert(rawAlgos_.get());
198  }
T getParameter(std::string const &) const
bool existsAs(std::string const &parameterName, bool trackiness=true) const
checks if a parameter exists as a given type
Definition: ParameterSet.h:186
std::auto_ptr< SiStripRawProcessingAlgorithms > rawAlgos_
assert(m_qm.get())
std::auto_ptr< StripClusterizerAlgorithm > clusterizer_
static std::auto_ptr< StripClusterizerAlgorithm > create(const edm::ParameterSet &)
static std::auto_ptr< SiStripRawProcessingAlgorithms > create(const edm::ParameterSet &)
SiStripDetCabling const * cabling_
edm::EDGetTokenT< FEDRawDataCollection > productToken_

Member Function Documentation

void SiStripClusterizerFromRaw::beginRun ( const edm::Run ,
const edm::EventSetup es 
)
inlinevirtual

Reimplemented from edm::stream::EDProducerBase.

Definition at line 201 of file ClustersFromRawProducer.cc.

References initialize().

201  {
202  initialize(es);
203  }
void initialize(const edm::EventSetup &es)
void SiStripClusterizerFromRaw::initialize ( const edm::EventSetup es)
private

Definition at line 270 of file ClustersFromRawProducer.cc.

References cabling_.

Referenced by beginRun(), and produce().

270  {
271 
272  (*clusterizer_).initialize(es);
273  cabling_ = (*clusterizer_).cabling();
274  (*rawAlgos_).initialize(es);
275 
276 }
SiStripDetCabling const * cabling_
void SiStripClusterizerFromRaw::produce ( edm::Event ev,
const edm::EventSetup es 
)
inlinevirtual

Implements edm::stream::EDProducerBase.

Definition at line 206 of file ClustersFromRawProducer.cc.

References assert(), clusterizer_, COUT, doAPVEmulatorCheck_, edm::Event::getByToken(), initialize(), onDemand, convertSQLitetoXML_cfg::output, productToken_, edm::Event::put(), rawAlgos_, and run().

206  {
207 
208  initialize(es);
209 
210  // get raw data
212  ev.getByToken( productToken_, rawData);
213 
214 
215  std::auto_ptr< edmNew::DetSetVector<SiStripCluster> >
216  output( onDemand ?
217  new edmNew::DetSetVector<SiStripCluster>(std::shared_ptr<edmNew::DetSetVector<SiStripCluster>::Getter>(std::make_shared<ClusterFiller>(*rawData, *clusterizer_,
219  ),
220  clusterizer_->allDetIds())
222 
223  if(onDemand) assert(output->onDemand());
224 
225  output->reserve(15000,12*10000);
226 
227 
228  if (!onDemand) {
229  run(*rawData, *output);
230  output->shrink_to_fit();
231  COUT << output->dataSize() << " clusters from "
232  << output->size() << " modules"
233  << std::endl;
234  }
235 
236  ev.put(output);
237 
238  }
void run(const FEDRawDataCollection &rawColl, edmNew::DetSetVector< SiStripCluster > &output)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
std::auto_ptr< SiStripRawProcessingAlgorithms > rawAlgos_
assert(m_qm.get())
std::auto_ptr< StripClusterizerAlgorithm > clusterizer_
void initialize(const edm::EventSetup &es)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
Definition: Event.h:121
#define COUT
edm::EDGetTokenT< FEDRawDataCollection > productToken_
void SiStripClusterizerFromRaw::run ( const FEDRawDataCollection rawColl,
edmNew::DetSetVector< SiStripCluster > &  output 
)
private

Definition at line 278 of file ClustersFromRawProducer.cc.

References clusterizer_, doAPVEmulatorCheck_, rawAlgos_, record, and edmNew::DetSetVector< SiStripCluster >::TSFastFiller.

Referenced by produce().

279  {
280 
281  ClusterFiller filler(rawColl, *clusterizer_, *rawAlgos_, doAPVEmulatorCheck_);
282 
283  // loop over good det in cabling
284  for ( auto idet : clusterizer_->allDetIds()) {
285 
287 
288  filler.fill(record);
289 
290  if(record.empty()) record.abort();
291 
292  } // end loop over dets
293 }
JetCorrectorParameters::Record record
Definition: classes.h:7
std::auto_ptr< SiStripRawProcessingAlgorithms > rawAlgos_
std::auto_ptr< StripClusterizerAlgorithm > clusterizer_

Member Data Documentation

SiStripDetCabling const* SiStripClusterizerFromRaw::cabling_
private

Definition at line 253 of file ClustersFromRawProducer.cc.

Referenced by initialize().

std::auto_ptr<StripClusterizerAlgorithm> SiStripClusterizerFromRaw::clusterizer_
private

Definition at line 255 of file ClustersFromRawProducer.cc.

Referenced by produce(), run(), and SiStripClusterizerFromRaw().

bool SiStripClusterizerFromRaw::doAPVEmulatorCheck_
private

Definition at line 260 of file ClustersFromRawProducer.cc.

Referenced by produce(), and run().

bool SiStripClusterizerFromRaw::onDemand
private

Definition at line 249 of file ClustersFromRawProducer.cc.

Referenced by produce().

edm::EDGetTokenT<FEDRawDataCollection> SiStripClusterizerFromRaw::productToken_
private

Definition at line 251 of file ClustersFromRawProducer.cc.

Referenced by produce(), and SiStripClusterizerFromRaw().

std::auto_ptr<SiStripRawProcessingAlgorithms> SiStripClusterizerFromRaw::rawAlgos_
private

Definition at line 256 of file ClustersFromRawProducer.cc.

Referenced by produce(), run(), and SiStripClusterizerFromRaw().