From 00b6d74faeeee6ae0f786a3d5e624319c73e6ebd Mon Sep 17 00:00:00 2001 From: nick Date: Wed, 1 Dec 2004 14:03:39 +0000 Subject: [PATCH] History file of Wa98 updated and subdirectory icepack introduced. --- RALICE/icepack/ICEHeaders.h | 17 ++ RALICE/icepack/ICELinkDef.h | 23 ++ RALICE/icepack/IceAOM.cxx | 69 ++++++ RALICE/icepack/IceAOM.h | 21 ++ RALICE/icepack/IceDOM.cxx | 69 ++++++ RALICE/icepack/IceDOM.h | 21 ++ RALICE/icepack/IceEvent.cxx | 307 ++++++++++++++++++++++++ RALICE/icepack/IceEvent.h | 21 ++ RALICE/icepack/IceGOM.cxx | 152 ++++++++++++ RALICE/icepack/IceGOM.h | 21 ++ RALICE/icepack/IceIDOM.cxx | 70 ++++++ RALICE/icepack/IceIDOM.h | 21 ++ RALICE/icepack/IceTDOM.cxx | 70 ++++++ RALICE/icepack/IceTDOM.h | 21 ++ RALICE/icepack/history.txt | 4 + RALICE/icepack/macros/icetest.cc | 327 ++++++++++++++++++++++++++ RALICE/icepack/scripts/alphacxxlib.sh | 32 +++ RALICE/icepack/scripts/gcclib.sh | 34 +++ RALICE/icepack/scripts/hpcclib.sh | 29 +++ RALICE/icepack/scripts/macgcclib.sh | 50 ++++ RALICE/icepack/scripts/mklibs.bat | 118 ++++++++++ RALICE/wa98/history.txt | 6 +- 22 files changed, 1502 insertions(+), 1 deletion(-) create mode 100644 RALICE/icepack/ICEHeaders.h create mode 100644 RALICE/icepack/ICELinkDef.h create mode 100644 RALICE/icepack/IceAOM.cxx create mode 100644 RALICE/icepack/IceAOM.h create mode 100644 RALICE/icepack/IceDOM.cxx create mode 100644 RALICE/icepack/IceDOM.h create mode 100644 RALICE/icepack/IceEvent.cxx create mode 100644 RALICE/icepack/IceEvent.h create mode 100644 RALICE/icepack/IceGOM.cxx create mode 100644 RALICE/icepack/IceGOM.h create mode 100644 RALICE/icepack/IceIDOM.cxx create mode 100644 RALICE/icepack/IceIDOM.h create mode 100644 RALICE/icepack/IceTDOM.cxx create mode 100644 RALICE/icepack/IceTDOM.h create mode 100644 RALICE/icepack/history.txt create mode 100644 RALICE/icepack/macros/icetest.cc create mode 100644 RALICE/icepack/scripts/alphacxxlib.sh create mode 100644 RALICE/icepack/scripts/gcclib.sh create mode 100644 RALICE/icepack/scripts/hpcclib.sh create mode 100644 RALICE/icepack/scripts/macgcclib.sh create mode 100755 RALICE/icepack/scripts/mklibs.bat diff --git a/RALICE/icepack/ICEHeaders.h b/RALICE/icepack/ICEHeaders.h new file mode 100644 index 00000000000..2eeb3c443ab --- /dev/null +++ b/RALICE/icepack/ICEHeaders.h @@ -0,0 +1,17 @@ +/////////////////////////////////////////////////////////////////////////// +// All headers of the ICE analysis software +// This header list is used to create the ICE dictionary via rootcint. +// +// Note : Class names have also to be entered into the list +// contained in ICELinkDef.h +// +//--- NvE 23-jan-2003 Utrecht University +/////////////////////////////////////////////////////////////////////////// + +#include "IceEvent.h" +#include "IceGOM.h" +#include "IceAOM.h" +#include "IceDOM.h" +#include "IceIDOM.h" +#include "IceTDOM.h" + diff --git a/RALICE/icepack/ICELinkDef.h b/RALICE/icepack/ICELinkDef.h new file mode 100644 index 00000000000..41bb817bd57 --- /dev/null +++ b/RALICE/icepack/ICELinkDef.h @@ -0,0 +1,23 @@ +/////////////////////////////////////////////////////////////////////////// +// All classes of ICE analysis software +// This class list is used to create the ICE dictionary via rootcint. +// +// Note : Headers have also to be entered into the list +// contained in ICEHeaders.h +// +//--- NvE 23-jan-2003 Utrecht University +/////////////////////////////////////////////////////////////////////////// + +#ifdef __CINT__ + #pragma link off all globals; + #pragma link off all classes; + #pragma link off all functions; + + #pragma link C++ class IceEvent+; + #pragma link C++ class IceGOM+; + #pragma link C++ class IceAOM+; + #pragma link C++ class IceDOM+; + #pragma link C++ class IceIDOM+; + #pragma link C++ class IceTDOM+; +#endif + diff --git a/RALICE/icepack/IceAOM.cxx b/RALICE/icepack/IceAOM.cxx new file mode 100644 index 00000000000..8fcbf737a84 --- /dev/null +++ b/RALICE/icepack/IceAOM.cxx @@ -0,0 +1,69 @@ +/////////////////////////////////////////////////////////////////////////// +// Copyright(c) 2003, IceCube Experiment at the South Pole. +// All rights reserved. +// +// Author: The IceCube RALICE-based Offline Project. +// Contributors are mentioned in the code where appropriate. +// +// Permission to use, copy, modify and distribute this software and its +// documentation strictly for non-commercial purposes is hereby granted +// without fee, provided that the above copyright notice appears in all +// copies and that both the copyright notice and this permission notice +// appear in the supporting documentation. +// The authors make no claims about the suitability of this software for +// any purpose. It is provided "as is" without express or implied warranty. +/////////////////////////////////////////////////////////////////////////// + +// $Id$ + +/////////////////////////////////////////////////////////////////////////// +// Class IceAOM +// Signal/Hit handling of a generic Amanda Optical Module (AOM). +// Basically this class provides an IceCube tailored user interface +// to the functionality of the class AliDevice via the generic IceGOM class. +// +// See IceGOM for some usage examples. +// +//--- Author: Nick van Eijndhoven 23-jun-2004 Utrecht University +//- Modified: NvE $Date$ Utrecht University +/////////////////////////////////////////////////////////////////////////// + +#include "IceAOM.h" +#include "Riostream.h" + +ClassImp(IceAOM) // Class implementation to enable ROOT I/O + +IceAOM::IceAOM() : IceGOM() +{ +// Default constructor. +} +/////////////////////////////////////////////////////////////////////////// +IceAOM::~IceAOM() +{ +// Default destructor. +} +/////////////////////////////////////////////////////////////////////////// +IceAOM::IceAOM(const IceAOM& m) : IceGOM(m) +{ +// Copy constructor. +} +/////////////////////////////////////////////////////////////////////////// +TObject* IceAOM::Clone(const char* name) const +{ +// Make a deep copy of the current object and provide the pointer to the copy. +// This memberfunction enables automatic creation of new objects of the +// correct type depending on the object type, a feature which may be very useful +// for containers like AliEvent when adding objects in case the +// container owns the objects. This feature allows e.g. AliEvent +// to store either IceAOM objects or objects derived from IceAOM +// via tha AddDevice memberfunction, provided these derived classes also have +// a proper Clone memberfunction. + + IceAOM* m=new IceAOM(*this); + if (name) + { + if (strlen(name)) m->SetName(name); + } + return m; +} +/////////////////////////////////////////////////////////////////////////// diff --git a/RALICE/icepack/IceAOM.h b/RALICE/icepack/IceAOM.h new file mode 100644 index 00000000000..d4df411f63c --- /dev/null +++ b/RALICE/icepack/IceAOM.h @@ -0,0 +1,21 @@ +#ifndef IceAOM_h +#define IceAOM_h + +// Copyright(c) 2003, IceCube Experiment at the South Pole, All rights reserved. +// See cxx source for full Copyright notice. + +// $Id$ + +#include "IceGOM.h" + +class IceAOM : public IceGOM +{ + public: + IceAOM(); // Default constructor + virtual ~IceAOM(); // Default destructor + IceAOM(const IceAOM& m); // Copy constructor + virtual TObject* Clone(const char* name="") const; // Make a deep copy and provide its pointer + + ClassDef(IceAOM,1) // Signal (Hit) handling of a generic Amanda Optical Module (AOM). +}; +#endif diff --git a/RALICE/icepack/IceDOM.cxx b/RALICE/icepack/IceDOM.cxx new file mode 100644 index 00000000000..38ed5978a5f --- /dev/null +++ b/RALICE/icepack/IceDOM.cxx @@ -0,0 +1,69 @@ +/////////////////////////////////////////////////////////////////////////// +// Copyright(c) 2003, IceCube Experiment at the South Pole. +// All rights reserved. +// +// Author: The IceCube RALICE-based Offline Project. +// Contributors are mentioned in the code where appropriate. +// +// Permission to use, copy, modify and distribute this software and its +// documentation strictly for non-commercial purposes is hereby granted +// without fee, provided that the above copyright notice appears in all +// copies and that both the copyright notice and this permission notice +// appear in the supporting documentation. +// The authors make no claims about the suitability of this software for +// any purpose. It is provided "as is" without express or implied warranty. +/////////////////////////////////////////////////////////////////////////// + +// $Id$ + +/////////////////////////////////////////////////////////////////////////// +// Class IceDOM +// Signal/Hit handling of a generic IceCube Digital Optical Module (DOM). +// Basically this class provides an IceCube tailored user interface +// to the functionality of the class AliDevice via the generic IceGOM class. +// +// See IceGOM for some usage examples. +// +//--- Author: Nick van Eijndhoven 23-jun-2004 Utrecht University +//- Modified: NvE $Date$ Utrecht University +/////////////////////////////////////////////////////////////////////////// + +#include "IceDOM.h" +#include "Riostream.h" + +ClassImp(IceDOM) // Class implementation to enable ROOT I/O + +IceDOM::IceDOM() : IceGOM() +{ +// Default constructor. +} +/////////////////////////////////////////////////////////////////////////// +IceDOM::~IceDOM() +{ +// Default destructor. +} +/////////////////////////////////////////////////////////////////////////// +IceDOM::IceDOM(const IceDOM& m) : IceGOM(m) +{ +// Copy constructor. +} +/////////////////////////////////////////////////////////////////////////// +TObject* IceDOM::Clone(const char* name) const +{ +// Make a deep copy of the current object and provide the pointer to the copy. +// This memberfunction enables automatic creation of new objects of the +// correct type depending on the object type, a feature which may be very useful +// for containers like AliEvent when adding objects in case the +// container owns the objects. This feature allows e.g. AliEvent +// to store either IceDOM objects or objects derived from IceDOM +// via tha AddDevice memberfunction, provided these derived classes also have +// a proper Clone memberfunction. + + IceDOM* m=new IceDOM(*this); + if (name) + { + if (strlen(name)) m->SetName(name); + } + return m; +} +/////////////////////////////////////////////////////////////////////////// diff --git a/RALICE/icepack/IceDOM.h b/RALICE/icepack/IceDOM.h new file mode 100644 index 00000000000..10800da5732 --- /dev/null +++ b/RALICE/icepack/IceDOM.h @@ -0,0 +1,21 @@ +#ifndef IceDOM_h +#define IceDOM_h + +// Copyright(c) 2003, IceCube Experiment at the South Pole, All rights reserved. +// See cxx source for full Copyright notice. + +// $Id$ + +#include "IceGOM.h" + +class IceDOM : public IceGOM +{ + public: + IceDOM(); // Default constructor + virtual ~IceDOM(); // Default destructor + IceDOM(const IceDOM& m); // Copy constructor + virtual TObject* Clone(const char* name="") const; // Make a deep copy and provide its pointer + + ClassDef(IceDOM,1) // Signal (Hit) handling of a generic IceCube Digital Optical Module (DOM). +}; +#endif diff --git a/RALICE/icepack/IceEvent.cxx b/RALICE/icepack/IceEvent.cxx new file mode 100644 index 00000000000..58515979904 --- /dev/null +++ b/RALICE/icepack/IceEvent.cxx @@ -0,0 +1,307 @@ +/////////////////////////////////////////////////////////////////////////// +// Copyright(c) 2003, IceCube Experiment at the South Pole. +// All rights reserved. +// +// Author: The IceCube RALICE-based Offline Project. +// Contributors are mentioned in the code where appropriate. +// +// Permission to use, copy, modify and distribute this software and its +// documentation strictly for non-commercial purposes is hereby granted +// without fee, provided that the above copyright notice appears in all +// copies and that both the copyright notice and this permission notice +// appear in the supporting documentation. +// The authors make no claims about the suitability of this software for +// any purpose. It is provided "as is" without express or implied warranty. +/////////////////////////////////////////////////////////////////////////// + +// $Id$ + +/////////////////////////////////////////////////////////////////////////// +// Class IceEvent +// Handling of IceCube event data. +// Basically this class provides an IceCube tailored user interface +// to the functionality of the class AliEvent. +// +// Examples : +// ========== +// +// Creation and filling of an event with some fictitious module data +// ----------------------------------------------------------------- +// IceEvent* evt=new IceEvent(); +// evt->SetOwner(); +// +// // The starting unique signal ID. +// // In this example it will be increased everytime +// // when a new signal is created. +// Int_t sid=1; +// +// // Amanda module +// IceAOM m; +// m.SetUniqueID(123); +// m.SetNameTitle("OM123","Amanda module"); +// +// Float_t pos[3]={1,2,3}; +// m.SetPosition(pos,"car"); +// +// AliSignal s; +// +// s.SetSlotName("ADC",1); +// s.SetSlotName("LE",2); +// s.SetSlotName("TOT",3); +// +// s.Reset(); +// s.SetName("OM123 Hit 1"); +// s.SetUniqueID(sid++); +// s.SetSignal(100,"ADC"); +// s.SetSignal(-100,"LE"); +// s.SetSignal(-1000,"TOT"); +// m.AddHit(s); +// +// s.Reset(); +// s.SetName("OM123 Hit 2"); +// s.SetUniqueID(sid++); +// s.SetSignal(110,"ADC"); +// s.SetSignal(-101,"LE"); +// s.SetSignal(1001,"TOT"); +// m.AddHit(s); +// +// s.Reset(); +// s.SetName("OM123 Hit 3"); +// s.SetUniqueID(sid++); +// s.SetSignal(120,"ADC"); +// s.SetSignal(-102,"LE"); +// s.SetSignal(-1002,"TOT"); +// m.AddHit(s); +// +// evt->AddDevice(m); +// +// m.Reset(); +// m.SetUniqueID(456); +// m.SetName("OM456"); +// +// pos[0]=-4; +// pos[1]=-5; +// pos[2]=-6; +// m.SetPosition(pos,"car"); +// +// s.Reset(); +// s.SetName("OM456 Hit 1"); +// s.SetUniqueID(sid++); +// s.SetSignal(20,"ADC"); +// s.SetSignal(-200,"LE"); +// s.SetSignal(-2000,"TOT"); +// m.AddHit(s); +// +// s.Reset(); +// s.SetName("OM456 Hit 2"); +// s.SetUniqueID(sid++); +// s.SetSignal(21,"ADC"); +// s.SetSignal(-201,"LE"); +// s.SetSignal(2001,"TOT"); +// m.AddHit(s); +// +// s.Reset(); +// s.SetName("OM456 Hit 3"); +// s.SetUniqueID(sid++); +// s.SetSignal(22,"ADC"); +// s.SetSignal(-202,"LE"); +// s.SetSignal(-2002,"TOT"); +// m.AddHit(s); +// +// evt->AddDevice(m); +// +// // IceCube in-ice DOM +// IceIDOM mid; +// mid.SetUniqueID(958); +// mid.SetNameTitle("OM958","IceCube in-ice module"); +// +// pos[0]=9; +// pos[1]=5; +// pos[2]=8; +// mid.SetPosition(pos,"car"); +// +// s.Reset(); +// s.SetName("OM958 Hit 1"); +// s.SetUniqueID(sid++); +// s.SetSignal(40,"ADC"); +// s.SetSignal(-400,"LE"); +// s.SetSignal(-4000,"TOT"); +// mid.AddHit(s); +// +// s.Reset(); +// s.SetName("OM958 Hit 2"); +// s.SetUniqueID(sid++); +// s.SetSignal(41,"ADC"); +// s.SetSignal(-401,"LE"); +// s.SetSignal(4001,"TOT"); +// mid.AddHit(s); +// +// s.Reset(); +// s.SetName("OM958 Hit 3"); +// s.SetUniqueID(sid++); +// s.SetSignal(42,"ADC"); +// s.SetSignal(-402,"LE"); +// s.SetSignal(-4002,"TOT"); +// mid.AddHit(s); +// +// evt->AddDevice(mid); +// +// // IceTop DOM +// IceTDOM mtd; +// mtd.SetUniqueID(4958); +// mtd.SetNameTitle("OM4958","IceTop module"); +// +// pos[0]=49; +// pos[1]=5; +// pos[2]=8; +// mtd.SetPosition(pos,"car"); +// +// s.Reset(); +// s.SetName("OM4958 Hit 1"); +// s.SetUniqueID(sid++); +// s.SetSignal(50,"ADC"); +// s.SetSignal(-500,"LE"); +// s.SetSignal(-5000,"TOT"); +// mtd.AddHit(s); +// +// s.Reset(); +// s.SetName("OM4958 Hit 2"); +// s.SetUniqueID(sid++); +// s.SetSignal(51,"ADC"); +// s.SetSignal(-501,"LE"); +// s.SetSignal(5001,"TOT"); +// mtd.AddHit(s); +// +// s.Reset(); +// s.SetName("OM4958 Hit 3"); +// s.SetUniqueID(sid++); +// s.SetSignal(52,"ADC"); +// s.SetSignal(-502,"LE"); +// s.SetSignal(-5002,"TOT"); +// mtd.AddHit(s); +// +// evt->AddDevice(mtd); +// +// Investigation of the event contents +// ----------------------------------- +// // Provide event data overview +// evt->Data(); +// +// // Select a specific device (i.e. OM) from the event +// AliDevice* dx=(AliDevice*)evt->GetIdDevice(958); +// if (dx) dx->Data(); +// +// // Select a specific hit from the event +// AliSignal* sx=evt->GetIdHit(5,"IceGOM"); +// if (sx) sx->Data(); +// +// // Dump all the information for the various stored devices +// Int_t ndev=evt->GetNdevices(); +// for (Int_t idev=1; idev<=ndev; idev++) +// { +// IceGOM* om=(IceGOM*)evt->GetDevice(idev); +// if (om) om->Data(); +// } +// +// // Dump all the information for the various stored hits +// // Obtain pointers to the hits for all generic OM's (i.e. IceGOM) +// TObjArray* hits=evt->GetHits("IceGOM"); +// Int_t nhits=0; +// if (hits) nhits=hits->GetEntries(); +// for (Int_t ih=0; ihAt(ih); +// if (sx) sx->Data(); +// } +// +// // Obtain the minimum and maximum recorded TOT value +// Float_t vmin,vmax; +// evt->GetExtremes("IceGOM",vmin,vmax,"TOT"); +// cout << " Extreme values : vmin = " << vmin << " vmax = " << vmax << endl; +// +// Some simple module and hit manipulations +// ---------------------------------------- +// // Ordered hits w.r.t. decreasing TOT +// TObjArray* ordered=evt->SortHits("IceGOM","TOT",-1); +// nhits=0; +// if (ordered) nhits=ordered->GetEntries(); +// for (Int_t i=0; iAt(i); +// if (sx) sx->Data(); +// } +// +// // Ordered devices from the already ordered hit array +// TObjArray* devs=evt->SortDevices(ordered,0,0); +// ndev=0; +// if (devs) ndev=devs->GetEntries(); +// for (Int_t id=0; idAt(id); +// if (dx) dx->Data(); +// } +// +// // Newly ordered devices w.r.t. decreasing ADC +// TObjArray* devs=evt->SortDevices("IceGOM","ADC",-1); +// ndev=0; +// if (devs) ndev=devs->GetEntries(); +// for (Int_t id2=0; id2At(id2); +// if (dx) dx->Data(); +// } +// +// A simple 3D event display of the modules +// ---------------------------------------- +// TCanvas* c1=new TCanvas("c1","c1"); +// c1->x3d(); +// TView* view=new TView(1); +// view->SetRange(-50,-50,-50,50,50,50); +// view->ShowAxis(); +// +// evt->DisplayHits("IceGOM","TOT",1e4,1); +// +// +//--- Author: Nick van Eijndhoven 23-jun-2004 Utrecht University +//- Modified: NvE $Date$ Utrecht University +/////////////////////////////////////////////////////////////////////////// + +#include "IceEvent.h" +#include "Riostream.h" + +ClassImp(IceEvent) // Class implementation to enable ROOT I/O + +IceEvent::IceEvent() : AliEvent() +{ +// Default constructor. +} +/////////////////////////////////////////////////////////////////////////// +IceEvent::~IceEvent() +{ +// Default destructor. +} +/////////////////////////////////////////////////////////////////////////// +IceEvent::IceEvent(const IceEvent& evt) : AliEvent(evt) +{ +// Copy constructor. +} +/////////////////////////////////////////////////////////////////////////// +TObject* IceEvent::Clone(const char* name) const +{ +// Make a deep copy of the current object and provide the pointer to the copy. +// This memberfunction enables automatic creation of new objects of the +// correct type depending on the object type, a feature which may be very useful +// for containers like AliEvent when adding objects in case the +// container owns the objects. This feature allows e.g. AliEvent +// to store either IceEvent objects or objects derived from IceEvent +// via tha AddDevice memberfunction, provided these derived classes also have +// a proper Clone memberfunction. + + IceEvent* evt=new IceEvent(*this); + if (name) + { + if (strlen(name)) evt->SetName(name); + } + return evt; +} +/////////////////////////////////////////////////////////////////////////// diff --git a/RALICE/icepack/IceEvent.h b/RALICE/icepack/IceEvent.h new file mode 100644 index 00000000000..12375db3d69 --- /dev/null +++ b/RALICE/icepack/IceEvent.h @@ -0,0 +1,21 @@ +#ifndef IceEvent_h +#define IceEvent_h + +// Copyright(c) 2003, IceCube Experiment at the South Pole, All rights reserved. +// See cxx source for full Copyright notice. + +// $Id$ + +#include "AliEvent.h" + +class IceEvent : public AliEvent +{ + public: + IceEvent(); // Default constructor + virtual ~IceEvent(); // Default destructor + IceEvent(const IceEvent& evt); // Copy constructor + virtual TObject* Clone(const char* name="") const; // Make a deep copy and provide its pointer + + ClassDef(IceEvent,1) // Handling of IceCube event data. +}; +#endif diff --git a/RALICE/icepack/IceGOM.cxx b/RALICE/icepack/IceGOM.cxx new file mode 100644 index 00000000000..08e5194b53c --- /dev/null +++ b/RALICE/icepack/IceGOM.cxx @@ -0,0 +1,152 @@ +/////////////////////////////////////////////////////////////////////////// +// Copyright(c) 2003, IceCube Experiment at the South Pole. +// All rights reserved. +// +// Author: The IceCube RALICE-based Offline Project. +// Contributors are mentioned in the code where appropriate. +// +// Permission to use, copy, modify and distribute this software and its +// documentation strictly for non-commercial purposes is hereby granted +// without fee, provided that the above copyright notice appears in all +// copies and that both the copyright notice and this permission notice +// appear in the supporting documentation. +// The authors make no claims about the suitability of this software for +// any purpose. It is provided "as is" without express or implied warranty. +/////////////////////////////////////////////////////////////////////////// + +// $Id$ + +/////////////////////////////////////////////////////////////////////////// +// Class IceGOM +// Signal/Hit handling of a generic IceCube Optical Module (GOM). +// Basically this class provides an IceCube tailored user interface +// to the functionality of the class AliDevice. +// This class is meant to provide a base class for more specific OM's +// (i.e. Amanda analog OM's or IceCube digital OM's). +// To specifically address Amanda OM's, In-ice DOM's or IceTop DOM's +// please refer to the derived classes IceAOM, IceIDOM and IceTDOM resp. +// +// Example : +// ========= +// +// Creation and filling of a generic Icecube module with fictituous data +// --------------------------------------------------------------------- +// +// For further functionality please refer to AliDevice, AliSignal and AliAttrib. +// +// IceGOM m; +// m.SetUniqueID(123); +// m.SetNameTitle("OM123","Generic IceCube module"); +// +// // Indicate status (e.g. version of readout electronics) +// // via a user definable status word. +// Int_t stat=20031; +// m.SetStatus(stat); +// +// Float_t pos[3]={1,2,3}; +// m.SetPosition(pos,"car"); +// +// // The starting unique signal ID. +// // In this example it will be increased automatically +// // whenever a new signal is created. +// Int_t sid=10; +// +// AliSignal s; +// +// s.SetSlotName("ADC",1); +// s.SetSlotName("LE",2); +// s.SetSlotName("TOT",3); +// +// s.Reset(); +// s.SetName("OM123 Hit 1"); +// s.SetUniqueID(sid++); +// s.SetSignal(100,"ADC"); +// s.SetSignal(-100,"LE"); +// s.SetSignal(-1000,"TOT"); +// m.AddHit(s); +// +// s.Reset(); +// s.SetName("OM123 Hit 2"); +// s.SetUniqueID(sid++); +// s.SetSignal(110,"ADC"); +// s.SetSignal(-101,"LE"); +// s.SetSignal(1001,"TOT"); +// m.AddHit(s); +// +// s.Reset(); +// s.SetName("OM123 Hit 3"); +// s.SetUniqueID(sid++); +// s.SetSignal(120,"ADC"); +// s.SetSignal(-102,"LE"); +// s.SetSignal(-1002,"TOT"); +// m.AddHit(s); +// +// // Provide module data overview +// m.Data(); +// +// // Accessing the 3rd stored hit +// AliSignal* sx=m.GetHit(3); +// if (sx) sx->Data(); +// +// // Explicit hit selection via unique ID +// AliSignal* sx=m.GetIdHit(12); +// if (sx) sx->Data(); +// +// // Obtain the minimum and maximum recorded TOT value +// Float_t vmin,vmax; +// m.GetExtremes(vmin,vmax,"TOT"); +// cout << " Extreme values : vmin = " << vmin << " vmax = " << vmax << endl; +// +// // Ordered hits w.r.t. decreasing TOT +// TObjArray* ordered=m.SortHits("TOT",-1); +// Int_t nhits=0; +// if (ordered) nhits=ordered->GetEntries(); +// for (Int_t i=0; iAt(i); +// if (sx) sx->Data(); +// } +// +//--- Author: Nick van Eijndhoven 23-jun-2004 Utrecht University +//- Modified: NvE $Date$ Utrecht University +/////////////////////////////////////////////////////////////////////////// + +#include "IceGOM.h" +#include "Riostream.h" + +ClassImp(IceGOM) // Class implementation to enable ROOT I/O + +IceGOM::IceGOM() : AliDevice() +{ +// Default constructor. +} +/////////////////////////////////////////////////////////////////////////// +IceGOM::~IceGOM() +{ +// Default destructor. +} +/////////////////////////////////////////////////////////////////////////// +IceGOM::IceGOM(const IceGOM& m) : AliDevice(m) +{ +// Copy constructor. +} +/////////////////////////////////////////////////////////////////////////// +TObject* IceGOM::Clone(const char* name) const +{ +// Make a deep copy of the current object and provide the pointer to the copy. +// This memberfunction enables automatic creation of new objects of the +// correct type depending on the object type, a feature which may be very useful +// for containers like AliEvent when adding objects in case the +// container owns the objects. This feature allows e.g. AliEvent +// to store either IceGOM objects or objects derived from IceGOM +// via tha AddDevice memberfunction, provided these derived classes also have +// a proper Clone memberfunction. + + IceGOM* m=new IceGOM(*this); + if (name) + { + if (strlen(name)) m->SetName(name); + } + return m; +} +/////////////////////////////////////////////////////////////////////////// diff --git a/RALICE/icepack/IceGOM.h b/RALICE/icepack/IceGOM.h new file mode 100644 index 00000000000..7b7bdf3d0f0 --- /dev/null +++ b/RALICE/icepack/IceGOM.h @@ -0,0 +1,21 @@ +#ifndef IceGOM_h +#define IceGOM_h + +// Copyright(c) 2003, IceCube Experiment at the South Pole, All rights reserved. +// See cxx source for full Copyright notice. + +// $Id$ + +#include "AliDevice.h" + +class IceGOM : public AliDevice +{ + public: + IceGOM(); // Default constructor + virtual ~IceGOM(); // Default destructor + IceGOM(const IceGOM& m); // Copy constructor + virtual TObject* Clone(const char* name="") const; // Make a deep copy and provide its pointer + + ClassDef(IceGOM,1) // Signal (Hit) handling of a generic IceCube Optical Module (GOM). +}; +#endif diff --git a/RALICE/icepack/IceIDOM.cxx b/RALICE/icepack/IceIDOM.cxx new file mode 100644 index 00000000000..f40da91ec27 --- /dev/null +++ b/RALICE/icepack/IceIDOM.cxx @@ -0,0 +1,70 @@ +/////////////////////////////////////////////////////////////////////////// +// Copyright(c) 2003, IceCube Experiment at the South Pole. +// All rights reserved. +// +// Author: The IceCube RALICE-based Offline Project. +// Contributors are mentioned in the code where appropriate. +// +// Permission to use, copy, modify and distribute this software and its +// documentation strictly for non-commercial purposes is hereby granted +// without fee, provided that the above copyright notice appears in all +// copies and that both the copyright notice and this permission notice +// appear in the supporting documentation. +// The authors make no claims about the suitability of this software for +// any purpose. It is provided "as is" without express or implied warranty. +/////////////////////////////////////////////////////////////////////////// + +// $Id$ + +/////////////////////////////////////////////////////////////////////////// +// Class IceIDOM +// Signal/Hit handling of an IceCube In-ice Digital Optical Module (IDOM). +// Basically this class provides an IceCube tailored user interface +// to the functionality of the class AliDevice via the generic IceDOM +// and IceGOM classes. +// +// See IceGOM for some usage examples. +// +//--- Author: Nick van Eijndhoven 23-jun-2004 Utrecht University +//- Modified: NvE $Date$ Utrecht University +/////////////////////////////////////////////////////////////////////////// + +#include "IceIDOM.h" +#include "Riostream.h" + +ClassImp(IceIDOM) // Class implementation to enable ROOT I/O + +IceIDOM::IceIDOM() : IceDOM() +{ +// Default constructor. +} +/////////////////////////////////////////////////////////////////////////// +IceIDOM::~IceIDOM() +{ +// Default destructor. +} +/////////////////////////////////////////////////////////////////////////// +IceIDOM::IceIDOM(const IceIDOM& m) : IceDOM(m) +{ +// Copy constructor. +} +/////////////////////////////////////////////////////////////////////////// +TObject* IceIDOM::Clone(const char* name) const +{ +// Make a deep copy of the current object and provide the pointer to the copy. +// This memberfunction enables automatic creation of new objects of the +// correct type depending on the object type, a feature which may be very useful +// for containers like AliEvent when adding objects in case the +// container owns the objects. This feature allows e.g. AliEvent +// to store either IceIDOM objects or objects derived from IceIDOM +// via tha AddDevice memberfunction, provided these derived classes also have +// a proper Clone memberfunction. + + IceIDOM* m=new IceIDOM(*this); + if (name) + { + if (strlen(name)) m->SetName(name); + } + return m; +} +/////////////////////////////////////////////////////////////////////////// diff --git a/RALICE/icepack/IceIDOM.h b/RALICE/icepack/IceIDOM.h new file mode 100644 index 00000000000..57cd42ddc8b --- /dev/null +++ b/RALICE/icepack/IceIDOM.h @@ -0,0 +1,21 @@ +#ifndef IceIDOM_h +#define IceIDOM_h + +// Copyright(c) 2003, IceCube Experiment at the South Pole, All rights reserved. +// See cxx source for full Copyright notice. + +// $Id$ + +#include "IceDOM.h" + +class IceIDOM : public IceDOM +{ + public: + IceIDOM(); // Default constructor + virtual ~IceIDOM(); // Default destructor + IceIDOM(const IceIDOM& m); // Copy constructor + virtual TObject* Clone(const char* name="") const; // Make a deep copy and provide its pointer + + ClassDef(IceIDOM,1) // Signal (Hit) handling of an IceCube In-ice Digital Optical Module (IDOM). +}; +#endif diff --git a/RALICE/icepack/IceTDOM.cxx b/RALICE/icepack/IceTDOM.cxx new file mode 100644 index 00000000000..6e2b8c195e3 --- /dev/null +++ b/RALICE/icepack/IceTDOM.cxx @@ -0,0 +1,70 @@ +/////////////////////////////////////////////////////////////////////////// +// Copyright(c) 2003, IceCube Experiment at the South Pole. +// All rights reserved. +// +// Author: The IceCube RALICE-based Offline Project. +// Contributors are mentioned in the code where appropriate. +// +// Permission to use, copy, modify and distribute this software and its +// documentation strictly for non-commercial purposes is hereby granted +// without fee, provided that the above copyright notice appears in all +// copies and that both the copyright notice and this permission notice +// appear in the supporting documentation. +// The authors make no claims about the suitability of this software for +// any purpose. It is provided "as is" without express or implied warranty. +/////////////////////////////////////////////////////////////////////////// + +// $Id$ + +/////////////////////////////////////////////////////////////////////////// +// Class IceTDOM +// Signal/Hit handling of an IceTop Digital Optical Module (TDOM). +// Basically this class provides an IceCube tailored user interface +// to the functionality of the class AliDevice via the generic IceDOM +// and IceGOM classes. +// +// See IceGOM for some usage examples. +// +//--- Author: Nick van Eijndhoven 23-jun-2004 Utrecht University +//- Modified: NvE $Date$ Utrecht University +/////////////////////////////////////////////////////////////////////////// + +#include "IceTDOM.h" +#include "Riostream.h" + +ClassImp(IceTDOM) // Class implementation to enable ROOT I/O + +IceTDOM::IceTDOM() : IceDOM() +{ +// Default constructor. +} +/////////////////////////////////////////////////////////////////////////// +IceTDOM::~IceTDOM() +{ +// Default destructor. +} +/////////////////////////////////////////////////////////////////////////// +IceTDOM::IceTDOM(const IceTDOM& m) : IceDOM(m) +{ +// Copy constructor. +} +/////////////////////////////////////////////////////////////////////////// +TObject* IceTDOM::Clone(const char* name) const +{ +// Make a deep copy of the current object and provide the pointer to the copy. +// This memberfunction enables automatic creation of new objects of the +// correct type depending on the object type, a feature which may be very useful +// for containers like AliEvent when adding objects in case the +// container owns the objects. This feature allows e.g. AliEvent +// to store either IceTDOM objects or objects derived from IceTDOM +// via tha AddDevice memberfunction, provided these derived classes also have +// a proper Clone memberfunction. + + IceTDOM* m=new IceTDOM(*this); + if (name) + { + if (strlen(name)) m->SetName(name); + } + return m; +} +/////////////////////////////////////////////////////////////////////////// diff --git a/RALICE/icepack/IceTDOM.h b/RALICE/icepack/IceTDOM.h new file mode 100644 index 00000000000..74e961d84f8 --- /dev/null +++ b/RALICE/icepack/IceTDOM.h @@ -0,0 +1,21 @@ +#ifndef IceTDOM_h +#define IceTDOM_h + +// Copyright(c) 2003, IceCube Experiment at the South Pole, All rights reserved. +// See cxx source for full Copyright notice. + +// $Id$ + +#include "IceDOM.h" + +class IceTDOM : public IceDOM +{ + public: + IceTDOM(); // Default constructor + virtual ~IceTDOM(); // Default destructor + IceTDOM(const IceTDOM& m); // Copy constructor + virtual TObject* Clone(const char* name="") const; // Make a deep copy and provide its pointer + + ClassDef(IceTDOM,1) // Signal (Hit) handling of an IceTop Digital Optical Module (TDOM). +}; +#endif diff --git a/RALICE/icepack/history.txt b/RALICE/icepack/history.txt new file mode 100644 index 00000000000..108e9d48709 --- /dev/null +++ b/RALICE/icepack/history.txt @@ -0,0 +1,4 @@ +////////////////////////////////////////////////////////////////////////////////////// +// History of updates // +////////////////////////////////////////////////////////////////////////////////////// +01-dec-2004 NvE First release of the package as a subdirectory of Ralice. diff --git a/RALICE/icepack/macros/icetest.cc b/RALICE/icepack/macros/icetest.cc new file mode 100644 index 00000000000..a9663ae1408 --- /dev/null +++ b/RALICE/icepack/macros/icetest.cc @@ -0,0 +1,327 @@ +////////////////////////////////////////////////////////////////////////// +// ROOT macro to show the functionality of data handling in IcePack. +// To run this ROOT macro in batch mode and get the output in a file +// test.log, just type the following at the regular command prompt ($) +// +// $ root -b -q icetest.cc >test.log +// +// Interactive execution of this macro can be achieved by +// the following command after starting a ROOT session +// +// $ root> .x icetest.cc +// +// The commented-out lines at the end of the macro show how +// to obtain a 3D event view of the stored data. +// Obviously such an event display can only be invoked by +// executing this test macro in interactive mode. +// +// NvE 01-dec-2004 Utrecht University +////////////////////////////////////////////////////////////////////////// +{ + gSystem->Load("ralice"); + gSystem->Load("icepack"); + + IceEvent* evt=new IceEvent(); + evt->SetOwner(); + + // Amanda module + IceAOM m; + m.SetUniqueID(123); + m.SetNameTitle("OM123","Amanda module"); + + Float_t pos[3]={1,2,3}; + m.SetPosition(pos,"car"); + + // The starting unique signal ID. + // It will be increased automatically in this macro + // when a new signal is created. + Int_t sid=1; + + AliSignal s; + + s.SetSlotName("ADC",1); + s.SetSlotName("LE",2); + s.SetSlotName("TOT",3); + + s.Reset(); + s.SetName("OM123 Hit 1"); + s.SetUniqueID(sid++); + s.SetSignal(100,"ADC"); + s.SetSignal(-100,"LE"); + s.SetSignal(-1000,"TOT"); + m.AddHit(s); + + s.Reset(); + s.SetName("OM123 Hit 2"); + s.SetUniqueID(sid++); + s.SetSignal(110,"ADC"); + s.SetSignal(-101,"LE"); + s.SetSignal(1001,"TOT"); + m.AddHit(s); + + s.Reset(); + s.SetName("OM123 Hit 3"); + s.SetUniqueID(sid++); + s.SetSignal(120,"ADC"); + s.SetSignal(-102,"LE"); + s.SetSignal(-1002,"TOT"); + m.AddHit(s); + + evt->AddDevice(m); + + m.Reset(); + m.SetUniqueID(456); + m.SetName("OM456"); + + pos[0]=-4; + pos[1]=-5; + pos[2]=-6; + m.SetPosition(pos,"car"); + + s.Reset(); + s.SetName("OM456 Hit 1"); + s.SetUniqueID(sid++); + s.SetSignal(20,"ADC"); + s.SetSignal(-200,"LE"); + s.SetSignal(-2000,"TOT"); + m.AddHit(s); + + s.Reset(); + s.SetName("OM456 Hit 2"); + s.SetUniqueID(sid++); + s.SetSignal(21,"ADC"); + s.SetSignal(-201,"LE"); + s.SetSignal(2001,"TOT"); + m.AddHit(s); + + s.Reset(); + s.SetName("OM456 Hit 3"); + s.SetUniqueID(sid++); + s.SetSignal(22,"ADC"); + s.SetSignal(-202,"LE"); + s.SetSignal(-2002,"TOT"); + m.AddHit(s); + + // Example of explicit hit selection + AliSignal* sx=m.GetIdHit(5); + if (sx) + { + cout << " === Hit selection on UniqueID=5 for OM 456 ===" << endl; + sx->Data(); + } + + evt->AddDevice(m); + + m.Reset(); + m.SetUniqueID(558); + m.SetName("OM558"); + + pos[0]=5; + pos[1]=5; + pos[2]=8; + m.SetPosition(pos,"car"); + + s.Reset(); + s.SetName("OM558 Hit 1"); + s.SetUniqueID(sid++); + s.SetSignal(30,"ADC"); + s.SetSignal(-300,"LE"); + s.SetSignal(-3000,"TOT"); + m.AddHit(s); + + s.Reset(); + s.SetName("OM558 Hit 2"); + s.SetUniqueID(sid++); + s.SetSignal(31,"ADC"); + s.SetSignal(-301,"LE"); + s.SetSignal(3001,"TOT"); + m.AddHit(s); + + s.Reset(); + s.SetName("OM558 Hit 3"); + s.SetUniqueID(sid++); + s.SetSignal(32,"ADC"); + s.SetSignal(-302,"LE"); + s.SetSignal(-3002,"TOT"); + m.AddHit(s); + + evt->AddDevice(m); + + // IceCube in-ice DOM + IceIDOM mid; + mid.SetUniqueID(958); + mid.SetNameTitle("OM958","IceCube in-ice module"); + + pos[0]=9; + pos[1]=5; + pos[2]=8; + mid.SetPosition(pos,"car"); + + s.Reset(); + s.SetName("OM958 Hit 1"); + s.SetUniqueID(sid++); + s.SetSignal(40,"ADC"); + s.SetSignal(-400,"LE"); + s.SetSignal(-4000,"TOT"); + mid.AddHit(s); + + s.Reset(); + s.SetName("OM958 Hit 2"); + s.SetUniqueID(sid++); + s.SetSignal(41,"ADC"); + s.SetSignal(-401,"LE"); + s.SetSignal(4001,"TOT"); + mid.AddHit(s); + + s.Reset(); + s.SetName("OM958 Hit 3"); + s.SetUniqueID(sid++); + s.SetSignal(42,"ADC"); + s.SetSignal(-402,"LE"); + s.SetSignal(-4002,"TOT"); + mid.AddHit(s); + + evt->AddDevice(mid); + + // IceTop DOM + IceTDOM mtd; + mtd.SetUniqueID(4958); + mtd.SetNameTitle("OM4958","IceTop module"); + + pos[0]=49; + pos[1]=5; + pos[2]=8; + mtd.SetPosition(pos,"car"); + + s.Reset(); + s.SetName("OM4958 Hit 1"); + s.SetUniqueID(sid++); + s.SetSignal(50,"ADC"); + s.SetSignal(-500,"LE"); + s.SetSignal(-5000,"TOT"); + mtd.AddHit(s); + + s.Reset(); + s.SetName("OM4958 Hit 2"); + s.SetUniqueID(sid++); + s.SetSignal(51,"ADC"); + s.SetSignal(-501,"LE"); + s.SetSignal(5001,"TOT"); + mtd.AddHit(s); + + s.Reset(); + s.SetName("OM4958 Hit 3"); + s.SetUniqueID(sid++); + s.SetSignal(52,"ADC"); + s.SetSignal(-502,"LE"); + s.SetSignal(-5002,"TOT"); + mtd.AddHit(s); + + evt->AddDevice(mtd); + + // Provide event data overview + evt->Data(); + + // Select a specific device (i.e. OM) from the event + AliDevice* dx=(AliDevice*)evt->GetIdDevice(958); + if (dx) + { + cout << " === Device selection on UniqueID=958 for the whole event ===" << endl; + dx->Data(); + } + + // Select a specific hit from the event + AliSignal* sx=evt->GetIdHit(5,"IceGOM"); + if (sx) + { + cout << " === Hit selection on UniqueID=5 for the whole event via IceGOM ===" << endl; + sx->Data(); + } + + // Dump all the information for the various stored devices + cout << endl; + cout << " ======= devices dump ========" << endl; + cout << endl; + + Int_t ndev=evt->GetNdevices(); + for (Int_t idev=1; idev<=ndev; idev++) + { + cout << " Device number : " << idev << endl; + IceGOM* om=(IceGOM*)evt->GetDevice(idev); + if (om) om->Data(); + } + + // Dump all the information for the various stored hits + cout << endl; + cout << " ======= Event all hits dump ========" << endl; + cout << endl; + + // Obtain pointers to the hits for all generic OM's (i.e. IceGOM) + TObjArray* hits=evt->GetHits("IceGOM"); + Int_t nhits=0; + if (hits) nhits=hits->GetEntries(); + for (Int_t ih=0; ihAt(ih); + if (sx) sx->Data(); + } + + // Obtain the minimum and maximum observed TOT value + Float_t vmin,vmax; + evt->GetExtremes("IceGOM",vmin,vmax,"TOT"); + + cout << endl; + cout << " === Extreme values : vmin = " << vmin << " vmax = " << vmax << endl; + cout << endl; + + // Various hit orderings + cout << endl; + cout << " ======= ordered hits w.r.t. decreasing TOT ========" << endl; + cout << endl; + + TObjArray* ordered=evt->SortHits("IceGOM","TOT",-1); + nhits=0; + if (ordered) nhits=ordered->GetEntries(); + for (Int_t i=0; iAt(i); + if (sx) sx->Data(); + } + + cout << endl; + cout << " ======= ordered devices from the ordered hit array ========" << endl; + cout << endl; + + TObjArray* devs=evt->SortDevices(ordered,0,0); + ndev=0; + if (devs) ndev=devs->GetEntries(); + for (Int_t id=0; idAt(id); + if (dx) dx->Data(); + } + + cout << endl; + cout << " ======= newly ordered devices w.r.t. decreasing ADC ========" << endl; + cout << endl; + + TObjArray* devs=evt->SortDevices("IceGOM","ADC",-1); + ndev=0; + if (devs) ndev=devs->GetEntries(); + for (Int_t id2=0; id2At(id2); + if (dx) dx->Data(); + } + + // Example for a 3D signal display of the devices +/*********** + TCanvas* c1=new TCanvas("c1","c1"); + c1->x3d(); + TView* view=new TView(1); + view->SetRange(-50,-50,-50,50,50,50); + view->ShowAxis(); + + evt->DisplayHits("IceGOM","TOT",1e4,1); +************/ +} diff --git a/RALICE/icepack/scripts/alphacxxlib.sh b/RALICE/icepack/scripts/alphacxxlib.sh new file mode 100644 index 00000000000..e5590959bce --- /dev/null +++ b/RALICE/icepack/scripts/alphacxxlib.sh @@ -0,0 +1,32 @@ +#!/bin/sh +### Shell script to create a ROOT loadable ALPHA-CXX shared lib out of .cxx source code +### +### NvE 05-jul-2000 UU-SAP Utrecht + +### Name of the produced shared library +lib=icepack.so + +### The option string for ALPHA-CXX shared lib compilation and linking *** +### For the ALPHA-CXX ROOT loadable shared lib the strict requirements are *** +### dropped to avoid many warnings from the rootcint generated code *** +alpharoot="-x cxx -g0 -shared -w1 -I$ROOTSYS/include -I$ALIROOT/RALICE -o $lib" + +### Go to the directory with the source files +cd $ALIROOT/RALICE/icepack + +### Create the dictionary files +rootcint zzzicepackdict.cxx -c -I$ALIROOT/RALICE ICEHeaders.h ICELinkDef.h + +### Compile and create the ROOT loadable shared library +cxx $alpharoot *.cxx + +rm zzzicepackdict.* +rm *.o +rm so_locations + +### Move the created lib to the scripts directory and go there +mv $lib scripts +cd scripts + +echo ' ' +echo '*** alphacxxlib done. Result in ' $lib diff --git a/RALICE/icepack/scripts/gcclib.sh b/RALICE/icepack/scripts/gcclib.sh new file mode 100644 index 00000000000..83e9f681409 --- /dev/null +++ b/RALICE/icepack/scripts/gcclib.sh @@ -0,0 +1,34 @@ +#!/bin/sh +### Shell script to create a ROOT loadable GCC shared lib out of .cxx source code +### +### NvE 23-may-2000 UU-SAP Utrecht +# +### Name of the produced shared library +lib=icepack.so +# +### The option string for GCC shared lib compilation and linking *** +### For the GCC ROOT loadable shared lib the strict requirements are *** +### dropped to avoid many warnings from the rootcint generated code *** +gccroot="-shared -g0 -ansi -pedantic -Wall -Wno-long-long -I$ROOTSYS/include -I$ALIROOT/RALICE -o $lib" +# +echo "lib = " $lib +echo "gccroot = " $gccroot +# +### Go to the directory with the source files +cd $ALIROOT/RALICE/icepack +# +### Create the dictionary files +rootcint -f zzzicepackdict.cxx -c -I$ALIROOT/RALICE ICEHeaders.h ICELinkDef.h +# +### Compile and create the ROOT loadable shared library +g++ $gccroot *.cxx +# +rm zzzicepackdict.* +rm *.o +# +### Move the created lib to the scripts directory and go there +mv $lib scripts +cd scripts +# +echo ' ' +echo '*** gcclib done. Result in ' $lib diff --git a/RALICE/icepack/scripts/hpcclib.sh b/RALICE/icepack/scripts/hpcclib.sh new file mode 100644 index 00000000000..0e58740fd4a --- /dev/null +++ b/RALICE/icepack/scripts/hpcclib.sh @@ -0,0 +1,29 @@ +#!/bin/sh +### Shell script to create a ROOT loadable HP-CC shared lib out of .cxx source code +### +### NvE 28-jun-1999 UU-SAP Utrecht +# +### The option strings for HP-CC shared lib compilation and linking *** +### For the HP-CC ROOT loadable shared lib the strict requirements are *** +### dropped to avoid many warnings from the rootcint generated code *** +hpcomp="-c -s -z +z +a1 +w +DAportable -I$ROOTSYS/include -I$ALIROOT/RALICE" +hproot="-c -s -z +z +a1 +DAportable -I$ROOTSYS/include -I$ALIROOT/RALICE" +hplink="-L$ROOTSYS/lib/ -l*.sl -lm" + +### Go to the directory with the source files +cd $ALIROOT/RALICE/icepack + +rootcint zzzicepackdict.cxx -c -I$ALIROOT/RALICE ICEHeaders.h ICELinkDef.h + +CC $hproot *.cxx + +CC -b -o icepack.sl *.o + +rm zzzicepackdict.* +rm *.o + +### Move the created lib to the scripts directory and go there +mv icepack.sl scripts +cd scripts + +echo '*** hpcclib.sh done. Result in icepack.sl' diff --git a/RALICE/icepack/scripts/macgcclib.sh b/RALICE/icepack/scripts/macgcclib.sh new file mode 100644 index 00000000000..093b2741e6c --- /dev/null +++ b/RALICE/icepack/scripts/macgcclib.sh @@ -0,0 +1,50 @@ +#!/bin/sh +### Shell script to create a ROOT loadable GCC shared lib out of .cxx source code +### +### NvE 23-may-2000 UU-SAP Utrecht +# +### Name of the produced shared libraries +lib1=icepack.so +lib2=icepack.dylib +# +### Some MAC specific settings +export MACOSX_DEPLOYMENT_TARGET=10.3 +unset LD_PREBIND +# +### The option string for GCC shared lib compilation and linking *** +### For the GCC ROOT loadable shared lib the strict requirements are *** +### dropped to avoid many warnings from the rootcint generated code *** +gccroot="-c -g0 -ansi -pedantic -Wall -Wno-long-long -I$ROOTSYS/include -I$ALIROOT/RALICE" +# +echo "lib = " $lib +echo "gccroot = " $gccroot +# +### Go to the directory with the source files +cd $ALIROOT/RALICE/icepack +# +### Create the dictionary files +rootcint -f zzzicepackdict.cxx -c -I$ALIROOT/RALICE ICEHeaders.h ICELinkDef.h +# +### Compile and create the ROOT loadable shared library +# +# Compilation phase +g++ $gccroot *.cxx +# +# Creating ralice.so library +g++ -v -bundle -undefined dynamic_lookup -o $lib1 *.o +# +# Creating ralice.dylib library +g++ -v -dynamiclib -undefined dynamic_lookup -single_module -o $lib2 *.o +### On some systems the following extra "-read_only_relocs" flag might be needed +# g++ -v -dynamiclib -undefined dynamic_lookup -single_module -read_only_relocs -o $lib2 *.o +# +rm zzzicepackdict.* +rm *.o +# +### Move the created lib to the scripts directory and go there +mv $lib1 scripts +mv $lib2 scripts +cd scripts +# +echo ' ' +echo '*** macgcclib.sh done. Results in icepack.so and icepack.dylib' diff --git a/RALICE/icepack/scripts/mklibs.bat b/RALICE/icepack/scripts/mklibs.bat new file mode 100755 index 00000000000..b30012abcb2 --- /dev/null +++ b/RALICE/icepack/scripts/mklibs.bat @@ -0,0 +1,118 @@ +@echo off +rem **************************************************************************** +rem * Script to create an MSVC++ LIB and relocatable DLL from *.cxx files +rem * +rem * Usage : +rem * ------- +rem * mklibs export : ROOT loadable DLL and export LIB are created +rem * mklibs full : ROOT loadable DLL and full LIB version are created +rem * +rem * Notes : +rem * ------- +rem * 1) "mklibs export" is the default, enabling ROOT loadable library creation +rem * via 'double clicking'. +rem * +rem * 2) Providing unsupported options results in displaying the help info. +rem * +rem * This script creates icepack.lib and icepack.dll from all .h and .cxx files +rem * in the current directory. +rem * +rem * In view of the ROOTCINT processing, the following two standard files +rem * are always required : +rem * +rem * ICEHeaders.h : containing an include of all .h files +rem * ICELinkDef.h : containing the #pragma's to define all classes +rem * +rem * --- NvE 04-apr-2000 UU-SAP Utrecht +rem **************************************************************************** + +echo . +echo === Automatic ROOT library production of files ice.lib and ice.dll === +echo . +rem --- Set the IcePack source directory as working directory +cd %ALIROOT%\RALICE\icepack + +rem --- The option strings for MSVC++ DLL compilation and linking --- +set mscomp=/nologo /c /TP /Ze /MD /GR /GX /I%ROOTSYS%\include /I%ALIROOT%\RALICE +set msdll=/nologo /TP /Ze /MD /LD /GD /GR /GX /I%ROOTSYS%\include /I%ALIROOT%\RALICE +set mslink=/ENTRY:_DllMainCRTStartup@12 %ROOTSYS%\lib\*.lib %MYLIBS%\*.lib + +if "%1" == "" goto export +if "%1" == "export" goto export +if "%1" == "full" goto full + +rem --- Displaying of the help info --- +echo **************************************************************************** +echo * Script to create an MSVC++ LIB and relocatable DLL from *.cxx files +echo * +echo * Usage : +echo * ------- +echo * mklibs export : ROOT loadable DLL and export LIB are created +echo * mklibs full : ROOT loadable DLL and full LIB version are created +echo * +echo * Notes : +echo * ------- +echo * 1) "mklibs export" is the default, enabling ROOT loadable library creation +echo * via 'double clicking'. +echo * 2) Providing unsupported options results in displaying the help info. +echo * +echo * This script creates icepack.lib and icepack.dll from all .h and .cxx files +echo * in the current directory. +echo * +echo * In view of the ROOTCINT processing, the following two standard files +echo * are always required : +echo * +echo * ICEHeaders.h : containing an include of all .h files +echo * ICELinkDef.h : containing the #pragma's to define all classes +echo **************************************************************************** +goto end + +:export +echo *** Creation of ROOT loadable export libraries +echo. +rem --- Creation of ROOT dictionary --- +rootcint zzzicepackdict.cxx -c -I%ALIROOT%\RALICE ICEHeaders.h ICELinkDef.h +rem --- Compilation step --- +cl %mscomp% *.cxx +rem --- Creation of the export LIB --- +bindexplib icepack *.obj > icepack.def +lib /nologo /machine:IX86 *.obj /def:icepack.def /out:icepack.lib +rem --- Creation of the DLL --- +link /nologo /machine:IX86 /DLL *.obj icepack.exp %mslink% /OUT:icepack.dll +rem --- Move the created libs to the SCRIPTS subdirectory +move icepack.lib .\scripts +move icepack.dll .\scripts +rem --- Delete intermediate files +del icepack.def +del icepack.exp +goto root_clean + +:full +echo *** Creation of ROOT loadable full version libraries +echo. +rem --- Creation of ROOT dictionary --- +rootcint zzzicepackdict.cxx -c -I%ALIROOT%\RALICE ICEHeaders.h ICELinkDef.h +rem --- Creation of the DLL --- +cl %msdll% *.cxx /link %mslink% /OUT:icepack.dll +rem --- Creation of the full version LIB --- +lib /nologo /machine:IX86 *.obj /out:icepack.lib +rem --- Move the created libs to the SCRIPTS subdirectory +move icepack.lib .\scripts +move icepack.dll .\scripts +rem --- Delete intermediate files +goto root_clean + +:root_clean +rem --- Delete all intermediate files --- +del .def +del zzzicepackdict.h +del zzzicepackdict.cxx +del *.obj +echo. +echo *** mklibs done. +goto end + +:end +rem --- Go back to original directory +cd scripts +rem --- End of script --- diff --git a/RALICE/wa98/history.txt b/RALICE/wa98/history.txt index 84fd2907dc8..dc40ae37612 100644 --- a/RALICE/wa98/history.txt +++ b/RALICE/wa98/history.txt @@ -39,4 +39,8 @@ 29-nov-2004 NvE Package containing the classes Wa98Event, Wa98Convert and the usual files RWA98Headers.h, RWA98LinkDef.h, history.txt and the sub-directory /scripts introduced as a sub-directory /wa98 in the Ralice repository at CERN. - +01-dev-2004 NvE Installation scripts modified to make use of environment variable ALIROOT + which should contain the path to the directory where AliRoot resides. + This ALIROOT environment variable fulfills a comparable function as + the ROOTSYS environment variable for the ROOT system. + Also installation script macgcclib.sh for gcc on MAC systems introduced. -- 2.43.0