**************************************************************************/
// $Id$
-// $MpId: AliMpMotifReader.cxx,v 1.8 2006/03/17 11:38:06 ivana Exp $
+// $MpId: AliMpMotifReader.cxx,v 1.10 2006/05/24 13:58:41 ivana Exp $
// Category: sector
-//
+
+//-----------------------------------------------------------------------------
// Class AliMpMotifReader
// -------------------
// Class that takes care of reading the sector data.
// Included in AliRoot: 2003/05/02
// Authors: David Guez, Ivana Hrivnacova; IPN Orsay
+//-----------------------------------------------------------------------------
#include "AliMpFiles.h"
#include "AliMpMotifReader.h"
#include "AliMpMotifType.h"
#include "AliMpConnection.h"
#include "AliMpIntPair.h"
-#include "AliMpDirection.h"
#include "AliLog.h"
#include <sstream>
#endif
+/// \cond CLASSIMP
ClassImp(AliMpMotifReader)
+/// \endcond
//_____________________________________________________________________________
-AliMpMotifReader::AliMpMotifReader(AliMpStationType station,
- AliMpPlaneType plane)
+AliMpMotifReader::AliMpMotifReader(AliMp::StationType station,
+ AliMp::PlaneType plane)
: TObject(),
fStationType(station),
fPlaneType(plane)
//_____________________________________________________________________________
AliMpMotifReader::AliMpMotifReader()
: TObject(),
- fStationType(kStation1),
- fPlaneType(kBendingPlane)
+ fStationType(AliMp::kStation1),
+ fPlaneType(AliMp::kBendingPlane)
{
/// Default constructor
}
-//_____________________________________________________________________________
-AliMpMotifReader::AliMpMotifReader(const AliMpMotifReader& right)
- : TObject(right)
-{
-/// Protected copy constructor (not provided)
-
- Fatal("AliMpMotifReader", "Copy constructor not provided.");
-}
-
//_____________________________________________________________________________
AliMpMotifReader::~AliMpMotifReader()
{
/// Destructor
}
-//
-// operators
-//
-
-//_____________________________________________________________________________
-AliMpMotifReader& AliMpMotifReader::operator=(const AliMpMotifReader& right)
-{
-/// Protected assignment operator (not provided)
-
- // check assignment to self
- if (this == &right) return *this;
-
- Fatal("operator =", "Assignment operator not provided.");
-
- return *this;
-}
-
-//
-// private methods
-//
-
-
//
// public methods
//
TString padPosFileName(AliMpFiles::PadPosFilePath(fStationType,
fPlaneType, motifTypeId));
ifstream padPos(padPosFileName);
- AliDebugStream(1) << "Opening file " << padPosFileName << endl;
+ AliDebugStream(2) << "Opening file " << padPosFileName << endl;
PadMapType positions;
TString bergToGCFileName
= AliMpFiles::BergToGCFilePath(fStationType);
- AliDebugStream(1) << "Opening file " << bergToGCFileName << endl;
+ AliDebugStream(2) << "Opening file " << bergToGCFileName << endl;
ifstream bergToGCFile(bergToGCFileName);
const Int_t knbergpins =
- (fStationType == kStation1 || fStationType == kStation2 ) ? 80 : 100;
+ (fStationType == AliMp::kStation1 || fStationType == AliMp::kStation2 ) ? 80 : 100;
// Station1 & 2 Bergstak connectors have 80 pins, while for stations
// 3, 4 and 5 they have 100 pins.
Int_t gassiChannel[100];
TString motifTypeFileName(AliMpFiles::MotifFilePath(fStationType,
fPlaneType, motifTypeId));
ifstream motif(motifTypeFileName);
- AliDebugStream(1) << "Opening file " << motifTypeFileName << endl;
+ AliDebugStream(2) << "Opening file " << motifTypeFileName << endl;
Int_t nofPadsX=0;
Int_t nofPadsY=0;
return motifType;
}
+//_____________________________________________________________________________
+TString
+AliMpMotifReader::MotifSpecialName(const TString& motifID, Double_t scale)
+{
+ /// Build the name taking into the scale, if not 1.0
+ TString id;
+
+ if ( scale != 1.0 )
+ {
+ id = Form("%s-%e",motifID.Data(),scale);
+ }
+ else
+ {
+ id = motifID;
+ }
+ return id;
+}
//_____________________________________________________________________________
AliMpMotifSpecial*
return 0;
}
- AliMpMotifSpecial* res = new AliMpMotifSpecial(motifID,motifType);
+ TString id = MotifSpecialName(motifID,scale);
+
+ AliMpMotifSpecial* res = new AliMpMotifSpecial(id,motifType);
Int_t i,j;
Double_t x,y;
in >> i;
res->SetPadDimensions(AliMpIntPair(i,j),TVector2(x*scale/2.,y*scale/2.));
in >> i;
}
+ res->CalculateDimensions();
in.close();
return res;