41 }
catch(
const std::bad_alloc&) {
42 ATH_MSG_FATAL(
"Could not create a new MDT PrepRawData container!" );
43 return StatusCode::FAILURE;
51 }
catch(
const std::bad_alloc&) {
52 ATH_MSG_FATAL(
"Could not create a new RPC PrepRawData container!" );
53 return StatusCode::FAILURE;
59 }
catch(
const std::bad_alloc&) {
60 ATH_MSG_FATAL(
"Could not create a new TGC PrepRawData container!" );
61 return StatusCode::FAILURE;
68 }
catch(
const std::bad_alloc&) {
69 ATH_MSG_FATAL(
"Could not create a new CSC PrepRawData container!" );
70 return StatusCode::FAILURE;
75 return StatusCode::SUCCESS;
84 return StatusCode::SUCCESS;
97 if(
sc.isFailure() ) {
106 if(
sc.isFailure() ) {
115 if(
sc.isFailure() ) {
124 if(
sc.isFailure() ) {
132 return StatusCode::SUCCESS;
157 return StatusCode::SUCCESS;
162 StatusCode
sc = StatusCode::SUCCESS ;
171 unsigned int i_mdtColl(0);
174 for( ; mdtColl!=last_mdtColl ; ++mdtColl, ++i_mdtColl ){
179 (driftCircleColl)->setIdentifier(
ID);
185 for(; mdtItr != mdtEnd; ++mdtItr,i++ ) {
199 Identifier newID = (driftCircleColl)->identify();
200 ATH_MSG_DEBUG(
"Adding New Collection to MDT list:" << newID );
201 if (StatusCode::SUCCESS !=
m_mdtPRDs_out->addCollection(driftCircleColl,hashID )) {
202 ATH_MSG_ERROR(
"Couldn't record MDT Drift Circle Collection with hash=" << hashID
203 <<
" in StoreGate!" );
208 <<
" in StoreGate!" );
217 StatusCode
sc = StatusCode::SUCCESS ;
226 unsigned int i_rpcColl(0);
229 for( ; rpcColl!=last_rpcColl ; ++rpcColl, ++i_rpcColl ){
234 (rpcPrdColl)->setIdentifier(
ID);
240 for(; rpcItr != rpcEnd; ++rpcItr,i++ ) {
255 ATH_MSG_DEBUG(
"Adding New Collection to RPC list:" << newID );
256 if (StatusCode::SUCCESS !=
m_rpcPRDs_out->addCollection(rpcPrdColl,hashID )) {
257 ATH_MSG_ERROR(
"Couldn't record RPC Drift Circle Collection with hashID=" << hashID
258 <<
" in StoreGate!" );
263 <<
" in StoreGate!" );
272 StatusCode
sc = StatusCode::SUCCESS ;
281 unsigned int i_tgcColl(0);
284 for( ; tgcColl!=last_tgcColl ; ++tgcColl, ++i_tgcColl ){
289 (tgcPrdColl)->setIdentifier(
ID);
295 for(; tgcItr != tgcEnd; ++tgcItr,i++ ) {
310 ATH_MSG_DEBUG(
"Adding New Collection to TGC list:" << newID );
311 if (StatusCode::SUCCESS !=
m_tgcPRDs_out->addCollection(tgcPrdColl,hashID )) {
312 ATH_MSG_ERROR(
"Couldn't record TGC Drift Circle Collection with hashID=" << hashID
313 <<
" in StoreGate!" );
318 <<
" in StoreGate!" );
326 StatusCode
sc = StatusCode::SUCCESS ;
335 unsigned int i_cscColl(0);
338 for( ; cscColl!=last_cscColl ; ++cscColl, ++i_cscColl ){
343 (cscPrdColl)->setIdentifier(
ID);
349 for(; cscItr != cscEnd; ++cscItr,i++ ) {
363 ATH_MSG_DEBUG(
"Adding New Collection to CSC list:" << newID );
364 if (StatusCode::SUCCESS !=
m_cscPRDs_out->addCollection(cscPrdColl,hashID )) {
365 ATH_MSG_ERROR(
"Couldn't record CSC Collection with hashID=" << hashID
366 <<
" in StoreGate!" );
371 <<
" in StoreGate!" );
382 unsigned int i_coll(0);
383 for( ; mdtColl!=last_mdtColl ; ++mdtColl, ++i_coll ){
385 ATH_MSG_DEBUG(
"MDT IN Collection(" << std::setw(2) << i_coll <<
") : " <<
ID );
391 for( ; mdtColl!=last_mdtColl ; ++mdtColl, ++i_coll ){
393 ATH_MSG_DEBUG(
"MDT OUT Collection(" << std::setw(2) << i_coll <<
") : " <<
ID );
399 for( ; rpcColl!=last_rpcColl ; ++rpcColl, ++i_coll ){
401 ATH_MSG_DEBUG(
"RPC IN Collection(" << std::setw(2) << i_coll <<
") : " <<
ID );
407 for( ; rpcColl!=last_rpcColl ; ++rpcColl, ++i_coll ){
409 ATH_MSG_DEBUG(
"RPC OUT Collection(" << std::setw(2) << i_coll <<
") : " <<
ID );
416 for( ; tgcColl!=last_tgcColl ; ++tgcColl, ++i_coll ){
418 ATH_MSG_DEBUG(
"TGC IN Collection(" << std::setw(2) << i_coll <<
") : " <<
ID );
424 for( ; tgcColl!=last_tgcColl ; ++tgcColl, ++i_coll ){
426 ATH_MSG_DEBUG(
"TGC OUT Collection(" << std::setw(2) << i_coll <<
") : " <<
ID );
432 for( ; cscColl!=last_cscColl ; ++cscColl, ++i_coll ){
434 ATH_MSG_DEBUG(
"CSC IN Collection(" << std::setw(2) << i_coll <<
") : " <<
ID );
440 for( ; cscColl!=last_cscColl ; ++cscColl, ++i_coll ){
442 ATH_MSG_DEBUG(
"CSC OUT Collection(" << std::setw(2) << i_coll <<
") : " <<
ID );
448 if (
evtStore()->retrieve(mdtCollection,lastColl) ==StatusCode::SUCCESS) {
449 for ( ; mdtCollection != lastColl ; ++mdtCollection ) {
450 ATH_MSG_DEBUG(
"DIRECTLY FROM COLL (" <<std::setw(2) << i_coll <<
") " << mdtCollection->identify() );
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
std::vector< Identifier > ID
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
ServiceHandle< StoreGateSvc > & evtStore()
DataModel_detail::const_iterator< DataVector > const_iterator
value_type push_back(value_type pElem)
This is a "hash" representation of an Identifier.
std::string m_outputContainer_rpc
virtual StatusCode execute()
Retrieves and records containers, performs selection.
std::string m_inputContainer_tgc
StatusCode performSelection()
checks if each hit in each collection passes a set of cuts these hits are written to new collections
Muon::RpcPrepDataContainer * m_rpcPRDs_out
std::string m_inputContainer_mdt
Muon::MdtPrepDataContainer * m_mdtPRDs_out
const Muon::RpcPrepDataContainer * m_rpcPRDs_in
std::string m_outputContainer_csc
StatusCode selectMDTs()
selects the hits from MDTcollections
StatusCode retrieveContainers()
retrieves input MuonPrepDataContainers from StoreGate
const Muon::MdtPrepDataContainer * m_mdtPRDs_in
std::string m_inputContainer_csc
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
StatusCode selectCSCs()
selects the hits from CSCcollections
StatusCode selectTGCs()
selects the hits from TGCcollections
MuonPrdSelectorAlg(const std::string &name, ISvcLocator *pSvcLocator)
Athena algorithm constructor.
const Muon::CscStripPrepDataContainer * m_cscPRDs_in
Muon::TgcPrepDataContainer * m_tgcPRDs_out
std::string m_inputContainer_rpc
Muon::CscStripPrepDataContainer * m_cscPRDs_out
ToolHandle< IMuonIdCutTool > m_muonIdCutTool
virtual StatusCode initialize()
Algorithm initialization: retrieves StoreGate/DetectorStore/MuonIdHelpers/MuonPrepDataContainers.
std::string m_outputContainer_mdt
const Muon::TgcPrepDataContainer * m_tgcPRDs_in
StatusCode selectRPCs()
selects the hits from RPCcollections
std::string m_outputContainer_tgc
StatusCode recordContainers()
records output MuonPrepDataContainers to StoreGate
void print()
method for DEBUG purposes: prints the content of input and output MuonPrepDataContainer
Class representing the raw data of one CSC strip (for clusters look at Muon::CscPrepData).
Class to represent measurements from the Monitored Drift Tubes.
Class to represent RPC measurements.
Class to represent TGC measurements.
a const_iterator facade to DataHandle.
MuonPrepDataCollection< TgcPrepData > TgcPrepDataCollection
MuonPrepDataCollection< CscStripPrepData > CscStripPrepDataCollection
MuonPrepDataContainerT< RpcPrepData > RpcPrepDataContainer
MuonPrepDataContainerT< TgcPrepData > TgcPrepDataContainer
MuonPrepDataContainerT< MdtPrepData > MdtPrepDataContainer
MuonPrepDataContainerT< CscStripPrepData > CscStripPrepDataContainer
MuonPrepDataCollection< MdtPrepData > MdtPrepDataCollection
MuonPrepDataCollection< RpcPrepData > RpcPrepDataCollection