X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=ITS%2FAliITSDDLRawData.C;h=57f7ff15ca548ccd33e0830da01e54d31f98f103;hb=83cb58d0a5a2c970e205aff7c7950a2719758189;hp=dafdb37d1e7e81f4cb363684a26df3ed053c022f;hpb=c391f9d9b3695367078064555bdcd094ca80b8ec;p=u%2Fmrichter%2FAliRoot.git diff --git a/ITS/AliITSDDLRawData.C b/ITS/AliITSDDLRawData.C index dafdb37d1e7..57f7ff15ca5 100644 --- a/ITS/AliITSDDLRawData.C +++ b/ITS/AliITSDDLRawData.C @@ -1,74 +1,45 @@ -#if !defined(__CINT__) || defined(__MAKECINT__) - -#include +#if !defined(__CINT__) +#include #include "AliITSDDLRawData.h" +#include "AliRunLoader.h" +#include "AliLoader.h" +#include "AliITS.h" #endif -/* -Before running this macro it is necessary to comment the following line of the method -AddDigit in the class AliITSsimulationSDD -//if( fResponse->Do10to8() ) signal = Convert8to10( signal ); -In this way the amplitude value for signal coming from SDD takes only 8 bits and not 10. -*/ //DigitsFile is the input file that contains digits -void AliITSDDLRawData(char* DigitsFile="galiceD.root"){ -#ifdef __NOCOMPILED__ - if (gClassTable->GetID("AliRun") < 0) { - gROOT->LoadMacro("loadlibs.C"); - loadlibs(); - } - else { -#endif - if(gAlice){ - delete gAlice; - gAlice=0; - } -#ifdef __NOCOMPILED__ +void AliITSDDLRawData(Int_t eventNumber=0){ + + Int_t spdLDCs=2; + Int_t sddLDCs=4; + Int_t ssdLDCs=2; + Int_t eventn=0; + const char * inFile_new = "galice.root"; + AliRunLoader *rl = AliRunLoader::Open(inFile_new,"Event","read"); + rl->LoadgAlice(); + gAlice=rl->GetAliRun(); + Int_t nevents=rl->GetNumberOfEvents(); + cout<<"Number of Events:"<nevents){ + cout<<"Insert the event number:"; + cin>>eventNumber; + cout<GetListOfFiles()->FindObject(DigitsFile); - if (!file){ - file = TFile::Open(DigitsFile); - }//end if - file->ls(); + rl->GetEvent(eventNumber-1); + AliLoader *itsloader=rl->GetLoader("ITSLoader"); + itsloader->LoadDigits(); + TTree *TD=itsloader->TreeD(); + gAlice=rl->GetAliRun(); + if(!gAlice){ + cout<<"gAlice is null"<GetDetector("ITS"); + + Int_t nmodules; + ITS->InitModules(-1,nmodules); + ITS->GetDetTypeSim()->SetTreeAddressD(TD,"ITS"); - // Get AliRun object from file - if (!gAlice){ - gAlice = (AliRun*)file->Get("gAlice"); - if (gAlice)cout<<"AliRun object found on file "<SetTreeDFileName(DigitsFile); - // Long_t nparticles = gAlice->GetEvent(0); - - //Int_t nparticles = gAlice->GetEvent(0); - // - // ITS - AliITS *ITS = (AliITS*)gAlice->GetModule("ITS"); - Int_t nmodules; - ITS->InitModules(-1,nmodules); - cout<<"Number of ITS modules= "<FillModules(0,0,nmodules," "," "); - //cout<<"ITS modules .... DONE!"<Get("TreeD0"); - if (TD == 0x0){ - ::Error("DDLRawData","Can not find tree with ITS digits"); - return; - }//end if - ITS->SetTreeAddressD(TD); - - - //TTree *TD = gAlice->TreeD(); - AliITSDDLRawData *util=new AliITSDDLRawData(); //Verbose level // 0: Silent @@ -84,29 +55,27 @@ void AliITSDDLRawData(char* DigitsFile="galiceD.root"){ //SILICON PIXEL DETECTOR cout<<"Formatting data for SPD"<RawDataSPD(ITS,TD); - // util->RawDataSPD(ITS,TD,20); + util->RawDataSPD(ITS,TD,spdLDCs,eventNumber); timer.Stop(); timer.Print(); //ONLY FOR DEBUGGING - util->TestFormat(); - + // util->TestFormat(eventNumber); + //SILICON DRIFT DETECTOR cout<<"Formatting data for SDD"<RawDataSDD(ITS,TD,12); - util->RawDataSDD(ITS,TD); + util->RawDataSDD(ITS,TD,sddLDCs,eventNumber); timer.Stop(); timer.Print(); //SILICON STRIP DETECTOR cout<<"Formatting data for SSD"<RawDataSSD(ITS,TD,16); - util->RawDataSSD(ITS,TD); + util->RawDataSSD(ITS,TD,ssdLDCs,eventNumber); timer.Stop(); timer.Print(); delete util; + return; }