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 ;
172 auto driftCircleColl = std::make_unique<Muon::MdtPrepDataCollection>(hashID);
173 driftCircleColl->setIdentifier(
ID);
189 Identifier newID = driftCircleColl->identify();
190 ATH_MSG_DEBUG(
"Adding New Collection to MDT list:" << newID );
191 if (StatusCode::SUCCESS !=
m_mdtPRDs_out->addCollection(driftCircleColl.release(),hashID )) {
192 ATH_MSG_ERROR(
"Couldn't record MDT Drift Circle Collection with hash=" << hashID
193 <<
" in StoreGate!" );
198 <<
" in StoreGate!" );
207 StatusCode
sc = StatusCode::SUCCESS ;
217 auto rpcPrdColl = std::make_unique<Muon::RpcPrepDataCollection>(hashID);
218 rpcPrdColl->setIdentifier(
ID);
235 ATH_MSG_DEBUG(
"Adding New Collection to RPC list:" << newID );
236 if (StatusCode::SUCCESS !=
m_rpcPRDs_out->addCollection(rpcPrdColl.release(),hashID )) {
237 ATH_MSG_ERROR(
"Couldn't record RPC Drift Circle Collection with hashID=" << hashID
238 <<
" in StoreGate!" );
243 <<
" in StoreGate!" );
252 StatusCode
sc = StatusCode::SUCCESS ;
262 auto tgcPrdColl = std::make_unique<Muon::TgcPrepDataCollection>(hashID);
263 tgcPrdColl->setIdentifier(
ID);
280 ATH_MSG_DEBUG(
"Adding New Collection to TGC list:" << newID );
281 if (StatusCode::SUCCESS !=
m_tgcPRDs_out->addCollection(tgcPrdColl.release(),hashID )) {
282 ATH_MSG_ERROR(
"Couldn't record TGC Drift Circle Collection with hashID=" << hashID
283 <<
" in StoreGate!" );
288 <<
" in StoreGate!" );
296 StatusCode
sc = StatusCode::SUCCESS ;
306 auto cscPrdColl = std::make_unique<Muon::CscStripPrepDataCollection>(hashID);
307 cscPrdColl->setIdentifier(
ID);
323 ATH_MSG_DEBUG(
"Adding New Collection to CSC list:" << newID );
324 if (StatusCode::SUCCESS !=
m_cscPRDs_out->addCollection(cscPrdColl.release(),hashID )) {
325 ATH_MSG_ERROR(
"Couldn't record CSC Collection with hashID=" << hashID
326 <<
" in StoreGate!" );
331 <<
" in StoreGate!" );
342 unsigned int i_coll(0);
343 for( ; mdtColl!=last_mdtColl ; ++mdtColl, ++i_coll ){
345 ATH_MSG_DEBUG(
"MDT IN Collection(" << std::setw(2) << i_coll <<
") : " <<
ID );
351 for( ; mdtColl!=last_mdtColl ; ++mdtColl, ++i_coll ){
353 ATH_MSG_DEBUG(
"MDT OUT Collection(" << std::setw(2) << i_coll <<
") : " <<
ID );
359 for( ; rpcColl!=last_rpcColl ; ++rpcColl, ++i_coll ){
361 ATH_MSG_DEBUG(
"RPC IN Collection(" << std::setw(2) << i_coll <<
") : " <<
ID );
367 for( ; rpcColl!=last_rpcColl ; ++rpcColl, ++i_coll ){
369 ATH_MSG_DEBUG(
"RPC OUT Collection(" << std::setw(2) << i_coll <<
") : " <<
ID );
376 for( ; tgcColl!=last_tgcColl ; ++tgcColl, ++i_coll ){
378 ATH_MSG_DEBUG(
"TGC IN Collection(" << std::setw(2) << i_coll <<
") : " <<
ID );
384 for( ; tgcColl!=last_tgcColl ; ++tgcColl, ++i_coll ){
386 ATH_MSG_DEBUG(
"TGC OUT Collection(" << std::setw(2) << i_coll <<
") : " <<
ID );
392 for( ; cscColl!=last_cscColl ; ++cscColl, ++i_coll ){
394 ATH_MSG_DEBUG(
"CSC IN Collection(" << std::setw(2) << i_coll <<
") : " <<
ID );
400 for( ; cscColl!=last_cscColl ; ++cscColl, ++i_coll ){
402 ATH_MSG_DEBUG(
"CSC OUT Collection(" << std::setw(2) << i_coll <<
") : " <<
ID );
408 if (
evtStore()->retrieve(mdtCollection,lastColl) ==StatusCode::SUCCESS) {
409 for ( ; mdtCollection != lastColl ; ++mdtCollection ) {
410 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()
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