CMS 3D CMS Logo

Macros | Functions
PFBlockAlgo.cc File Reference
#include "RecoParticleFlow/PFProducer/interface/PFBlockAlgo.h"
#include "RecoParticleFlow/PFProducer/interface/Utils.h"
#include "RecoParticleFlow/PFClusterTools/interface/LinkByRecHit.h"
#include "DataFormats/ParticleFlowReco/interface/PFBlock.h"
#include "DataFormats/TrackReco/interface/Track.h"
#include "DataFormats/ParticleFlowReco/interface/PFDisplacedVertex.h"
#include "DataFormats/ParticleFlowReco/interface/PFRecHit.h"
#include <stdexcept>
#include <algorithm>
#include "TMath.h"

Go to the source code of this file.

Macros

#define INIT_ENTRY(name)   {#name,name}
 

Functions

std::ostream & operator<< (std::ostream &out, const PFBlockAlgo &a)
 

Macro Definition Documentation

#define INIT_ENTRY (   name)    {#name,name}

Definition at line 17 of file PFBlockAlgo.cc.

Referenced by PFBlockAlgo::PFBlockAlgo().

Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const PFBlockAlgo a 
)

Definition at line 383 of file PFBlockAlgo.cc.

References PFBlockAlgo::blocks(), PFBlockAlgo::elements_, cuy::ib, and MillePedeFileConverter_cfg::out.

383  {
384  if(! out) return out;
385 
386  out<<"====== Particle Flow Block Algorithm ======= ";
387  out<<endl;
388  out<<"number of unassociated elements : "<<a.elements_.size()<<endl;
389  out<<endl;
390 
391  for(PFBlockAlgo::IEC ie = a.elements_.begin();
392  ie != a.elements_.end(); ++ie) {
393  out<<"\t"<<**ie <<endl;
394  }
395 
396 
397  // const PFBlockCollection& blocks = a.blocks();
398 
399  const std::unique_ptr< reco::PFBlockCollection >& blocks
400  = a.blocks();
401 
402  if(!blocks.get() ) {
403  out<<"blocks already transfered"<<endl;
404  }
405  else {
406  out<<"number of blocks : "<<blocks->size()<<endl;
407  out<<endl;
408 
409  for(PFBlockAlgo::IBC ib=blocks->begin();
410  ib != blocks->end(); ++ib) {
411  out<<(*ib)<<endl;
412  }
413  }
414 
415  return out;
416 }
ElementList::const_iterator IEC
Definition: PFBlockAlgo.h:101
const std::unique_ptr< reco::PFBlockCollection > & blocks() const
Definition: PFBlockAlgo.h:129
ElementList elements_
Definition: PFBlockAlgo.h:158
reco::PFBlockCollection::const_iterator IBC
Definition: PFBlockAlgo.h:102
ib
Definition: cuy.py:661