// Method to process=analyze one event in the data stream
if (!in) return kFALSE; //Return right away if there's a null pointer
- in->SetOldRCUFormat(kTRUE);
-
int sample, i = 0; //The sample temp, and the sample number in current event.
int max = fgkSampleMin, min = fgkSampleMax;//Use these for picking the pedestal
int gain = 0;
//-----------------------------------------------------------------------------
AliEMCALCalibHistoProducer::AliEMCALCalibHistoProducer(AliRawReader* rawReader) :
TObject(),fRawReader(rawReader),fHistoFile(0),fHistoFileName("calibEmcHisto.root"),
- fUpdatingRate(100),fIsOldRCUFormat(kFALSE), fNSuperModules(12), fNCellsEta (48),
+ fUpdatingRate(100), fNSuperModules(12), fNCellsEta (48),
fNCellsPhi(24), fNCellsPhiHalfSM(12)
{
// Constructor
//-----------------------------------------------------------------------------
AliEMCALCalibHistoProducer::AliEMCALCalibHistoProducer() :
fRawReader(0x0),fHistoFile(0),fHistoFileName(""),
- fUpdatingRate(0),fIsOldRCUFormat(kFALSE), fNSuperModules(12), fNCellsEta (48),
+ fUpdatingRate(0), fNSuperModules(12), fNCellsEta (48),
fNCellsPhi(24), fNCellsPhiHalfSM(12)
{
// default Constructor
AliEMCALCalibHistoProducer::AliEMCALCalibHistoProducer(const AliEMCALCalibHistoProducer & copy) :
TObject(copy),fRawReader((AliRawReader*)copy. fRawReader->Clone()),
fHistoFile((TFile*)copy.fHistoFile->Clone()),fHistoFileName(copy.fHistoFileName),
- fUpdatingRate(copy.fUpdatingRate),fIsOldRCUFormat(copy.fIsOldRCUFormat),
+ fUpdatingRate(copy.fUpdatingRate),
fNSuperModules(copy.fNSuperModules), fNCellsEta (copy.fNCellsEta),
fNCellsPhi(copy.fNCellsPhi), fNCellsPhiHalfSM(copy.fNCellsPhiHalfSM)
{
TObject::operator=(copy);
fHistoFileName = copy.fHistoFileName;
fUpdatingRate = copy.fUpdatingRate;
- fIsOldRCUFormat = copy.fIsOldRCUFormat;
fNSuperModules = copy.fNSuperModules;
fNCellsEta = copy.fNCellsEta;
fNCellsPhi = copy.fNCellsPhi;
Int_t nEvtBins = 1000; //Total number of the profile survey bins.
AliCaloRawStream in(fRawReader,"EMCAL");
- if(fIsOldRCUFormat)
- in.SetOldRCUFormat(kTRUE);
// Read raw data event by event
void Run();
void UpdateHistoFile();
void SetUpdatingRate(Int_t rate) {fUpdatingRate = rate;}
- void SetOldRCUFormat(Bool_t isOldRCUFormat) { fIsOldRCUFormat = isOldRCUFormat; }
void SetCalibHistoFileName(Int_t name) {fHistoFileName = name;}
void SetSMInstalled(Int_t nsm, Bool_t bsm) {fSMInstalled[nsm] = bsm;}
TFile* fHistoFile; // root file to store histograms in
TString fHistoFileName; // name of root file to store histograms in
Int_t fUpdatingRate; // update rate
- Bool_t fIsOldRCUFormat; // Old RCU format flag.
Int_t fNSuperModules; //Number of SuperModules;
Int_t fNCellsEta; //Number of Cells in Eta in a SuperModule;
Int_t fNCellsPhi; //Number of Cells in Phi in a SuperModule;
Int_t fNCellsPhiHalfSM; //Number of Cells in Phi in a Half SuperModule;
Bool_t fSMInstalled[12]; //Check which detectors are on.
- ClassDef(AliEMCALCalibHistoProducer,1)
+ ClassDef(AliEMCALCalibHistoProducer,2)
};
// Select EMCAL DDL's;
reader->Select("EMCAL");
- TString option = GetOption();
- if (option.Contains("OldRCUFormat"))
- in.SetOldRCUFormat(kTRUE); // Needed for testbeam data
- else
- in.SetOldRCUFormat(kFALSE);
-
//Updated fitting routine from 2007 beam test takes into account
//possibility of two peaks in data and selects first one for fitting
//Also sets some of the starting parameters based on the shape of the
AliRawReader *rawReader = new AliRawReaderDate(argv[i]);
AliCaloRawStream *in = new AliCaloRawStream(rawReader,"EMCAL");
- in->SetOldRCUFormat(kTRUE);
AliRawEventHeaderBase *aliHeader=NULL;
/* read until EOF */
printf("Now loading event %d\n", fEvent);
fReader->Reset();
AliTPCRawStream input(fReader);
- input.SetOldRCUFormat(kTRUE);
fReader->Select("TPC");
fData->DropAllSectors();
gMemReader->Reset();
AliTPCRawStream tpcStream( gMemReader );
- tpcStream.SetOldRCUFormat(kTRUE);
gMemReader->Select("TPC");
gTPCData->LoadRaw( tpcStream, kTRUE, kTRUE );
printf("Now loading event %d\n", event);
reader->Reset();
AliTPCRawStream input(reader);
- input.SetOldRCUFormat(kTRUE);
reader->Select("TPC"); // ("TPC", firstRCU, lastRCU);
x->DropAllSectors();
reader->Reset();
AliTPCRawStream input(reader);
- input.SetOldRCUFormat(kTRUE);
// reader->Select(0, firstRCU, lastRCU);
Int_t sector = input.GetSector();
fFixedMaxStrip(0),
fFixedPulseGain(0),
fEdepMip(0),
- fHasRcuTrailer(kTRUE),
fHasCompleteHeader(kTRUE),
fZeroSuppression(0),
fSampleRate(0),
@param min Minimum strip number (0-127).
@param max Maximum strip number (0-127). */
void SetStripRange(UShort_t min=0, UShort_t max=127);
- /** Whether raw data is in the old ALTRO format (i.e., no RCU
- trailer), or in the new format (with a trailer).
- @param yes if true the raw data has RCU trailer */
- void UseRcuTrailer(Bool_t yes=kTRUE) { fHasRcuTrailer = yes; }
/** Whether raw data has full common data header (8 32bit words) or
the older invalid format (7 32bit words with bogus entries)
@param yes if true the raw data has complete data header */
@return Get the map that translates hardware to detector
coordinates */
AliFMDAltroMapping* GetAltroMap() const;
- /** Whether raw data is in the old ALTRO format (i.e., no RCU
- trailer), or in the new format (with a trailer).
- @return false if the raw data has no RCU trailer */
- Bool_t HasRcuTrailer() const { return fHasRcuTrailer; }
/** Whether raw data has full common data header (8 32bit words) or
the older invalid format (7 32bit words with bogus entries)
@return false if the raw data has incomplete data header */
fFixedMaxStrip(o.fFixedMaxStrip),
fFixedPulseGain(o.fFixedPulseGain),
fEdepMip(o.fEdepMip),
- fHasRcuTrailer(o.fHasRcuTrailer),
fHasCompleteHeader(o.fHasCompleteHeader),
fZeroSuppression(o.fZeroSuppression),
fSampleRate(o.fSampleRate),
UShort_t fFixedMaxStrip; // Maximum strip read-out
mutable Float_t fFixedPulseGain; //! Gain (cached)
mutable Float_t fEdepMip; //! Cache of energy loss for a MIP
- Bool_t fHasRcuTrailer; // if the raw data has RCU trailer
Bool_t fHasCompleteHeader; // raw data has incomplete data header
static const char* fkPedestalShuttleID; // Shuttle/preprocessor ID for pedestals
AliFMDAltroMapping* fAltroMap; // Map of hardware
AliFMDCalibStripRange* fStripRange; // Strip range
- ClassDef(AliFMDParameters,5) // Manager of parameters
+ ClassDef(AliFMDParameters,6) // Manager of parameters
};
#endif
// Get sample rate
AliFMDParameters* pars = AliFMDParameters::Instance();
AliFMDRawStream input(fReader);
- AliFMDDebug(5, ("Setting old RCU format and 7 word headers"));
- input.SetOldRCUFormat(!pars->HasRcuTrailer());
+ AliFMDDebug(5, ("Setting 7 word headers"));
input.SetShortDataHeader(!pars->HasCompleteHeader());
UShort_t stripMin = 0;
Bool_t old = kTRUE;
AliFMDParameters::Instance()->Init(kFALSE,0);
- AliFMDParameters::Instance()->UseRcuTrailer(!old);
AliFMDParameters::Instance()->UseCompleteHeader(!old);
AliRawReader *reader = 0;
Bool_t old = kTRUE;
AliFMDParameters::Instance()->Init(kFALSE,0);
- AliFMDParameters::Instance()->UseRcuTrailer(!old);
//This will only work for FDR 1 data. When newer data becomes available the ! must be removed!
AliFMDParameters::Instance()->UseCompleteHeader(!old);
AliFMDParameters::Instance()->Init(kFALSE,0);
- AliFMDParameters::Instance()->UseRcuTrailer(!old);
AliFMDParameters::Instance()->UseCompleteHeader(old);
AliRawReader *reader = 0;
fRawReader(NULL),
fRawStream(NULL),
fCalibCE(NULL),
- fRCUFormat(kFALSE),
fMinPatch(5),
fMaxPatch(0),
fSpecification(0) ,
else {
parameter = argv[1];
if ( parameter.CompareTo("old") == 0 ) {
- fRCUFormat = kTRUE;
HLTInfo( "RCU Format is set to old." );
}
else if ( parameter.CompareTo("new") == 0 ) {
- fRCUFormat = kFALSE;
HLTInfo( "RCU Format is set to new." );
}
else {
fRawReader->SetEquipmentID(ddlId);
fRawStream = new AliTPCRawStream( fRawReader );
- fRawStream->SetOldRCUFormat( fRCUFormat );
// ** Process actual Pedestal Calibration - Fill histograms
fCalibCE->ProcessEvent( fRawStream );
* interface. The output is the class AliTPCCalibCE as a TObject.
*
* The component has the following component arguments:
- * -rcuformat <old/new> : Whether to use old or new rcuformat ( default is new )
* -enableanalysis : Whether to enable analyis before shipping data to FXS
*
* @ingroup alihlt_tpc_components
/** Pedestal Calibration class */
AliTPCCalibCE * fCalibCE; //!transient
- /** Wether to use old RCU format */
- Bool_t fRCUFormat; // see above
-
/** Minimum patch specifcation for this component */
AliHLTUInt8_t fMinPatch; // see above
/** Analysze calibration data before shipping to FXS */
Bool_t fEnableAnalysis; // see above
- ClassDef(AliHLTTPCCalibCEComponent, 1)
+ ClassDef(AliHLTTPCCalibCEComponent, 2)
};
#endif
fRawReader(NULL),
fRawStream(NULL),
fCalibPedestal(NULL),
- fRCUFormat(kFALSE),
fMinPatch(5),
fMaxPatch(0),
fSpecification(0) ,
else {
parameter = argv[1];
if ( parameter.CompareTo("old") == 0 ) {
- fRCUFormat = kTRUE;
HLTInfo( "RCU Format is set to old." );
}
else if ( parameter.CompareTo("new") == 0 ) {
- fRCUFormat = kFALSE;
HLTInfo( "RCU Format is set to new." );
}
else {
return 0;
}
-/*
- * --- setter for rcuformat need in AliTPCCalibPedestal class
- */
Int_t AliHLTTPCCalibPedestalComponent::ProcessCalibration( const AliHLTComponentEventData& /*evtData*/,
AliHLTComponentTriggerData& /*trigData*/ ) {
// see header file for class documentation
fRawReader->SetEquipmentID(ddlId);
fRawStream = new AliTPCRawStream( fRawReader );
- fRawStream->SetOldRCUFormat( fRCUFormat );
// ** Process actual Pedestal Calibration - Fill histograms
fCalibPedestal->ProcessEvent( fRawStream );
/** Pedestal Calibration class */
AliTPCCalibPedestal * fCalibPedestal; //!transient
-
- /** Wether to use old RCU format */
- Bool_t fRCUFormat; // see above
/** Minimum patch specifcation for this component */
AliHLTUInt8_t fMinPatch; // see above
/** Analysze calibration data before shipping to FXS */
Bool_t fEnableAnalysis; // see above
- ClassDef(AliHLTTPCCalibPedestalComponent, 1)
+ ClassDef(AliHLTTPCCalibPedestalComponent, 2)
};
#endif
fRawReader(NULL),
fRawStream(NULL),
fCalibPulser(NULL),
- fRCUFormat(kFALSE),
fMinPatch(5),
fMaxPatch(0),
fSpecification(0) ,
else {
parameter = argv[1];
if ( parameter.CompareTo("old") == 0 ) {
- fRCUFormat = kTRUE;
HLTInfo( "RCU Format is set to old." );
}
else if ( parameter.CompareTo("new") == 0 ) {
- fRCUFormat = kFALSE;
HLTInfo( "RCU Format is set to new." );
}
else {
return 0;
}
-/*
- * --- setter for rcuformat need in AliTPCCalibPulser class
- */
Int_t AliHLTTPCCalibPulserComponent::ProcessCalibration( const AliHLTComponentEventData& /*evtData*/,
AliHLTComponentTriggerData& /*trigData*/ ) {
// see header file for class documentation
fRawReader->SetEquipmentID(ddlId);
fRawStream = new AliTPCRawStream( fRawReader );
- fRawStream->SetOldRCUFormat( fRCUFormat );
#ifndef HAVE_NOT_ALITPCCALIBPULSER
// ** Process actual Pulser Calibration - Fill histograms
* interface. The output is the class AliTPCCalibPulser as a TObject.
*
* The component has the following component arguments:
- * -rcuformat <old/new> : Wether to use old or new rcuformat ( default is new )
* -enableanalysis : Wether to enable analyis before shipping data to FXS
*
* @ingroup alihlt_tpc_components
/** Pulser Calibration class */
AliTPCCalibPulser * fCalibPulser; //!transient
- /** Wether to use old RCU format */
- Bool_t fRCUFormat; // see above
-
/** Minimum patch specifcation for this component */
AliHLTUInt8_t fMinPatch; // see above
fNTimeBins(0),
fData(NULL),
//#endif // ENABLE_PAD_SORTING
- fOldRCUFormat(kFALSE),
fUnsorted(kFALSE)
{
fRawMemoryReader = new AliRawReaderMemory;
fRawMemoryReader->SetEquipmentID(DDLid);
//fRawMemoryReader->SetEquipmentID(1);
- if(fOldRCUFormat) {
- fTPCRawStream->SetOldRCUFormat(kTRUE);
- HLTInfo("set old RCU format (1 trailer word: 40bit payload)");
- }
fRawMemoryReader->RewindEvents();
fRawMemoryReader->NextEvent();
* @param slice sector no (0 to 35)
*/
Int_t InitBlock(void* ptr,ULong_t size, Int_t patch, Int_t slice);
- void SetOldRCUFormat(bool oldrcuformat){fOldRCUFormat=oldrcuformat;}
void SetUnsorted(bool unsorted){fUnsorted=unsorted;}
Bool_t NextSignal();
Int_t GetRow();
Int_t *fData; //!transient
//#endif // ENABLE_PAD_SORTING
- Bool_t fOldRCUFormat; //!transient
Bool_t fUnsorted; //!transient
- ClassDef(AliHLTTPCDigitReaderPacked, 1)
+ ClassDef(AliHLTTPCDigitReaderPacked, 2)
};
//-----------------------------------------------------------------------------
AliPHOSCalibHistoProducer::AliPHOSCalibHistoProducer() :
- fRawDecoder(0),fHistoFile(0),fUpdatingRate(100),fIsOldRCUFormat(kFALSE),
+ fRawDecoder(0),fHistoFile(0),fUpdatingRate(100),
fEvents(0),fNbins(100),fXlow(0.),fXup(1000.)
{
// Constructor: initializes data members
//-----------------------------------------------------------------------------
AliPHOSCalibHistoProducer::AliPHOSCalibHistoProducer(Int_t nbinsx, Double_t xlow, Double_t xup) :
- fRawDecoder(0),fHistoFile(0),fUpdatingRate(100),fIsOldRCUFormat(kFALSE),
+ fRawDecoder(0),fHistoFile(0),fUpdatingRate(100),
fEvents(0),fNbins(nbinsx),fXlow(xlow),fXup(xup)
{
// Constructor: initializes data members.
//-----------------------------------------------------------------------------
AliPHOSCalibHistoProducer::AliPHOSCalibHistoProducer(const AliPHOSCalibHistoProducer &histoproducer) :
TObject(histoproducer),fRawDecoder(histoproducer.fRawDecoder),fHistoFile(histoproducer.fHistoFile),
- fUpdatingRate(histoproducer.fUpdatingRate),fIsOldRCUFormat(histoproducer.fIsOldRCUFormat),
+ fUpdatingRate(histoproducer.fUpdatingRate),
fEvents(histoproducer.fEvents),fNbins(histoproducer.fNbins),fXlow(histoproducer.fXlow),fXup(histoproducer.fXup)
{
//Copy constructor.
fRawDecoder = histoproducer.fRawDecoder;
fHistoFile = histoproducer.fHistoFile;
fUpdatingRate = histoproducer.fUpdatingRate;
- fIsOldRCUFormat = histoproducer.fIsOldRCUFormat;
fEvents = histoproducer.fEvents;
fEvents = histoproducer.fEvents;
fNbins = histoproducer.fNbins;
Double_t energy;
Int_t mod,col,row;
- if(fIsOldRCUFormat)
- fRawDecoder->SetOldRCUFormat(kTRUE);
-
while(fRawDecoder->NextDigit()) {
if(fRawDecoder->IsLowGain()) continue;
void Run();
void UpdateHistoFile();
void SetUpdatingRate(Int_t rate) {fUpdatingRate = rate;}
- void SetOldRCUFormat(Bool_t isOldRCUFormat) { fIsOldRCUFormat = isOldRCUFormat; }
void SetRawDecoder(AliPHOSRawDecoder* decoder) { fRawDecoder = decoder; }
protected:
AliPHOSRawDecoder* fRawDecoder; // raw data decoder.
TFile* fHistoFile; // root file to store histograms in
Int_t fUpdatingRate; // update rate
- Bool_t fIsOldRCUFormat; // Old RCU format flag.
Int_t fEvents;
Int_t fNbins; // Number of bins in histograms.
Double_t fXlow; // Low X in histograms.
Double_t fXup; // High X in histograms.
- ClassDef(AliPHOSCalibHistoProducer,1)
+ ClassDef(AliPHOSCalibHistoProducer,2)
};
const Int_t modMax = 5 ;
rawReader->Reset() ;
AliPHOSRawDecoder decoder(rawReader);
- decoder.SetOldRCUFormat (AliPHOSReconstructor::GetRecoParamEmc()->IsOldRCUFormat());
decoder.SubtractPedestals(AliPHOSReconstructor::GetRecoParamEmc()->SubtractPedestals());
Int_t count = 0 ;
while (decoder.NextDigit()) {
decoder=new AliPHOSRawDecoderv2(rawReader);
else
decoder=new AliPHOSRawDecoder(rawReader);
- decoder->SetOldRCUFormat (AliPHOSReconstructor::GetRecoParamEmc()->IsOldRCUFormat());
decoder->SubtractPedestals(AliPHOSReconstructor::GetRecoParamEmc()->SubtractPedestals());
Double_t lgEtot=0. ;
Double_t hgEtot=0. ;
// AliRawReader* rf = new AliRawReaderDate("2006run2211.raw");
// AliPHOSRawDecoder dc(rf);
// while (rf->NextEvent()) {
-// dc.SetOldRCUFormat(kTRUE);
// dc.SubtractPedestals(kTRUE);
// while ( dc.NextDigit() ) {
// Int_t module = dc.GetModule();
fRawReader = rawReader;
fCaloStream = new AliCaloRawStream(rawReader,"PHOS",mapping);
- fCaloStream->SetOldRCUFormat(kFALSE);
fSamples = new TArrayI(100);
fTimes = new TArrayI(100);
}
virtual Bool_t NextDigit();
- void SetOldRCUFormat(Bool_t isOldRCU) {fCaloStream->SetOldRCUFormat(isOldRCU);}
void SubtractPedestals(Bool_t subtract) {fPedSubtract=subtract;}
const Double_t GetEnergy() const { return fEnergy; }
// AliRawReader* rf = new AliRawReaderDate("2006run2211.raw");
// AliPHOSRawDecoder dc(rf);
// while (rf->NextEvent()) {
-// dc.SetOldRCUFormat(kTRUE);
// dc.SubtractPedestals(kTRUE);
// while ( dc.NextDigit() ) {
// Int_t module = dc.GetModule();
// AliRawReader* rf = new AliRawReaderDate("2006run2211.raw");
// AliPHOSRawDecoder dc(rf);
// while (rf->NextEvent()) {
-// dc.SetOldRCUFormat(kTRUE);
// dc.SubtractPedestals(kTRUE);
// while ( dc.NextDigit() ) {
// Int_t module = dc.GetModule();
fSampleQualityCut(1.),
fSubtractPedestals(kTRUE),
fUnfold(kTRUE),
- fOldRCUFormat(kFALSE),
fDecoderVersion("")
{
//Default constructor.
fSampleQualityCut(1.),
fSubtractPedestals(kTRUE),
fUnfold(kTRUE),
- fOldRCUFormat(kFALSE),
fDecoderVersion("")
{
//Copy constructor.
fSampleQualityCut = recoParam.fSampleQualityCut ;
fSubtractPedestals = recoParam.fSubtractPedestals;
fUnfold = recoParam.fUnfold;
- fOldRCUFormat = recoParam.fOldRCUFormat;
fDecoderVersion = recoParam.fDecoderVersion ;
}
Float_t GetSampleQualityCut() const { return fSampleQualityCut; }
Bool_t SubtractPedestals() const { return fSubtractPedestals; }
Bool_t ToUnfold() const { return fUnfold; }
- Bool_t IsOldRCUFormat() const { return fOldRCUFormat; }
const char* DecoderVersion() const { return fDecoderVersion.Data();}
void SetClusteringThreshold(Float_t cluth) { fClusteringThreshold=cluth; }
void SetSubtractPedestals(Bool_t subtract) { fSubtractPedestals =subtract;}
void SetDecoderVersion(const char* version="v1"){fDecoderVersion =version ;}
void SetUnfolding(Bool_t toUnfold=kFALSE) {fUnfold =toUnfold;}
- void SetOldRCUFormat(Bool_t oldRCU = kTRUE) {fOldRCUFormat =oldRCU; }
protected:
Float_t fSampleQualityCut;
Bool_t fSubtractPedestals;
Bool_t fUnfold;
- Bool_t fOldRCUFormat; // kTRUE if RCU has old firmware (2006-2007)
TString fDecoderVersion ;
- ClassDef(AliPHOSRecoParam,2)
+ ClassDef(AliPHOSRecoParam,3)
};
#endif
else
dc=new AliPHOSRawDecoder(rawReader,mapping);
- dc->SetOldRCUFormat(fgkRecoParamEmc->IsOldRCUFormat());
-
dc->SubtractPedestals(fgkRecoParamEmc->SubtractPedestals());
TClonesArray *digits = new TClonesArray("AliPHOSDigit",1);
AliRawReader *rawReader = NULL;
AliPHOSCalibHistoProducer hp(200,0.,200.);
- hp.SetOldRCUFormat(kTRUE);
hp.SetUpdatingRate(200000);
/* main loop (infinite) */
rawReader = new AliRawReaderDate((void*)event);
AliPHOSRawDecoderv1 dc(rawReader,mapping);
dc.SubtractPedestals(kTRUE);
- dc.SetOldRCUFormat(kTRUE);
while(dc.NextDigit()) {
rawReader = new AliRawReaderDate((void*)event);
AliPHOSRawDecoderv1 dc(rawReader,mapping);
dc.SubtractPedestals(kTRUE);
- dc.SetOldRCUFormat(kTRUE);
while(dc.NextDigit()) {
// Loas the raw data for corresponding DDLs
rawReader->Reset();
- tpcRawStream->SetOldRCUFormat(kTRUE);
rawReader->Select("TPC",indexDDL,indexDDL+nDDLs-1);
AliDebug(AliLog::kDebug, Form("Selected DDLs %d ... %d", indexDDL, indexDDL+nDDLs-1));
// Now the RCU identifier and size of the trailer
// FOr the moment the triler size is 2 32-bit words
- UInt_t buffer = 2;
- buffer |= ((rcuId & 0x3FF) << 22);
+ UInt_t buffer = (2 & 0x7F);
+ buffer |= ((rcuId & 0x1FF) << 7);
+ buffer |= 0xAAAA << 16;
fFile->WriteBuffer((char *)(&buffer),sizeof(UInt_t));
}
//_____________________________________________________________________________
AliAltroRawStream::AliAltroRawStream(AliRawReader* rawReader) :
fNoAltroMapping(kTRUE),
- fIsOldRCUFormat(kFALSE),
fIsShortDataHeader(kFALSE),
fDDLNumber(-1),
fPrevDDLNumber(-1),
AliAltroRawStream::AliAltroRawStream(const AliAltroRawStream& stream) :
TObject(stream),
fNoAltroMapping(stream.fNoAltroMapping),
- fIsOldRCUFormat(stream.fIsOldRCUFormat),
fIsShortDataHeader(stream.fIsShortDataHeader),
fDDLNumber(stream.fDDLNumber),
fPrevDDLNumber(stream.fPrevDDLNumber),
if(&stream == this) return *this;
fNoAltroMapping = stream.fNoAltroMapping;
- fIsOldRCUFormat = stream.fIsOldRCUFormat;
fIsShortDataHeader = stream.fIsShortDataHeader;
fDDLNumber = stream.fDDLNumber;
fPrevDDLNumber = stream.fPrevDDLNumber;
// The RCU trailer format is described
// in details in the RCU manual.
- if (!fIsOldRCUFormat) {
- // First read 32-bit word with the
- // trailer size (22 bits) and RCU ID (the rest)
- Int_t index = fRawReader->GetDataSize();
- UInt_t word = Get32bitWord(index);
- fRCUId = (Int_t)(word >> 22);
- Int_t trailerSize = (word & 0x3FFFFF);
+ // We use the last word of the payload
+ // in order to decide which RCU firmware
+ // was used during the data taking.
+ // The firmware v2 adds 0xAAAA as 16
+ // most significant bits and since the
+ // payload size (firmware v1) can not be
+ // that big, we use this as a unique
+ // label of the firmware version.
+
+ Int_t index = fRawReader->GetDataSize();
+ UInt_t word = Get32bitWord(index);
+ if (((word >> 16) == 0xaaaa) || (word == 2)) {
+ // This is RCU formware v2
+ // The statement word==2 is needed only temporary
+ // in order to be able to read previously generated
+ // aliroot raw data
+
+ Int_t trailerSize = 0;
+ if (word == 2) {
+ AliInfo("Old simulated raw data is assumed!");
+ trailerSize = 2;
+ fRCUId = 0;
+ }
+ else {
+ // First read 32-bit word with the
+ // trailer size (7 bits), RCU ID (9 bits) and
+ // 0xAAA (the rest - 16 bits)
+ fRCUId = (Int_t)((word >> 7) & 0x1ff);
+ trailerSize = (word & 0x7F);
+ }
// Now read the beginning of the trailer
// where the payload size is written
// In case of the Old RCU trailer format
// we have to read just the size of altro payload
// in units of 40-bit words
- Int_t index = fRawReader->GetDataSize();
- Int_t position = Get32bitWord(index);
+ Int_t position = (Int_t)word;
fRCUId = -1;
fRCUTrailerSize = 0;
///
/// This is a base class for reading raw data digits in Altro format
/// The class is able to read both old and new RCU trailer formats
-/// One can switch between formats using fIsOldRCUFormat flag.
+/// Switch between formats is done automatically using the last payload word.
/// In case the Common Data Header is 7 32-bit words long, one
/// can use the fIsShortDataHeader flag.
///
void SelectRawData(const char *detName); // Select raw data for specific detector name
void SetNoAltroMapping(Bool_t flag) { fNoAltroMapping = flag; } // Specify whenever to use or not the altro mapping
- void SetOldRCUFormat(Bool_t flag) { fIsOldRCUFormat = flag; } // Specify whenever to use or not the old RCU trailer format
void SetShortDataHeader(Bool_t flag) { fIsShortDataHeader = flag; } // Specify whenever to assume or not a short CDH format
void PrintDebug() const; // Print debug information in case of decoding errors
Bool_t fNoAltroMapping; // temporary flag in case of no altro mapping is provided
Short_t fSegmentation[3]; // temporary container for the dummy trailer, to be removed
- Bool_t fIsOldRCUFormat; // flag used to select between old and new RCU trailer format
Bool_t fIsShortDataHeader; // flag used to select between normal and short CDH format
private :
fXminRMS(0.1),
fXmaxRMS(5.1),
fLastSector(-1),
- fOldRCUformat(kTRUE),
fROC(AliTPCROC::Instance()),
fMapping(NULL),
fParam(new AliTPCParam),
fXminRMS(sig.fXminRMS),
fXmaxRMS(sig.fXmaxRMS),
fLastSector(-1),
- fOldRCUformat(kTRUE),
fROC(AliTPCROC::Instance()),
fMapping(NULL),
fParam(new AliTPCParam),
// The Function 'SetTimeStamp' should be called for each event to set the event time stamp!!!
//
- rawStream->SetOldRCUFormat(fOldRCUformat);
-
ResetEvent();
Bool_t withInput = kFALSE;
void SetEventInfo(Double_t runNumber, Double_t timestamp, Double_t eventId){ fRunNumber=runNumber; fTimeStamp=timestamp; fEventId=eventId;}
- void SetOldRCUformat(Bool_t format=kTRUE){ fOldRCUformat = format; }
-
void SetDebugLevel(Short_t debug=1){ fDebugLevel = debug;}
void SetPedestalDatabase(AliTPCCalPad *pedestalTPC, AliTPCCalPad *padNoiseTPC) {fPedestalTPC = pedestalTPC; fPadNoiseTPC = padNoiseTPC;}
Int_t fLastSector; //! Last sector processed
- Bool_t fOldRCUformat; //! Should we use the old RCU format for data reading
AliTPCROC *fROC; //! ROC information
AliTPCAltroMapping **fMapping; //! Altro Mapping object
TVectorF* GetPadRMSEvent(Int_t sector, Bool_t force=kFALSE);
TVectorF* GetPadPedestalEvent(Int_t sector, Bool_t force=kFALSE);
- ClassDef(AliTPCCalibCE,5) //Implementation of the TPC Central Electrode calibration
+ ClassDef(AliTPCCalibCE,6) //Implementation of the TPC Central Electrode calibration
};
fAdcMax(100),
fAnaMeanDown(0.),
fAnaMeanUp(1.),
- fOldRCUformat(kTRUE),
fTimeAnalysis(kFALSE),
fROC(AliTPCROC::Instance()),
fMapping(NULL),
fAdcMax(ped.GetAdcMax()),
fAnaMeanDown(ped.fAnaMeanDown),
fAnaMeanUp(ped.fAnaMeanUp),
- fOldRCUformat(ped.fOldRCUformat),
fTimeAnalysis(ped.fTimeAnalysis),
fROC(AliTPCROC::Instance()),
fMapping(NULL),
// Event Processing loop - AliTPCRawStream
//
- rawStream->SetOldRCUFormat(fOldRCUformat);
-
Bool_t withInput = kFALSE;
while (rawStream->Next()) {
void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range for the pedestal calibration
void SetAnalysisTruncationRange(Float_t down, Float_t up) {fAnaMeanDown=down; fAnaMeanUp=up;} //Set range for truncated mean analysis of the channel information
- void SetOldRCUformat(Bool_t format=kTRUE) { fOldRCUformat = format; }
-
void Merge(AliTPCCalibPedestal *ped);
Bool_t TestEvent(); // Test the fast approach to fill histogram - used for test purposes
Float_t fAnaMeanDown; // Truncated mean channel analysis - lower cut
Float_t fAnaMeanUp; // Truncated mean channel analysis - upper cut
- Bool_t fOldRCUformat; //! Should we use the old RCU format for data reading
Bool_t fTimeAnalysis; //! Should we use the time dependent analysis? ONLY ON LDC!
AliTPCROC *fROC; //! ROC information
AliTPCCalROC* GetCalRoc(Int_t sector, TObjArray* arr, Bool_t force);
public:
- ClassDef(AliTPCCalibPedestal, 5) // Implementation of the TPC pedestal and noise calibration
+ ClassDef(AliTPCCalibPedestal, 6) // Implementation of the TPC pedestal and noise calibration
};
fXminRMS(0.1),
fXmaxRMS(5.1),
fLastSector(-1),
- fOldRCUformat(kTRUE),
fROC(AliTPCROC::Instance()),
fMapping(NULL),
fParam(new AliTPCParam),
fXminRMS(sig.fXminRMS),
fXmaxRMS(sig.fXmaxRMS),
fLastSector(-1),
- fOldRCUformat(kTRUE),
fROC(AliTPCROC::Instance()),
fMapping(NULL),
fParam(new AliTPCParam),
// Event Processing loop - AliTPCRawStream
//
- rawStream->SetOldRCUFormat(fOldRCUformat);
-
ResetEvent();
Bool_t withInput = kFALSE;
void SetRangeRefT0 (Int_t nBins, Float_t xMin, Float_t xMax){ fNbinsT0 = nBins; fXminT0 = xMin; fXmaxT0 = xMax; } //Set range for T0 reference histograms
void SetRangeRefRMS(Int_t nBins, Float_t xMin, Float_t xMax){ fNbinsRMS = nBins; fXminRMS = xMin; fXmaxRMS = xMax; } //Set range for T0 reference histograms
- void SetOldRCUformat(Bool_t format=kTRUE){ fOldRCUformat = format; }
-
void SetDebugLevel(Short_t debug=1){ fDebugLevel = debug;}
void SetPedestalDatabase(AliTPCCalPad *pedestalTPC, AliTPCCalPad *padNoiseTPC) {fPedestalTPC = pedestalTPC; fPadNoiseTPC = padNoiseTPC;}
Int_t fLastSector; //! Last sector processed
- Bool_t fOldRCUformat; //! Should we use the old RCU format for data reading
AliTPCROC *fROC; //! ROC information
AliTPCAltroMapping **fMapping; //! Altro Mapping object
TVectorF* GetPadPedestalEvent(Int_t sector, Bool_t force=kFALSE);
- ClassDef(AliTPCCalibPulser,1) //Implementation of the TPC pulser calibration
+ ClassDef(AliTPCCalibPulser,2) //Implementation of the TPC pulser calibration
};
// Event Processing loop - AliTPCRawStream
//
- rawStream->SetOldRCUFormat(1);
-
ResetEvent();
Bool_t withInput = kFALSE;
TH1I *tempHis = new TH1I("tempHis","tempHis",fSample+fGateWidth,fGateWidth,fSample+fGateWidth);
TH1I *tempRMSHis = new TH1I("tempRMSHis","tempRMSHis",2000,0,2000);
- rawStream->SetOldRCUFormat(1);
-
while (rawStream->Next()) {
// in case of a new row, get sector and row number
TH1I *tempHis = new TH1I("tempHis","tempHis",fSample+fGateWidth,fGateWidth,fSample+fGateWidth);
TH1I *tempRMSHis = new TH1I("tempRMSHis","tempRMSHis",2000,0,2000);
- rawStream.SetOldRCUFormat(1);
-
TFile fileOut(nameFileOut,"UPDATE"); // Quality Parameters storage
TNtuple *qualityTuple = (TNtuple*)fileOut.Get("TCFquality");
if (!qualityTuple) { // no entry in file
void AliTPCReconstructor::Reconstruct(AliRawReader* rawReader, TTree* clustersTree) const {
// single event local reconstruction
// of TPC data starting from raw data
- TString option = GetOption();
- if (option.Contains("OldRCUFormat"))
- fClusterer->SetOldRCUFormat(kTRUE);
fClusterer->SetOutput(clustersTree);
fClusterer->Digits2Clusters(rawReader);
fParam(0),\r
fDigarr(0),\r
fRecoParam(0),\r
- fIsOldRCUFormat(kFALSE),\r
fZeroSup(2),\r
fFirstBin(60),\r
fLastBin(950),\r
fParam(0),\r
fDigarr(0),\r
fRecoParam(0),\r
- fIsOldRCUFormat(kFALSE),\r
fZeroSup(2),\r
fFirstBin(60),\r
fLastBin(950),\r
//\r
fParam = param.fParam;\r
fRecoParam = param.fRecoParam;\r
- fIsOldRCUFormat = param.fIsOldRCUFormat;\r
fRawData = param.fRawData;\r
fRowCl = param.fRowCl ;\r
fInput = param.fInput ;\r
//\r
fParam = param.fParam;\r
fRecoParam = param.fRecoParam;\r
- fIsOldRCUFormat = param.fIsOldRCUFormat;\r
fRawData = param.fRawData;\r
fRowCl = param.fRowCl ;\r
fInput = param.fInput ;\r
//\r
// Load the raw data for corresponding DDLs\r
//\r
- //fIsOldRCUFormat=kTRUE;\r
rawReader->Reset();\r
- input.SetOldRCUFormat(fIsOldRCUFormat);\r
rawReader->Select("TPC",indexDDL,indexDDL+nDDLs-1);\r
\r
if(input.Next()) {\r
}//end loop over rows\r
}\r
rawReader->Reset();\r
- input.SetOldRCUFormat(fIsOldRCUFormat);\r
rawReader->Select("TPC",indexDDL,indexDDL+nDDLs-1);\r
\r
//\r
virtual void SetParam(AliTPCParam *param){fParam=param;}//set TPC parameters
virtual void SetDigArr(AliTPCDigitsArray *digarr){fDigarr=digarr;}//set current array of digits
virtual void SetRecoParam(AliTPCRecoParam *recoParam=0);//set reconstruction parameters
- virtual void SetOldRCUFormat(Bool_t rcuFormat = kFALSE)
- { fIsOldRCUFormat = rcuFormat; };
TH1F * GetHistoTime(){return fHistoTime;}
TH2F * GetHistoRowPad(){return fHistoRowPad;}
- Bool_t GetOldRCUFormat(){return fIsOldRCUFormat;}
-
private:
Bool_t fRawData; //flag =0 for MC =1 for real data
AliTPCClustersRow * fRowCl; //! current cluster row (used in rootuple fill)
//only for raw data :)
const AliTPCRecoParam * fRecoParam; //! reconstruction parameters
- Bool_t fIsOldRCUFormat; // assume old RCU raw data format
//cluster finder parameters
Int_t fZeroSup;//zero suppresion parameter = 2 def.
TH1F *fHistoTime;//!debug histo for timebins
TH2F *fHistoRowPad;//!debug histo for rows and pads
- ClassDef(AliTPCclustererKr,4) // Time Projection Chamber Kr clusters
+ ClassDef(AliTPCclustererKr,5) // Time Projection Chamber Kr clusters
};
fPadLength(0),
fZWidth(0),
fPedSubtraction(kFALSE),
- fIsOldRCUFormat(kFALSE),
fEventHeader(0),
fTimeStamp(0),
fEventType(0),
// param - tpc parameters for given file
// recoparam - reconstruction parameters
//
- fIsOldRCUFormat = kFALSE;
fInput =0;
fParam = par;
if (recoParam) {
fPadLength(0),
fZWidth(0),
fPedSubtraction(kFALSE),
- fIsOldRCUFormat(kFALSE),
fEventHeader(0),
fTimeStamp(0),
fEventType(0),
// Loas the raw data for corresponding DDLs
rawReader->Reset();
- input.SetOldRCUFormat(fIsOldRCUFormat);
rawReader->Select("TPC",indexDDL,indexDDL+nDDLs-1);
Int_t digCounter=0;
// Begin loop over altro data
virtual ~AliTPCclustererMI();
virtual void Digits2Clusters();
virtual void Digits2Clusters(AliRawReader* rawReader);
- virtual void SetOldRCUFormat(Bool_t rcuFormat = kFALSE)
- { fIsOldRCUFormat = rcuFormat; };
virtual void SetInput(TTree * tree); // set input tree with digits
virtual void SetOutput(TTree * tree); // set output tree with
virtual void FillRow(); // fill the output container - Tree or TObjArray
Float_t fPadLength; // the width of the pad
Float_t fZWidth; //the z bin width
Bool_t fPedSubtraction; // perform pedestal subtraction or not
- Bool_t fIsOldRCUFormat; // assume old RCU raw data format
AliRawEventHeaderBase *fEventHeader; //! event header information
UInt_t fTimeStamp; // Time Stamp
UInt_t fEventType; // Event Type
TTreeSRedirector *fDebugStreamer; //!debug streamer
const AliTPCRecoParam * fRecoParam; //! reconstruction parameters
Bool_t fBDumpSignal; // dump signal flag
- ClassDef(AliTPCclustererMI,1) // Time Projection Chamber digits
+ ClassDef(AliTPCclustererMI,2) // Time Projection Chamber digits
};
inline Bool_t AliTPCclustererMI::IsMaximum(Float_t q,Int_t max,const Float_t *bins) const {
fLastTimeBin(1000),
fAdcMin(1),
fAdcMax(100),
- fOldRCUformat(kTRUE),
fMapping(NULL),
fPedestal(0),
fNoise(0),
fLastTimeBin(ped.GetLastTimeBin()),
fAdcMin(ped.GetAdcMin()),
fAdcMax(ped.GetAdcMax()),
- fOldRCUformat(ped.GetOldRCUformat()),
fMapping(NULL),
fPedestal(0),
fNoise(0),
// Event Processing loop - AliTPCRawStream
//
- rawStream->SetOldRCUFormat(fOldRCUformat);
-
Bool_t withInput = kFALSE;
Int_t nSignals = 0;
Int_t lastSector = -1;
Int_t GetAdcMin() const { return fAdcMin; }
Int_t GetAdcMax() const { return fAdcMax; }
Int_t GetEventCounter() const { return fEventCounter; }
- Bool_t GetOldRCUformat() const { return fOldRCUformat; }
Bool_t GetIsAnalysed() const { return fIsAnalysed; }
void SetRangeTime(Int_t tMin, Int_t tMax){ fFirstTimeBin=tMin; fLastTimeBin=tMax;} // Set time bin range that is used for the pedestal calibration
void SetRangeAdc (Int_t aMin, Int_t aMax){ fAdcMin=aMin; fAdcMax=aMax; } // Set adc range for the pedestal calibration
- void SetOldRCUformat(Bool_t format=kTRUE) { fOldRCUformat = format; }
private:
Int_t fLastTimeBin; // Last Time bin needed for analysis
Int_t fAdcMin; // min adc channel of pedestal value
Int_t fAdcMax; // max adc channel of pedestal value
- Bool_t fOldRCUformat; //! Should we use the old RCU format for data reading
AliTPCAltroMapping **fMapping; //! Altro Mapping object
//
public:
- ClassDef(AliTPCdataQA, 2) // Implementation of the TPC pedestal and noise calibration
+ ClassDef(AliTPCdataQA, 3) // Implementation of the TPC pedestal and noise calibration
};
//if (!param) {cerr<<"TPC parameters have not been found !\n"; return 4;}
clusters->SetParam(param);
- clusters->SetOldRCUFormat(kTRUE);
//set cluster finder parameters (from data)
clusters->SetZeroSup(param->GetZeroSup());//zero suppression parameter
rec.SetInput(filename);
rec.SetEquipmentIdMap("EquipmentIdMap.data");
rec.SetRunReconstruction("TPC");
- rec.SetOption("TPC","PedestalSubtraction OldRCUFormat");
+ rec.SetOption("TPC","PedestalSubtraction");
// rec.SetRunLocalReconstruction("");
// rec.SetRunTracking("TPC");
rec.SetFillESD("TPC");
rec.SetInput(filename);
rec.SetEquipmentIdMap("EquipmentIdMap.data");
//rec.SetRunReconstruction("TPC");
- rec.SetOption("TPC","PedestalSubtraction OldRCUFormat");
+ rec.SetOption("TPC","PedestalSubtraction");
rec.SetRunLocalReconstruction("");
rec.SetRunTracking("TPC");
rec.SetFillESD("TPC");
AliAltroRawStreamFast *sf = new AliAltroRawStreamFast(rawReader);
AliAltroRawStream *s = new AliAltroRawStream(rawReader);
- s->SetOldRCUFormat(kTRUE);
s->SetNoAltroMapping(kFALSE);
s->SelectRawData("TPC");
AliTPCRawStreamFast *sf = new AliTPCRawStreamFast(rawReader);
AliTPCRawStream *s = new AliTPCRawStream(rawReader);
- s->SetOldRCUFormat(kTRUE);
s->SetNoAltroMapping(kFALSE);
Int_t ievent = 0;