Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

ClusterLHCbIDCnv Class Reference

#include <ClusterLHCbIDCnv.h>

List of all members.

Public Member Functions

const OTTime & otTime (const LHCbID &id)
const ITCluster & itCluster (const LHCbID &id)
const VeloCluster & veloCluster (const LHCbID &id)
LHCbID lhcbid (const OTTime &otTime)
LHCbID lhcbid (const ITCluster &itCluster)
LHCbID lhcbid (const VeloCluster &veloCluster)
 ClusterLHCbIDCnv (const std::string &type, const std::string &name, const IInterface *parent)
 Standard constructor.
virtual ~ClusterLHCbIDCnv ()
 Destructor.

Static Public Member Functions

static const InterfaceID & interfaceID ()


Detailed Description

Tool to make the conversions between a XxxCluster and the corresponding LHCbID

Author:
Eduardo Rodrigues
Date:
2005-03-31

Definition at line 25 of file ClusterLHCbIDCnv.h.


Constructor & Destructor Documentation

ClusterLHCbIDCnv::ClusterLHCbIDCnv const std::string &  type,
const std::string &  name,
const IInterface *  parent
 

Standard constructor.

Definition at line 125 of file ClusterLHCbIDCnv.cpp.

00128   : GaudiTool ( type, name , parent )
00129 {
00130   declareInterface<ClusterLHCbIDCnv>( this );
00131 
00132 }

ClusterLHCbIDCnv::~ClusterLHCbIDCnv  )  [virtual]
 

Destructor.

Definition at line 136 of file ClusterLHCbIDCnv.cpp.

00136 {}; 


Member Function Documentation

static const InterfaceID& ClusterLHCbIDCnv::interfaceID  )  [inline, static]
 

Definition at line 36 of file ClusterLHCbIDCnv.h.

References IID_ClusterLHCbIDCnv().

00036 { return IID_ClusterLHCbIDCnv; }

const ITCluster & ClusterLHCbIDCnv::itCluster const LHCbID id  ) 
 

Definition at line 49 of file ClusterLHCbIDCnv.cpp.

Referenced by lhcbid().

00050 {
00051   ITCluster* dummy = NULL;
00052   if ( ! id.isST() ) {
00053     error() << "LHCbID not of ST type!" << endreq;
00054     return *dummy;    
00055   }
00056 
00057   ITChannelID itChID = id.stID();
00058   ITClusters* itClus = get<ITClusters>( ITClusterLocation::Default );
00059   ITClusters::const_iterator itITClu;
00060   for ( itITClu=itClus->begin() ; itClus->end()!= itITClu ; ++itITClu ) {
00061     if ( itChID == (*itITClu)->channelID() ) {
00062       return *(*itITClu);
00063     }
00064   }
00065 
00066   if ( NULL == (*itITClu) )
00067     error() << "LHCbID " << id.lhcbID() << " is not valid!" << endreq;
00068 
00069   return *dummy;
00070 }

LHCbID ClusterLHCbIDCnv::lhcbid const VeloCluster &  veloCluster  ) 
 

Definition at line 117 of file ClusterLHCbIDCnv.cpp.

References veloCluster().

00118 {
00119   return LHCbID( veloCluster.channelID(0) );
00120 }

LHCbID ClusterLHCbIDCnv::lhcbid const ITCluster &  itCluster  ) 
 

Definition at line 109 of file ClusterLHCbIDCnv.cpp.

References itCluster().

00110 {
00111   return LHCbID( itCluster.channelID() );
00112 }

LHCbID ClusterLHCbIDCnv::lhcbid const OTTime &  otTime  ) 
 

Definition at line 101 of file ClusterLHCbIDCnv.cpp.

References otTime().

00102 {
00103   return LHCbID( otTime.channel() );
00104 }

const OTTime & ClusterLHCbIDCnv::otTime const LHCbID id  ) 
 

Definition at line 23 of file ClusterLHCbIDCnv.cpp.

Referenced by lhcbid().

00024 {
00025   OTTime* dummy = NULL;
00026   if ( ! id.isOT() ) {
00027     error() << "LHCbID not of OT type!" << endreq;
00028     return *dummy;
00029   }
00030   
00031   OTChannelID otChID = id.otID();
00032   OTTimes* otTimes = get<OTTimes>( OTTimeLocation::Default );
00033   OTTimes::const_iterator itOTTime;
00034   for ( itOTTime=otTimes->begin() ; otTimes->end()!= itOTTime ; ++itOTTime ) {
00035     if ( otChID == (*itOTTime)->channel() ) {
00036       return *(*itOTTime);
00037     }
00038   }
00039 
00040   if ( NULL == (*itOTTime) )
00041     error() << "LHCbID " << id.lhcbID() << " is not valid!" << endreq;
00042 
00043   return *dummy;
00044 }

const VeloCluster & ClusterLHCbIDCnv::veloCluster const LHCbID id  ) 
 

Definition at line 75 of file ClusterLHCbIDCnv.cpp.

Referenced by lhcbid().

00076 {
00077   VeloCluster* dummy = NULL;
00078   if ( ! id.isVelo() ) {
00079     error() << "LHCbID not of Velo type!" << endreq;
00080     return *dummy;
00081   }
00082 
00083   VeloChannelID veloChID = id.veloID();
00084   VeloClusters* veloClus = get<VeloClusters>( VeloClusterLocation::Default );
00085   VeloClusters::const_iterator itVeloClu;
00086   for ( itVeloClu=veloClus->begin() ; veloClus->end()!= itVeloClu ; ++itVeloClu ) {
00087     if ( veloChID.channelID() == (*itVeloClu)->channelID(0).channelID() ) {
00088       return *(*itVeloClu);
00089     }
00090   }  
00091 
00092   if ( NULL == (*itVeloClu) )
00093     error() << "LHCbID " << id.lhcbID() << " is not valid!" << endreq;
00094 
00095   return *dummy;
00096 }


The documentation for this class was generated from the following files:
Generated on Thu Apr 7 22:43:28 2005 for New Track Event Model by doxygen 1.4.1