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::EDProducer 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::EDProducer
 EDProducer ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDProducer ()
 
- 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
 
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::InputTag productLabel_
 
std::auto_ptr
< SiStripRawProcessingAlgorithms
rawAlgos_
 

Additional Inherited Members

- Public Types inherited from edm::EDProducer
typedef EDProducer ModuleType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDProducer
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_, and rawAlgos_.

180  :
181  onDemand(conf.getParameter<bool>("onDemand")),
182  productLabel_(conf.getParameter<edm::InputTag>("ProductLabel")),
183  cabling_(nullptr),
186  doAPVEmulatorCheck_(conf.existsAs<bool>("DoAPVEmulatorCheck") ? conf.getParameter<bool>("DoAPVEmulatorCheck") : true)
187  {
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_

Member Function Documentation

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

Reimplemented from edm::EDProducer.

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::EDProducer.

Definition at line 199 of file ClustersFromRawProducer.cc.

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

199  {
200 
201  initialize(es);
202 
203  // get raw data
205  ev.getByLabel( productLabel_, rawData);
206 
207 
208  std::auto_ptr< edmNew::DetSetVector<SiStripCluster> >
209  output( onDemand ?
210  new edmNew::DetSetVector<SiStripCluster>(boost::shared_ptr<edmNew::DetSetVector<SiStripCluster>::Getter>(new 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 
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)
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:116
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
#define COUT
void SiStripClusterizerFromRaw::run ( const FEDRawDataCollection rawColl,
edmNew::DetSetVector< SiStripCluster > &  output 
)
private

Definition at line 272 of file ClustersFromRawProducer.cc.

References edmNew::DetSetVector< T >::FastFiller::abort(), clusterizer_, doAPVEmulatorCheck_, edmNew::DetSetVector< T >::FastFiller::empty(), rawAlgos_, and GlobalPosition_Frontier_DevDB_cff::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 }
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::InputTag SiStripClusterizerFromRaw::productLabel_
private

Definition at line 245 of file ClustersFromRawProducer.cc.

Referenced by produce().

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

Definition at line 250 of file ClustersFromRawProducer.cc.

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