diff --git a/Commission/CommissionRec/CMakeLists.txt b/Commission/CommissionRec/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..4fb77c0f1b5d08d8abd55059d083fbea72ec3990 --- /dev/null +++ b/Commission/CommissionRec/CMakeLists.txt @@ -0,0 +1,29 @@ +################################################################################ +# Package: CommissionRec +################################################################################ + +# Declare the package name: +atlas_subdir( CommissionRec ) + +# Declare the package's dependencies: +atlas_depends_on_subdirs( PUBLIC + Commission/CommissionUtils + Control/AthenaBaseComps + GaudiKernel + PRIVATE + Commission/CommissionEvent + Simulation/G4Sim/TrackRecord ) + +# External dependencies: +find_package( CLHEP ) + +# Component(s) in the package: +atlas_add_component( CommissionRec + src/*.cxx + src/components/*.cxx + INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} + LINK_LIBRARIES ${CLHEP_LIBRARIES} CommissionUtilsLib AthenaBaseComps GaudiKernel CommissionEvent ) + +# Install files from the package: +atlas_install_headers( CommissionRec ) + diff --git a/Commission/CommissionRec/src/ComTimeRec.cxx b/Commission/CommissionRec/src/ComTimeRec.cxx index a509dfdab41d242ba3670bb2594fc12bf6c03ce8..6a1570302e6fb083e6de737da22426667e64b7da 100755 --- a/Commission/CommissionRec/src/ComTimeRec.cxx +++ b/Commission/CommissionRec/src/ComTimeRec.cxx @@ -78,16 +78,16 @@ StatusCode ComTimeRec::execute() // Use the Timed Track Record of the muon entering the cavern. - // const TimedTrackRecordCollection* coll; - const TrackRecordCollection *coll(NULL); - if(evtStore()->contains<TrackRecordCollection>(m_TTRKey) ){ - ATH_MSG_ERROR( " can not retrieve TTR with key " << m_TTRKey ); + if(!evtStore()->contains<TrackRecordCollection>(m_TTRKey) ){ + ATH_MSG_ERROR( " can not retrieve TrackRecordCollection with key " << m_TTRKey ); // Put default ComTime into SG for. ComTime *theComTime = new ComTime(); CHECK( evtStore()->record(theComTime, m_comTimeKey) ); return StatusCode::SUCCESS; } - + // const TimedTrackRecordCollection* coll; + const TrackRecordCollection *coll(NULL); + CHECK( evtStore()->retrieve(coll, m_TTRKey) ); int nMuons = 0; double earliestMuonTime = -1.; // TimedTrackRecord* earliestMuon=NULL;