Review of CMSSW Services for Thread Safety Issues

Complete: 4

Contents:

Purpose of Page

This is meant to collect all known Services used in cmsRun and evaluate their ability to work in the proposed threaded framework.

DQMService

  • watchPreSourceConstruction (restrict access to DQM core, apply pthread_mutex_lock)
  • watchPostSourceConstruction (release access to DQM core, use pthread_mutex_unlock)
  • watchPreSource (restrict access to DQM core, apply pthread_mutex_lock)
  • watchPostSource (release access to DQM core, use pthread_mutex_unlock)
  • watchPreModule (restrict access to DQM core, apply pthread_mutex_lock)
  • watchPostModule (release access to DQM core, use pthread_mutex_unlock)
  • watchPostProcessEvent (lock network layer, update network cache, Pack object and reference, scalar and quality data)
  • watchPostEndJob (shutdown network)

Source

  • /DQMServices/Core/src/DQMService.cc
  • /DQMServices/Core/src/DQMService.h

Thread safe: N

Notes

  • use pthread mutex locking on transitions
  • operate both in global and local scopes
  • Holds pointer to DQMStore/DQMNet which reserve and fill DQM histograms

User interaction

OK, uses locking in public methods

Conforms to CMS event policy: OK

New framework: require re-design, stay in global

DQMStore

Source

  • /DQMServices/Core/interface/DQMStore.h
  • /DQMServices/Core/src/DQMStore.cc

Thread safe: N

Notes

it has only one transition and should operate in global scope (my understanding that post source run is a global transition)

It books 76 various histograms

User interaction

can break object state with multiple access, e.g. cd/setCurrentFolder methods

Conforms to CMS event policy: OK

New framework: require re-design, stay in global

DTDataIntegrityTask

  • watchPreBeginLumi (set nEventsLS to zero)
  • watchPreEndLumi (update DTTimeEvolutionHisto and set its timeslot to current lumiBlock and nEventsLS)
  • watchPostBeginJob (book FED integrity histograms)
  • watchPreProcessEvent (increment nEvents, fill out MonitorElement)

Source

  • /DQM/DTMonitorModule/interface/DTDataIntegrityTask.h
  • /DQM/DTMonitorModule/src/DTDataIntegrityTask.cc

Thread safe: N

Notes

operate in global and stream scopes

Holds pointer to DQMStore, it books 19 various histograms and store information via DQMStore

User interaction

can break object state with multiple access, e.g. processFED method

Conforms to CMS event policy: OK

New framework: require re-design, stay in global

EnableFloatingPointExceptions DONE

  • watchPreModuleBeginJob (find module label and set fpu state)
  • watchPostModuleBeginJob (set the state of the fpu back to its value before entering module)
  • watchPreModuleEndJob (similar to above actions)
  • watchPostModuleEndJob
  • watchPreModuleBeginRun
  • watchPostModuleBeginRun
  • watchPreModuleEndRun
  • watchPostModuleEndRun
  • watchPreModuleBeginLumi
  • watchPostModuleBeginLumi
  • watchPreModuleEndLumi
  • watchPostModuleEndLumi
  • watchPreModule
  • watchPostModule

Source

  • /FWCore/Services/src/EnableFloatingPointExceptions.cc
  • /FWCore/Services/src/EnableFloatingPointExceptions.h

Thread safe: N

Notes

operate in global and stream scope

User interaction OK

Conforms to CMS event policy: OK

New framework: require re-design, stay in global or be thread based

Replication

can be once per thread

FUShmDQMOutputService Removed from CMSSW

  • watchPostEndLumi (fetch monitor elements from the DQM backend and write out to shared memory for sending to the storage manager)
  • watchPostSourceConstruction (initialize connection to the storage manager and any other needed setup)
  • watchPreBeginRun (initialize member data)
  • watchPostEndJob (disconnect from the storage manager)

Source

  • /EventFilter/Modules/interface/FUShmDQMOutputService.h
  • /EventFilter/Modules/src/FUShmDQMOutputService.cc

Thread safe: N

Notes

  • use shared memory object
  • operate in global and stream scope
  • Collects DQM info, package it into DQMEvent object and write data to shared memory object

User interaction

can break object state with multiple access, e.g. reset method

Conforms to CMS event policy: OK

New framework: require re-design, stay in global

JobReportService DONE

  • watchPostEndJob (flush open files to the report)
  • watchJobFailure (flush open files to the report)

Source

  • /FWCore/Services/src/JobReportService.cc
  • /FWCore/Services/src/JobReportService.h

Thread safe: N

Notes

operate in global scope

User interaction

can break object state with multiple access, e.g. JobReport::JobReportImpl::writeInputFile

Conforms to CMS event policy: OK

New framework: require re-design, stay in global

LockService Will be Removed

  • watchPreSourceConstruction (find module label and create new scoped_lock)
  • watchPostSourceConstruction (reset scoped_lock)
  • watchPreSource (find module label and create new scoped_lock)
  • watchPostSource (reset scoped_lock)
  • watchPreModule (find module label and create new scoped_lock)
  • watchPostModule (reset scoped_lock)

Source

  • /FWCore/Services/src/LockService.cc
  • /FWCore/Services/src/LockService.h

Thread safe: N

Notes

  • operate in global and stream scopes

  • I don't know if this service will be required in new framework, moreover the class note says it exists only because root it no thread-safe in its (de)-serialization process which should be fixed soon. Does root fix the problem?

User interaction

users can call getLock public method to get the lock, but lock can be reset during transitions

Conforms to CMS event policy: OK

New framework: require re-design, stay in global

MicroStateService

  • watchPostBeginJob (acquire scoped_lock, set state value, all below do similar stuff)
  • watchPostEndJob
  • watchPreProcessEvent
  • watchPostProcessEvent
  • watchPreSource
  • watchPostSource
  • watchPreModule
  • watchPostModule

Source

  • /EventFilter/Utilities/interface/MicroStateService.h
  • /EventFilter/Utilities/src/MicroStateService.cc

Thread safe: N

Notes

operate in global and stream scopes

User interaction

can break object state with multiple access, e.g. setMicroState

Conforms to CMS event policy: OK

New framework: require re-design, stay in global

Replication

can be converted to thread-safe via usage of atomic data types

RandomNumberGeneratorService In Progress

  • watchPostBeginLumi (copy state from event cache to engines)
  • watchPreModuleConstruction (copy state from event cache to engines)
  • watchPostModuleConstruction (pop engine stack)
  • watchPreModuleBeginJob (push module label to the stack)
  • watchPostModuleBeginJob
  • watchPreModuleBeginRun
  • watchPostModuleBeginRun
  • watchPreModuleBeginLumi
  • watchPostModuleBeginLumi
  • watchPreModule
  • watchPostModule
  • watchPreModuleEndLumi
  • watchPostModuleEndLumi
  • watchPreModuleEndRun
  • watchPostModuleEndRun
  • watchPreModuleEndJob
  • watchPostModuleEndJob
  • watchPostForkReacquireResources (assign file name)

Source

  • /IOMC/RandomEngine/src/RandomNumberGeneratorService.cc
  • /IOMC/RandomEngine/src/RandomNumberGeneratorService.h

Thread safe: N

Notes

  • operate in global and stream scopes
  • Save random engine states to external file

User interaction OK

Conforms to CMS event policy: OK

New framework: require re-design, stay in global

TimerService

  • watchPreModule (reset cpu timer)
  • watchPostModule (stop cpu timer and issue new signal to the module with given time)

Source

  • /HLTrigger/Timer/interface/TimerService.h
  • /HLTrigger/Timer/src/TimerService.cc

Thread safe: N

Notes

  • operate in global and stream scopes
  • should be dropped since it relies on usage of CPUTimer which has little sense in parallel framework

User interaction

Conforms to CMS event policy:

New framework: drop

AdaptorConfig DONE

  • watchPostEndJob (report file statistics)

Source

  • /IOPool/TFileAdaptor/src/TFileAdaptor.h
  • /IOPool/TFileAdaptor/src/TFileAdaptor.cc

Thread safe: Y

User interaction OK

Conforms to CMS event policy: OK

New framework: OK, stay in global

ApvFactoryService

Source

  • CalibTracker/SiStripAPVAnalysis/interface/ApvFactoryService.h

Thread safe: N

BlockWipedAllocatorService

  • watchPreSource (does nothing)
  • watchPreProcessEvent (dump block allocation stats and clean-up the block pool)
  • watchPostEndJob (dump block allocation stats and clean-up the block pool)
  • watchPreModule (clean-up the block pool)
  • watchPostModule (dump block allocation stats and clean-up the block pool)

Thread safe: N

Source

  • /DataFormats/GeometrySurface/plugins/BlockWipedAllocatorService.cc

Notes

It uses BlockWipedPool which allocates pool of BlockWipedAllocator. Each Allocator never removes single allocation and requires explicit wipe/clear call to free the space, therefore if it is not wiped it may run out of memory.

Uses const_cast to allow const methods to modify state.

see GeometrySurface/BlockWipedAllocator.cc

    void BlockWipedAllocator::wipe(bool force) const {
      if (m_alive>0 && !force) return;
     * // reset caches
      std::for_each(localCaches.begin(),localCaches.end(),boost::bind(&LocalCache::reset,_1));

      me().m_current=me().m_blocks.begin();
      me().nextBlock(false);
      me().recycled.clear();
    }

    BlockWipedAllocator & BlockWipedAllocator::me() const {
      return const_cast<BlockWipedAllocator&>(*this);
    }

User interaction

can break object within multiple access, e.g. wiper method

Conforms to CMS event policy: OK

New framework: require re-design, can be thread based

Replication:
  • it can be replicated once per Stream(?)
  • Memory allocation is defined by block and recycler sizes of the pool and defined via parameter set configuration

CPU OK

  • watchPostEndJob (report CPU usage, get information from /proc file system)

Source

  • /FWCore/Services/src/CPU.cc
  • /FWCore/Services/src/CPU.h

Thread safe: Y

Notes

  • can run in global scope,
  • this service reads information from Linux proc file-system (/proc/cpuinfo) at endJob time

User interaction N/A

Conforms to CMS event policy: OK

New framework: OK

EcalDQMBinningService

Source

  • /DQM/EcalCommon/interface/EcalDQMBinningService.h
  • /DQM/EcalCommon/src/EcalDQMBinningService.cc

Thread safe: N

Notes

Reads EventSetup mapping and sets EcalTrigTowerConstituentsMap within the transition. Assigns data from EventSetup to a global variable.

User interaction OK

Conforms to CMS event policy: In Violation. Assigns data from EventSetup to a global variable.

New framework: require re-design, can be stream based

EveService

  • watchPostBeginJob (enter the GUI loop, call gSystem->ProcessEvents())
  • watchPostEndJob (exit GUI loop, call TEveManager::Terminate())
  • watchPostBeginRun (report run conditions)
  • watchPostProcessEvent (reset state of the GUI elements)

Source

  • /Fireworks/Eve/interface/EveService.h
  • /Fireworks/Eve/src/EveService.cc

Thread safe: N

Notes

interact with ROOT, it sets several data members in post process event transition and re-draw the event during transitions. I am not sure that this functionality belongs to the Service and certainly will not properly in new framework.

User interaction

can break object state with multiple access, e.g. slotExit()

Conforms to CMS event policy: OK

New framework: require re-design, should be serializable or moved out of Services

FWFFHelper

  • app() returns a non-const pointer to member m_Rint

Source

  • Fireworks/FWInterface/interface/FWFFHelper.h
  • Fireworks/FWInterface/src/FWFFHelper.cc

Thread safe: N

User interaction

Conforms to CMS event policy: OK

New framework:

FWFFService

  • watchPostBeginJob (enter the GUI loop)
  • watchPostEndJob (exit GUI loop)
  • watchPostBeginRun (load geometry from EventSetup, setup GUI elements)
  • watchPostProcessEvent (update meta-data manager, draw GUI elements)

Source

  • /Fireworks/FWInterface/interface/FWFFService.h
  • /Fireworks/FWInterface/src/FWFFService.cc

Thread safe: N

Notes

this class sets the event and its properties and re-draw the event during transitions. See notes for EveService since they are applied here.

User interaction

interact with ROOT, init geometries, interact with EventSetup or files

Conforms to CMS event policy: OK

New framework: require re-design, should serializable or move out of Services

FastTimerService DONE

  • watchPreModuleBeginJob (init ModuleMap)
  • watchPostBeginJob (check if process bound to single CPU, cache all path/moduleinfo objects, load DQM store, book Monitor elements, book histograms)
  • watchPostEndJob (print timing summary )
  • watchPrePathBeginRun (cache the pointers to the names of the first and last path and endpath)
  • watchPreProcessEvent (reset event counters)
  • watchPostProcessEvent (stop the per-event timer, and account event time)
  • watchPreSource (clear the event counters, keep track of the total number of events, start timer source)
  • watchPostSource (stop timer source and fill DQM source with timer source info)
  • watchPreProcessPath (prepare timers for path measurement)
  • watchPostProcessPath (time each path, measure the time spent between the execution of the last module and the end of the path)
  • watchPreModule (if enable timing modules, start timer for each module)
  • watchPostModule (if enable timing modules, report time for each module)

Source

  • /HLTrigger/Timer/interface/FastTimerService.h
  • /HLTrigger/Timer/src/FastTimerService.cc

Thread safe: N

Notes

  • it generates massive amount of plots during transitions and therefore need to book them during job transitions. As such, it must operate both in global and stream scopes, it uses former to book/close histograms and later to fill out their content.
  • It books 21 TH1F histograms

User interaction OK

Conforms to CMS event policy: OK

New framework: require re-design, stay in global

Replication

it can be replicated once per thread and follow map-reduce paradigm

IgProfService

  • watchPostBeginJob (print record info, e.g. nrecord, nevent, nrun, nlumi)
  • watchPostBeginRun (print run info)
  • watchPostBeginLumi (print lumi info)
  • watchPreProcessEvent (increment nrecord and dump event info)
  • watchPostProcessEvent (dump event info)
  • watchPostEndLumi (dump lumi info)
  • watchPostEndRun (dump run info)
  • watchPostEndJob (dump job info)
  • watchPostOpenFile (increment number of open files, dump file info)
  • watchPostCloseFile (increment number of closed files, dump file info)

Source

  • /IgTools/IgProf/plugins/IgProfService.cc
  • /IgTools/IgProf/plugins/IgProfService.h

Thread safe: N

Notes

this service gather information about CMS job and pass this information to IgProf, therefore it operates both in global and stream scopes.

User interaction OK

Conforms to CMS event policy: OK

New framework: require re-design, stay in global

Replication

Can run one per thread or use map-reduce paradigm

InputTagDistributorService

  • watchPreModule (set input tag distributor)

Source

  • /CommonTools/UtilAlgos/interface/InputTagDistributor.h
  • /PhysicsTools/UtilAlgos/interface/InputTagDistributor.h
  • /PhysicsTools/UtilAlgos/src/InputTagDistributor.cc

Thread safe: N

Notes

Header files in CommonTools and PhysicsTools are identical. Find module by its label in InputTagDistributor map, set InputTagDistributor instance. Since modules will operate both in global and stream scope this service will follow both.

User interaction

client code may call public init method which can set input tag distributor pointer

Conforms to CMS event policy: OK

New framework: require re-design, stay in global

Replication:

it can be run one per thread, no significant memory overhead

MessageLogger DONE

  • watchPostBeginJob (set begin job messages)
  • watchPostEndJob (put summary info into job report, dump trigger summary info)
  • watchJobFailure (put summary info into job report, dump trigger summary info)
  • watchPreModuleConstruction (validate message service pset, record module info)
  • watchPostModuleConstruction (clean-up module info)
  • watchPreSourceConstruction (record source info)
  • watchPostSourceConstruction (clean-up source info)
  • watchPreModule (record module info)
  • watchPostModule (clean-up module info)
  • watchPreSource (record source info)
  • watchPostSource (clean-up source info)
  • watchPreSourceRun (record source run info)
  • watchPostSourceRun (clean-up source run info)
  • watchPreSourceLumi (record source lumi info)
  • watchPostSourceLumi (clean-up source lumi info)
  • watchPreOpenFile (record open file info)
  • watchPostOpenFile (clean-up open file info)
  • watchPreCloseFile (record open file info)
  • watchPostCloseFile (clean-up open file info, everything below has similar behavior)
  • watchPreModuleBeginJob
  • watchPostModuleBeginJob
  • watchPreModuleEndJob
  • watchPostModuleEndJob
  • watchPreModuleBeginRun
  • watchPostModuleBeginRun
  • watchPreModuleEndRun
  • watchPostModuleEndRun
  • watchPreModuleBeginLumi
  • watchPostModuleBeginLumi
  • watchPreModuleEndLumi
  • watchPostModuleEndLumi
  • watchPreProcessEvent
  • watchPostProcessEvent
  • watchPreBeginRun
  • watchPostBeginRun
  • watchPreEndRun
  • watchPostEndRun
  • watchPreBeginLumi
  • watchPostBeginLumi
  • watchPreEndLumi
  • watchPostEndLumi
  • watchPrePathBeginRun
  • watchPostPathBeginRun
  • watchPrePathEndRun
  • watchPostPathEndRun
  • watchPrePathBeginLumi
  • watchPostPathBeginLumi
  • watchPrePathEndLumi
  • watchPostPathEndLumi
  • watchPreProcessPath
  • watchPostProcessPath

Source

  • /FWCore/MessageService/interface/MessageLogger.h
  • /FWCore/MessageService/src/MessageLogger.cc

Thread safe: N

Notes operates both in global and stream scopes

User interaction OK

Conforms to CMS event policy: OK

New framework: require re-design, stay in global

Replication

I think it can nicely fit into map-reduce pattern and run once per thread

PathTimerService

  • watchPostBeginJob (look-up trig/hlt paths, modules and update HTLPerformanceInfo)
  • watchPostEndJob (do nothing)
  • watchPreProcessEvent (clear modules in HTLPerformanceInfo, increment module's time/cpu)
  • watchPostProcessEvent (increment event counter)
  • watchPreModule (reset and start cpu timer)
  • watchPostModule (record module cpu/time)
  • watchPostProcessPath (set path's names and their info)

Source

  • /DQM/HLTEvF/interface/PathTimerService.h
  • /DQM/HLTEvF/src/PathTimerService.cc

Thread safe: N

Notes

  • calculate time spent by each module in each htl path.
  • If it make sense in new framework, it should keep track of time in all streams which process specific htl path.
  • holds 5 maps for module information and one STL vector for path info, therefore memory overhead is not that big

User interaction OK

Conforms to CMS event policy: OK

New framework: require re-design or drop

Replication

can run once per thread

PoolDBOutputService

  • watchPreProcessEvent (set current time to eventid or timestamp depending on time type)
  • watchPostEndJob (commit session transaction)
  • watchPreModule (do nothing)
  • watchPostModule (do nothing)
  • watchPreBeginLumi (set current time to lumiid)

Source

  • /CondCore/DBOutputService/interface/PoolDBOutputService.h
  • /CondCore/DBOutputService/src/PoolDBOutputService.cc

Thread safe: N

Notes

operate on both global and stream scopes, since it set time to eventid, run or lumi and commit the state to db at each end job. It will require to start DB connection only once while commit the state at each end job

User interaction

  • can break object state, e.g. createNewIOV
  • The class uses Oracle connection pool

Conforms to CMS event policy: OK

New framework: require re-design, stay in global

Replication

it can be used once per thread since it relies on DB connection pool and replication will talk to Oracle connection pool

PrintEventSetupDataRetrieval

  • watchPostBeginRun (check EventSetup and print record/data/provider info)
  • watchPostBeginLumi (similar)
  • watchPostProcessEvent (similar)

Source

  • /FWCore/Services/src/PrintEventSetupDataRetrieval.cc
  • /FWCore/Services/src/PrintEventSetupDataRetrieval.h

Thread safe: N

Notes

  • can operate on stream boundaries
  • class holds vector of EventSetupRecordKey keys and map between record and data keys

User interaction OK

Conforms to CMS event policy: OK

New framework: can be converted to stream based service

Replication

can be replicated once per thread

ProfilerService

  • watchPostSource (start/stop instrumentation, dump stats, increment/decrement counters)
  • watchPreProcessEvent (start instrumentation, dump stats, increment counters)
  • watchPostProcessEvent (stop intrumentation, dump stats, decrement counters)
  • watchPreProcessPath (start instrumentation, dump stats, increment counters)
  • watchPostProcessPath (stop instrumentation, dump stats, decrement counters)

Source

  • /PerfTools/Callgrind/interface/ProfilerService.h
  • /PerfTools/Callgrind/src/ProfilerService.cc

Thread safe: N

Notes

  • I think it should either operate in global or stream scope
  • Class holds vector of paths and excluded paths retrieved from provided parameter set

User interaction

can break object within multiple access, e.g. stop|start|pause|resumeInstrumentation are public methods

Conforms to CMS event policy: OK

New framework: require re-design

Replication

can be replicated once per thread, not significant memory overhead

PythonService Will be Removed

  • watchPostBeginJob (eval python service module)
  • watchPostEndJob (eval python service module)
  • watchPostProcessEvent (eval python service module)

Source

  • /FWCore/Python/src/PythonService.cc
  • /FWCore/Python/src/PythonService.h

Thread safe: Y

Notes

operate in both global and stream scopes, possibly can be split into global and stream services

User interaction OK

Conforms to CMS event policy: OK

New framework: OK

ResourceEnforcer

  • watchPostProcessEvent (check RSS/VMS/Time and throw exception if they are above thresholds)

Source

  • /FWCore/Services/plugins/ResourceEnforcer.cc

Thread safe: Y

Notes

User interaction

Conforms to CMS event policy:

New framework: OK

SimpleMemoryCheck DONE

  • watchPostForkReacquireResources (open /proc/pid/smaps files)
  • watchPreSourceConstruction (update and print module level and module name, all others below are similar)
  • watchPostSourceConstruction
  • watchPostSource
  • watchPostModuleConstruction
  • watchPostModuleBeginJob
  • watchPreModule (update Vsize)
  • watchPostModule (update module memory stats)
  • watchPostBeginJob (update VSize/RSS)
  • watchPostEndJob (memory report)
  • watchPreProcessEvent (set event id)
  • watchPostProcessEvent (increment event counter and print event info)

Source

  • /FWCore/Services/src/Memory.h

Thread safe: N

Notes

monitor memory consumption via Linux /proc system

User interaction

Conforms to CMS event policy:

New framework:

SimpleProfiling Was Removed

  • watchPostBeginJob (start profiler instance)
  • watchPostEndJob (stop profiler instance)

Source

  • /FWCore/Services/src/Profiling.h

Thread safe: Y

Notes

can operate only in global scope

User interaction

even though class does not have data members and thread safe at first view it starts/stops static SimpleProfiler object in begin/end job transitions Therefore when multiple client will communicate the class we can have racing conditions. In addition the SimpleProfiler uses mutex scoped lock and open a file to store its output (the name of the file is formed by getpid()).

Conforms to CMS event policy: OK

New framework: not sure how it should be handled in new FM

Replication

I don't think it should be run one per thread, since it relies on pid, /proc, etc. it should be run as one per entire framework job

Stepper Was Removed

  • watchPostBeginJob (update event processing state)
  • watchPostEndJob (update event processing state and module label)
  • watchPreProcessEvent (record run/event id)
  • watchPostProcessEvent (do nothing)
  • watchPreSource (update module name and label)
  • watchPostSource (update module label)
  • watchPreModule (record module name)
  • watchPostModule (do nothing)

Source

  • /EventFilter/Utilities/interface/Stepper.h
  • /EventFilter/Utilities/src/Stepper.cc

Thread safe: N

Notes

uses pthread mutex locking, operates in global and stream scopes

User interaction

can break state of the object with multiple access, e.g. defaultWebPage

Conforms to CMS event policy: OK

New framework: require re-design

TFileService DONE

  • watchPreModuleConstruction (set module name and label, all other are similar)
  • watchPreModule
  • watchPreModuleBeginJob
  • watchPreModuleEndJob
  • watchPreModuleBeginRun
  • watchPreModuleEndRun
  • watchPreModuleBeginLumi
  • watchPreModuleEndLumi
  • watchPostBeginJob (report analysis file info)

Source

  • /CommonTools/UtilAlgos/interface/TFileService.h
  • /CommonTools/UtilAlgos/src/TFileService.cc extends
  • /CommonTools/Utils/interface/TFileDirectory.h

Thread safe: N

Notes

operate in global and stream scopes

User interaction OK

Conforms to CMS event policy: OK

New framework: require re-design, stay in global

Replication

can run one per thread and will require reduce step to collect all histogram information

Resolution

Module which use the TFileService must be 'one' style modules and declare TFileService as a shared resource.

TimeProfilerService Was Removed

  • watchPostBeginJob (do nothing)
  • watchPostEndJob (do nothing)
  • watchPreProcessEvent (do nothing)
  • watchPostProcessEvent (do nothing)
  • watchPreModule (get current time)
  • watchPostModule (record time spent in modules)

Source

  • /EventFilter/Utilities/interface/TimeProfilerService.h
  • /EventFilter/Utilities/src/TimeProfilerService.cc

Thread safe: N

Notes

operate in global and stream scopes make no sense in new FM, since modules will run in parralel

User interaction OK

Conforms to CMS event policy: OK

New framework: require re-design or drop

Timing

  • watchPostBeginJob (get current time and cpu values and dump them into log)
  • watchPostEndJob (report job summary, time/cpu,event times/etc.)
  • watchPreProcessEvent (get event id, time and cpu values)
  • watchPostProcessEvent (dump information about event summary, time/cpu/etc.)
  • watchPreModule (get time)
  • watchPostModule (dump module time)

Source

  • /FWCore/Services/interface/Timing.h
  • /FWCore/Services/src/Timing.cc

Thread safe: N

Notes

operate in global and stream scope record CPU usage of job/event

User interaction

Conforms to CMS event policy:

New framework: redesign

Tracer DONE

  • watchPostBeginJob (print information about begining of the job, all other are similar)
  • watchPostEndJob
  • watchPreModule
  • watchPostModule
  • watchPreSourceConstruction
  • watchPostSourceConstruction
  • watchPreModuleConstruction
  • watchPostModuleConstruction
  • watchPreModuleBeginJob
  • watchPostModuleBeginJob
  • watchPreModuleEndJob
  • watchPostModuleEndJob
  • watchPreModuleBeginRun
  • watchPostModuleBeginRun
  • watchPreModuleEndRun
  • watchPostModuleEndRun
  • watchPreModuleBeginLumi
  • watchPostModuleBeginLumi
  • watchPreModuleEndLumi
  • watchPostModuleEndLumi
  • watchPreProcessPath
  • watchPostProcessPath
  • watchPrePathBeginRun
  • watchPostPathBeginRun
  • watchPrePathEndRun
  • watchPostPathEndRun
  • watchPrePathBeginLumi
  • watchPostPathBeginLumi
  • watchPrePathEndLumi
  • watchPostPathEndLumi
  • watchPreProcessEvent
  • watchPostProcessEvent
  • watchPreBeginRun
  • watchPostBeginRun
  • watchPreEndRun
  • watchPostEndRun
  • watchPreBeginLumi
  • watchPostBeginLumi
  • watchPreEndLumi
  • watchPostEndLumi
  • watchPreSource
  • watchPostSource
  • watchPreOpenFile
  • watchPostOpenFile
  • watchPreCloseFile
  • watchPostCloseFile
  • watchPreSourceRun
  • watchPostSourceRun
  • watchPreSourceLumi
  • watchPostSourceLumi

Source

  • /FWCore/Services/src/Tracer.cc
  • /FWCore/Services/src/Tracer.h

Thread safe: N

Notes

operate on global and stream boundaries

User interaction OK

Conforms to CMS event policy: OK

New framework: require re-design, stay in global

Replication

I think we can make this class thread safe by using std::atomic and C printf which is thread safe on POSIX.

UpdaterService

  • watchPreProcessEvent (record event id, clear up counters)

Source

  • /FWCore/Services/interface/UpdaterService.h
  • /FWCore/Services/src/UpdaterService.cc

Thread safe: N

Notes

stream based

User interaction

can change object state with multiple access, e.g. checkOnce method

Conforms to CMS event policy: OK

New framework: can be used in streams

Replication

I think it's possible to change this service to be thread safe if it will use std::atomic for its counts map

VariableHelperService

  • watchPreModule (record module name and variable helper)
  • watchPostProcessEvent (dump variable helper content)

Source

  • /PhysicsTools/UtilAlgos/interface/VariableHelper.h
  • /PhysicsTools/UtilAlgos/src/VariableHelper.cc

Thread safe: N

Notes

operate in global and stream scopes

User interaction

can change object state with multiple access, e.g. init method

Conforms to CMS event policy:

New framework: require re-design

Classes with no watch* methods

DBService

  • DBConfig() returns non-const reference to member m_dbconfig but never called

Source

Thread safe: N

Notes

  • Members are a coral::ConnectionService* and lumi::DBConfig*

User interaction

  • Creates and deletes new read-only coral::ISessionProxy* using member coral::ConnectionService*

Conforms to CMS event policy: OK

New framework

MLlog4cplus Was Removed

  • setAppl() changes member _appl

Source

  • EventFilter/Message2log4cplus/interface/MLlog4cplus.h

Thread safe: N

User interaction

Conforms to CMS event policy: OK

New framework:

PrescaleService

  • setIndex() changes member data iLvl1IndexDefault_
  • configure() changes various member data
  • reconfigure() changes various member data

Source

  • FWCore/PrescaleService/interface/PrescaleService.h
  • FWCore/PrescaleService/src/PrescaleService.cc

Thread safe: N

User interaction

Conforms to CMS event policy: OK

New framework:

DTHVCheckByAbsoluteValues

Source

  • CondTools/DT/plugins/DTHVCheckByAbsoluteValues.h
  • CondTools/DT/plugins/DTHVCheckByAbsoluteValues.cc

Thread safe: Y

Notes

User interaction

  • Creates a table of values on first instance and returns a flag based on input values.

Conforms to CMS event policy: OK

New framework:

DTHVCheckWithHysteresis

  • DTHVAbstractCheck::getInstance returns pointer to static member instance
  • setStatus() changes value of data members oldStatus[A,B,S] but never called.

Source

  • CondTools/DT/plugins/DTHVCheckWithHysteresis.h
  • CondTools/DT/plugins/DTHVCheckWithHysteresis.cc

Thread safe: N

Notes

User interaction

  • Creates a table of values on first instance, returns a flag based on input values, keeps a history of values
  • Can add to history with setStatus method

Conforms to CMS event policy: OK

New framework:

GenericHistoryDQMService

Source

  • DQMServices/Diagnostic/plugins/GenericHistoryDQMService.h
  • DQMServices/Diagnostic/plugins/GenericHistoryDQMService.cc

Thread safe: N

Notes

  • Inherits from DQMHistoryServiceBase defined in DQMServices/Diagnostic/interface/DQMHistoryServiceBase.h

User interaction

Conforms to CMS event policy: OK

New framework:

SiPixelHistoryDQMService

Source

  • DQM/SiPixelHistoricInfoClient/plugins/SiPixelHistoryDQMService.h
  • DQM/SiPixelHistoricInfoClient/plugins/SiPixelHistoryDQMService.cc

Thread safe: N

Notes

  • Inherits from DQMHistoryServiceBase which is defined in DQMServices/Diagnostic/interface/DQMHistoryServiceBase.h

User interaction

Conforms to CMS event policy: OK

New framework:

SiStripCondObjBuilderFromDb

  • checkUpdate() isets member dbParams_ = dbParams() and calls buildCondObj() id there is an update in dbParams()
  • buildCondObj() modifies various members

Source

  • OnlineDB/SiStripESSources/interface/SiStripCondObjBuilderFromDb.h
  • OnlineDB/SiStripESSources/src/SiStripCondObjBuilderFromDb.cc

Thread safe: N

User interaction

Conforms to CMS event policy: OK

New framework:

SiStripConfigDb

  • addFedConnections()
  • clearFedConnections()
  • addDeviceDescriptions()
  • clearDeviceDescriptions()
  • addFedDescriptions()
  • clearFedDescriptions()
  • addDcuDetIds()
  • clearDcuDetIds()
  • addAnalysisDescriptions()
  • clearAnalysisDescriptions()

Source

  • OnlineDB/SiStripConfigDb/interface/SiStripConfigDb.h
  • OnlineDB/SiStripConfigDb/src/SiStripConfigDb.cc

Thread safe: N

Notes

  • Creates a local cache of the db query

User interaction

* Many friend classes with access to protected methods that can change object state with multiple access, e.g. addDcuDetIds method

Conforms to CMS event policy: OK

New framework:

SiStripDetInfoFileReader

Source

  • CalibTracker/SiStripCommon/interface/SiStripDetInfoFileReader.h
  • CalibTracker/SiStripCommon/src/SiStripDetInfoFileReader.cc

Thread safe: Yes

Internal state does not change after construction. Two function local statics are only accessed 'const'.

User interaction

Conforms to CMS event policy: OK

NOTE: Seems like values it delivers could be used to affect physics.

New framework:

SiStripDetVOffBuilder

Source

Thread safe: N

Notes

  • Inherits from popcon::PopConSourceHandler
  • Template popcon::PopConSourceHandler defined in CondCore/PopCon/interface/PopConSourceHandler.h

User interaction

Conforms to CMS event policy: OK

New framework:

SiStripHistoryDQMService

Source

  • DQM/SiStripHistoricInfoClient/plugins/SiStripHistoryDQMService.h
  • DQM/SiStripHistoricInfoClient/plugins/SiStripHistoryDQMService.cc

Thread safe: N

Notes

* Inherits from DQMHistoryServiceBase which is defined in DQMServices/Diagnostic/interface/DQMHistoryServiceBase.h

User interaction

Conforms to CMS event policy: OK

New framework:

SiStripBadComponentsDQMService

Source

  • DQMOffline/CalibTracker/plugins/SiStripBadComponentsDQMService.h
  • DQMOffline/CalibTracker/plugins/SiStripBadComponentsDQMService.cc

Thread safe: N

Notes

User interaction

Conforms to CMS event policy: OK

New framework:

SiStripNoisesDQMService

Source

  • DQMOffline/CalibTracker/plugins/SiStripNoisesDQMService.h
  • DQMOffline/CalibTracker/plugins/SiStripNoisesDQMService.cc

Thread safe: N

Notes

User interaction

Conforms to CMS event policy: OK

New framework:

SiStripPedestalsDQMService

Source

  • DQMOffline/CalibTracker/plugins/SiStripPedestalsDQMService.h
  • DQMOffline/CalibTracker/plugins/SiStripPedestalsDQMService.cc

Thread safe: N

Notes

User interaction

Conforms to CMS event policy: OK

New framework:

SiStripApvGainGenerator DONE

  • getObj() calls createObj() and sets pointer passed in to member obj_ a pointer to object of template instantiation type
  • createObj() sets member obj_=new SiStripApvGain and sets SiStripApvGain members from file

Source

  • CalibTracker/SiStripESProducers/interface/SiStripApvGainGenerator.h
  • CalibTracker/SiStripESProducers/src/SiStripApvGainGenerator.cc

Thread safe: N

Notes

  • Inherits from SiStripCondObjBuilderBase< SiStripApvGain >
  • Template class is defined in CondTools/SiStrip/interface/SiStripCondObjBuilderBase.h and has members *T obj_ and edm::ParameterSet _pset, where T is the template instantiation type.
  • Can be made thread safe by defining getObj(T* &obj) {obj=createObj();} and T* createObj();

User interaction

Conforms to CMS event policy: OK

New framework:

SiStripBadModuleGenerator DONE

  • getObj() calls createObj() and sets pointer passed in to member obj_ a pointer to object of template instantiation type
  • createObject() creates obj=new SiStripBadModule, sets SiStripBadModule members from file, sets member obj_=new SiStripBadModule(obj) and deletes obj

Source

  • CalibTracker/SiStripESProducers/interface/SiStripBadModuleGenerator.h

Thread safe: N

Notes

  • Inherits from SiStripCondObjBuilderBase< SiStripBadModule >
  • Template class is defined in CondTools/SiStrip/interface/SiStripCondObjBuilderBase.h and has members *T obj_ and edm::ParameterSet _pset, where T is the template instantiation type.
  • Can be made thread safe by defining getObj(T* &obj) {obj=createObj();} and T* createObj();

User interaction

Conforms to CMS event policy: OK

New framework:

SiStripBaseDelayGenerator DONE

  • getObj() calls createObj() and sets pointer passed in to member obj_ a pointer to object of template instantiation type
  • createObject() sets member obj_=new SiStripBaseDelay and sets SiStripBaseDelay members from file

Source

  • CalibTracker/SiStripESProducers/interface/SiStripBaseDelayGenerator.h

Thread safe: N

Notes

  • Inherits from SiStripCondObjBuilderBase< SiStripBaseDelay >
  • Template class is defined in CondTools/SiStrip/interface/SiStripCondObjBuilderBase.h and has members *T obj_ and edm::ParameterSet _pset, where T is the template instantiation type.
  • Can be made thread safe by defining getObj(T* &obj) {obj=createObj();} and T* createObj();

User interaction

Conforms to CMS event policy: OK

New framework:

SiStripConfObjectGenerator DONE

  • getObj() calls createObj() and sets pointer passed in to member obj_ a pointer to object of template instantiation type
  • createObject() sets member obj_=new SiStripConfObject and sets SiStripConfObject members from file

Source

  • CalibTracker/SiStripESProducers/interface/SiStripConfObjectGenerator.h
  • CalibTracker/SiStripESProducers/src/SiStripConfObjectGenerator.cc

Thread safe: N

Notes

  • Inherits from SiStripCondObjBuilderBase< SiStripConfObject >
  • Template class is defined in CondTools/SiStrip/interface/SiStripCondObjBuilderBase.h and has members *T obj_ and edm::ParameterSet _pset, where T is the template instantiation type.
  • Can be made thread safe by defining getObj(T* &obj) {obj=createObj();} and T* createObj();

User interaction

Conforms to CMS event policy: OK

New framework:

SiStripLatencyGenerator DONE

  • getObj() calls createObj() and sets pointer passed in to member obj_ a pointer to object of template instantiation type
  • createObject() sets member obj_=new SiStripLatencyGenerator and sets SiStripLatencyGenerator members from file

Source

  • CalibTracker/SiStripESProducers/interface/SiStripLatencyGenerator.h
  • CalibTracker/SiStripESProducers/src/SiStripLatencyGenerator.cc

Thread safe: N

Notes

  • Inherits from SiStripCondObjBuilderBase< SiStripLatency >
  • Template class is defined in CondTools/SiStrip/interface/SiStripCondObjBuilderBase.h and has members *T obj_ and edm::ParameterSet _pset, where T is the template instantiation type.
  • Can be made thread safe by defining getObj(T* &obj) {obj=createObj();} and T* createObj();

User interaction

Conforms to CMS event policy: OK

New framework:

SiStripLorentzAngleGenerator DONE

Source

  • CalibTracker/SiStripESProducers/interface/SiStripLorentzAngleGenerator.h
  • CalibTracker/SiStripESProducers/src/SiStripLorentzAngleGenerator.cc

Thread safe: N

Notes

  • Inherits from SiStripCondObjBuilderBase< SiStripLorentzAngle >
  • Template class is defined in CondTools/SiStrip/interface/SiStripCondObjBuilderBase.h and has members *T obj_ and edm::ParameterSet _pset, where T is the template instantiation type.
  • Can be made thread safe by defining getObj(T* &obj) {obj=createObj();} and T* createObj();

User interaction

Conforms to CMS event policy: OK

New framework:

SiStripNoisesGenerator DONE

  • getObj() calls createObj() and sets pointer passed in to member obj_ a pointer to object of template instantiation type
  • createObject() sets obj_ = new SiStripNoises and sets SiStripNoises members from file

Source

  • CalibTracker/SiStripESProducers/interface/SiStripNoisesGenerator.h
  • CalibTracker/SiStripESProducers/src/SiStripNoisesGenerator.cc

Thread safe: N

Notes

  • Inherits from SiStripCondObjBuilderBase< SiStripNoises >
  • Template class is defined in CondTools/SiStrip/interface/SiStripCondObjBuilderBase.h and has members *T obj_ and edm::ParameterSet _pset, where T is the template instantiation type.
  • Can be made thread safe by defining getObj(T* &obj) {obj=createObj();} and T* createObj();

User interaction

Conforms to CMS event policy: OK

New framework:

SiStripPedestalsGenerator DONE

  • getObj() calls createObj() and sets pointer passed in to member obj_ a pointer to object of template instantiation type
  • createObject() sets obj_ = new SiStripPedestals and sets SiStripPedestals members from file

Source

  • CalibTracker/SiStripESProducers/interface/SiStripPedestalsGenerator.h
  • CalibTracker/SiStripESProducers/src/SiStripPedestalsGenerator.cc

Thread safe: N

  • Inherits from SiStripCondObjBuilderBase< SiStripPedestals >
  • Template class is defined in CondTools/SiStrip/interface/SiStripCondObjBuilderBase.h and has members *T obj_ and edm::ParameterSet _pset, where T is the template instantiation type.
  • Can be made thread safe by defining getObj(T* &obj) {obj=createObj();} and T* createObj();

User interaction

Conforms to CMS event policy: OK

New framework:

SiStripThresholdGenerator DONE

  • getObj() calls createObj() and sets pointer passed in to member obj_ a pointer to object of template instantiation type
  • createObject() sets obj_ = new SiStripThreshold and sets SiStripThreshold members from file

Source

  • CalibTracker/SiStripESProducers/interface/SiStripThresholdGenerator.h
  • CalibTracker/SiStripESProducers/src/SiStripThresholdGenerator.cc

Thread safe: N

  • Inherits from SiStripCondObjBuilderBase< SiStripThreshold >
  • Template class is defined in CondTools/SiStrip/interface/SiStripCondObjBuilderBase.h and has members *T obj_ and edm::ParameterSet _pset, where T is the template instantiation type.
  • Can be made thread safe by defining getObj(T* &obj) {obj=createObj();} and T* createObj();

User interaction

Conforms to CMS event policy: OK

New framework:

TkDetMap

  • doMe() initializes member data, called by constructor
  • getXY() calls FindLayer()
  • FindLayer() changes member cached_layer and cached_detid

Source

Thread safe: N

Notes

User interaction

Conforms to CMS event policy: OK

New framework:

Edit | Attach | Watch | Print version | History: r20 < r19 < r18 < r17 < r16 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r20 - 2014-03-05 - ChrisDJones
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    CMSPublic All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback