extensions in AliHLTTPCDisplay
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Oct 2006 04:49:58 +0000 (04:49 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Oct 2006 04:49:58 +0000 (04:49 +0000)
- handling of new include directory structure of the HOMER header files
- default geometry file introduced
- library compile time and property functions added
- geometry file alice.geom added to distribution; to be installed in
  <prefix>/share/alice-hlt

HLT/ChangeLog
HLT/TPCLib/OnlineDisplay/AliHLTTPCDisplayMain.cxx
HLT/TPCLib/OnlineDisplay/AliHLTTPCDisplayMain.h
HLT/TPCLib/OnlineDisplay/Makefile.am
HLT/configure.ac

index fc81768bd856839c0158b756518d8e151ca98fea..9b804df3ebe3eae2dfef6e808cd57a94a391e0dc 100644 (file)
@@ -1,3 +1,9 @@
+2006-10-05 extensions in AliHLTTPCDisplay
+       - handling of new include directory structure of the HOMER header files
+       - default geometry file introduced
+       - library compile time and property functions added
+       - geometry file alice.geom added to distribution; to be installed in
+         <prefix>/share/alice-hlt
 2006-09-07 HLT-v0-4
        - TPC digit reader classes fetch row range from AliHLTTPCTransform
         - code from TPC commissioning version merged
index 773ce9b4d870659bc9d64e51307e9f640d20e446..25a091167e499bd2656829f41a8cb2ecc06ce191 100644 (file)
@@ -197,6 +197,26 @@ AliHLTTPCDisplayMain::~AliHLTTPCDisplayMain() {
 //____________________________________________________________________________________________________
 Int_t AliHLTTPCDisplayMain::Connect( unsigned int cnt, const char** hostnames, unsigned short* ports, Char_t *gfile){
 
+    Char_t* defaultGeometry=NULL;
+#if defined(DEFAULT_GEOMETRY)
+    defaultGeometry=DEFAULT_GEOMETRY;
+#endif
+    if (gfile!=NULL) {
+      HLTDebug("probing geometry file %s", gfile);
+      ifstream test(gfile);
+      if (test.fail()) {
+       HLTWarning("unable to find geometry file %s, using default file", gfile);
+       gfile=defaultGeometry;
+      }
+      test.close();
+    } else {
+      HLTDebug("using default geometry file %s", gfile, defaultGeometry);
+      gfile=defaultGeometry;
+    }
+    if (gfile==NULL) {
+      HLTError("geometry file missing");
+      return -EINVAL;
+    }
 #if defined(HAVE_HOMERREADER) 
     // -- input datatypes , reverse
     Char_t* spptID="SRETSULC";
@@ -261,7 +281,7 @@ Int_t AliHLTTPCDisplayMain::Connect( unsigned int cnt, const char** hostnames, u
     }
     fConnect = kTRUE;  
 
-    // Initialize TPC Display Classes  -- IMPORTANT... don't change the order of them
+    // INITIALIZE TPC DISPLAY Classes  -- IMPORTANT... don't change the order of them
     fDisplay3D = new AliHLTTPCDisplay3D(this, gfile);
  
     if (ExistsRawData()){
@@ -280,7 +300,8 @@ Int_t AliHLTTPCDisplayMain::Connect( unsigned int cnt, const char** hostnames, u
 
     return 0;
 #else
-    HLTFatal("HOMER raeder not available");
+    HLTFatal("HOMER raeder not available during package configuration, libAliHLTTPCDisplay compiled without HOMER support");
+    return -EFAULT;
 #endif // defined(HAVE_HOMERREADER) 
 }
 
@@ -405,7 +426,7 @@ void AliHLTTPCDisplayMain::ReadData(Bool_t nextSwitch){
     
     SetupTracks();  
 #else
-    HLTFatal("HOMER raeder not available");
+    HLTFatal("HOMER raeder not available during package configuration, libAliHLTTPCDisplay compiled without HOMER support");
 #endif // defined(HAVE_HOMERREADER) 
 }
 
@@ -481,7 +502,7 @@ void AliHLTTPCDisplayMain::DisplayEvent(){
     // TAKE CARE !!! EXISTSxxxData() HANDLING of 3D will be done IN this class !!!
     fDisplay3D->Draw(); 
 #else
-    HLTFatal("HOMER raeder not available");
+    HLTFatal("HOMER raeder not available during package configuration, libAliHLTTPCDisplay compiled without HOMER support");
 #endif // defined(HAVE_HOMERREADER) 
 
 }
@@ -645,5 +666,3 @@ void AliHLTTPCDisplayMain::ExecPadEvent(Int_t event, Int_t px, Int_t py, TObject
         fPadCallback(fPt2Gui, binx);
   }
 }
-
-
index 4c4c2e5bc631603bccf5b6b0fa59f071cc3e8ca1..a281507fc4e9d2c40786c042033dbb4122864d60 100644 (file)
@@ -202,7 +202,7 @@ Char_t GetTrackParamBfield());
 
 // ---------------------------------------------------
  private:
-    AliHLTTPCDisplayMain(const AliHLTTPCDisplayMain &/*d*/):TObject(){;}
+    AliHLTTPCDisplayMain(const AliHLTTPCDisplayMain &/*d*/):TObject(), AliHLTLogging(){;}
     AliHLTTPCDisplayMain& operator=(const AliHLTTPCDisplayMain &/*d*/){return *this;}
    
     void SetSliceArray();
index 65096d1d8e3e8bd5742c8c80cefe34939bb0ee94..079ccb5987a10927b68218794e9484d7752261d3 100644 (file)
@@ -21,6 +21,11 @@ libAliHLTTPCDisplay_la_SOURCES       = AliHLTTPCDisplayMain.cxx \
                                  AliHLTTPCDisplayPadRow.cxx  \
                                  AliHLTTPCDisplayResiduals.cxx
 
+DEFAULT_GEOMETRY               = alice.geom
+libAliHLTTPCDisplay_la_DATA    = $(DEFAULT_GEOMETRY)
+libAliHLTTPCDisplay_ladir      = $(pkgdatadir)
+AM_CPPFLAGS                    += -DDEFAULT_GEOMETRY=\"$(libAliHLTTPCDisplay_ladir)/$(DEFAULT_GEOMETRY)\"
+
 # class header files, the link definition for the root dictionary
 # will be created from the names of the header files
 CLASS_HDRS                     = AliHLTTPCDisplayMain.h  \
@@ -42,7 +47,10 @@ libAliHLTTPCDisplay_la_LDFLAGS       = -L@ROOTLIBDIR@ \
                                  @ALIROOT_LDFLAGS@ \
                                  @ALIROOT_LIBS@ \
                                  @HOMER_LDFLAGS@ \
-                                 -version-info 1:0:0
+                                 -version-info 1:1:0
+
+# automatic generation of data and time of library build
+COMPILE_INFO                   =  AliHLTTPCDisplayCompileInfo.cxx
 
 # set the file name for the generated root dictionary
 DICTCPP                                =  AliHLTTPCDisplay-DICT.cxx
@@ -50,8 +58,26 @@ DICTCPP                              =  AliHLTTPCDisplay-DICT.cxx
 # dictionary files and which are not part of the CLASS_HDRS
 DICTINCLUDE                    = AliHLTTPCSpacePointData.h \
                                  AliHLTTPCTrackArray.h
-nodist_libAliHLTTPCDisplay_la_SOURCES  =  $(DICTCPP)
+nodist_libAliHLTTPCDisplay_la_SOURCES  =  $(COMPILE_INFO) \
+                                         $(DICTCPP)
 
 CLEANFILES                     = 
 
 include $(top_srcdir)/make.dict
+
+$(COMPILE_INFO): $(libAliHLTTPCDisplay_la_SOURCES) $(pkginclude_HEADERS) $(noinst_HEADERS) Makefile.am
+       @echo '//automatically generated compilation info' > $@
+       @echo '//!!! DO NOT EDIT THIS FILE !!!' >> $@
+       @echo '//add changes in Makefile.am' >> $@
+       @echo '#include <iostream>' >> $@
+       @echo 'void $(MODULE)CompileInfo( char*& date, char*& time)' >> $@
+       @echo '{date=__DATE__; time=__TIME__; return;}' >> $@
+       @echo >> $@
+       @echo 'extern "C" const char* __lib$(MODULE)Properties=""' >> $@
+       @echo '#if defined(HAVE_HOMERREADER)      ' >> $@
+       @echo '"HOMER"'                             >> $@
+       @echo '#endif // defined(HAVE_HOMERREADER)' >> $@
+       @echo ';'                                   >> $@
+       @echo >> $@
+       @echo 'void __init()'>> $@
+       @echo '{std::cout << "lib$(MODULE) build on " << __DATE__ << " - " << __TIME__ << std::endl;}'>> $@
index 1e7b55355dfb5800812d44c2dc978f138b2a71e3..6833bb85131043b8695363717eeb9f66ae69efce 100644 (file)
@@ -251,8 +251,8 @@ if test "x$with_pubsub" != "xno" ; then
   save_LIBS=$LIBS
   # currently the different versions of the HLT PubSub framework have a different
   # directory layout
-  if test -d ${with_pubsub}/include/HOMER/reader ; then
-    HOMER_CPPFLAGS="-I${with_pubsub}/include/HOMER/reader"
+  if test -d ${with_pubsub}/include/HOMER ; then
+    HOMER_CPPFLAGS="-I${with_pubsub}/include/HOMER -I${with_pubsub}/include/HOMER/reader"
   else
     HOMER_CPPFLAGS="-I${with_pubsub}/src/Util/HOMER/reader/include -I${with_pubsub}/src/Util/HOMER/data/include"
   fi