#include "AliMpSegmentation.h"
#include "AliMpDEManager.h"
-#include "AliMpContainers.h"
#include "AliMpConstants.h"
#include "AliMpCDB.h"
#include "AliMpSector.h"
#include <TVector2.h>
#include <TVector3.h>
#include <TVirtualMC.h>
-
-#ifdef WITH_STL
- #include <vector>
-#endif
-
-#ifdef WITH_ROOT
- #include "TArrayI.h"
-#endif
+#include <TArrayI.h>
/// \cond CLASSIMP
ClassImp(AliMUONSt1GeometryBuilderV2)
GReal_t posX,posY,posZ;
-#ifdef WITH_STL
- vector<Int_t> alreadyDone;
-#endif
-
-#ifdef WITH_ROOT
TArrayI alreadyDone(20);
Int_t nofAlreadyDone = 0;
-#endif
for (Int_t irow=0;irow<sector->GetNofRows();irow++){ // for each row
AliMpRow* row = sector->GetRow(irow);
Int_t motifPosId = seg->GetMotifPositionId(motifNum);
-#ifdef WITH_STL
- if (find(alreadyDone.begin(),alreadyDone.end(),motifPosId)
- != alreadyDone.end()) continue; // don't treat the same motif twice
-
-#endif
-#ifdef WITH_ROOT
Bool_t isDone = false;
Int_t i=0;
while (i<nofAlreadyDone && !isDone) {
i++;
}
if (isDone) continue; // don't treat the same motif twice
-#endif
AliMUONSt1SpecialMotif spMot = *((AliMUONSt1SpecialMotif*)specialMap.GetValue(motifPosId));
AliDebugStream(2) << chamber << " processing special motif: " << motifPosId << endl;
posZ = where.Z() + sgn * (fgkMotherThick1 - TotalHzDaughter());
gMC->Gspos(fgkDaughterName, copyNo, QuadrantMLayerName(chamber), posX, posY, posZ, rot, "ONLY");
-#ifdef WITH_STL
- alreadyDone.push_back(motifPosId);// mark this motif as done
-#endif
-#ifdef WITH_ROOT
if (nofAlreadyDone == alreadyDone.GetSize())
alreadyDone.Set(2*nofAlreadyDone);
alreadyDone.AddAt(motifPosId, nofAlreadyDone++);
-#endif
+
AliDebugStream(2) << chamber << " processed motifPosId: " << motifPosId << endl;
}
// COMMENT OUT END
#include "AliMUONVGeometryBuilder.h"
-#include "AliMpContainers.h"
-
#include <TExMap.h>
-#ifdef WITH_STL
- #include <map>
-#endif
-
// typedef Float_t GReal_t; // for AliGeant3
typedef Double_t GReal_t; // for VirtualMC
#pragma link C++ class AliMpPCBPainter+;
#pragma link C++ class AliMpDEVisu+;
#pragma link C++ class AliMpIteratorPainter+;
-
-#ifdef WITH_STL
-#pragma link C++ class std::pair<Int_t, TVector2>+;
-#pragma link C++ class std::pair<Int_t, AliMpMotifPosition*>+;
-#pragma link C++ class std::pair<TString, AliMpVMotif*>+;
-#pragma link C++ class std::pair<TString, AliMpMotifType*>+;
-#pragma link C++ class std::pair<AliMpIntPair, AliMpConnection*>+;
-#pragma link C++ class std::pair<AliMpIntPair, AliMpMotifPosition*>+;
-#endif
ClassImp(AliMpGraphContext)
/// \endcond
-AliMpGraphContext *AliMpGraphContext::fgInstance = 0;
-AliMpGraphContext::GraphContextVector AliMpGraphContext::fgStack;
-
-#ifdef WITH_ROOT
+AliMpGraphContext* AliMpGraphContext::fgInstance = 0;
+TObjArray AliMpGraphContext::fgStack;
Int_t AliMpGraphContext::fgStackSize = 0;
-#endif
//_____________________________________________________________________________
AliMpGraphContext::AliMpGraphContext():
AliMpGraphContext *save = new AliMpGraphContext(*this);
-#ifdef WITH_STL
- fgStack.push_back(save);
-#endif
-
-#ifdef WITH_ROOT
fgStack.AddAt(save, fgStackSize++);
-#endif
}
//_____________________________________________________________________________
{
/// Pop an object from the stack.
-#ifdef WITH_STL
- // restore the last saved configuration
- if (!fgStack.empty()){
- AliMpGraphContext *obj = fgStack.back();
- *this = *obj;
- fgStack.pop_back();
- delete obj;
- }
-#endif
-
-#ifdef WITH_ROOT
// restore the last saved configuration
if ( fgStackSize ){
AliMpGraphContext *obj
fgStack.RemoveAt(fgStackSize);
delete obj;
}
-#endif
}
#include <TObject.h>
-#include "AliMpContainers.h"
-
-#include <TVector2.h>
-#ifdef WITH_ROOT
#include "AliMpExMap.h"
-#endif
-#ifdef WITH_STL
-#include <vector>
-#endif
+#include <TVector2.h>
class MPainter;
class AliMpGraphContext : public TObject
{
- public:
-#ifdef WITH_STL
- /// GraphContextVector type
- typedef std::vector<AliMpGraphContext*> GraphContextVector;
-#endif
-#ifdef WITH_ROOT
- /// GraphContextVector type
- typedef TObjArray GraphContextVector;
-#endif
-
public:
void Push() const;
void Pop();
AliMpGraphContext();
///< static data members
- static AliMpGraphContext *fgInstance; ///< the global instance
- static GraphContextVector fgStack; ///< the object stack
-#ifdef WITH_ROOT
- static Int_t fgStackSize; ///< the object stack size
-#endif
+ static AliMpGraphContext* fgInstance; ///< the global instance
+ static TObjArray fgStack; ///< the object stack
+ static Int_t fgStackSize;///< the object stack size
//data members
Int_t fColor; ///< color to use
{
/// Standard constructor
-#ifdef WITH_ROOT
fMotifPositions2.SetOwner(false);
-#endif
}
//_____________________________________________________________________________
AliMpMotifMap::AliMpMotifMap(TRootIOCtor* ioCtor)
: TObject(),
-#ifdef WITH_STL
- fMotifs(),
- fMotifTypes(),
- fMotifPositions(),
- fMotifPositions2()
-#endif
-#ifdef WITH_ROOT
fMotifs(ioCtor),
fMotifTypes(ioCtor),
fMotifPositions(ioCtor),
fMotifPositions2(ioCtor)
-#endif
{
/// Root IO constructor
-#ifdef WITH_ROOT
fMotifPositions2.SetOwner(false);
-#endif
}
//_____________________________________________________________________________
/// Destructor
// Delete all registered motifs, motif types, motif positions
-
-#ifdef WITH_STL
- for (MotifMapIterator im=fMotifs.begin(); im != fMotifs.end(); im++) {
- delete im->second;
- }
-
- for (MotifTypeMapIterator it=fMotifTypes.begin();
- it != fMotifTypes.end(); it++) {
- delete it->second;
- }
-
- for (MotifPositionMapIterator ip=fMotifPositions.begin();
- ip != fMotifPositions.end(); ip++) {
- delete ip->second;
- }
-#endif
-
}
//
/// Print all the motifs and their motif types
/// for all motifs in the motifs map.
-#ifdef WITH_STL
- if (fMotifs.size()) {
- cout << "Dump of Motif Map - " << fMotifs.size() << " entries:" << endl;
- Int_t counter = 0;
- for (MotifMapIterator i=fMotifs.begin(); i != fMotifs.end(); i++) {
- const TString& id = (*i).first;
- cout << "Map element "
- << setw(3) << counter++ << " "
- << id.Data() << " " ;
- PrintMotif((*i).second);
- cout << endl;
- }
- cout << endl;
- }
-#endif
-
-#ifdef WITH_ROOT
if (fMotifs.GetSize()) {
cout << "Dump of Motif Map - " << fMotifs.GetSize() << " entries:" << endl;
Int_t counter = 0;
cout << endl;
delete it;
}
-#endif
}
//_____________________________________________________________________________
/// Print all the the motifs types and their motif dimensions
/// for all motif types in the motif types map.
-#ifdef WITH_STL
- if (fMotifTypes.size()) {
- cout << "Dump of Motif Type Map - " << fMotifTypes.size() << " entries:" << endl;
- Int_t counter = 0;
- for (MotifTypeMapIterator i=fMotifTypes.begin(); i != fMotifTypes.end(); i++) {
- const TString& id = (*i).first;
- cout << "Map element "
- << setw(3) << counter++ << " "
- << id.Data() << " ";
- PrintMotifType((*i).second);
- cout << endl;
- }
- cout << endl;
- }
-#endif
-
-#ifdef WITH_ROOT
if (fMotifTypes.GetSize()) {
cout << "Dump of Motif Type Map - " << fMotifTypes.GetSize() << " entries:" << endl;
Int_t counter = 0;
cout << endl;
delete it;
}
-#endif
}
//_____________________________________________________________________________
/// Fill the given array with all motif positions IDs (electronic card numbers)
/// defined in the map
-#ifdef WITH_STL
- ecn.Set(fMotifPositions.size());
- Int_t i(0);
- MotifPositionMapIterator it;
- for (it=fMotifPositions.begin(); it != fMotifPositions.end(); it++) {
- AliMpMotifPosition* motifPosition = (*it).second;
- ecn[i++] = motifPosition->GetID();
- }
-#endif
-
-#ifdef WITH_ROOT
ecn.Set(fMotifPositions.GetSize());
TIter next(fMotifPositions.CreateIterator());
AliMpMotifPosition* motifPosition;
ecn[i] = motifPosition->GetID();
++i;
}
-#endif
}
//_____________________________________________________________________________
{
/// Return the number of all motif positions IDs (electronic card numbers)
-#ifdef WITH_STL
- return fMotifPositions.size();
-#endif
-
-#ifdef WITH_ROOT
return fMotifPositions.GetSize();
-#endif
}
//_____________________________________________________________________________
return 0;
}
-#ifdef WITH_STL
- MotifPositionMapIterator it = fMotifPositions.begin();
- std::advance(it, index);
- return it->second;
-#endif
-
-#ifdef WITH_ROOT
TIter next(fMotifPositions.CreateIterator());
while (index-- > 0) next();
return static_cast<AliMpMotifPosition*>(next());
-#endif
}
//_____________________________________________________________________________
Int_t nofPads = 0;
-#ifdef WITH_STL
- MotifPositionMapIterator it;
- for (it=fMotifPositions.begin(); it != fMotifPositions.end(); it++) {
- AliMpMotifPosition* motifPosition = (*it).second;
- nofPads += motifPosition->GetMotif()->GetMotifType()->GetNofPads();
- }
-#endif
-
-#ifdef WITH_ROOT
TIter next(fMotifPositions.CreateIterator());
AliMpMotifPosition* motifPosition;
while ( ( motifPosition = static_cast<AliMpMotifPosition*>(next()) ) )
{
nofPads += motifPosition->GetMotif()->GetMotifType()->GetNofPads();
}
-#endif
return nofPads;
}
{
/// Print all motif positions.
-#ifdef WITH_STL
- if (fMotifPositions.size()) {
- cout << "Dump of Motif Position Map - " << fMotifPositions.size() << " entries:" << endl;
- Int_t counter = 0;
- for (MotifPositionMapIterator i=fMotifPositions.begin();
- i != fMotifPositions.end(); i++) {
-
- cout << "Map element "
- << setw(3) << counter++ << " ";
- PrintMotifPosition((*i).second);
- cout << endl;
- }
- cout << endl;
- }
-#endif
-
-#ifdef WITH_ROOT
if (fMotifPositions.GetSize()) {
cout << "Dump of Motif Position Map - " << fMotifPositions.GetSize() << " entries:" << endl;
Int_t counter = 0;
}
cout << endl;
}
-#endif
}
//_____________________________________________________________________________
/// Print all motif positions from the second map
/// (by global indices)
-#ifdef WITH_STL
- if (fMotifPositions2.size()) {
- cout << "Dump of Motif Position Map 2 - " << fMotifPositions2.size() << " entries:" << endl;
- Int_t counter = 0;
- for (MotifPositionMap2Iterator i=fMotifPositions2.begin();
- i != fMotifPositions2.end(); i++) {
-
- cout << "Map element "
- << setw(3) << counter++ << " ";
- PrintMotifPosition2((*i).second);
- cout << endl;
- }
- cout << endl;
- }
-#endif
-
-#ifdef WITH_ROOT
-
if (fMotifPositions2.GetSize())
{
cout << "Dump of Motif Position Map 2 - " << fMotifPositions2.GetSize() << " entries:" << endl;
}
cout << endl;
}
-#endif
}
//
return false;
}
-#ifdef WITH_STL
- fMotifs[motif->GetID()] = motif;
-#endif
-
-#ifdef WITH_ROOT
fMotifs.Add(motif->GetID(), motif);
-#endif
return true;
}
return false;
}
-#ifdef WITH_STL
- fMotifTypes[motifType->GetID()] = motifType;
-#endif
-
-#ifdef WITH_ROOT
fMotifTypes.Add(motifType->GetID(), motifType);
-#endif
return true;
}
return false;
}
-#ifdef WITH_STL
- fMotifPositions[motifPosition->GetID()] = motifPosition;
-#endif
-
-#ifdef WITH_ROOT
fMotifPositions.Add(motifPosition->GetID() << 16, motifPosition);
-#endif
return true;
}
{
/// Fill the second map (by global indices) of motif positions.
-#ifdef WITH_STL
- if (fMotifPositions2.size() > 0 ) {
- AliWarningStream() << "Map has been already filled." << endl;
- return;
- }
-
- for (MotifPositionMapIterator ip=fMotifPositions.begin();
- ip != fMotifPositions.end(); ip++) {
-
- fMotifPositions2[(*ip).second->GetLowIndicesLimit()] = (*ip).second;
- }
-#endif
-
-#ifdef WITH_ROOT
if (fMotifPositions2.GetSize() > 0 ) {
AliWarningStream() <<"Map has been already filled." << endl;
return;
{
fMotifPositions2.Add(motifPosition->GetLowIndicesLimit(), motifPosition);
}
-#endif
-
}
//_____________________________________________________________________________
ofstream out(fileName, ios::out);
-#ifdef WITH_STL
- if (fMotifPositions.size()) {
- for (MotifPositionMapIterator i=fMotifPositions.begin();
- i != fMotifPositions.end(); i++) {
-
- AliMpMotifPosition* motifPosition = (*i).second;
- out << setw(5) << motifPosition->GetID() << " "
- << setw(3) << motifPosition->GetLowIndicesLimit().GetFirst() << " "
- << setw(3) << motifPosition->GetLowIndicesLimit().GetSecond()
- << endl;
- }
- out << endl;
- }
-#endif
-
-#ifdef WITH_ROOT
if (fMotifPositions.GetSize()) {
TIter next(fMotifPositions.CreateIterator());
AliMpMotifPosition* motifPosition;
}
out << endl;
}
-#endif
}
//_____________________________________________________________________________
//AliCodeTimerAuto("");
-#ifdef WITH_STL
- MotifMapIterator i = fMotifs.find(motifID);
- if (i != fMotifs.end())
- return (*i).second;
- else
- return 0;
-#endif
-
-#ifdef WITH_ROOT
return (AliMpVMotif*)fMotifs.GetValue(motifID);
-#endif
}
//_____________________________________________________________________________
//AliCodeTimerAuto("");
-#ifdef WITH_STL
- MotifTypeMapIterator i = fMotifTypes.find(motifTypeID);
- if (i != fMotifTypes.end())
- return (*i).second;
- else
- return 0;
-#endif
-
-#ifdef WITH_ROOT
return (AliMpMotifType*)fMotifTypes.GetValue(motifTypeID);
-#endif
}
//_____________________________________________________________________________
//AliCodeTimerAuto("");
-#ifdef WITH_STL
- MotifPositionMapIterator i = fMotifPositions.find(motifPositionID);
- if (i != fMotifPositions.end())
- return (*i).second;
- else
- return 0;
-#endif
-
-#ifdef WITH_ROOT
return (AliMpMotifPosition*)fMotifPositions.GetValue(motifPositionID << 16);
-#endif
-}
-
-/*
-//_____________________________________________________________________________
-AliMpMotifPosition*
-AliMpMotifMap::FindMotifPosition(const AliMpIntPair& indices) const
-{
-/// Find the last motif position which has the global indices (low limit)
-/// less then the indices specified.
-
-#ifdef WITH_STL
- MotifPositionMap2Iterator found
- = fMotifPositions2.lower_bound(indices);
-
- if (found == fMotifPositions2.end()) found--;
-
- MotifPositionMap2Iterator i=found;
- do {
- AliMpIntPair low = (*i).second->GetLowIndicesLimit();
- AliMpIntPair up = (*i).second->GetHighIndicesLimit();
-
- if ( indices.GetFirst() >= low.GetFirst() &&
- indices.GetSecond() >= low.GetSecond() &&
- indices.GetFirst() <= up.GetFirst() &&
- indices.GetSecond() <= up.GetSecond())
-
- return (*i).second;
- }
- while ( i-- != fMotifPositions2.begin());
-
- return 0;
-#endif
-
-#ifdef WITH_ROOT
- // HOW TO DO THIS WITH ROOT ????
- // Fortunately it seems not to be used anywhere
- Fatal("FindMotifPosition", "Difficult in Root to do this.");
- return 0;
-#endif
}
-*/
#include <TObject.h>
-#include "AliMpContainers.h"
-
-#ifdef WITH_STL
-#include "AliMpIntPair.h"
-#endif
-
-#ifdef WITH_ROOT
#include "AliMpExMap.h"
-#endif
-
-#ifdef WITH_STL
-#include <map>
-#include <iterator>
-#endif
class AliMpVMotif;
class AliMpMotifType;
class AliMpMotifMap : public TObject
{
- public:
-#ifdef WITH_STL
- /// Motif map type
- typedef std::map<TString, AliMpVMotif*> MotifMap;
- /// Motif map iterator type
- typedef MotifMap::const_iterator MotifMapIterator;
- /// Motif type map type
- typedef std::map<TString, AliMpMotifType*> MotifTypeMap;
- /// Motif type map iterator type
- typedef MotifTypeMap::const_iterator MotifTypeMapIterator;
- /// Motif position map to int type
- typedef std::map<Int_t, AliMpMotifPosition*> MotiPositionMap;
- /// Motif position map to int iterator type
- typedef MotiPositionMap::const_iterator MotifPositionMapIterator;
- /// Motif position map to int pair type
- typedef std::map<AliMpIntPair, AliMpMotifPosition*> MotifPositionMap2;
- /// Motif position map to int pair iterator type
- typedef MotifPositionMap2::const_iterator MotifPositionMap2Iterator;
-#endif
-#ifdef WITH_ROOT
- /// Motif map type
- typedef AliMpExMap MotifMap;
- /// Motif type map type
- typedef AliMpExMap MotifTypeMap;
- /// Motif position map to int type
- typedef AliMpExMap MotifPositionMap;
- /// Motif position map to int pair iterator type
- typedef AliMpExMap MotifPositionMap2;
-#endif
-
public:
AliMpMotifMap();
AliMpMotifMap(TRootIOCtor* ioCtor);
void PrintMotifPositions2() const;
// data members
- MotifMap fMotifs; ///< motifs map
- MotifTypeMap fMotifTypes; ///< motifs types map
-#ifdef WITH_STL
- std::map<Int_t, AliMpMotifPosition*> fMotifPositions; ///< motif positions map by Id
-#endif
-#ifdef WITH_ROOT
- MotifPositionMap fMotifPositions; ///< motifs positions map
-#endif
- MotifPositionMap2 fMotifPositions2;///< motifs positions map
+ AliMpExMap fMotifs; ///< motifs map
+ AliMpExMap fMotifTypes; ///< motifs types map
+ AliMpExMap fMotifPositions; ///< motifs positions map
+ AliMpExMap fMotifPositions2;///< motifs positions map
ClassDef(AliMpMotifMap,1) // motif map
};
AliMpMotifType* motifType = new AliMpMotifType(motifTypeId);
- PadMapType positions;
+ TExMap positions;
char line[256];
do {
int i,j;
strline>>i>>j;
-#ifdef WITH_STL
- positions[key].first=i;
- positions[key].second=j;
-#endif
-#ifdef WITH_ROOT
positions.Add( AliMpExMap::GetIndex(key),
AliMpExMap::GetIndex(AliMpIntPair(i,j)) );
-#endif
} while (!padPosStream.eof());
const Int_t knbergpins =
gassiNum = gassiChannel[numBerg-1];
-#ifdef WITH_STL
- PadMapTypeIterator iter = positions.find(padName);
- if (iter==positions.end()) {
- AliWarningStream()
- << "Problem: Pad number " << padNum
- << " for motif type " << motifTypeId.Data()
- << " found in the motifType stream, but not in the padPos stream" << endl;
- continue;
- }
-
- ix= iter->second.first;
- iy= iter->second.second;
-#endif
-
-#ifdef WITH_ROOT
Long_t value = positions.GetValue(AliMpExMap::GetIndex(padName));
if (!value) {
AliWarningStream()
ix = AliMpExMap::GetPair(value).GetFirst();
iy = AliMpExMap::GetPair(value).GetSecond();
-
-#endif
AliMpConnection* connection
= new AliMpConnection(padNum,numBerg,numKapton,gassiNum, AliMpIntPair(ix,iy));
#include <TObject.h>
-#include "AliMpContainers.h"
-
#include "AliMpStationType.h"
#include "AliMpStation12Type.h"
#include "AliMpPlaneType.h"
#include "AliMpIntPair.h"
-#include "AliMpContainers.h"
-#ifdef WITH_ROOT
#include <TExMap.h>
-#endif
#include <TString.h>
#include <TVector2.h>
#include <Riostream.h>
#include <fstream>
-#ifdef WITH_STL
-#include <map>
-#endif
class AliMpMotifMap;
class AliMpVMotif;
class AliMpMotifReader : public TObject
{
- public:
-#ifdef WITH_STL
- /// Map of int pair to string
- typedef std::map<std::string, std::pair<Int_t,Int_t> > PadMapType;
- /// Map of int pair to string iterator
- typedef PadMapType::iterator PadMapTypeIterator;
-#endif
-#ifdef WITH_ROOT
- /// Map of int pair to string
- typedef TExMap PadMapType;
-#endif
-
public:
AliMpMotifReader(const AliMpDataStreams& dataStreams,
AliMp::StationType station,
#include "AliLog.h"
#include <TString.h>
+#include <Riostream.h>
/// \cond CLASSIMP
ClassImp(AliMpMotifSpecial)
{
/// Standard constructor.
-
-#ifdef WITH_STL
- fPadDimensionsVector.resize(motifType->GetNofPadsX()*motifType->GetNofPadsY());
-#endif
}
//______________________________________________________________________________
AliMpMotifSpecial::AliMpMotifSpecial(TRootIOCtor* ioCtor):
AliMpVMotif(),
fDimensions(),
-#ifdef WITH_STL
- fPadDimensionsVector(),
-#endif
-#ifdef WITH_ROOT
fPadDimensionsVector(ioCtor),
-#endif
fPadDimensionsVector2()
{
/// Root IO constructor
// public methods
//
-#include <Riostream.h>
//______________________________________________________________________________
TVector2
AliMpMotifSpecial::GetPadDimensions(const AliMpIntPair& localIndices) const
/// Return the dimensions of pad located at the given indices
if (GetMotifType()->HasPadByLocalIndices(localIndices)) {
-#ifdef WITH_STL
- return fPadDimensionsVector[VectorIndex(localIndices)];
-#endif
-#ifdef WITH_ROOT
if (!fPadDimensionsVector.GetValue(localIndices)) {
Warning("GetPadDimensions","Indices outside limits");
return TVector2(0.,0.);
}
else
return *((TVector2*)fPadDimensionsVector.GetValue(localIndices));
-#endif
}
else {
Warning("GetPadDimensions","Indices outside limits");
{
/// Return number of different pad dimensions in this motif
-#ifdef WITH_STL
- return fPadDimensionsVector2.size();
-#endif
-
-#ifdef WITH_ROOT
return fPadDimensionsVector2.GetEntriesFast();
-#endif
}
//______________________________________________________________________________
return TVector2();
}
-#ifdef WITH_STL
- return fPadDimensionsVector2[i];
-#endif
-
-#ifdef WITH_ROOT
return *((TVector2*) fPadDimensionsVector2[i]);
-#endif
}
//______________________________________________________________________________
}
// fill the dimensions map vector
-#ifdef WITH_STL
- fPadDimensionsVector[VectorIndex(localIndices)]=dimensions;
-
- // fill the vector of different pad dimensions
- // only if these dimensions are not yet present
- Bool_t isPresent = false;
- for (Int_t i=0; i<GetNofPadDimensions(); i++) {
- if (AliMpConstants::IsEqual(fPadDimensionsVector2[i], dimensions))
- isPresent = true;
- }
-
- if (!isPresent) fPadDimensionsVector2.push_back(dimensions);
-#endif
-
-#ifdef WITH_ROOT
TVector2* dimensionsObj = new TVector2(dimensions);
fPadDimensionsVector.Add(localIndices, dimensionsObj);
}
if (!isPresent) fPadDimensionsVector2.Add(dimensionsObj);
-#endif
-
}
#ifndef ALI_MP_MOTIF_SPECIAL_H
#define ALI_MP_MOTIF_SPECIAL_H
-#include "AliMpContainers.h"
-
#include "AliMpVMotif.h"
-#ifdef WITH_ROOT
#include "AliMpExMap.h"
-#endif
#include <TVector2.h>
-#ifdef WITH_ROOT
#include <TObjArray.h>
-#endif
-
-#ifdef WITH_STL
-#include <vector>
-#endif
class TString;
class AliMpMotifSpecial : public AliMpVMotif
{
- public:
-#ifdef WITH_STL
- /// Dimensions map type
- typedef std::vector< TVector2 > DimensionsMap;
- /// Dimensions map iterator type
- typedef std::vector< TVector2 > DimensionsMap2;
-#endif
-#ifdef WITH_ROOT
- /// Dimensions map type
- typedef AliMpExMap DimensionsMap;
- /// Dimensions map iterator type
- typedef TObjArray DimensionsMap2;
-#endif
-
public:
AliMpMotifSpecial(const TString &id, AliMpMotifType *motifType);
AliMpMotifSpecial(TRootIOCtor* ioCtor);
Int_t VectorIndex(const AliMpIntPair& indices) const;
// data members
- TVector2 fDimensions; ///< motif dimensions
- DimensionsMap fPadDimensionsVector; ///< the vector of pad dimensions
- DimensionsMap2 fPadDimensionsVector2; ///< the vector of different pad dimensions
+ TVector2 fDimensions; ///< motif dimensions
+ AliMpExMap fPadDimensionsVector; ///< the vector of pad dimensions
+ TObjArray fPadDimensionsVector2; ///< the vector of different pad dimensions
ClassDef(AliMpMotifSpecial,2) // A motif with its ID
};
#include <TObject.h>
-#include "AliMpContainers.h"
-
#include "AliMpIntPair.h"
+
#ifndef ROOT_TObjArray
-# include "TObjArray.h"
+# include <TObjArray.h>
#endif
#include <TString.h>
{
/// Destructor
-#ifdef WITH_ROOT
fPads.Delete();
-#endif
}
// operators
/// Assignment operator. \n
/// If the right hand iterator isn't of a good type
/// the current operator is invalidated \n
-/// Not provided for WITH_ROOT option.
// check assignment to self
if (this == &right) return *this;
// base class assignment
AliMpVPadIterator::operator=(right);
-#ifdef WITH_STL
- fkSegmentation = right.fkSegmentation;
- fCenterPad = right.fCenterPad;
- fPads = right.fPads;
- fIndex = right.fIndex;
-#endif
-#ifdef WITH_ROOT
AliFatal("Not allowed assignment for TObjArray");
-#endif
return *this;
}
}
-#ifdef WITH_STL
//______________________________________________________________________________
-AliMpNeighboursPadIterator::PadVector
+TObjArray*
AliMpNeighboursPadIterator::PadVectorLine(const AliMpPad& from,
const AliMpIntPair& direction) const
{
/// starting from \a from and moving by \a direction
AliMpPad current = from;
- PadVector ans;
- Bool_t cont=kTRUE;
- do {
- if (IsNeighbour(current))
- ans.push_back(current);
- else
- cont=kFALSE;
- TVector2 nextPos = current.Position() + TVector2(
- current.Dimensions().X()*(AliMpConstants::LengthStep()+1.)*direction.GetFirst(),
- current.Dimensions().Y()*(AliMpConstants::LengthStep()+1.)*direction.GetSecond());
- current = fkSegmentation->PadByPosition(nextPos, false);
- } while (cont);
- return ans;
-}
-
-//______________________________________________________________________________
-void AliMpNeighboursPadIterator::UpdateTotalSet(PadSet& setTotal,
- const PadVector& from) const
-{
-/// Add pads from pad vector to the total set
-/// only if they are not yet included
-
- setTotal.insert(from.begin(),from.end());
-}
-
-#endif
-#ifdef WITH_ROOT
-//______________________________________________________________________________
-AliMpNeighboursPadIterator::PadVector*
-AliMpNeighboursPadIterator::PadVectorLine(const AliMpPad& from,
- const AliMpIntPair& direction) const
-{
-/// Fill a new vector with all pads which have common
-/// parts with the pad located at \a fCenterPad, in a given line
-/// starting from \a from and moving by \a direction
-
- AliMpPad current = from;
- PadVector* ans = new PadVector();
+ TObjArray* ans = new TObjArray();
Bool_t cont=kTRUE;
do {
if (IsNeighbour(current))
}
//______________________________________________________________________________
-void AliMpNeighboursPadIterator::UpdateTotalSet(PadSet& setTotal,
- PadVector* from) const
+void AliMpNeighboursPadIterator::UpdateTotalSet(TObjArray& setTotal,
+ TObjArray* from) const
{
/// Add pads from pad vector to the total set
/// only if they are not yet included and deletes the pad vector
delete from;
}
-#endif
-
//______________________________________________________________________________
void AliMpNeighboursPadIterator::FillPadsVector(Bool_t includeCenter)
{
AliMpPad from;
AliMpIntPair direction;
-#ifdef WITH_STL
- PadVector found;
-#endif
-#ifdef WITH_ROOT
- PadVector* found;
-#endif
+ TObjArray* found;
// repare a unique simple associative container
// --> no doublons, rapid insersion
- PadSet setTotal;
+ TObjArray setTotal;
///////////// Left side
// fill the fIndices vector with the set (-->pass from a rapid insertion,
// to rapid and indexed access, for the rest of the job)
-#ifdef WITH_STL
- fPads.clear();
- // include the center pad if requiered
- if (includeCenter) fPads.push_back(fCenterPad);
- //fPads.insert(fPads.end(),setTotal.begin(),setTotal.end());
-
- PadSetCIterator it;
- for (it = setTotal.begin(); it != setTotal.end(); it++)
- fPads.push_back((*it));
-#endif
-
-#ifdef WITH_ROOT
fPads.Delete();
// include the center pad if requiered
if (includeCenter) fPads.Add(new AliMpPad(fCenterPad));
for (Int_t i = 0; i<setTotal.GetEntriesFast(); i++)
fPads.Add(setTotal.At(i));
-#endif
}
//______________________________________________________________________________
/// Reset the iterator, so that it points to the first available
/// pad in the sector
-#ifdef WITH_STL
- if ((fkSegmentation != 0) && (fPads.size() != 0))
-#endif
-#ifdef WITH_ROOT
if ((fkSegmentation != 0) && (fPads.GetEntriesFast() != 0))
-#endif
fIndex=0;
else
fIndex=fgkInvalidIndex;
if (!IsValid()) return;
-#ifdef WITH_STL
- if (fIndex < fPads.size()-1)
-#endif
-#ifdef WITH_ROOT
if (Int_t(fIndex) < fPads.GetEntriesFast()-1)
-#endif
fIndex++;
else
Invalidate();
if (!IsValid())
return AliMpPad::Invalid();
else
-#ifdef WITH_STL
- return fPads[fIndex];
-#endif
-#ifdef WITH_ROOT
return *((AliMpPad*)fPads[fIndex]);
-#endif
}
//______________________________________________________________________________
#ifndef ALI_MP_NEIGHBOURS_PAD_ITERATOR_H
#define ALI_MP_NEIGHBOURS_PAD_ITERATOR_H
-#include "AliMpContainers.h"
-
#include "AliMpVPadIterator.h"
#include "AliMpPad.h"
-#ifdef WITH_ROOT
#include <TObjArray.h>
-#endif
-
-#ifdef WITH_STL
-#include <vector>
-#include <set>
-#endif
class AliMpVSegmentation;
class AliMpIntPair;
class AliMpNeighboursPadIterator : public AliMpVPadIterator
{
- public:
-#ifdef WITH_STL
- /// Pad vector type
- typedef std::vector<AliMpPad> PadVector;
- /// Pad set type
- typedef std::set<AliMpPad> PadSet;
- /// Pad set iterator type
- typedef PadSet::const_iterator PadSetCIterator;
-#endif
-#ifdef WITH_ROOT
- /// Pad vector type
- typedef TObjArray PadVector;
- /// Pad set type
- typedef TObjArray PadSet;
-#endif
-
public:
AliMpNeighboursPadIterator();
AliMpNeighboursPadIterator(const AliMpVSegmentation* segmentation,
static const UInt_t fgkInvalidIndex; ///< invalid index number
// private methods
- Bool_t IsNeighbour(const AliMpPad& pad) const;
-#ifdef WITH_STL
- PadVector PadVectorLine(const AliMpPad& from,
- const AliMpIntPair& direction) const;
- void UpdateTotalSet(PadSet& setTotal, const PadVector& from) const;
-#endif
-#ifdef WITH_ROOT
- PadVector* PadVectorLine(const AliMpPad& from,
+ Bool_t IsNeighbour(const AliMpPad& pad) const;
+ TObjArray* PadVectorLine(const AliMpPad& from,
const AliMpIntPair& direction) const;
- void UpdateTotalSet(PadSet& setTotal, PadVector* from) const;
-#endif
- void FillPadsVector(Bool_t includeCenter);
- Bool_t IsValid() const;
+ void UpdateTotalSet(TObjArray& setTotal, TObjArray* from) const;
+ void FillPadsVector(Bool_t includeCenter);
+ Bool_t IsValid() const;
// private data members
const AliMpVSegmentation* fkSegmentation; ///< \brief The segmentation
/// segmentation over which to iterate
AliMpPad fCenterPad; ///< Pad arround which we iterate
- PadVector fPads; ///< The list of pad arround fCenterIndices
+ TObjArray fPads; ///< The list of pad arround fCenterIndices
UInt_t fIndex; ///< Current index inside the fPads vector
ClassDef(AliMpNeighboursPadIterator,1) // iterator over motif's pads
///
/// Default ctor.
///
-#ifdef WITH_ROOT
fMotifPositions.SetOwner(kTRUE);
-#endif
AliDebug(1,Form("this=%p",this));
}
/// Normal ctor. Must be fed with the PCB's name (id), the pad dimensions
/// and the global dimension of the virtual enveloppe of the PCB
/// (usually 400x400 mm)
-#ifdef WITH_ROOT
fMotifPositions.SetOwner(kTRUE);
-#endif
AliDebug(1,Form("this=%p id=%s",this,id));
}
///
/// Copy constructor
-#ifdef WITH_ROOT
- fMotifPositions.SetOwner(kTRUE);
-#endif
+ fMotifPositions.SetOwner(kTRUE);
+
AliDebug(1,Form("this=%p (copy ctor) : begin",this));
o.Copy(*this);
AliDebug(1,Form("this=%p (copy ctor) : end",this));
AliDebug(1,Form("this=%p (ctor special motif)",this));
-#ifdef WITH_ROOT
fMotifPositions.SetOwner(kTRUE);
-#endif
+
TVector2 position(ms->Dimensions());
AliMpMotifPosition* mp = new AliMpMotifPosition(-1,ms,position);
mp->SetLowIndicesLimit(AliMpIntPair(fIxmin,fIymin));
mp->SetHighIndicesLimit(AliMpIntPair(fIxmax,fIymax));
-#ifdef WITH_ROOT
fMotifPositions.AddLast(mp);
-#else
- fMotifPositions.push_back(mp);
-#endif
}
//_____________________________________________________________________________
/// Dtor.
///
AliDebug(1,Form("this=%p",this));
-#ifndef WITH_ROOT
- for ( UInt_t i = 0; i < fMotifPositions.size(); ++i )
- {
- delete fMotifPositions[i];
- }
-#endif
-
}
//_____________________________________________________________________________
mp->SetLowIndicesLimit(AliMpIntPair(ixmin,iymin));
mp->SetHighIndicesLimit(AliMpIntPair(ixmax,iymax));
-#ifdef WITH_ROOT
fMotifPositions.AddLast(mp);
-#else
- fMotifPositions.push_back(mp);
-#endif
fIxmin = TMath::Min(fIxmin,ixmin);
fIxmax = TMath::Max(fIxmax,ixmax);
pcb.fActiveXmin = fActiveXmin;
pcb.fActiveXmax = fActiveXmax;
-#ifdef WITH_ROOT
AliDebug(1,"Deleting pcb.fMotifPositions");
pcb.fMotifPositions.Delete();
AliDebug(1,"Deleting pcb.fMotifPositions : done");
-#else
- for ( UInt_t i = 0; i < pcb.fMotifPositions.size(); ++i )
- {
- delete pcb.fMotifPositions[i];
- }
-#endif
-#ifdef WITH_ROOT
for ( Int_t i = 0; i < fMotifPositions.GetEntriesFast(); ++i )
-#else
- for ( UInt_t i = 0; i < fMotifPositions.size(); ++i )
-#endif
{
AliMpMotifPosition* pos = (AliMpMotifPosition*)fMotifPositions[i];
AliMpMotifPosition* pcbpos = new AliMpMotifPosition(pos->GetID(),
pos->Position());
pcbpos->SetLowIndicesLimit(pos->GetLowIndicesLimit());
pcbpos->SetHighIndicesLimit(pos->GetHighIndicesLimit());
-#ifdef WITH_ROOT
pcb.fMotifPositions.AddLast(pcbpos);
-#else
- pcb.fMotifPositions.push_back(pcbpos);
-#endif
}
pcb.fNofPads = fNofPads;
/// integer indices (ix,iy).
///
-#ifdef WITH_ROOT
for (Int_t i = 0; i < fMotifPositions.GetEntriesFast(); ++i )
-#else
- for (UInt_t i = 0; i < fMotifPositions.size(); ++i )
-#endif
{
AliMpMotifPosition* mp = (AliMpMotifPosition*)fMotifPositions[i];
if ( mp->HasPadByIndices(AliMpIntPair(ix,iy)) )
/// Returns the motifPosition located at position (x,y)
///
-#ifdef WITH_ROOT
for (Int_t i = 0; i < fMotifPositions.GetEntriesFast(); ++i )
-#else
- for (UInt_t i = 0; i < fMotifPositions.size(); ++i )
-#endif
{
AliMpMotifPosition* mp = (AliMpMotifPosition*)fMotifPositions[i];
/// Get the i-th motifPosition stored in this PCB's internal array.
///
-#ifdef WITH_ROOT
if ( i >= fMotifPositions.GetEntriesFast() ) return 0;
-#else
- if ( i >= Int_t(fMotifPositions.size()) ) return 0;
-#endif
+
return (AliMpMotifPosition*)fMotifPositions[i];
}
/// Returns the number of motifPositions stored in this PCB.
///
-#ifdef WITH_ROOT
return fMotifPositions.GetEntriesFast();
-#else
- return fMotifPositions.size();
-#endif
}
//_____________________________________________________________________________
{
/// Returns whether or not we have manuId
-#ifdef WITH_ROOT
TIter next(&fMotifPositions);
AliMpMotifPosition* pos;
while ( ( pos = static_cast<AliMpMotifPosition*>(next()) ) )
if ( pos->GetID() == manuId ) return kTRUE;
}
return kFALSE;
-#else
- for ( UInt_t i=0; i<fMotifPositions.size(); ++i ) {
- if ( fMotifPositions[i]->GetID() == manuId ) return kTRUE;
- }
- return kFALSE;
-#endif
}
if ( option && option[0] == 'M' )
{
-#ifdef WITH_ROOT
for ( Int_t i = 0; i < fMotifPositions.GetEntriesFast(); ++i )
-#else
- for ( UInt_t i = 0; i < fMotifPositions.size(); ++i )
-#endif
{
if (option)
{
TList lines;
lines.SetOwner(kTRUE);
-#ifdef WITH_ROOT
for ( Int_t i = 0; i < fMotifPositions.GetEntriesFast(); ++i )
-#else
- for ( UInt_t i = 0; i < fMotifPositions.size(); ++i )
-#endif
{
AliMpMotifPosition* pos = GetMotifPosition(i);
AliMpVMotif* motif = pos->GetMotif();
#ifndef ALIMPPCB_H
#define ALIMPPCB_H
-#ifndef ROOT_TObject
-# include "TObject.h"
+#ifndef ALI_MP_VPAD_ITERATOR_H
+# include "AliMpVPadIterator.h"
#endif
-#ifndef ROOT_TString
-# include "TString.h"
+#ifndef ALI_MP_AREA_H
+# include "AliMpArea.h"
#endif
-# ifndef ROOT_TArraI
-# include "TArrayI.h"
-# endif
-#include "AliMpContainers.h"
+#ifndef ROOT_TObject
+# include "TObject.h"
+#endif
-#ifdef WITH_ROOT
-# ifndef ROOT_TObjArray
-# include "TObjArray.h"
-# endif
-#else
-# include <vector>
+#ifndef ROOT_TString
+# include "TString.h"
#endif
-#ifndef ALI_MP_VPAD_ITERATOR_H
-# include "AliMpVPadIterator.h"
+#ifndef ROOT_TArraI
+# include "TArrayI.h"
#endif
-#ifndef ALI_MP_AREA_H
-# include "AliMpArea.h"
+#ifndef ROOT_TObjArray
+# include "TObjArray.h"
#endif
class AliMpSlatMotifMap;
Int_t fIxmax; ///< max pad index in x
Int_t fIymin; ///< min pad index in y
Int_t fIymax; ///< max pad index in y
-#ifdef WITH_ROOT
TObjArray fMotifPositions; ///< array of motifs
-#else
- std::vector<AliMpMotifPosition*> fMotifPositions; ///< array of motif positions
-#endif
Int_t fNofPads; ///< number of pads in this PCB
AliMpSlatMotifMap* fMotifMap; ///< to keep track of things to avoid duplications of motif and motiftypes, and get proper deletion
Bool_t validity)
: TObject(),
fLocations(0),
-#ifdef WITH_ROOT
fNofLocations(0),
-#endif
fLocation(location),
fIndices(indices),
fPosition(position),
AliMpPad::AliMpPad()
: TObject(),
fLocations(0),
-#ifdef WITH_ROOT
fNofLocations(0),
-#endif
fLocation(AliMpIntPair::Invalid()),
fIndices(AliMpIntPair::Invalid()),
fPosition(-1.,-1.),
AliMpPad::AliMpPad(const AliMpPad& rhs)
: TObject(rhs),
fLocations(0),
-#ifdef WITH_ROOT
fNofLocations(0),
-#endif
fLocation(AliMpIntPair::Invalid()),
fIndices(AliMpIntPair::Invalid()),
fPosition(-1.,-1.),
{
/// Destructor
-#ifdef WITH_STL
- delete fLocations;
-#endif
-
-#ifdef WITH_ROOT
delete [] fLocations;
-#endif
}
//_____________________________________________________________________________
fValidity = rhs.fValidity;
fLocations = 0;
-
-#ifdef WITH_STL
- if ( rhs.GetNofLocations() ) {
- fLocations = new IntPairVector(rhs.GetNofLocations());
-
- for (Int_t i=0; i<rhs.GetNofLocations(); i++)
- (*fLocations)[i] = rhs.GetLocation(i);
- }
-#endif
-
-#ifdef WITH_ROOT
fNofLocations = rhs.fNofLocations;
if ( rhs.GetNofLocations() ) {
fLocations = new AliMpIntPair[fgkMaxNofLocations];
for ( UInt_t i=0; i<rhs.fNofLocations; i++ )
fLocations[i] = rhs.fLocations[i];
}
-#endif
return *this;
}
}
// Add location
-#ifdef WITH_STL
- if (! fLocations )
- fLocations = new IntPairVector();
-
- fLocations->push_back(location);
- return true;
-#endif
-
-#ifdef WITH_ROOT
if ( ! fLocations)
fLocations = new AliMpIntPair[fgkMaxNofLocations];
fLocations[fNofLocations++] = location;
return true;
-#endif
}
//_____________________________________________________________________________
if (!fLocations) return 0;
-#ifdef WITH_STL
- return fLocations->size();
-#endif
-
-#ifdef WITH_ROOT
return fNofLocations;
-#endif
}
if ( !fLocations || i<0 || i>=GetNofLocations() )
return AliMpIntPair::Invalid();
-#ifdef WITH_STL
- return (*fLocations)[i];
-#endif
-
-#ifdef WITH_ROOT
return fLocations[i];
-#endif
}
//_____________________________________________________________________________
#include <TObject.h>
-#include "AliMpContainers.h"
#include "AliMpIntPair.h"
#include <TVector2.h>
-#ifdef WITH_ROOT
#include <TClonesArray.h>
-#endif
-
-#ifdef WITH_STL
-#include <vector>
-#endif
class AliMpPad : public TObject
{
- public:
-#ifdef WITH_STL
- /// Int pair vector type
- typedef std::vector<AliMpIntPair> IntPairVector;
-#endif
-#ifdef WITH_ROOT
- /// Int pair vector type
- typedef AliMpIntPair IntPairVector;
-#endif
-
public:
AliMpPad(const AliMpIntPair& location, const AliMpIntPair& indices,
const TVector2& position, const TVector2& dimensions,
static const Int_t fgkMaxNofLocations; ///< \brief maximum number of pad locations
/// in the collection
// data members
- IntPairVector* fLocations; ///< collection of pad locations
-#ifdef WITH_ROOT
+ AliMpIntPair* fLocations; ///< collection of pad locations
UInt_t fNofLocations; ///< number of locations in fLocations
-#endif
AliMpIntPair fLocation; ///< pad location
AliMpIntPair fIndices; ///< pad indices
TVector2 fPosition; ///< the pad position (in cm)
padRowSegment->SetOffsetX(CurrentBorderX());
// Adds the pad row segment
-#ifdef WITH_STL
- fSegments.push_back(padRowSegment);
-#endif
-
-#ifdef WITH_ROOT
fSegments.Add(padRowSegment);
-#endif
return padRowSegment;
}
{
/// Return the number of pad row segments.
-#ifdef WITH_STL
- return fSegments.size();
-#endif
-
-#ifdef WITH_ROOT
return fSegments.GetEntriesFast();
-#endif
}
//_____________________________________________________________________________
return 0;
}
-#ifdef WITH_STL
- return fSegments[i];
-#endif
-
-#ifdef WITH_ROOT
return (AliMpVPadRowSegment*)fSegments[i];
-#endif
}
//_____________________________________________________________________________
#include <TObject.h>
-#include "AliMpContainers.h"
-
#include "AliMpXDirection.h"
-#ifdef WITH_ROOT
#include <TObjArray.h>
-#endif
-
-#ifdef WITH_STL
-#include <vector>
-#endif
class AliMpVPadRowSegment;
class AliMpMotif;
class AliMpPadRow : public TObject
{
- public:
-#ifdef WITH_STL
- /// Pad row segment vector type
- typedef std::vector<AliMpVPadRowSegment*> PadRowSegmentVector;
-#endif
-#ifdef WITH_ROOT
- /// Pad row segment vector type
- typedef TObjArray PadRowSegmentVector;
-#endif
-
public:
AliMpPadRow(AliMp::XDirection direction);
AliMpPadRow();
AliMp::XDirection fDirection; ///< the pad row x direction
Int_t fID; ///< the pad row ID
Double_t fOffsetX; ///< the x position of the border
- PadRowSegmentVector fSegments; ///< the pad row segments
+ TObjArray fSegments; ///< the pad row segments
ClassDef(AliMpPadRow,1) // Pad row
};
{
/// Destructor
-#ifdef WITH_STL
- for (Int_t i=0; i<GetNofRowSegments(); i++)
- delete fSegments[i];
-#endif
-
-#ifdef WITH_ROOT
fSegments.Delete();
-#endif
}
//
{
/// Add row segment at the end.
-#ifdef WITH_STL
- fSegments.push_back(rowSegment);
-#endif
-
-#ifdef WITH_ROOT
fSegments.Add(rowSegment);
-#endif
}
//_____________________________________________________________________________
{
/// Insert row segment in the first vector position.
-#ifdef WITH_STL
- fSegments.insert(fSegments.begin(), rowSegment);
-#endif
-
-#ifdef WITH_ROOT
fSegments.AddFirst(rowSegment);
-#endif
}
//_____________________________________________________________________________
for (Int_t i=0; i<GetNofRowSegments(); i++) {
-#ifdef WITH_STL
- AliMpVRowSegment* rs = fSegments[i];
-#endif
-#ifdef WITH_ROOT
AliMpVRowSegment* rs = (AliMpVRowSegment*)fSegments.At(i);
-#endif
if (x >= rs->LeftBorderX() && x <= rs->RightBorderX())
return rs;
{
/// Return number of row segments.
-#ifdef WITH_STL
- return fSegments.size();
-#endif
-
-#ifdef WITH_ROOT
return fSegments.GetSize();
-#endif
}
//_____________________________________________________________________________
return 0;
}
-#ifdef WITH_STL
- return fSegments[i];
-#endif
-
-#ifdef WITH_ROOT
return (AliMpVRowSegment*)fSegments.At(i);
-#endif
}
#ifndef ALI_MP_ROW_H
#define ALI_MP_ROW_H
-#include "AliMpContainers.h"
-
#include "AliMpVIndexed.h"
#include "AliMpDirection.h"
#include <TVector2.h>
-#ifdef WITH_ROOT
#include <TList.h>
-#endif
-
-#ifdef WITH_STL
-#include <vector>
-#endif
class AliMpVRowSegment;
class AliMpVPadIterator;
class AliMpRow : public AliMpVIndexed
{
- public:
-#ifdef WITH_STL
- /// Row segment vector type
- typedef std::vector<AliMpVRowSegment*> RowSegmentVector;
-#endif
-#ifdef WITH_ROOT
- /// Row segment vector type
- typedef TList RowSegmentVector;
-#endif
-
public:
AliMpRow(Int_t id, AliMpMotifMap* motifMap);
AliMpRow();
// data members
UInt_t fID; ///< row ID
Double_t fOffsetY; ///< the y position of the centre of motifs
- RowSegmentVector fSegments;///< row segments
+ TList fSegments;///< row segments
AliMpMotifMap* fMotifMap;///< the motif map associated with its sector
ClassDef(AliMpRow,1) // Row
fMotifMap = new AliMpMotifMap;
-#ifdef WITH_STL
- for (Int_t izone = 0; izone<nofZones; izone++)
- fZones.push_back(new AliMpZone(izone+1));
-
- for (Int_t irow = 0; irow<nofRows; irow++)
- fRows.push_back(new AliMpRow(irow, fMotifMap));
-#endif
-
-#ifdef WITH_ROOT
for (Int_t izone = 0; izone<nofZones; izone++)
fZones.Add(new AliMpZone(izone+1));
for (Int_t irow = 0; irow<nofRows; irow++)
fRows.Add(new AliMpRow(irow, fMotifMap));
-#endif
}
//_____________________________________________________________________________
Double_t y = position.Y();
-#ifdef WITH_STL
- for (Int_t i=0; i<GetNofRows(); i++) {
- if ( y >= fRows[i]->LowBorderY() && y <= fRows[i]->UpperBorderY())
- return fRows[i];
- }
-#endif
-
-#ifdef WITH_ROOT
for (Int_t i=0; i<GetNofRows(); i++) {
if ( y >= ((AliMpRow*)fRows[i])->LowBorderY() &&
y <= ((AliMpRow*)fRows[i])->UpperBorderY())
return (AliMpRow*)fRows[i];
}
-#endif
return 0;
}
for (Int_t irow=0; irow<GetNofRows(); irow++) {
-#ifdef WITH_STL
- AliMpRow* row = fRows[irow];
-#endif
-#ifdef WITH_ROOT
AliMpRow* row = (AliMpRow*)fRows[irow];
-#endif
-
+
for (Int_t iseg=0; iseg<row->GetNofRowSegments(); iseg++) {
AliMpVRowSegment* segment = row->GetRowSegment(iseg);
if (segment->HasMotifPosition(motifPositionId)) return segment;
Double_t y = 0.;
for (Int_t i=0; i<GetNofRows(); i++) {
-#ifdef WITH_STL
- // take the largest x row dimension
- if (fRows[i]->Dimensions().X() > x)
- x = fRows[i]->Dimensions().X();
-
- // add all rows y dimensions
- y += fRows[i]->Dimensions().Y();
-#endif
-
-#ifdef WITH_ROOT
// take the largest x row dimension
if ( ((AliMpRow*)fRows[i])->Dimensions().X() > x)
x = ((AliMpRow*)fRows[i])->Dimensions().X();
// add all rows y dimensions
y += ((AliMpRow*)fRows[i])->Dimensions().Y();
-#endif
}
return TVector2(x, y);
{
/// Return the number of zones.
-#ifdef WITH_STL
- return fZones.size();
-#endif
-
-#ifdef WITH_ROOT
return fZones.GetEntriesFast();
-#endif
}
//_____________________________________________________________________________
return 0;
}
-#ifdef WITH_STL
- return fZones[zoneID-1];
-#endif
-
-#ifdef WITH_ROOT
return (AliMpZone*)fZones[zoneID-1];
-#endif
}
//_____________________________________________________________________________
{
/// Return the number of rows.
-#ifdef WITH_STL
- return fRows.size();
-#endif
-
-#ifdef WITH_ROOT
return fRows.GetEntriesFast();
-#endif
}
//_____________________________________________________________________________
return 0;
}
-#ifdef WITH_STL
- return fRows[rowID];
-#endif
-
-#ifdef WITH_ROOT
return (AliMpRow*)fRows[rowID];
-#endif
}
//_____________________________________________________________________________
#include <TNamed.h>
-#include "AliMpContainers.h"
-
#include "AliMpDirection.h"
#include "AliMpPlaneType.h"
#include "AliMpIntPair.h"
#include <TString.h>
#include <TVector2.h>
-#ifdef WITH_ROOT
#include <TObjArray.h>
-#endif
-
-#ifdef WITH_STL
-#include <vector>
-#endif
class AliMpZone;
class AliMpRow;
class AliMpSector : public TNamed
{
- public:
-#ifdef WITH_STL
- /// Row vector type
- typedef std::vector<AliMpRow*> RowVector;
- /// Zone vector type
- typedef std::vector<AliMpZone*> ZoneVector;
-#endif
-#ifdef WITH_ROOT
- /// Row vector type
- typedef TObjArray RowVector;
- /// Zone vector type
- typedef TObjArray ZoneVector;
-#endif
-
public:
AliMpSector(const TString& id, Int_t nofZones, Int_t nofRows,
AliMp::Direction direction, const TVector2& offset);
// data members
TString fID; ///< sector ID
TVector2 fOffset; ///< sector position
- ZoneVector fZones; ///< zones
- RowVector fRows; ///< rows
+ TObjArray fZones; ///< zones
+ TObjArray fRows; ///< rows
AliMpMotifMap* fMotifMap; ///< motif map
AliMp::Direction fDirection; ///< the direction of constant pad size
TVector2 fMinPadDimensions; ///< minimum pad dimensions
// Process data
//
- AliMpVRowSegmentSpecial::PadRowVector newPadRows;
+ TObjArray newPadRows;
for (Int_t i=0; i<nofPadRows; i++) {
// Create pad row
segment->AddPadRow(padRow);
// Keep the new rows in a temporary vector
-#ifdef WITH_STL
- newPadRows.push_back(padRow);
-#endif
-#ifdef WITH_ROOT
newPadRows.Add(padRow);
-#endif
}
TString nextKeyword;
for (Int_t i=0; i<nofPadRows; i++) {
// Get pad row from the temporary vector
-#ifdef WITH_STL
- AliMpPadRow* padRow = newPadRows[i];
-#endif
-#ifdef WITH_ROOT
AliMpPadRow* padRow = (AliMpPadRow*)newPadRows[i];
-#endif
// Find motif
AliMpVMotif* motif = fSector->GetMotifMap()->FindMotif(motifId);
ClassImp(AliMpSectorSegmentation)
/// \endcond
-#ifdef WITH_ROOT
const Double_t AliMpSectorSegmentation::fgkS1 = 100000.;
const Double_t AliMpSectorSegmentation::fgkS2 = 1000.;
-#endif
//______________________________________________________________________________
AliMpSectorSegmentation::AliMpSectorSegmentation(
// private methods
//
-#ifdef WITH_ROOT
//______________________________________________________________________________
Long_t AliMpSectorSegmentation::GetIndex(const TVector2& vector2) const
{
return TVector2( TMath::Floor(index/fgkS1)/fgkS2,
(index - TMath::Floor(index/fgkS1)*fgkS1)/fgkS2 );
}
-#endif
//______________________________________________________________________________
void AliMpSectorSegmentation::FillPadDimensionsMap()
if (!AliMpConstants::IsEqual(zone->GetPadDimensions(), TVector2())) {
// regular zone
-#ifdef WITH_STL
- fPadDimensionsMap[zoneID*10] = zone->GetPadDimensions();
-#endif
-#ifdef WITH_ROOT
AliDebugStream(3)
<< "Filling fPadDimensions[" << zoneID*10 << "] = ("
<< zone->GetPadDimensions().X() << ", "
fPadDimensionsMap.Add((Long_t)(zoneID*10),
GetIndex(zone->GetPadDimensions()));
-#endif
}
else {
// special zone
for (Int_t k=0; k<motif->GetNofPadDimensions(); k++) {
Int_t index = zoneID*10 + subIndex++;
-#ifdef WITH_STL
- fPadDimensionsMap[index] = motif->GetPadDimensions(k);
-#endif
-#ifdef WITH_ROOT
AliDebugStream(3)
<< "Filling fPadDimensions[" << index << "] = ("
<< motif->GetPadDimensions(k).X() << ", "
fPadDimensionsMap.Add((Long_t)(index),
GetIndex(motif->GetPadDimensions(k)));
-#endif
}
}
}
return 0;
}
-#ifdef WITH_STL
- PadDimensionsMapCIterator it;
- for (it = fPadDimensionsMap.begin(); it != fPadDimensionsMap.end(); ++it) {
- if (AliMpConstants::IsEqual(it->second, pad.Dimensions()))
- return it->first;
- }
-#endif
-
-#ifdef WITH_ROOT
- PadDimensionsMapCIterator it(&fPadDimensionsMap);
+ TExMapIter it(&fPadDimensionsMap);
Long_t key, value;
while ( it.Next(key, value) ) {
TVector2 dimensions = GetVector(value);
}
AliError(Form("fPadDimensionsMap size is %d",fPadDimensionsMap.GetSize()));
-
-#endif
// Should never happen
AliErrorStream()
{
/// Return the pad dimensions for the zone with the specified zone index.
-#ifdef WITH_STL
- PadDimensionsMapCIterator it = fPadDimensionsMap.find(zone);
- if (it != fPadDimensionsMap.end()) return it->second;
-#endif
-
-#ifdef WITH_ROOT
Long_t value = fPadDimensionsMap.GetValue(zone);
if (value) return GetVector(value);
-#endif
if (warning) Warning("PadDimensions(zone)", "not found");
return TVector2();
cout << "Zones: " << endl;
-#ifdef WITH_STL
- PadDimensionsMapCIterator it;
- for (it = fPadDimensionsMap.begin(); it != fPadDimensionsMap.end(); ++it) {
- cout << " zone: " << setw(4) << it->first;
- cout << " pad dimensions: ( "
- << it->second.X() << ", " << it->second.Y() << ")" << endl;
- }
-#endif
-
-#ifdef WITH_ROOT
- PadDimensionsMapCIterator it(&fPadDimensionsMap);
+ TExMapIter it(&fPadDimensionsMap);
Long_t key, value;
while ( it.Next(key, value) ) {
//cout << "Iterating over: " << key << ", " << value << endl;
cout << " pad dimensions: ( "
<< dimensions.X() << ", " << dimensions.Y() << ")" << endl;
}
-#endif
}
#ifndef ALI_MP_SECTOR_SEGMENTATION_H
#define ALI_MP_SECTOR_SEGMENTATION_H
-#include "AliMpContainers.h"
-
#include "AliMpVSegmentation.h"
#include "AliMpPad.h"
#include <TVector2.h>
-#ifdef WITH_ROOT
#include <TExMap.h>
-#endif
-
-#ifdef WITH_STL
-#include <map>
-#endif
class AliMpSector;
class AliMpMotifPosition;
class AliMpSectorSegmentation : public AliMpVSegmentation
{
- public:
-#ifdef WITH_STL
- /// Pad dimensions map type
- typedef std::map<Int_t, TVector2> PadDimensionsMap;
- /// Pad dimensions map iterator type
- typedef PadDimensionsMap::const_iterator PadDimensionsMapCIterator;
-#endif
-#ifdef WITH_ROOT
- /// Pad dimensions map type
- typedef TExMap PadDimensionsMap;
- /// Pad dimensions map iterator type
- typedef TExMapIter PadDimensionsMapCIterator;
-#endif
-
public:
AliMpSectorSegmentation(const AliMpSector* sector, Bool_t own = false);
AliMpSectorSegmentation();
/// Not implemented
AliMpSectorSegmentation& operator = (const AliMpSectorSegmentation& right);
-#ifdef WITH_ROOT
static const Double_t fgkS1; ///< the separators used for conversion
static const Double_t fgkS2; ///< of TVector2 to Long_t
// methods
Long_t GetIndex(const TVector2& vector2) const;
TVector2 GetVector(Long_t index) const;
-#endif
// methods
void FillPadDimensionsMap();
const AliMpSector* fkSector; ///< Sector
Bool_t fIsOwner; ///< Sector ownership
AliMpPad* fPadBuffer; ///< The pad buffer
-#ifdef WITH_STL
- PadDimensionsMap fPadDimensionsMap; ///< Map between zone IDs and pad dimensions
-#endif
-#ifdef WITH_ROOT
- mutable PadDimensionsMap fPadDimensionsMap; ///< Map between zone IDs and pad dimensions
-#endif
-
+ mutable TExMap fPadDimensionsMap; ///< Map between zone IDs and pad dimensions
Int_t fMaxIndexInX; ///< maximum pad index in x
Int_t fMaxIndexInY; ///< maximum pad index in y
/// Empty ctor.
///
AliDebug(1,Form("this=%p Empty ctor",this));
-#ifdef WITH_ROOT
+
fPCBs.SetOwner(kTRUE);
-#endif
fManuMap.SetOwner(kFALSE);
}
/// Normal ctor
///
AliDebug(1,Form("this=%p id=%s",this,id));
-#ifdef WITH_ROOT
+
fPCBs.SetOwner(kTRUE);
-#endif
fManuMap.SetOwner(kFALSE);
}
/// Dtor.
///
AliDebug(1,Form("this=%p fId=%s",this,fId.Data()));
-#ifdef WITH_ROOT
+
fPCBs.Delete();
-#else
- for ( UInt_t i = 0; i < fPCBs.size(); ++i )
- {
- delete fPCBs[i];
- }
-#endif
}
//_____________________________________________________________________________
}
Double_t xOffset = DX()*2;
AliMpPCB* pcb = pcbType.Clone(manuList,ixOffset,xOffset);
-#ifdef WITH_ROOT
fPCBs.AddLast(pcb);
-#else
- fPCBs.push_back(pcb);
-#endif
fDY = TMath::Max(pcb->DY(),fDY);
fDX += pcb->DX();
fNofPadsX += pcb->GetNofPadsX();
AliMpMotifPosition* mp = pcb->GetMotifPosition(i);
Int_t manuID = mp->GetID();
// Before inserting a new key, check if it's already there
-//#ifdef WITH_ROOT
TObject* there = fManuMap.GetValue(manuID);
if ( there == 0 )
{
{
AliError(Form("ManuID %d is duplicated for PCB %s",manuID,pcbType.GetID()));
}
-//#else
-// fManuMap[manuID] = mp;
-//#endif
- }
+ }
fPosition.Set(DX(),DY());
fNofPads += pcb->NofPads();
}
///
/// Returns the motifPosition referenced by it manuID
///
-//#ifdef WITH_ROOT
return static_cast<AliMpMotifPosition*>(fManuMap.GetValue(manuID));
-//#else
-// std::map<int,AliMpMotifPosition*>::const_iterator it = fManuMap.find(manuID);
-// if ( it != fManuMap.end() )
-// {
-// return it->second;
-// }
-// else
-// {
-// return 0;
-// }
-//#endif
}
//_____________________________________________________________________________
Int_t nofElectronicCards(GetNofElectronicCards());
assert(nofElectronicCards>0);
ecn.Set(nofElectronicCards);
-//#ifdef WITH_ROOT
TIter next(fManuMap.CreateIterator());
AliMpMotifPosition* mp;
Int_t n(0);
++n;
}
assert(n==nofElectronicCards);
-//#else
- // missing here
-//#endif
}
//_____________________________________________________________________________
///
/// Returns the i-th PCB of this slat.
///
-#ifdef WITH_ROOT
if ( i >= fPCBs.GetEntriesFast() ) return 0;
return (AliMpPCB*)fPCBs[i];
-#else
- if ( i >= Int_t(fPCBs.size()) ) return 0;
- return fPCBs[i];
-#endif
}
//_____________________________________________________________________________
///
/// Returns the number of PCB in this slat.
///
-#ifdef WITH_ROOT
return fPCBs.GetEntriesFast();
-#else
- return fPCBs.size();
-#endif
}
//_____________________________________________________________________________
#ifndef ALI_MP_SLAT_H
#define ALI_MP_SLAT_H
-#include <TObject.h>
-
-#ifndef ROOT_TString
-# include "TString.h"
-#endif
-
#ifndef ALI_MP_PAD_H
# include "AliMpPad.h"
#endif
# include "AliMpPlaneType.h"
#endif
-#include "AliMpContainers.h"
-#include "AliMpExMap.h"
+#ifndef ALI_MP_EX_MAP_H
+ #include "AliMpExMap.h"
+#endif
-class TArrayI;
+#ifndef ROOT_TObject
+ #include <TObject.h>
+#endif
-#ifdef WITH_ROOT
+#ifndef ROOT_TString
+# include "TString.h"
+#endif
+
+#ifndef ROOT_TObjArray
# include "TObjArray.h"
-#else
-# include <vector>
-//# include <map>
#endif
+class TArrayI;
+
+
class AliMpMotifPosition;
class AliMpPCB;
class TArrayI;
Int_t fNofPadsX; ///< Actual number of pads in x direction
Int_t fMaxNofPadsY; ///< Maximum number of pads in y direction
mutable AliMpExMap fManuMap; ///< map of int to AliMpMotifPosition*
-#ifdef WITH_ROOT
TObjArray fPCBs; ///< array of AliMpPCB*
-#else
- std::vector<AliMpPCB*> fPCBs; ///< array of AliMpPCB*
-#endif
TVector2 fPosition; ///< Position of the slat center.
Int_t fNofPads; ///< number of pads in this slat
{
/// Add row segment.
-#ifdef WITH_STL
- fSegments.push_back(rowSegment);
-#endif
-
-#ifdef WITH_ROOT
fSegments.Add(rowSegment);
-#endif
}
{
/// Return number of row segments.
-#ifdef WITH_STL
- return fSegments.size();
-#endif
-
-#ifdef WITH_ROOT
return fSegments.GetSize();
-#endif
}
//_____________________________________________________________________________
return 0;
}
-#ifdef WITH_STL
- return fSegments[i];
-#endif
-
-#ifdef WITH_ROOT
return (AliMpVRowSegment*)fSegments.At(i);
-#endif
}
//_____________________________________________________________________________
#define ALI_MP_SUB_ZONE_H
#include <TObject.h>
-
-#include "AliMpContainers.h"
-
-#ifdef WITH_ROOT
#include <TList.h>
-#endif
-
-#ifdef WITH_STL
-#include <vector>
-#endif
class AliMpVMotif;
class AliMpVRowSegment;
class AliMpSubZone : public TObject
{
- public:
-#ifdef WITH_STL
- /// Row segment vector type
- typedef std::vector<AliMpVRowSegment*> RowSegmentVector;
-#endif
-#ifdef WITH_ROOT
- /// Row segment vector type
- typedef TList RowSegmentVector;
-#endif
-
public:
AliMpSubZone(AliMpVMotif* motif);
AliMpSubZone();
// data members
AliMpVMotif* fMotif; ///< the motif in this subzone
- RowSegmentVector fSegments;///< contained row segments
+ TList fSegments;///< contained row segments
ClassDef(AliMpSubZone,1) // Zone segment
};
ClassImp(AliMpVRowSegmentSpecial)
/// \endcond
-#ifdef WITH_ROOT
const Int_t AliMpVRowSegmentSpecial::fgkMaxNofMotifPositionIds = 20;
-#endif
//______________________________________________________________________________
AliMpVRowSegmentSpecial::AliMpVRowSegmentSpecial(AliMpRow* row, Double_t offsetX)
fOffsetX(offsetX),
fPadRows(),
fMotifs(),
- fMotifPositionIds()
-#ifdef WITH_ROOT
- ,fNofMotifPositionIds(0)
-#endif
+ fMotifPositionIds(),
+ fNofMotifPositionIds(0)
{
/// Standard constructor
}
fOffsetX(0.),
fPadRows(),
fMotifs(),
- fMotifPositionIds()
-#ifdef WITH_ROOT
- ,fNofMotifPositionIds(0)
-#endif
+ fMotifPositionIds(),
+ fNofMotifPositionIds(0)
{
/// Default constructor
-#ifdef WITH_ROOT
fMotifPositionIds.Set(fgkMaxNofMotifPositionIds);
-#endif
}
//______________________________________________________________________________
/// Return true if the specified motif is already in fMotifs vector,
/// returns false otherwise.
-#ifdef WITH_STL
- for (UInt_t i=0; i<fMotifs.size(); i++)
- if (fMotifs[i] == motif) return true;
-#endif
-
-#ifdef WITH_ROOT
for (Int_t i=0; i<fMotifs.GetEntriesFast(); i++)
if (fMotifs[i] == (const TObject*)motif) return true;
-#endif
return false;
}
{
/// Return number of pad rows.
-#ifdef WITH_STL
- return fPadRows.size();
-#endif
-
-#ifdef WITH_ROOT
return fPadRows.GetEntriesFast();
-#endif
}
//______________________________________________________________________________
{
/// Return number of pad rows.
-#ifdef WITH_STL
- return fPadRows[i];
-#endif
-
-#ifdef WITH_ROOT
return (AliMpPadRow*)fPadRows[i];
-#endif
}
//
padRow->SetOffsetX(fOffsetX);
padRow->SetID(GetNofPadRows());
-#ifdef WITH_STL
- fPadRows.push_back(padRow);
-#endif
-
-#ifdef WITH_ROOT
fPadRows.Add(padRow);
-#endif
}
//______________________________________________________________________________
AliMpVMotif* motif = padRow->GetPadRowSegment(j)->GetMotif();
if (!HasMotif(motif)) {
-#ifdef WITH_STL
- fMotifs.push_back(motif);
- fMotifPositionIds.push_back(
- padRow->GetPadRowSegment(j)->GetMotifPositionId());
-#endif
-#ifdef WITH_ROOT
fMotifs.Add(motif);
// resize array if needed
fMotifPositionIds.AddAt(
padRow->GetPadRowSegment(j)->GetMotifPositionId(),
fNofMotifPositionIds++);
-#endif
}
}
}
{
/// Return the number of different motifs present in this row segment.
-#ifdef WITH_STL
- return fMotifs.size();
-#endif
-#ifdef WITH_ROOT
return fMotifs.GetEntriesFast();
-#endif
}
//______________________________________________________________________________
{
/// Return the i-th motif present in this row segment.
-#ifdef WITH_STL
- return fMotifs[i];
-#endif
-#ifdef WITH_ROOT
return (AliMpVMotif*)fMotifs[i];
-#endif
}
//______________________________________________________________________________
#ifndef ALI_MP_V_ROW_SEGMENT_SPECIAL_H
#define ALI_MP_V_ROW_SEGMENT_SPECIAL_H
-#include "AliMpContainers.h"
-
#include "AliMpVRowSegment.h"
#include "AliMpVMotif.h"
#include <TVector2.h>
-#ifdef WITH_ROOT
#include <TArrayI.h>
#include <TObjArray.h>
-#endif
-
-#ifdef WITH_STL
-#include <vector>
-#endif
class AliMpRow;
class AliMpPadRow;
class AliMpVRowSegmentSpecial : public AliMpVRowSegment
{
- public:
-#ifdef WITH_STL
- /// Pad row vector type
- typedef std::vector<AliMpPadRow*> PadRowVector;
- /// Motif vector type
- typedef std::vector<AliMpVMotif*> MotifVector;
- /// Motif position Id vector type
- typedef std::vector<Int_t> MotifPositionIdVector;
-#endif
-#ifdef WITH_ROOT
- /// Pad row vector type
- typedef TObjArray PadRowVector;
- /// Motif vector type
- typedef TObjArray MotifVector;
- /// Motif position Id vector type
- typedef TArrayI MotifPositionIdVector;
-#endif
-
public:
AliMpVRowSegmentSpecial(AliMpRow* row, Double_t offsetX);
AliMpVRowSegmentSpecial();
/// Not implemented
AliMpVRowSegmentSpecial& operator = (const AliMpVRowSegmentSpecial& right);
-#ifdef WITH_ROOT
// static data members
static const Int_t fgkMaxNofMotifPositionIds; ///< dimension of fMotifPositionIds
-#endif
// data members
- AliMpRow* fRow; ///< the row containing this segment
- Double_t fOffsetX; ///< \brief the x position of the border that touches a standard
- /// row segment
- PadRowVector fPadRows; ///< pad rows vector
- MotifVector fMotifs; ///< motifs vector
- MotifPositionIdVector fMotifPositionIds; ///< motifs position Ids vector
-
-#ifdef WITH_ROOT
- Int_t fNofMotifPositionIds; ///< number of motif positions Ids
-#endif
+ AliMpRow* fRow; ///< the row containing this segment
+ Double_t fOffsetX; ///< \brief the x position of the border that touches a standard
+ /// row segment
+ TObjArray fPadRows; ///< pad rows vector
+ TObjArray fMotifs; ///< motifs vector
+ TArrayI fMotifPositionIds; ///< motifs position Ids vector
+ Int_t fNofMotifPositionIds; ///< number of motif positions Ids
ClassDef(AliMpVRowSegmentSpecial,1) //Row segment
};
{
/// Add row segment.
-#ifdef WITH_STL
- fSubZones.push_back(subZone);
-#endif
-
-#ifdef WITH_ROOT
fSubZones.Add(subZone);
-#endif
}
//_____________________________________________________________________________
{
/// Return number of row segments.
-#ifdef WITH_STL
- return fSubZones.size();
-#endif
-
-#ifdef WITH_ROOT
return fSubZones.GetEntriesFast();
-#endif
}
//_____________________________________________________________________________
return 0;
}
-#ifdef WITH_STL
- return fSubZones[i];
-#endif
-
-#ifdef WITH_ROOT
return (AliMpSubZone*)fSubZones[i];
-#endif
}
#define ALI_MP_ZONE_H
#include <TObject.h>
-
-#include "AliMpContainers.h"
-
#include <TVector2.h>
-#ifdef WITH_ROOT
#include <TObjArray.h>
-#endif
-
-#ifdef WITH_STL
-#include <vector>
-#endif
class AliMpSubZone;
class AliMpVMotif;
class AliMpZone : public TObject
{
- public:
-#ifdef WITH_STL
- /// Sub zone vector type
- typedef std::vector<AliMpSubZone*> SubZoneVector;
-#endif
-#ifdef WITH_ROOT
- /// Sub zone vector type
- typedef TObjArray SubZoneVector;
-#endif
-
public:
AliMpZone(Int_t id);
AliMpZone();
private:
// data members
UInt_t fID; ///< ID
- SubZoneVector fSubZones; ///< subzones
+ TObjArray fSubZones; ///< subzones
TVector2 fPadDimensions;///< pad dimensions
ClassDef(AliMpZone,1) // Zone