/*
$Log$
+Revision 1.66 2003/02/11 16:54:07 hristov
+Updated AliTrackReference class (S.Radomski)
+
Revision 1.65 2002/11/21 22:43:32 alibrary
Removing AliMC and AliMCProcess
}
+
+////////////////////////////////////////////////////////////////////////
+AliTPCParam* AliTPC::LoadTPCParam(TFile *file) {
+//
+// load TPC paarmeters from a given file or create new if the object
+// is not found there
+//
+ char paramName[50];
+ sprintf(paramName,"75x40_100x60_150x60");
+ AliTPCParam *paramTPC=(AliTPCParam*)file->Get(paramName);
+ if (paramTPC) {
+ cout<<"TPC parameters "<<paramName<<" found."<<endl;
+ } else {
+ cerr<<"TPC parameters not found. Create new (they may be incorrect)."
+ <<endl;
+ paramTPC = new AliTPCParamSR;
+ }
+ return paramTPC;
+
+// the older version of parameters can be accessed with this code.
+// In some cases, we have old parameters saved in the file but
+// digits were created with new parameters, it can be distinguish
+// by the name of TPC TreeD. The code here is just for the case
+// we would need to compare with old data, uncomment it if needed.
+//
+// char paramName[50];
+// sprintf(paramName,"75x40_100x60");
+// AliTPCParam *paramTPC=(AliTPCParam*)in->Get(paramName);
+// if (paramTPC) {
+// cout<<"TPC parameters "<<paramName<<" found."<<endl;
+// } else {
+// sprintf(paramName,"75x40_100x60_150x60");
+// paramTPC=(AliTPCParam*)in->Get(paramName);
+// if (paramTPC) {
+// cout<<"TPC parameters "<<paramName<<" found."<<endl;
+// } else {
+// cerr<<"TPC parameters not found. Create new (they may be incorrect)."
+// <<endl;
+// paramTPC = new AliTPCParamSR;
+// }
+// }
+// return paramTPC;
+
+}
+
void SetActiveSectors(Int_t * sectors, Int_t n); //set active sectors
Int_t GetHitType(){return fHitType;}
void SetActiveSectors(Int_t flag=0); //loop over al hits and set active only hitted sectors
-private:
+
+// static functions
+ static AliTPCParam* LoadTPCParam(TFile *file);
+
+ private:
//
Bool_t TrackInVolume(Int_t id,Int_t track); //return true if current track is in volume
void SetDefaults();
Int_t fCurrentNoise; //!index of the noise in the noise table
Bool_t* fActiveSectors; //!bool indicating which sectors are active
- ClassDef(AliTPC,8) // Time Projection Chamber class
+ ClassDef(AliTPC,9) // Time Projection Chamber class
};