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
 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
 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 (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) 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
 
- 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::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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 176 of file ClustersFromRawProducer.cc.

Constructor & Destructor Documentation

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

Definition at line 180 of file ClustersFromRawProducer.cc.

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

180  :
181  onDemand(conf.getParameter<bool>("onDemand")),
182  cabling_(nullptr),
185  doAPVEmulatorCheck_(conf.existsAs<bool>("DoAPVEmulatorCheck") ? conf.getParameter<bool>("DoAPVEmulatorCheck") : true)
186  {
187  productToken_ = consumes<FEDRawDataCollection>(conf.getParameter<edm::InputTag>("ProductLabel"));
188  produces< edmNew::DetSetVector<SiStripCluster> > ();
189  assert(clusterizer_.get());
190  assert(rawAlgos_.get());
191  }
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:184
std::auto_ptr< SiStripRawProcessingAlgorithms > rawAlgos_
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 194 of file ClustersFromRawProducer.cc.

References initialize().

194  {
195  initialize(es);
196  }
void initialize(const edm::EventSetup &es)
void SiStripClusterizerFromRaw::initialize ( const edm::EventSetup es)
private

Definition at line 264 of file ClustersFromRawProducer.cc.

References cabling_.

Referenced by beginRun(), and produce().

264  {
265 
266  (*clusterizer_).initialize(es);
267  cabling_ = (*clusterizer_).cabling();
268  (*rawAlgos_).initialize(es);
269 
270 }
SiStripDetCabling const * cabling_
void SiStripClusterizerFromRaw::produce ( edm::Event ev,
const edm::EventSetup es 
)
inlinevirtual

Implements edm::stream::EDProducerBase.

Definition at line 199 of file ClustersFromRawProducer.cc.

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

199  {
200 
201  initialize(es);
202 
203  // get raw data
205  ev.getByToken( productToken_, rawData);
206 
207 
208  std::auto_ptr< edmNew::DetSetVector<SiStripCluster> >
209  output( onDemand ?
210  new edmNew::DetSetVector<SiStripCluster>(std::shared_ptr<edmNew::DetSetVector<SiStripCluster>::Getter>(std::make_shared<ClusterFiller>(*rawData, *clusterizer_,
212  ),
213  clusterizer_->allDetIds())
215 
216  if(onDemand) assert(output->onDemand());
217 
218  output->reserve(15000,6*10000);
219 
220 
221 
222  if (!onDemand) {
223  run(*rawData, *output);
224  output->shrink_to_fit();
225  COUT << output->dataSize() << " clusters from "
226  << output->size() << " modules"
227  << std::endl;
228  }
229 
230  ev.put(output);
231 
232  }
void run(const FEDRawDataCollection &rawColl, edmNew::DetSetVector< SiStripCluster > &output)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
std::auto_ptr< SiStripRawProcessingAlgorithms > rawAlgos_
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:113
#define COUT
edm::EDGetTokenT< FEDRawDataCollection > productToken_
void SiStripClusterizerFromRaw::run ( const FEDRawDataCollection rawColl,
edmNew::DetSetVector< SiStripCluster > &  output 
)
private

Definition at line 272 of file ClustersFromRawProducer.cc.

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

Referenced by produce().

273  {
274 
275  ClusterFiller filler(rawColl, *clusterizer_, *rawAlgos_, doAPVEmulatorCheck_);
276 
277  // loop over good det in cabling
278  for ( auto idet : clusterizer_->allDetIds()) {
279 
281 
282  filler.fill(record);
283 
284  if(record.empty()) record.abort();
285 
286  } // end loop over dets
287 }
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 247 of file ClustersFromRawProducer.cc.

Referenced by initialize().

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

Definition at line 249 of file ClustersFromRawProducer.cc.

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

bool SiStripClusterizerFromRaw::doAPVEmulatorCheck_
private

Definition at line 254 of file ClustersFromRawProducer.cc.

Referenced by produce(), and run().

bool SiStripClusterizerFromRaw::onDemand
private

Definition at line 243 of file ClustersFromRawProducer.cc.

Referenced by produce().

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

Definition at line 245 of file ClustersFromRawProducer.cc.

Referenced by produce(), and SiStripClusterizerFromRaw().

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

Definition at line 250 of file ClustersFromRawProducer.cc.

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