36 #include <AliRawReader.h>
37 #include <AliRawVEvent.h>
38 #include <AliRawData.h>
39 #include <AliRawVEquipment.h>
40 #include <AliRawEquipmentHeader.h>
43 #include <AliRawDataHeader.h>
44 #include <AliRawDataHeaderV3.h>
63 fChannelShort(Channel),
78 fBSL1ValuePeDestal(0),
96 fBSL2HighThreshold(0),
104 fZSUMinSamplesaboveThreshold(0),
111 fDDLFolderName("./"),
112 fOutputDateFileName("./tmpRaw.date"),
113 fOutputRootFileName("./tmpRaw.root"),
124 fADCkeep =
new Short_t[1024];
126 fTCFK1IntROC[0]=0; fTCFK1IntROC[1]=0;
127 fTCFK2IntROC[0]=0; fTCFK2IntROC[1]=0;
128 fTCFK3IntROC[0]=0; fTCFK3IntROC[1]=0;
129 fTCFL1IntROC[0]=0; fTCFL1IntROC[1]=0;
130 fTCFL2IntROC[0]=0; fTCFL2IntROC[1]=0;
131 fTCFL3IntROC[0]=0; fTCFL3IntROC[1]=0;
172 void AliTPCAltroEmulator::ConfigAltro(Int_t ONBaselineCorrection1, Int_t ONTailcancellation, Int_t ONBaselineCorrection2, Int_t ONClipping, Int_t ONZerosuppression, Int_t ONDataFormatting){
176 fOnBSL1 =
InRange(ONBaselineCorrection1,0,1,
"AliTPCAltroEmulator::ConfigAltro",
"ONBaselineCorrection1");
177 fOnTCF =
InRange(ONTailcancellation,0,1,
"AliTPCAltroEmulator::ConfigAltro",
"ONTailcancellation");
178 fOnBSL2 =
InRange(ONBaselineCorrection2,0,1,
"AliTPCAltroEmulator::ConfigAltro",
"ONBaselineCorrection2");
179 fOnClip =
InRange(ONClipping,0,1,
"AliTPCAltroEmulator::ConfigAltro",
"ONClipping");
180 fOnZSU =
InRange(ONZerosuppression,0,1,
"AliTPCAltroEmulator::ConfigAltro",
"ONZerosuppression");
183 printf(
"%d\n",ONDataFormatting);
204 fBSL1mode =
InRange(mode,0,16,
"AliTPCAltroEmulator::ConfigBaselineCorrection1",
"mode");
233 fTCFK1Int =
InRange(K1,0,65535,
"AliTPCAltroEmulator::ConfigTailCancellationFilter",
"K1");
234 fTCFK2Int =
InRange(K2,0,65535,
"AliTPCAltroEmulator::ConfigTailCancellationFilter",
"K2");
235 fTCFK3Int =
InRange(K3,0,65535,
"AliTPCAltroEmulator::ConfigTailCancellationFilter",
"K3");
237 fTCFL1Int =
InRange(L1,0,65535,
"AliTPCAltroEmulator::ConfigTailCancellationFilter",
"L1");
238 fTCFL2Int =
InRange(L2,0,65535,
"AliTPCAltroEmulator::ConfigTailCancellationFilter",
"L2");
239 fTCFL3Int =
InRange(L3,0,65535,
"AliTPCAltroEmulator::ConfigTailCancellationFilter",
"L3");
243 const Int_t *L1,
const Int_t *L2,
const Int_t *L3){
251 fTCFK1IntROC[0] =
InRange(K1[0],0,65535,
"AliTPCAltroEmulator::ConfigTailCancellationFilter",
"K1[0]");
252 fTCFK2IntROC[0] =
InRange(K2[0],0,65535,
"AliTPCAltroEmulator::ConfigTailCancellationFilter",
"K2[0]");
253 fTCFK3IntROC[0] =
InRange(K3[0],0,65535,
"AliTPCAltroEmulator::ConfigTailCancellationFilter",
"K3[0]");
254 fTCFL1IntROC[0] =
InRange(L1[0],0,65535,
"AliTPCAltroEmulator::ConfigTailCancellationFilter",
"L1[0]");
255 fTCFL2IntROC[0] =
InRange(L2[0],0,65535,
"AliTPCAltroEmulator::ConfigTailCancellationFilter",
"L2[0]");
256 fTCFL3IntROC[0] =
InRange(L3[0],0,65535,
"AliTPCAltroEmulator::ConfigTailCancellationFilter",
"L3[0]");
258 fTCFK1IntROC[1] =
InRange(K1[1],0,65535,
"AliTPCAltroEmulator::ConfigTailCancellationFilter",
"K1[1]");
259 fTCFK2IntROC[1] =
InRange(K2[1],0,65535,
"AliTPCAltroEmulator::ConfigTailCancellationFilter",
"K2[1]");
260 fTCFK3IntROC[1] =
InRange(K3[1],0,65535,
"AliTPCAltroEmulator::ConfigTailCancellationFilter",
"K3[1]");
261 fTCFL1IntROC[1] =
InRange(L1[1],0,65535,
"AliTPCAltroEmulator::ConfigTailCancellationFilter",
"L1[1]");
262 fTCFL2IntROC[1] =
InRange(L2[1],0,65535,
"AliTPCAltroEmulator::ConfigTailCancellationFilter",
"L2[1]");
263 fTCFL3IntROC[1] =
InRange(L3[1],0,65535,
"AliTPCAltroEmulator::ConfigTailCancellationFilter",
"L3[1]");
288 fBSL2Offset =
InRange(Offset,0,1023,
"AliTPCAltroEmulator::ConfigBaselineCorrection2",
"Offset");
309 fZSUThreshold =
InRange(Threshold,0,1023,
"AliTPCAltroEmulator::BaselineCorrection1",
"Threshold");
328 cout <<
"+-------------------------------------------+" << endl;
329 cout <<
"| Configured Parameters of the Altro Module |" << endl;
330 cout <<
"+-------------------------------------------+" << endl << endl;
332 cout <<
"Parameters set in the Altro Modules:" << endl << endl;
333 cout <<
"ONBaselineCorrection1: " <<
fOnBSL1 << endl;
334 cout <<
"ONTailcancellation : " <<
fOnTCF << endl;
335 cout <<
"ONBaselineCorrection2: " <<
fOnBSL2 << endl;
336 cout <<
"ONClipping : " <<
fOnClip << endl;
337 cout <<
"ONZerosuppression : " <<
fOnZSU << endl << endl << endl;
339 cout <<
"Parameters set in the BSL1 (Baseline Correction 1) Module:" << endl << endl;
344 cout <<
"BSL1 (Baseline Correction 1) Module not configured!" << endl << endl << endl;
347 cout <<
"Parameters set in the TCF (TailCancellation Filter) Module:" << endl << endl;
348 cout <<
"K1 (int|Float_t) : " <<
fTCFK1Int <<
" | " <<
fTCFK1Int/(Float_t)((1<<16)-1) << endl;
349 cout <<
"K2 (int|Float_t) : " <<
fTCFK2Int <<
" | " <<
fTCFK2Int/(Float_t)((1<<16)-1) << endl;
350 cout <<
"K3 (int|Float_t) : " <<
fTCFK3Int <<
" | " <<
fTCFK3Int/(Float_t)((1<<16)-1) << endl;
351 cout <<
"L1 (int|Float_t) : " <<
fTCFL1Int <<
" | " <<
fTCFL1Int/(Float_t)((1<<16)-1) << endl;
352 cout <<
"L2 (int|Float_t) : " <<
fTCFL2Int <<
" | " <<
fTCFL2Int/(Float_t)((1<<16)-1) << endl;
353 cout <<
"L3 (int|Float_t) : " <<
fTCFL3Int <<
" | " <<
fTCFL3Int/(Float_t)((1<<16)-1) << endl << endl << endl;
355 cout <<
"TCF (TailCancellation Filter) Module not configured!" << endl << endl << endl;
358 cout <<
"Parameters set in the BSL2 (Baseline Correction 2) Module:" << endl << endl;
365 cout <<
"BSL2 (Baseline Correction 2) Module not configured!" << endl << endl << endl;
368 cout <<
"Parameters set in the ZSU (Zero Suppression Unit) Module:" << endl << endl;
374 cout <<
"ZSU (Zero Suppression Unit) Module not configured!" << endl << endl << endl;
401 printf(
"ERROR cant run Altro Emulation: Channel input not set.\nUse for example: SetChannelData(Int_t timebins, Short_t* Channel)\n");
407 cout <<
"ERROR cant run Altro Emulation because not configured" << endl;
416 cout <<
"ERROR cant run Baseline Correction 1 because not configured" << endl;
427 cout <<
"ERROR cant run Tail Cancellation Filter because not configured" << endl;
439 cout <<
"ERROR cant run Tail Cancellation Filter because TCF settings for ROC not found" << endl;
441 cout <<
"ERROR cant run Tail Cancellation Filter because not configured (for RAW data files!)" << endl;
453 cout <<
"ERROR cant run Baseline Correction 2 because not configured" << endl;
466 cout <<
"ERROR cant run Zero Suppression Unit because not configured" << endl;
481 Int_t fixedPeDestal = 0;
485 Int_t meanPeDestal = 0;
487 for(Int_t i = 0; i < window; i++) {
491 meanPeDestal /= (window*2);
559 temp = (
long long)P*(
long long)N;
560 vAX = ((
Mask(temp,35,18) + ((
long long)(-P)<<18) ) +
Mask(temp,17,0));
574 long long length = abs(left - right)+1;
575 pattern = ((((
long long)1)<<length)-1)<<right;
586 long long length = abs(left - right)+1;
587 pattern = ((((
long long)1)<<length)-1);
588 retval = (in>>right)&pattern;
596 Int_t c1n = 0, c2n = 0, c3n = 0;
597 Int_t c1o = 0, c2o = 0, c3o = 0;
598 Int_t d1 = 0, d2 = 0;
627 dout = ((dout>>3)<<1) + bit;
630 dout = -
Mask((-
Mask(dout,9,0)),9,0);
632 dout =
Mask(dout,9,0);
653 Int_t offset = Offset;
654 Int_t thrlo = LowThreshold;
655 Int_t thrhi = HighThreshold;
685 for(Int_t i = 0; i < 9 ; i++)
687 for(Int_t i = 0; i < 4 ; i++){
696 for(Int_t i = 0; i < 2 ; i++){
697 edges[i] = (Presamples&(1<<i))>>i;
699 for(Int_t i = 0; i < 4 ; i++){
700 edges[(3-i)+2] = (Postsamples&(1<<i))>>i;
709 for(Int_t timebin = -12; timebin <
ftimebins+10; timebin++){
713 s8 = zxOld + (zOld[8] - zOld[0]);
721 if( (din <= (bsl + thrhi)) && (din >= (bsl - thrlo)) )
738 if( (fOld[3] == 1) || ( (flag == 1) && ( (edges[0] == 1) || (edges[1] == 1) ) ) )
743 if( (fOld[2] == 1) || ( (edges[1] == 1) && (flag == 1) ) )
748 if( ( (fOld[1] == 1) || ( (flag == 1) && (edges[0] == 1) && (edges[1] == 1) ) || (fx==1) ) && (valid==1) )
754 for(Int_t i = 0; i < 3; i++)
758 if( (fOld[1]==1) && (fOld[2]==0) )
759 pstscnt = Postsamples;
765 valcntNew = ++valcntOld;
768 for(Int_t i = 0; i < 8; i++)
773 for(Int_t i = 0; i < 9; i++)
776 dout = dxOld - (bsl - offset);
782 for(Int_t i = 0; i < 9 ; i++)
785 for(Int_t i = 0; i < 4 ; i++){
790 valcntOld = valcntNew;
820 Int_t startofclustersequence = -1;
821 Int_t endofClustersInSequence = -1;
825 startofclustersequence = i;
828 endofClustersInSequence = i;
831 if( (startofclustersequence != -1) && (endofClustersInSequence != -1) ){
833 if ( (endofClustersInSequence - startofclustersequence + 1) < MinSamplesaboveThreshold ){
834 for(Int_t j = startofclustersequence; j <= endofClustersInSequence ; j++){
838 startofclustersequence = -1;
839 endofClustersInSequence = -1;
852 for(Int_t j = i-Presamples ; j <= i; j++){
857 for(Int_t i = ftimebins; i >= 0; i--){
859 for(Int_t j = i ; j <= i+Postsamples; j++){
920 Float_t retval = 0.0;
930 data = sample + cluster*2;
931 data = data + data%4 + 4;
933 retval = ftimebins / (Float_t)data;
961 Array[index] = value;
968 Int_t fLow = bsl - LowThreshold;
969 Int_t fHigh = bsl + HighThreshold;
970 if( (ADC <= fHigh) && (ADC >= fLow) )
983 if(parameter > High){
984 snprintf(out,255,
"Error | %s | Parameter %s is to big, has to be %d <= %s <= %d, is %d, now set to %d",Module,ParameterName,Low,ParameterName,High,parameter,High);
987 }
else if(parameter < Low){
988 snprintf(out,255,
"Error | %s | Parameter %s is to small, has to be %d <= %s <= %d, is %d, now set to %d",Module,ParameterName,Low,ParameterName,High,parameter,Low);
1016 for (Int_t ddlID=0;ddlID<216;++ddlID) {
1017 Bool_t *channelsDDL=
fChannels+ddlID*4096 ;
1018 Short_t *adcsDDL =
fADCs +ddlID*4096*1024;
1019 UInt_t *cdhDDL =
fCDHs +ddlID*8 ;
1022 FILE *file=fopen(Form(
"%s/raw%d/TPC_%03d.ddl",
1030 for (i32=0;i32<8;++i32)
1034 for (Int_t hwaddr=0;hwaddr<4096;++hwaddr)
if (channelsDDL[hwaddr]) {
1035 Short_t *adcsChannel=adcsDDL+hwaddr*1024;
1038 for (Int_t it=0;it<1024-3;++it) {
1039 if (adcsChannel[it]>=0&&adcsChannel[it+3]>=0) {
1040 if (adcsChannel[it+1]<0) {
1042 adcsChannel[it+1]=0;
1044 if (adcsChannel[it+2]<0) {
1046 adcsChannel[it+2]=0;
1055 for (Int_t it=1023;it>=0;--it) {
1056 Short_t w10=adcsChannel[it];
1064 fRawData[i32+i10/3]|=w10<<(10*(2-i10%3));
1071 fRawData[i32+icw/3]|=cw <<(10*(2-icw%3));
1072 fRawData[i32+its/3]|=ts <<(10*(2-its%3));
1077 fRawData[i32]=0x1<<30|(i10-3)<<16|hwaddr;
1081 for (Int_t i=0;i<1024;++i) adcsChannel[i]=-1;
1082 channelsDDL[hwaddr]=kFALSE;
1086 fRawData[i32]=0x2<<30|(i32-8);i32++;
1087 for (Int_t i=0;i<8;++i)
1093 Int_t nwritten=fwrite(
fRawData,
sizeof(UInt_t),i32,file);
1096 if (nwritten!=i32)
return kFALSE;
1099 do {
fRawData[--i32]=0;}
while (i32>0);
1109 for(Int_t iLDC=0;iLDC<gdc->GetNSubEvents();++iLDC) {
1110 AliRawVEvent *ldc=gdc->GetSubEvent(iLDC);
1111 for(Int_t iEq=0;iEq<ldc->GetNEquipments();++iEq) {
1112 AliRawVEquipment *eq=ldc->GetEquipment(iEq);
1113 AliRawEquipmentHeader *eqHeader=eq->GetEquipmentHeader();
1114 Int_t eqSize=eqHeader->GetEquipmentSize();
1117 Int_t detId=AliDAQ::DetectorIDFromDdlID(eqHeader->GetId(),ddlIndex);
1119 FILE *ddlFile=fopen(Form(
"%s/raw%d/%s",
1122 AliDAQ::DdlFileName(detId,ddlIndex)),
1124 AliRawData *rawData=eq->GetRawData();
1126 nwritten=fwrite(rawData->GetBuffer(),1,rawData->GetSize(),ddlFile);
1129 if (nwritten<rawData->GetSize())
return kFALSE;
1150 pipe=gSystem->OpenPipe(Form(
"dateStream -c -s -D -o %s -C -# %d -run %d",
1156 pipe=gSystem->OpenPipe(Form(
"dateStream -c -s -D -o %s -C -# %d",
1161 fprintf(stderr,
"error: cannot execute command: %s",command);
1165 for (Int_t ievent=0;ievent<nevents;++ievent) {
1166 UInt_t detectorPattern = 0xFFFFFFFF;
1167 fprintf(pipe,
"GDC DetectorPattern %u\n", detectorPattern);
1173 for (Int_t iDet = 0; iDet < AliDAQ::kNDetectors; iDet++) {
1174 if (!(iDet<=5 || iDet==17 ))
continue;
1175 for (Int_t iDDL = 0; iDDL < AliDAQ::NumberOfDdls(iDet); iDDL++) {
1177 Int_t ddlID = AliDAQ::DdlID(iDet,iDDL);
1178 Int_t ldcID = Int_t(ldc + 0.0001);
1179 ldc += AliDAQ::NumberOfLdcs(iDet) / AliDAQ::NumberOfDdls(iDet);
1182 FILE* file = fopen(Form(
"%s/raw%d/%s",
1185 AliDAQ::DdlFileName(iDet,iDDL)),
1187 if (!file)
continue;
1188 fseek(file, 0, SEEK_END);
1189 unsigned long size = ftell(file);
1191 if (!size)
continue;
1193 if (ldcID != prevLDC) {
1194 fprintf(pipe,
" LDC Id %d\n", ldcID);
1197 fprintf(pipe,
" Equipment Id %d Payload %s/raw%d/%s\n",
1201 (
char*)AliDAQ::DdlFileName(iDet,iDDL) );
1205 Int_t result = gSystem->ClosePipe(pipe);
1206 return (result == 0);
1215 if (!
fADCs )
fADCs =
new Short_t[216*4096*1024];
1219 for (Int_t i=0;i<216*4096 ;++i)
fChannels[i]=kFALSE;
1221 for (Int_t i=0;i<216*4096*1024;++i)
fADCs [i]=-1 ;
1223 for (Int_t i=0;i< 1*4096*1024;++i)
fRawData [i]= 0 ;
1236 const Int_t kDBSize = 2000000000;
1237 const Int_t kTagDBSize = 1000000000;
1238 const Bool_t kFilter = kFALSE;
1239 const Int_t kCompression = 1;
1244 const char* rawDBFS[2] = {
"/tmp/mdc1",
"/tmp/mdc2" };
1245 const char* tagDBFS =
"/tmp/mdc1/tags";
1248 if (gSystem->Getenv(
"ALIMDC_RAWDB1"))
1249 rawDBFS[0] = gSystem->Getenv(
"ALIMDC_RAWDB1");
1250 if (gSystem->Getenv(
"ALIMDC_RAWDB2"))
1251 rawDBFS[1] = gSystem->Getenv(
"ALIMDC_RAWDB2");
1252 if (gSystem->Getenv(
"ALIMDC_TAGDB"))
1253 tagDBFS = gSystem->Getenv(
"ALIMDC_TAGDB");
1255 gSystem->Exec(Form(
"rm -rf %s",rawDBFS[0]));
1256 gSystem->Exec(Form(
"rm -rf %s",rawDBFS[1]));
1257 gSystem->Exec(Form(
"rm -rf %s",tagDBFS));
1259 gSystem->Exec(Form(
"mkdir %s",rawDBFS[0]));
1260 gSystem->Exec(Form(
"mkdir %s",rawDBFS[1]));
1261 gSystem->Exec(Form(
"mkdir %s",tagDBFS));
1263 Int_t result = gSystem->Exec(Form(
"alimdc %d %d %d %d %s",
1267 gSystem->Exec(Form(
"rm -rf %s",rawDBFS[0]));
1268 gSystem->Exec(Form(
"rm -rf %s",rawDBFS[1]));
1269 gSystem->Exec(Form(
"rm -rf %s",tagDBFS));
1271 return (result == 0);
1281 printf(
"ERROR cant run Altro Emulation: AliRawReader is zero. No RAW data file.\n");
1292 TH1F hisO(
"DINO",
"DINO",1024,0,1024);
1293 TH1F his(
"DIN",
"DIN",1024,0,1024);
1294 his.GetYaxis()->SetRangeUser(-20,90);
1295 Short_t *data =
new Short_t[1024];
1298 c1 =
new TCanvas(
"c1",
"c1");
1299 c1->SetGridx(); c1->SetGridy();
1304 while (
fReader->NextEvent()) {
1307 gSystem->Exec(Form(
"mkdir -p %s/raw%d/",
fDDLFolderName.Data(),ievent));
1312 Int_t ddlID=
fDecoder->GetDDLNumber();
1313 printf(
"ddl: %d (%d/216)\n",ddlID,++ddlC);
1315 Bool_t *channelsDDL=
fChannels+ddlID*4096 ;
1316 Short_t *adcsDDL =
fADCs +ddlID*4096*1024 ;
1317 UInt_t *cdhDDL =
fCDHs +ddlID*8 ;
1321 const AliRawDataHeader * cdh =
fReader->GetDataHeader();
1322 const AliRawDataHeaderV3 * cdhV3 =
fReader->GetDataHeaderV3();
1323 for (Int_t i=0;i<8;++i) {
1326 cdhDDL[i]=
reinterpret_cast<UInt_t*
>(
const_cast<AliRawDataHeader*
>(cdh))[i];
1328 cdhDDL[i]=
reinterpret_cast<UInt_t*
>(
const_cast<AliRawDataHeaderV3*
>(cdhV3))[i];
1332 Int_t hwaddr=
fDecoder->GetHWAddress();
1336 Short_t *adcsChannel=adcsDDL+hwaddr*1024;
1338 UInt_t ts =
fDecoder->GetStartTimeBin();
1339 Int_t cw =
fDecoder->GetBunchLength() ;
1340 const UShort_t *signals=
fDecoder->GetSignals() ;
1341 for (Int_t ci=0;ci<cw;++ci) {
1342 Short_t s=signals[ci];
1345 if (0<=t&&t<(1024-3)) {
1346 channelsDDL[hwaddr]=kTRUE;
1347 if (adcsChannel[t]<0)
1351 if (adcsChannel[t]>0x3ff)
1352 adcsChannel[t]=0x3ff;
1358 Int_t t0 = 0;
while (adcsChannel[t0]==-1) t0++;
1360 Int_t tE = 1024;
while (adcsChannel[tE]==-1) tE--;
1363 if (plotFlag!=0 && !(chanCount%plotFlag) ) {
1364 for (Int_t t=0; t<1024; t++) {
1365 his.SetBinContent(t+1,adcsChannel[t]);
1367 his.SetTitle(Form(
"sig_sec%d_row%d_pad%d",sector,row,pad));
1368 his.SetStats(0); his.GetXaxis()->SetTitle(
"timebin");
1373 Int_t timebins = tE-t0+1;
1374 for (Int_t t=t0;t<(t0+timebins);t++)
1375 data[t-t0]=adcsChannel[t];
1378 Int_t roc = (sector%36)>=18;
1380 for (Int_t t=t0;t<(t0+timebins);t++)
1381 adcsChannel[t]=data[t-t0];
1383 if (plotFlag!=0 && !(chanCount%plotFlag) ) {
1384 for (Int_t t=0; t<1024; t++)
1385 hisO.SetBinContent(t+1,adcsChannel[t]);
1386 hisO.SetStats(0); hisO.SetLineColor(2);
1387 hisO.DrawCopy(
"same");
1389 c1->SaveAs(Form(
"%s/sig_sec%02d_row%02d_pad%03d_%s_%d%d%d%d%d.png",
1403 UChar_t *rcuTrailer;
1404 fDecoder->GetRCUTrailerData(rcuTrailer);
1405 for (Int_t i=0;i<=
fDecoder->GetRCUTrailerSize()/4;++i)
1406 trailerDDL[i]=reinterpret_cast<UInt_t*>(rcuTrailer)[i];
long long Mask(long long in, Int_t left, Int_t right)
printf("Chi2/npoints = %f\n", TMath::Sqrt(chi2/npoints))
self initialized array, used for adding constraints
AliTPCRawStreamV3 * fDecoder
UInt_t * fCDHs
field of active channels
void ConfigBaselineCorrection2(Int_t HighThreshold, Int_t LowThreshold, Int_t Offset, Int_t Presamples, Int_t Postsamples)
Configures the Moving Average Filter (BSL2) Module.
void RunEmulation(Int_t roc=-1)
Runs the emulation of all configured Modules.
virtual Bool_t NextChannel()
Bool_t GDC2DDLs(AliRawVEvent *gdc, Int_t ievent)
ClassImp(AliTPCAltroEmulator) AliTPCAltroEmulator
Consturctor of Altro Class.
Bool_t ConvertRawFilesToDate(Int_t nevents)
void PrintParameters()
Prints the set Parameters, if module is configured.
long long Maskandshift(long long in, Int_t left, Int_t right)
Float_t CalculateCompression()
calculates the compression out of the bitmask
Int_t InRange(Int_t parameter, Int_t Low, Int_t High, const char *Module, const char *ParameterName)
void SetChannelData(Int_t timebins, Short_t *Channel)
void ConfigTailCancellationFilterForRAWfiles(const Int_t *K1, const Int_t *K2, const Int_t *K3, const Int_t *L1, const Int_t *L2, const Int_t *L3)
TString fOutputDateFileName
This the header File for the Altro class.
void ConfigTailCancellationFilter(Int_t K1, Int_t K2, Int_t K3, Int_t L1, Int_t L2, Int_t L3)
Configures the Tail Cancellation Filter (TCF) Module.
This class provides access to TPC digits in raw data.
UInt_t * fTrailers
field of ADC counts
Int_t InBand(Int_t ADC, Int_t bsl, Int_t LowThreshold, Int_t HighThreshold)
Short_t GetShortChannel(Int_t i)
void DataFormater()
formats the data like the ALTRO. Result is a 64 bit array
void SetElement(short *Array, Int_t index, Short_t value)
Int_t fZSUMinSamplesaboveThreshold
void RunEmulationOnRAWdata(AliRawReader *reader, Int_t plotFlag=0)
void TailCancellationFilterFixedPoint(Int_t K1, Int_t K2, Int_t K3, Int_t L1, Int_t L2, Int_t L3)
Short_t GetElement(short *Array, Int_t index)
void ConfigZerosuppression(Int_t Threshold, Int_t MinSamplesaboveThreshold, Int_t Presamples, Int_t Postsamples)
Configures the Zero Suppression Module (ZSU)
Bool_t ConvertDateToRoot()
void BaselineCorrection2RTL(Int_t HighThreshold, Int_t LowThreshold, Int_t Offset, Int_t Presamples, Int_t Postsamples)
TString fOutputRootFileName
Bool_t WriteEvent(Int_t ievent)
UInt_t * fRawData
RCU trailers.
void Zerosuppression(Int_t Threshold, Int_t MinSamplesaboveThreshold, Int_t Presamples, Int_t Postsamples)
void ConfigBaselineCorrection1(Int_t mode, Int_t ValuePeDestal, Int_t *PedestalMem, Int_t polarity)
Configures the Base Line Correction 1 (BSL1) Module.
Int_t Multiply36(Int_t P, Int_t N)
~AliTPCAltroEmulator()
Destructor of Altro Class.
Short_t GetKeepChannel(Int_t i)
void ConfigAltro(Int_t ONBaselineCorrection1, Int_t ONTailcancellation, Int_t ONBaselineCorrection2, Int_t ONClipping, Int_t ONZerosuppression, Int_t ONDataFormatting)
Configures which modules of the Altro should be on.
void BaselineCorrection1(Int_t mode, Int_t FixedPeDestal, Int_t *PedestalMem, Int_t polarity)