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 Attributes
BlockWipedAllocatorService Class Reference

Public Member Functions

 BlockWipedAllocatorService (const edm::ParameterSet &iConfig, edm::ActivityRegistry &iAR)
 
void dump ()
 
void postEndJob ()
 
void postModule (const edm::ModuleDescription &desc)
 
void preEventProcessing (const edm::EventID &, const edm::Timestamp &)
 
void preModule (const edm::ModuleDescription &desc)
 
void preSource ()
 
void wiper ()
 

Private Attributes

bool m_useAlloc
 

Detailed Description

manage the allocator

Definition at line 32 of file BlockWipedAllocatorService.cc.

Constructor & Destructor Documentation

BlockWipedAllocatorService::BlockWipedAllocatorService ( const edm::ParameterSet iConfig,
edm::ActivityRegistry iAR 
)
inline

Definition at line 36 of file BlockWipedAllocatorService.cc.

References edm::ParameterSet::getUntrackedParameter(), m_useAlloc, postEndJob(), postModule(), preEventProcessing(), preModule(), preSource(), BlockWipedPoolAllocated::usePool(), edm::ActivityRegistry::watchPostEndJob(), edm::ActivityRegistry::watchPostModule(), edm::ActivityRegistry::watchPreModule(), edm::ActivityRegistry::watchPreProcessEvent(), and edm::ActivityRegistry::watchPreSource().

37  {
38 
39  m_useAlloc = iConfig.getUntrackedParameter<bool>("usePoolAllocator",false);
46  }
T getUntrackedParameter(std::string const &, T const &) const
void preModule(const edm::ModuleDescription &desc)
void watchPostEndJob(PostEndJob::slot_type const &iSlot)
void watchPostModule(PostModule::slot_type const &iSlot)
void watchPreProcessEvent(PreProcessEvent::slot_type const &iSlot)
void watchPreModule(PreModule::slot_type const &iSlot)
void preEventProcessing(const edm::EventID &, const edm::Timestamp &)
void watchPreSource(PreSource::slot_type const &iSlot)
void postModule(const edm::ModuleDescription &desc)

Member Function Documentation

void BlockWipedAllocatorService::dump ( void  )
inline

Definition at line 56 of file BlockWipedAllocatorService.cc.

References blockWipedPool(), gather_cfg::cout, ReferenceCountedPoolAllocated::s_alive, BlockWipedPoolAllocated::s_alive, ReferenceCountedPoolAllocated::s_referenced, and BlockWipedPool::visit().

Referenced by postModule(), and wiper().

56  {
57  std::cout << "ReferenceCounted stat"<< std::endl;
58  std::cout << "still alive/referenced "
61  << std::endl;
62 
63  std::cout << "BlockAllocator stat"<< std::endl;
64  std::cout << "still alive " << BlockWipedPoolAllocated::s_alive << std::endl;
65  Dumper dumper;
66  blockWipedPool().visit(dumper);
67  }
BlockWipedPool & blockWipedPool()
void visit(Visitor &visitor) const
tuple cout
Definition: gather_cfg.py:41
void BlockWipedAllocatorService::postEndJob ( )
inline

Definition at line 95 of file BlockWipedAllocatorService.cc.

References wiper().

Referenced by BlockWipedAllocatorService().

95  {
96  wiper();
97  }
void BlockWipedAllocatorService::postModule ( const edm::ModuleDescription desc)
inline

Definition at line 90 of file BlockWipedAllocatorService.cc.

References dump().

Referenced by BlockWipedAllocatorService().

90  {
91  dump();
92  }
void BlockWipedAllocatorService::preEventProcessing ( const edm::EventID ,
const edm::Timestamp  
)
inline

Definition at line 49 of file BlockWipedAllocatorService.cc.

References wiper().

Referenced by BlockWipedAllocatorService().

void BlockWipedAllocatorService::preModule ( const edm::ModuleDescription desc)
inline

Definition at line 86 of file BlockWipedAllocatorService.cc.

Referenced by BlockWipedAllocatorService().

86  {
87  // blockWipedPool().wipe();
88  }
void BlockWipedAllocatorService::preSource ( )
inline

Definition at line 52 of file BlockWipedAllocatorService.cc.

Referenced by BlockWipedAllocatorService().

52  {
53  // wiper();
54  }
void BlockWipedAllocatorService::wiper ( )
inline

Definition at line 70 of file BlockWipedAllocatorService.cc.

References blockWipedPool(), trackerHits::c, BlockWipedPool::clear(), dump(), and BlockWipedPool::wipe().

Referenced by postEndJob(), and preEventProcessing().

70  {
71  dump();
72  blockWipedPool().wipe();
73  blockWipedPool().clear(); // try to crash
74  {
75  static int c=0;
76  if (20==c) {
78  c=0;
79  }
80  c++;
81  }
82 
83  }
BlockWipedPool & blockWipedPool()

Member Data Documentation

bool BlockWipedAllocatorService::m_useAlloc
private

Definition at line 34 of file BlockWipedAllocatorService.cc.

Referenced by BlockWipedAllocatorService().