MTDetector Class Reference

#include <MTDetector.hh>

Inheritance diagram for MTDetector:

Inheritance graph
[legend]
Collaboration diagram for MTDetector:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MTDetector ()
 MTDetector (const Detector &aDetector)
virtual ~MTDetector ()
MTDetectoroperator= (const Detector &aDetector)
UInt_t GetId (void) const
void SetId (UInt_t value)
TString GetDetectorName (void) const
void SeDetectortName (TString aValue)
TString GetDescription (void) const
void SetDescription (TString aValue)
const std::map< UInt_t, MTChamber * > & GetChambers (void)
const MTChamberGetChamber (UInt_t id) const
void Info (void) const

Private Attributes

UInt_t id
TString name
TString description
std::map< UInt_t, MTChamber * > chambers

Detailed Description

CLASS MTDetector(containing detector indormations)

Definition at line 16 of file MTDetector.hh.


Constructor & Destructor Documentation

MTDetector::MTDetector (  ) 

MTDetector::MTDetector ( const Detector aDetector  ) 

Definition at line 25 of file MTDetector.cpp.

00026  {
00027      (*this) = aDetector; // appelle operator=
00028  }

MTDetector::~MTDetector (  )  [virtual]

Definition at line 30 of file MTDetector.cpp.

00031 {
00032         for( map<UInt_t,MTChamber*>::const_iterator iiChamber=this->chambers.begin(); iiChamber!=this->chambers.end(); ++iiChamber)
00033   {
00034         delete (*iiChamber).second; 
00035   }
00036 }


Member Function Documentation

MTDetector & MTDetector::operator= ( const Detector aDetector  ) 

Definition at line 38 of file MTDetector.cpp.

00039 {
00040         try
00041         {
00042                 name            = aDetector.getName();
00043                 description     = aDetector.getDescription();
00044 
00045                 const ChamberMap_t& detChambers = aDetector.getChambers();
00046 
00047                 for (ChamberMap_t::const_iterator chamberIt = detChambers.begin(); chamberIt != detChambers.end(); ++chamberIt)
00048                 {
00049                         Chamber& chamber = *(chamberIt->second);
00050                         MTChamber *mtChamber = new MTChamber(chamber);
00051                         this->chambers[chamber.getId()] = mtChamber;
00052                 }
00053 
00054         } //try block
00055         catch (MicroException e)
00056         {
00057                 throw MicroException(e.getMessage());
00058         }
00059         // Save all objects in this file
00060         return *this;
00061 }

UInt_t MTDetector::GetId ( void   )  const [inline]

Definition at line 35 of file MTDetector.hh.

00035 { return id; } ;

void MTDetector::SetId ( UInt_t  value  )  [inline]

Definition at line 36 of file MTDetector.hh.

00036 { id = value; } ;

TString MTDetector::GetDetectorName ( void   )  const [inline]

Definition at line 38 of file MTDetector.hh.

00038 { return name;  } ;

void MTDetector::SeDetectortName ( TString  aValue  )  [inline]

Definition at line 39 of file MTDetector.hh.

00039 { name = aValue;};

TString MTDetector::GetDescription ( void   )  const [inline]

Definition at line 41 of file MTDetector.hh.

00041 { return description;  } ;

void MTDetector::SetDescription ( TString  aValue  )  [inline]

Definition at line 42 of file MTDetector.hh.

00042 { description = aValue;};

const std::map<UInt_t,MTChamber*>& MTDetector::GetChambers ( void   )  [inline]

Definition at line 45 of file MTDetector.hh.

Referenced by MTRun::GetOneChip(), and main().

00045 { return chambers; } ;

const MTChamber& MTDetector::GetChamber ( UInt_t  id  )  const [inline]

Definition at line 46 of file MTDetector.hh.

00046 { return *(chambers.find(id)->second); };

void MTDetector::Info ( void   )  const

Definition at line 64 of file MTDetector.cpp.

00065 {
00066 
00067   TString recDate;
00068 
00069   cout << "**** Detector informations ****"    << endl << endl ;
00070   cout << "    Id: " << id << "    " << endl ;
00071   cout << "    Name: " << name << "    " << endl ;
00072 }


Member Data Documentation

UInt_t MTDetector::id [private]

Definition at line 25 of file MTDetector.hh.

Referenced by GetId().

TString MTDetector::name [private]

Definition at line 26 of file MTDetector.hh.

Referenced by GetDetectorName(), Info(), operator=(), and SeDetectortName().

TString MTDetector::description [private]

Definition at line 27 of file MTDetector.hh.

Referenced by GetDescription(), operator=(), and SetDescription().

std::map<UInt_t,MTChamber*> MTDetector::chambers [private]

Definition at line 30 of file MTDetector.hh.

Referenced by GetChamber(), GetChambers(), operator=(), and ~MTDetector().


The documentation for this class was generated from the following files:
Generated on Mon Jan 7 13:18:52 2013 for MicromegasFramework by  doxygen 1.4.7