// ------------------------------------------------------------------------- // ----- AsyUnpack source file ----- // ----- Created 12/04/12 by P. Russotto ----- // ------------------------------------------------------------------------- #include "LANDUnpack.h" #include "FairLogger.h" #include "TClonesArray.h" #include #include "TSystem.h" using std::cout; using std::endl; LANDUnpack::LANDUnpack() :FairTask() { //init calibration } // ------------------------------------------------------------------------- LANDUnpack::LANDUnpack(const char* name, Int_t iVerbose) : FairTask(name, iVerbose), fLAND_evt(0), fRootLANDEvent(0), fRootLANDEventCopy(0), ffBufferClone(0) { } // ------------------------------------------------------------------------- LANDUnpack::~LANDUnpack() { } // ------------------------------------------------------------------------- InitStatus LANDUnpack::Init() { fLogger->Info(MESSAGE_ORIGIN," LANDUnpack::Init()------------------Start "); corr=false; string dir = gSystem->Getenv("VMCWORKDIR"); string landcaldir = dir + "/calfiles/LAND/"; // landcaldir = "/home/russotto/asyeosrootREP/asyeosroot/CALFILES/LAND/"; fLAND_evt = new TLANDEvent(landcaldir); fLAND_evt->DoLANDMapping();//apply mapping! fLAND_evt->TLANDTSync(); if(corr){fLAND_evt->TLANDReadPar();} fRootLANDEvent= new TRootLANDEvent(); FairRootManager* ioman = FairRootManager::Instance(); if ( ! ioman ) Fatal("Init", "No FairRootManager"); ioman->Register("LANDEVENT", "LAND EVENT TREE", fRootLANDEvent, kFALSE); fRootLANDEventCopy = new TClonesArray("TRootLANDEvent"); fRootLANDEventCopy=(TClonesArray*)fRootLANDEvent; ioman->Register("LANDEVENTCLONE", "LAND EVENT TREE CLONE", fRootLANDEventCopy, kFALSE); ffBufferClone =(TClonesArray*) ioman->GetObject("EVTBUFFERCLONE"); ffBuffer = (TEvtBuffer*)ffBufferClone; fLogger->Info(MESSAGE_ORIGIN," LANDUnpack::Init()------------------End "); cout << " ...return to continue..."<< endl; getchar(); } // ------------------------------------------------------------------------- void LANDUnpack::SetParTask() { } // ------------------------------------------------------------------------- void LANDUnpack::Finish() { // if(fIsLastEvent) // fLogger->Info(MESSAGE_ORIGIN," Finish all events in file"); } // ------------------------------------------------------------------------- void LANDUnpack::Reset() { } // ------------------------------------------------------------------------- void LANDUnpack::Exec(Option_t* opt) { /* cout <<"LANDUnpack::Exec*****************BEGIN***************"<Info(MESSAGE_ORIGIN," LANDUnpack::Exec(Option_t* opt) ");*/ //_____________________________LAND subevent________________________________________________ int fRawMulti=fLAND_evt->ProcessCurrentEventMBS(ffBuffer->LANDBuffer,ffBuffer->LAND_nrw); int landrawmulti=fLAND_evt->GetLANDRawData(fRootLANDEvent,corr); /* cout <<"LANDUnpack::Exec*****************END***************"<