From: mrodrigu Date: Tue, 19 Feb 2008 09:12:51 +0000 (+0000) Subject: This update contains the Full ACORDE Geometry and raw Data X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=6fb64ed1e8d08bc6c227f0b8da4d2be31f2d7604 This update contains the Full ACORDE Geometry and raw Data --- diff --git a/ACORDE/ACORDErecLinkDef.h b/ACORDE/ACORDErecLinkDef.h index 1dfdd1a27dc..c97b68740b7 100644 --- a/ACORDE/ACORDErecLinkDef.h +++ b/ACORDE/ACORDErecLinkDef.h @@ -1,11 +1,14 @@ #ifdef __CINT__ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ - - //The classes needed for reconstruction are not yet available + +#pragma link off all globals; +#pragma link off all classes; +#pragma link off all functions; + +#pragma link C++ class AliACORDERawStream+; #endif - diff --git a/ACORDE/ACORDEsimLinkDef.h b/ACORDE/ACORDEsimLinkDef.h index 67ecfa9db37..1bb14d6a9ec 100644 --- a/ACORDE/ACORDEsimLinkDef.h +++ b/ACORDE/ACORDEsimLinkDef.h @@ -1,18 +1,19 @@ #ifdef __CINT__ /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * - * See cxx source for full Copyright notice */ + * See cxx source for full Copyright notice */ + #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; +#pragma link C++ class AliACORDEv1+; +#pragma link C++ class AliACORDEhit+; +#pragma link C++ class AliACORDEdigit+; +#pragma link C++ class AliACORDEDigitizer+; +#pragma link C++ class AliACORDETrigger+; +#pragma link C++ class AliACORDERawData+; -#pragma link C++ class AliACORDEv0+; -#pragma link C++ class AliACORDEhit+; -#pragma link C++ class AliACORDEdigit+; -#pragma link C++ class AliACORDEDigitizer+; -#pragma link C++ class AliACORDETrigger+; -#pragma link C++ class AliACORDERawData+; #endif diff --git a/ACORDE/AliACORDE.cxx b/ACORDE/AliACORDE.cxx index 68b07f7de79..7a0ad5cb9dc 100644 --- a/ACORDE/AliACORDE.cxx +++ b/ACORDE/AliACORDE.cxx @@ -41,11 +41,13 @@ #include #include #include +#include #include "AliACORDE.h" #include "AliMagF.h" #include "AliRun.h" #include "AliACORDERawData.h" +#include "AliACORDERawStream.h" ClassImp(AliACORDE) @@ -282,6 +284,59 @@ void AliACORDE::Digits2Raw() rawdata.WriteACORDERawData(Modules); } +//_____________________________________________________________________________ +Bool_t AliACORDE::Raw2SDigits(AliRawReader* rawReader) +{ + // + // Reads the raw data stream and exracts the digits + // + // Input: + // rawReader : pointer to the current AliRawReader + // Output: + // + // Created: 31 Jan 2008 Mario Sitta + // + TStopwatch timer; + timer.Start(); + + if(!fLoader) { + AliError("no ACORDE loader found"); + return kFALSE; + } + + TTree* treeD = fLoader->TreeD(); + if(!treeD) { + fLoader->MakeTree("D"); + treeD = fLoader->TreeD(); + } + + AliACORDEdigit digit; + AliACORDEdigit* pdigit = &digit; + const Int_t kBufferSize = 4000; + + treeD->Branch("ACORDE", "AliACORDEdigit", &pdigit, kBufferSize); + + // rawReader->Reset(); + AliACORDERawStream* rawStream = new AliACORDERawStream(rawReader); + + if (!rawStream->Next()) return kFALSE; // No ACORDE data found + /* + for(Int_t i=0; i<64; i++) { + new(pdigit) AliACORDEdigit(i, (Int_t)rawStream->GetADC(i), (Int_t)rawStream->GetTime(i)); + treeD->Fill(); + } + */ + fLoader->WriteDigits("OVERWRITE"); + fLoader->UnloadDigits(); + + delete rawStream; + + timer.Stop(); + timer.Print(); + + return kTRUE; +} + //_____________________________________________________________________________ void AliACORDE::AddAlignableVolumes() const { diff --git a/ACORDE/AliACORDE.h b/ACORDE/AliACORDE.h index bd6c6f309c4..537e444a17e 100644 --- a/ACORDE/AliACORDE.h +++ b/ACORDE/AliACORDE.h @@ -40,6 +40,8 @@ public: { return new AliACORDETrigger(); } void Digits2Raw (); + virtual Bool_t Raw2SDigits(AliRawReader*); + virtual void SetCreateCavern(Bool_t b) {fCreateCavern = b;} virtual void SetITSGeometry(Bool_t b) {fITSGeometry = b;} virtual Bool_t GetCreateCavern() const {return fCreateCavern;} diff --git a/ACORDE/AliACORDEConstants.cxx b/ACORDE/AliACORDEConstants.cxx index a13676f3e01..850312b8bc7 100644 --- a/ACORDE/AliACORDEConstants.cxx +++ b/ACORDE/AliACORDEConstants.cxx @@ -22,7 +22,7 @@ // This class serves to group constants needed by ACORDE detector in 1 // easily accessible place. All constants are public const static data // members. The class is never instatiated. -// Author: Arturo Fernandez, Enrique Gamez +// Authors: Arturo Fernandez, Enrique Gamez, Mario Rodríguez Cahuantzi, Eleazar Cuautle(ICN-UNAM) // FCFM-UAP, Mexico. // //////////////////////////////////////////////////////////////////////// @@ -59,7 +59,7 @@ const Float_t AliACORDEConstants::fgkModulePositionY[60] = { 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 797, 797, 797, 797, 797, 797, 797, 797, 797, 797, - 576, 576, 576, 576, 576, 609, 605, 582, 582, 582}; + 582, 582, 582, 582, 582, 609, 605, 582, 582, 582}; const Float_t AliACORDEConstants::fgkModulePositionZ[60] = { 450, 350, 250, 150, 50, -50, -120, -280, -350, -450, 450, 350, 250, 150, 50, -50, -150, -250, -350, -450, diff --git a/ACORDE/libACORDErec.pkg b/ACORDE/libACORDErec.pkg index ccbae8e8afe..ad38ffbe632 100644 --- a/ACORDE/libACORDErec.pkg +++ b/ACORDE/libACORDErec.pkg @@ -1,8 +1,6 @@ -SRCS = - +SRCS = AliACORDERawStream.cxx HDRS:= $(SRCS:.cxx=.h) - - + DHDR:=ACORDErecLinkDef.h diff --git a/ACORDE/libACORDEsim.pkg b/ACORDE/libACORDEsim.pkg index 9fd7bbb5aec..e8046028645 100644 --- a/ACORDE/libACORDEsim.pkg +++ b/ACORDE/libACORDEsim.pkg @@ -1,6 +1,6 @@ -SRCS = AliACORDEv0.cxx AliACORDEhit.cxx AliACORDEdigit.cxx \ +SRCS = AliACORDEv1.cxx AliACORDEhit.cxx AliACORDEdigit.cxx \ AliACORDEDigitizer.cxx AliACORDETrigger.cxx \ - AliACORDERawData.cxx + AliACORDERawData.cxx HDRS:= $(SRCS:.cxx=.h)