/data3/calcul/jacquem/working_dir/Micromegas/micromegasFrameWork/src/geometry/ChannelSoftId.cpp

Go to the documentation of this file.
00001 /* @version $Revision: 1328 $ * @modifiedby $Author: jacquem $ * @lastmodified $Date: 2011-10-03 17:04:17 +0200 (Mon, 03 Oct 2011) $ */
00002 /* 
00003  * File:   ChannelSoftId.cpp
00004  * Author: jacquem
00005  * 
00006  * Created on May 8, 2010, 7:51 PM
00007  */
00008 
00009 #include <iostream>
00010 
00011 #include "geometry/ChannelSoftId.hh"
00012 
00013 using namespace std;
00014 
00015 ChannelSoftId::ChannelSoftId() : ChipSoftId(),channelId(0),  row(0), col (0)
00016 {
00017 }
00018 
00019 ChannelSoftId::ChannelSoftId(const ChannelSoftId& orig)
00020 {
00021                 channelId = orig.channelId;
00022                 row = orig.row;
00023                 col = orig.col;
00024                 std::cout << "CONSTRUCTEUR DE COPI  POUR ChannelSoftId" << std::endl;
00025 }
00026 
00027 ChannelSoftId::~ChannelSoftId()
00028 {
00029 }
00030 
00031 
00032 void ChannelSoftId::SetValue(unsigned int _chamberId,unsigned int _difId,unsigned int _boardId, unsigned int _chipId, unsigned int _channelId,unsigned int _row,unsigned int _col)
00033 {
00034                 ChipSoftId::SetValue(_chamberId,_difId,_boardId,_chipId);
00035                 channelId = _channelId;
00036                 row = _row;
00037                 col = _col;
00038 
00039 }
00040 
00041 
00042 
00043 string ChannelSoftId::toString( ) const
00044 {
00045 
00046          string result;
00047    stringstream sId,srow,scol;// (stringstream::in | stringstream::out);
00048 
00049          result =  ChipSoftId::toString();
00050          sId<<channelId;
00051          result+="channel[" + sId.str();
00052    srow<<row;
00053    result+="]row["+srow.str();
00054          scol<<col;
00055    result+="]col["+scol.str()+"]";
00056 
00057          return result;
00058 
00059 }
00060 
00061 
00062 long ChannelSoftId::GetValue() const
00063  {
00064                  return  ( OFFSET_CHAMBER *NB_CHANNEL* GetChamberId()
00065                + OFFSET_DIF *NB_CHANNEL*  GetDifId()
00066                + OFFSET_CHIP*NB_CHANNEL * GetChipId ()
00067                +  channelId ) ;
00068 
00069  }
00070 

Generated on Mon Jan 7 13:15:22 2013 for MicromegasFramework by  doxygen 1.4.7