Skip to content

Commit

Permalink
Retagging v4-18-14-AN
Browse files Browse the repository at this point in the history
  • Loading branch information
hristov committed Dec 16, 2009
2 parents b00b6e4 + 3ebbf5a commit a6d03a8
Show file tree
Hide file tree
Showing 45 changed files with 1,293 additions and 272 deletions.
2 changes: 1 addition & 1 deletion ALIROOT/binaliroot.pkg
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ ELIBS:= MUONcore MUONgeometry MUONrec MUONsim MUONbase MUONtrigger MUONraw MUONc
THijing hijing \
FASTSIM microcern \
RAWDatabase RAWDatarec RAWDatasim \
HLTbase MUONevaluation TRIGGERbase
HLTbase MUONevaluation TRIGGERbase STAT
# THbtp TEPEMGEN \
# THerwig herwig TPHIC

Expand Down
2 changes: 1 addition & 1 deletion ANALYSIS/binaliengui.pkg
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ ELIBS := Aliengui \
FASTSIM microcern \
RAWDatabase RAWDatarec RAWDatasim \
HLTbase \
ANALYSIS ANALYSISalice
ANALYSIS ANALYSISalice STAT

ifeq (yes,$(CHECKXML))
PACKCXXFLAGS += $(CXXFLAGS) -DWITHXML
Expand Down
2 changes: 1 addition & 1 deletion EMCAL/AliEMCALRawUtils.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class AliEMCALDigitizer;
ClassImp(AliEMCALRawUtils)

// Signal shape parameters
Int_t AliEMCALRawUtils::fgTimeBins = 100; // number of sampling bins of the raw RO signal (we typically use 15-50; theoretical max is 1k+)
Int_t AliEMCALRawUtils::fgTimeBins = 256; // number of sampling bins of the raw RO signal (we typically use 15-50; theoretical max is 1k+)
Double_t AliEMCALRawUtils::fgTimeBinWidth = 100E-9 ; // each sample is 100 ns
Double_t AliEMCALRawUtils::fgTimeTrigger = 1.5E-6 ; // 15 time bins ~ 1.5 musec

Expand Down
6 changes: 3 additions & 3 deletions EMCAL/AliEMCALReconstructor.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ void AliEMCALReconstructor::ConvertDigits(AliRawReader* rawReader, TTree* digits
fgRawUtils->Raw2Digits(rawReader,digitsArr,fPedestalData);

digitsTree->Fill();
//digitsArr->Delete(); //Do not delete digits array are not created here.
//delete digitsArr;
digitsArr->Delete();
delete digitsArr;

}

Expand Down Expand Up @@ -448,7 +448,7 @@ void AliEMCALReconstructor::FillESD(TTree* digitsTree, TTree* clustersTree,
pid->RunPID(esd);
delete pid;

//delete digits;
delete digits;
delete clusters;

// printf(" ## AliEMCALReconstructor::FillESD() is ended : ncl %i -> %i ### \n ",nClusters, nClustersNew);
Expand Down
35 changes: 35 additions & 0 deletions EMCAL/macros/PedestalDB/map.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,38 @@ Mod - Col - Row - Dead/hot
0 27 13 1
0 27 14 1
0 27 15 1


0 4 7 2
0 20 7 2
1 4 13 2
1 7 16 2
1 19 16 2
1 19 19 2
1 31 16 2
1 40 20 2
1 43 16 2
2 14 15 2
2 18 16 2
2 18 17 2
2 18 20 2
2 18 21 2
2 18 23 2
2 19 16 2
2 19 17 2
2 19 18 2
2 19 19 2
2 19 20 2
2 19 22 2
3 4 7 2
3 5 4 2
3 5 5 2
3 5 6 2
3 5 7 2
3 18 15 2
3 19 15 2
3 31 15 2
3 31 16 2
3 43 15 2

1 1 21 2
2 changes: 1 addition & 1 deletion EVE/binalieve.pkg
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ELIBS := EveBase EveDet EveHLT \
hijing THbtp TEPEMGEN \
FASTSIM microcern \
RAWDatabase RAWDatarec RAWDatasim \
HLTbase XMLParser
HLTbase XMLParser STAT

PACKBLIBS := $(ROOTCLIBS) $(ROOTPLIBS) -lTreePlayer -lGeomPainter -lGed -lRGL -lEve $(SYSLIBS)

Expand Down
4 changes: 2 additions & 2 deletions FMD/scripts/MakeRecoParam.C
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
void
MakeRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult)
MakeRecoParam(AliRecoParam::EventSpecie_t thedefault=AliRecoParam::kLowMult)
{
AliCDBManager* cdb = AliCDBManager::Instance();
cdb->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
Expand Down Expand Up @@ -41,7 +41,7 @@ MakeRecoParam(AliRecoParam::EventSpecie_t default=AliRecoParam::kLowMult)
for(Int_t i =0; i < recoParamArray->GetEntriesFast(); i++) {
AliDetectorRecoParam *param = (AliDetectorRecoParam *)recoParamArray->UncheckedAt(i);
if (!param) continue;
if (default & param->GetEventSpecie()) {
if (thedefault & param->GetEventSpecie()) {
param->SetAsDefault();
defaultIsSet = kTRUE;
}
Expand Down
102 changes: 72 additions & 30 deletions HLT/BASE/AliHLTDataBuffer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ int AliHLTDataBuffer::AliHLTRawBuffer::operator<=(const AliHLTRawBuffer& op) con
int AliHLTDataBuffer::AliHLTRawBuffer::operator>(const AliHLTRawBuffer& op) const
{
// see header file for function documentation
return (fPtr > op.fPtr+op.fSize);
return (fPtr >= op.fPtr+op.fSize);
}

AliHLTUInt8_t* AliHLTDataBuffer::AliHLTRawBuffer::UseBuffer(AliHLTUInt32_t size)
Expand Down Expand Up @@ -916,7 +916,7 @@ void AliHLTDataBuffer::AliHLTRawBuffer::Print(const char* option)
if (strcmp(option, "min")!=0) {
cout << "************* AliHLTRawBuffer status ***********" << endl;
}
cout << " " << fPtr << " (" << fExternalPtr << ") size " << fTotalSize << " used " << fSize << endl;
printf(" %p: buffer %p%s size %d used %d\n", this, fPtr, fExternalPtr?" (external)":"", fTotalSize, fSize); fflush(stdout);
}

AliHLTDataBuffer::AliHLTRawPage::AliHLTRawPage(AliHLTUInt32_t pagesize)
Expand Down Expand Up @@ -959,20 +959,18 @@ AliHLTDataBuffer::AliHLTRawPage::~AliHLTRawPage()
AliHLTDataBuffer::AliHLTRawBuffer* AliHLTDataBuffer::AliHLTRawPage::Alloc(AliHLTUInt32_t size)
{
/// alloc a buffer of specified size
if (fFreeBuffers.size()>0) return NULL;
if (fFreeBuffers.size()==0) return NULL;

AliHLTRawBuffer* buffer=NULL;
for (AliHLTRawBufferPList::iterator iter=fFreeBuffers.begin();
iter!=fFreeBuffers.end() && buffer==NULL;
iter!=fFreeBuffers.end();
iter++) {
if ((*iter)->GetTotalSize()>=size) {
buffer=(*iter)->Split(size);
if (buffer) {
fFreeBuffers.insert(iter, buffer);
buffer=*iter;
fFreeBuffers.erase(iter);
fUsedBuffers.push_back(buffer);
return buffer;
AliHLTRawBuffer* thisbuffer=*iter;
AliHLTRawBuffer* newbuffer=thisbuffer->Split(size);
if (newbuffer) {
*iter=newbuffer;
fUsedBuffers.push_back(thisbuffer);
return thisbuffer;
} else {
HLTWarning("failed to split raw buffer %p", *iter);
}
Expand All @@ -990,55 +988,99 @@ int AliHLTDataBuffer::AliHLTRawPage::Free(AliHLTRawBuffer* pBuffer)
iter++) {
if ((*iter)==pBuffer) {
fUsedBuffers.erase(iter);
for (AliHLTRawBufferPList::iterator prev=fFreeBuffers.begin();
prev!=fFreeBuffers.end() && iResult>=0;
prev++) {
AliHLTRawBufferPList::iterator prev=fFreeBuffers.begin();
for (; prev!=fFreeBuffers.end() && iResult>=0; prev++) {
if ((*pBuffer)<(*(*prev))) {
// check consecutive buffers
if ((*(*prev)) == (pBuffer->GetPointer()+pBuffer->GetTotalSize())) {
// the buffer to be released has a consecutive free buffer -> merge them
if ((iResult=pBuffer->Merge(*(*prev)))>=0) {
fFreeBuffers.insert(prev, pBuffer);
delete *prev;
fFreeBuffers.erase(prev);
*prev=pBuffer;
}
break;
}
continue;
fFreeBuffers.insert(prev, pBuffer);
break;
}
if ((*pBuffer)>(*(*prev))) {
// check consecutive buffers
if ((*(*prev)) == ((*prev)->GetPointer()+(*prev)->GetTotalSize())) {
if ((*pBuffer) == ((*prev)->GetPointer()+(*prev)->GetTotalSize())) {
// the buffer to be released is consecutive to a free buffer -> merge them
if ((iResult=pBuffer->Merge(*(*prev)))>=0) {
fFreeBuffers.insert(prev, pBuffer);
AliHLTRawBufferPList::iterator succ=prev+1;
delete *prev;
fFreeBuffers.erase(prev);
*prev=pBuffer;
// check if the buffer and the following one are consecutive
if (succ!=fFreeBuffers.end() &&
(*(*succ)) == (pBuffer->GetPointer()+pBuffer->GetTotalSize())) {
if ((iResult=pBuffer->Merge(*(*succ)))>=0) {
delete *succ;
fFreeBuffers.erase(succ);
}
}
}
} else {
fFreeBuffers.push_back(pBuffer);
break;
}
break;
}
}
}
}
if (prev==fFreeBuffers.end()) {
fFreeBuffers.push_back(pBuffer);
}
// buffer was part of this page
return 0;
}
}
// buffer not found in this page
return 1;
}

int AliHLTDataBuffer::AliHLTRawPage::SetSize(AliHLTDataBuffer::AliHLTRawBuffer* pBuffer, AliHLTUInt32_t size)
{
/// set the size of a raw buffer and release the remaining part
int iResult=0;
for (AliHLTRawBufferPList::iterator iter=fUsedBuffers.begin();
iter!=fUsedBuffers.end() && iResult>=0;
iter++) {
if ((*iter)==pBuffer) { // buffer was part of this page
AliHLTDataBuffer::AliHLTRawBuffer* freespace=(*iter)->Split(size);
if (freespace) {
fUsedBuffers.push_back(freespace);
Free(freespace);
} else {
HLTWarning("failed to split raw buffer %p in order to relase unused memory", *iter);
}
return 0;
}
}
// buffer not found in this page
return 1;
}

AliHLTUInt32_t AliHLTDataBuffer::AliHLTRawPage::Capacity() const
{
/// get max available contiguous buffer
AliHLTUInt32_t capacity=0;
for (unsigned i=0; i<fFreeBuffers.size(); i++) {
if (fFreeBuffers[i]->GetTotalSize()>capacity)
capacity=fFreeBuffers[i]->GetTotalSize();
}
return capacity;
}

void AliHLTDataBuffer::AliHLTRawPage::Print(const char* /*option*/)
{
/// print page information
cout << "************* AliHLTRawPage status ***********" << endl;
cout << " used buffers:" << endl;
printf(" buffer %p size %d", fPtr, fSize);
cout << " used buffers: " << fUsedBuffers.size() << endl;
AliHLTRawBufferPList::iterator iter=fUsedBuffers.begin();
for (; iter!=fUsedBuffers.end(); iter++) {
cout << " "; (*iter)->Print("min");
cout << " "; (*iter)->Print("min");
}
cout << " used buffers:" << endl;
cout << " free buffers: " << fFreeBuffers.size() << endl;
iter=fFreeBuffers.begin();
for (; iter!=fFreeBuffers.end(); iter++) {
cout << " "; (*iter)->Print("min");
cout << " "; (*iter)->Print("min");
}
}
7 changes: 7 additions & 0 deletions HLT/BASE/AliHLTDataBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,13 @@ class AliHLTDataBuffer : public TObject, public AliHLTLogging
AliHLTRawBuffer* Alloc(AliHLTUInt32_t size);
/** free a buffer and merge consecutive free buffers */
int Free(AliHLTRawBuffer* pBuffer);
/** set the size of a raw buffer and release the remaining part */
int SetSize(AliHLTRawBuffer* pBuffer, AliHLTUInt32_t size);

AliHLTUInt32_t Size() const {return fSize;}
AliHLTUInt32_t Capacity() const;
bool IsUsed() const {return fUsedBuffers.size()>0;}
bool IsFragmented() const {return (fFreeBuffers.size()+fUsedBuffers.size()>0)>1;}

/**
* Print page information
Expand Down
3 changes: 2 additions & 1 deletion HLT/BASE/AliHLTMisc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Double_t AliHLTMisc::GetBz()
return 0.0;
}

Double_t AliHLTMisc::GetBz(const Double_t *r)
Double_t AliHLTMisc::GetBz(const Double_t */*r*/)
{
// default method, functionality is implemented in the child class
return 0.0;
Expand All @@ -139,6 +139,7 @@ Double_t AliHLTMisc::GetBz(const Double_t *r)
void AliHLTMisc::GetBxByBz(const Double_t r[3], Double_t b[3])
{
// default method, functionality is implemented in the child class
if (!r || !b) return;
return;
}

Expand Down
4 changes: 4 additions & 0 deletions HLT/BASE/test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ EXTRA_DIST =
check_PROGRAMS = testAliHLTBlockDataCollection \
testAliHLTComponent \
testAliHLTCTPData \
testAliHLTDataBuffer \
dtOperators \
testDefaultDataTypes

Expand All @@ -32,4 +33,7 @@ testAliHLTCTPData_SOURCES = testAliHLTCTPData.C
testAliHLTCTPData_LDADD = $(top_builddir)/BASE/libHLTbase.la \
$(top_builddir)/rec/libHLTrec.la

testAliHLTDataBuffer_SOURCES = testAliHLTDataBuffer.C
testAliHLTDataBuffer_LDADD = $(top_builddir)/BASE/libHLTbase.la

TESTS = $(check_PROGRAMS)
Loading

0 comments on commit a6d03a8

Please sign in to comment.