6 #include <Exceptions.h>
13 return std::string(
"$Rev: 2568 $");
18 return std::string(
"TPCChannelMapping");
26 _myObj =
new IMPL::LCGenericObjectImpl(5,0,0);
29 _myObj->setIntVal( 0, channelID) ;
30 _myObj->setIntVal( 1, padIndex) ;
31 _myObj->setIntVal( 2, type) ;
32 _myObj->setIntVal( 3, moduleID) ;
33 _myObj->setIntVal( 4, readoutGroup) ;
40 _myObj =
dynamic_cast<IMPL::LCGenericObjectImpl*
>(
obj);
44 throw lcio::Exception(
"Cannot create ADCChannelMapping from sth."
45 " that is not LCGenericObjectImpl" ) ;
50 if ( ( (
_myObj->getNInt() != 3 ) && (
_myObj->getNInt() != 5 ) ) ||
51 (
_myObj->getNFloat() != 0 ) ||
52 (
_myObj->getNDouble() != 0 )
55 throw lcio::Exception(
"ADCChannelMapping(LCObject* obj): Wrong number of elements in object" ) ;
69 return _myObj->getIntVal( 0 ) ;
74 return _myObj->getIntVal( 1 ) ;
79 return _myObj->getIntVal( 2 ) ;
88 if (
_myObj->getNInt() >=4)
90 return _myObj->getIntVal( 3 ) ;
104 if (
_myObj->getNInt() >=5)
106 return _myObj->getIntVal( 4 ) ;
116 os<<
"ADCChannelMapping: Pad "<<
getPadID()
131 ADCChannelMapping::key_type ADCChannelMapping::softwareToHardwareKey()
const
137 ADCChannelMapping::key_type ADCChannelMapping::hardwareToSoftwareKey()
const
ADCChannelMapping(int channelID, int padIndex, int type=-1, int moduleID=0, int readoutGroup=0)
The constructor with all the member functions given.
std::ostream & operator<<(std::ostream &os, const ADCChannelMapping &acm)
int getReadoutGroup() const
void print(std::ostream &os=std::cout) const
IMPL::LCGenericObjectImpl * _myObj
static std::string getRevision()
virtual ~ADCChannelMapping()
The desctructor.
static std::string getDefaultColName()
class to store the mapping pad (position) to the channel ID (electronic) also the type of the used el...
IMPL::LCGenericObjectImpl * obj() const