CMS 3D CMS Logo

Public Member Functions | Private Attributes

BlockWipedAllocatorService Class Reference

List of all members.

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

int m_clearFreq
bool m_dump
bool m_silent
bool m_useAlloc
BlockWipedPool pool

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]

Member Function Documentation

void BlockWipedAllocatorService::dump ( void  ) [inline]

Definition at line 68 of file BlockWipedAllocatorService.cc.

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

Referenced by postModule(), and wiper().

              {
    if (m_silent) return;
    std::cout << "ReferenceCounted stat"<< std::endl;
    std::cout << "still alive/referenced " 
              << ReferenceCountedPoolAllocated::s_alive
              << "/" << ReferenceCountedPoolAllocated::s_referenced
              << std::endl;

    std::cout << "BlockAllocator stat"<< std::endl;
    std::cout << "still alive " << BlockWipedPoolAllocated::s_alive << std::endl;
    Dumper dumper;
    blockWipedPool().visit(dumper);
  }
void BlockWipedAllocatorService::postEndJob ( ) [inline]

Definition at line 108 of file BlockWipedAllocatorService.cc.

References wiper().

Referenced by BlockWipedAllocatorService().

                    {
    wiper();
  }
void BlockWipedAllocatorService::postModule ( const edm::ModuleDescription desc) [inline]

Definition at line 103 of file BlockWipedAllocatorService.cc.

References dump(), and m_dump.

Referenced by BlockWipedAllocatorService().

                                                   {
    if (m_dump) dump();
    }
void BlockWipedAllocatorService::preEventProcessing ( const edm::EventID ,
const edm::Timestamp  
) [inline]

Definition at line 61 of file BlockWipedAllocatorService.cc.

References wiper().

Referenced by BlockWipedAllocatorService().

{ wiper();}
void BlockWipedAllocatorService::preModule ( const edm::ModuleDescription desc) [inline]

Definition at line 99 of file BlockWipedAllocatorService.cc.

References blockWipedPool(), and BlockWipedPool::wipe().

Referenced by BlockWipedAllocatorService().

                                                  {
    blockWipedPool().wipe(false);
  }
void BlockWipedAllocatorService::preSource ( ) [inline]

Definition at line 64 of file BlockWipedAllocatorService.cc.

Referenced by BlockWipedAllocatorService().

                   {
   // wiper();
  }
void BlockWipedAllocatorService::wiper ( ) [inline]

Definition at line 83 of file BlockWipedAllocatorService.cc.

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

Referenced by postEndJob(), and preEventProcessing().

               {
    dump();
    blockWipedPool().wipe();
    // blockWipedPool().clear();  // try to crash
    {
       static int c=0;
       c++;
       if (m_clearFreq==c) {
         blockWipedPool().clear();
         c=0;
       }
    }

  }

Member Data Documentation

Definition at line 37 of file BlockWipedAllocatorService.cc.

Referenced by BlockWipedAllocatorService(), and wiper().

Definition at line 36 of file BlockWipedAllocatorService.cc.

Referenced by BlockWipedAllocatorService(), and postModule().

Definition at line 35 of file BlockWipedAllocatorService.cc.

Referenced by BlockWipedAllocatorService(), and dump().

Definition at line 34 of file BlockWipedAllocatorService.cc.

Referenced by BlockWipedAllocatorService().

Definition at line 38 of file BlockWipedAllocatorService.cc.

Referenced by BlockWipedAllocatorService().