HLT component for writing analyzed raw data to files
authorphille <phille@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Feb 2007 12:24:54 +0000 (12:24 +0000)
committerphille <phille@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Feb 2007 12:24:54 +0000 (12:24 +0000)
HLT/PHOS/AliHLTPHOSFileWriterComponent.cxx [new file with mode: 0644]
HLT/PHOS/AliHLTPHOSFileWriterComponent.h [new file with mode: 0644]
HLT/PHOS/Makefile.am
HLT/PHOS/PeakFinderTest.cxx

diff --git a/HLT/PHOS/AliHLTPHOSFileWriterComponent.cxx b/HLT/PHOS/AliHLTPHOSFileWriterComponent.cxx
new file mode 100644 (file)
index 0000000..a6559bb
--- /dev/null
@@ -0,0 +1,54 @@
+/**************************************************************************
+ * Copyright(c) 2006, ALICE Experiment at CERN, All rights reserved.      *
+ *                                                                        *
+ * Author: Per Thomas Hille for the ALICE HLT 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.                  *
+ **************************************************************************/
+
+#include "AliHLTPHOSFileWriterComponent.h"
+
+
+AliHLTPHOSFileWriterComponent gAliHLTPHOSFileWriterComponent;
+
+AliHLTPHOSFileWriterComponent::AliHLTPHOSFileWriterComponent():AliHLTFileWriter()
+{
+  //  cout <<"AliHLTPHOSFileWriterComponent: Creating new FILEWRTER"  << endl;
+  
+} 
+
+
+AliHLTPHOSFileWriterComponent::~AliHLTPHOSFileWriterComponent()
+{
+
+}
+
+const char* 
+AliHLTPHOSFileWriterComponent::GetComponentID()
+{
+  //  cout <<"AliHLTPHOSFileWriterComponent::GetComponentID(): Returning ID"  << endl; 
+  return "PhosFileWriter";
+}
+
+AliHLTComponent* AliHLTPHOSFileWriterComponent::Spawn()
+{
+  cout <<" AliHLTPHOSFileWriterComponent::Spawn()" << endl;
+  return new AliHLTPHOSFileWriterComponent;
+}
+
+int 
+AliHLTPHOSFileWriterComponent::DoInit( int argc, const char** argv )
+{
+   cout <<" AliHLTPHOSFileWriterComponent::DoInit()" << endl;
+   return 0;
+
+}
+
+
diff --git a/HLT/PHOS/AliHLTPHOSFileWriterComponent.h b/HLT/PHOS/AliHLTPHOSFileWriterComponent.h
new file mode 100644 (file)
index 0000000..0239dc5
--- /dev/null
@@ -0,0 +1,23 @@
+#ifndef ALIHLTPHOSFILEWRITER_H
+#define ALIHLTPHOSFILEWRITER_H
+
+#include "AliHLTComponent.h"
+#include "AliHLTFileWriter.h" 
+
+/* Copyright(c) 1998-2004, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+class AliHLTPHOSFileWriterComponent : public AliHLTFileWriter
+{
+ public:
+  AliHLTPHOSFileWriterComponent();
+  ~AliHLTPHOSFileWriterComponent();
+  //  virtual AliHLTComponent* Spawn();
+  AliHLTComponent* Spawn();
+
+  int DoInit( int argc, const char** argv );
+
+  const char* GetComponentID();
+};
+
+#endif
index a03a3c0babcd001d2e1a98512ed8eaab3ad0539d..7645506b9c60fcfc1504c45c2e6215484e3efc22 100644 (file)
@@ -23,6 +23,7 @@ libAliHLTPHOS_la_SOURCES      = AliHLTPHOSPulseGenerator.cxx \
                                  AliHLTPHOSRawAnalyzerPeakFinderComponent.cxx \
                                  AliHLTPHOSDefinitions.cxx \
                                  AliHLTPHOSModuleMergerComponent.cxx \
                                  AliHLTPHOSRawAnalyzerPeakFinderComponent.cxx \
                                  AliHLTPHOSDefinitions.cxx \
                                  AliHLTPHOSModuleMergerComponent.cxx \
+                                 AliHLTPHOSFileWriterComponent.cxx \
                                  PeakFinderTest.cxx
 
 # class header files, the link definition for the root dictionary
                                  PeakFinderTest.cxx
 
 # class header files, the link definition for the root dictionary
@@ -42,6 +43,7 @@ CLASS_HDRS                    = AliHLTPHOSPulseGenerator.h \
                                  AliHLTPHOSModuleMergerComponent.h \
                                  AliHLTPHOSRcuCellEnergyDataStruct.h \
                                  AliHLTPHOSModuleCellEnergyDataStruct.h\
                                  AliHLTPHOSModuleMergerComponent.h \
                                  AliHLTPHOSRcuCellEnergyDataStruct.h \
                                  AliHLTPHOSModuleCellEnergyDataStruct.h\
+                                  AliHLTPHOSFileWriterComponent.h \
 #                                AliHLTPHOSValidCellDataStruct.h
 pkginclude_HEADERS             = $(CLASS_HDRS) \
                                  AliHLTPHOSCommonDefs.h
 #                                AliHLTPHOSValidCellDataStruct.h
 pkginclude_HEADERS             = $(CLASS_HDRS) \
                                  AliHLTPHOSCommonDefs.h
index 6bfc83b249e094b02ca91d5281e097fa6abf7687..ed88e0edbc1796330030cdecfdf85fa73b6a8b4c 100644 (file)
@@ -71,8 +71,8 @@ int main()
   
    fitPtr->SetData(data);
    fitPtr->SetSampleFreq(fs);
   
    fitPtr->SetData(data);
    fitPtr->SetSampleFreq(fs);
-   fitPtr->SetTVector(timeVector);
-   fitPtr->SetAVector(amplitudeVector);
+   fitPtr->SetTVector(timeVector, 100);
+   fitPtr->SetAVector(amplitudeVector, 100);
    //   fitPtr->Set
    fitPtr->Evaluate(start, N);
   
    //   fitPtr->Set
    fitPtr->Evaluate(start, N);