3 // Class AliMUONVGeometryBuilder
4 // -----------------------------
5 // Abstract base class for geometry construction per chamber(s).
7 // Author: Ivana Hrivnacova, IPN Orsay
11 #include "AliMUONVGeometryBuilder.h"
12 #include "AliMUONChamber.h"
14 ClassImp(AliMUONVGeometryBuilder)
16 //______________________________________________________________________________
17 AliMUONVGeometryBuilder::AliMUONVGeometryBuilder(
18 AliMUONChamber* ch1, AliMUONChamber* ch2,
19 AliMUONChamber* ch3, AliMUONChamber* ch4,
20 AliMUONChamber* ch5, AliMUONChamber* ch6)
24 // Standard constructor
26 // Create the chambers array
27 fChambers = new TObjArray();
29 if (ch1) fChambers->Add(ch1);
30 if (ch2) fChambers->Add(ch2);
31 if (ch3) fChambers->Add(ch3);
32 if (ch4) fChambers->Add(ch4);
33 if (ch5) fChambers->Add(ch5);
34 if (ch6) fChambers->Add(ch6);
39 //______________________________________________________________________________
40 AliMUONVGeometryBuilder::AliMUONVGeometryBuilder()
44 // Default constructor
48 //______________________________________________________________________________
49 AliMUONVGeometryBuilder::AliMUONVGeometryBuilder(const AliMUONVGeometryBuilder& rhs)
52 Fatal("Copy constructor",
53 "Copy constructor is not implemented.");
56 //______________________________________________________________________________
57 AliMUONVGeometryBuilder::~AliMUONVGeometryBuilder() {
63 //______________________________________________________________________________
64 AliMUONVGeometryBuilder&
65 AliMUONVGeometryBuilder::operator = (const AliMUONVGeometryBuilder& rhs)
67 // check assignement to self
68 if (this == &rhs) return *this;
71 "Assignment operator is not implemented.");
80 //______________________________________________________________________________
81 AliMUONChamber* AliMUONVGeometryBuilder::GetChamber(Int_t chamberId) const
83 // Returns the chamber specified by chamberId
86 for (Int_t i=0; i<fChambers->GetEntriesFast(); i++) {
87 AliMUONChamber* chamber = (AliMUONChamber*)fChambers->At(i);
88 if ( chamber->GetId() == chamberId) return chamber;